From 5babe54b466fed898dcf49fb8e6a8f3c2b5a1c66 Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Fri, 14 Apr 2023 10:20:53 -0600 Subject: [PATCH] Update more TypeScript tooling, see https://github.com/phetsims/chipper/issues/1384 --- js/common/Transpiler.js | 7 ++++++- package.json | 15 ++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/js/common/Transpiler.js b/js/common/Transpiler.js index b5a0ca761..07b8f296a 100644 --- a/js/common/Transpiler.js +++ b/js/common/Transpiler.js @@ -112,7 +112,12 @@ class Transpiler { presets: [ '../chipper/node_modules/@babel/preset-typescript', '../chipper/node_modules/@babel/preset-react' - ], sourceMaps: 'inline' + ], + sourceMaps: 'inline', + + plugins: [ + [ '@babel/plugin-proposal-decorators', { version: '2022-03' } ] + ] } ); fs.mkdirSync( path.dirname( targetPath ), { recursive: true } ); diff --git a/package.json b/package.json index 740fd6354..f1897c833 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,11 @@ "supportsOutputJS": true }, "devDependencies": { - "@babel/core": "~7.15.0", - "@babel/preset-env": "~7.15.0", - "@babel/preset-react": "~7.16.0", - "@babel/preset-typescript": "~7.16.0", + "@babel/core": "~7.21.4", + "@babel/plugin-proposal-decorators": "~7.21.0", + "@babel/preset-env": "~7.21.4", + "@babel/preset-react": "~7.18.6", + "@babel/preset-typescript": "~7.21.4", "@types/jquery": "~3.5.13", "@types/lodash": "~4.14.172", "@types/p2": "~0.7.39", @@ -23,9 +24,9 @@ "@types/three": "~0.137.0", "@types/react": "~18.0.12", "@types/react-dom": "~18.0.5", - "@typescript-eslint/parser": "~5.45.0", - "@typescript-eslint/eslint-plugin": "~5.45.0", - "@typescript-eslint/utils": "~5.45.0", + "@typescript-eslint/parser": "~5.58.0", + "@typescript-eslint/eslint-plugin": "~5.58.0", + "@typescript-eslint/utils": "~5.58.0", "archiver": "~5.3.0", "axios": "~0.21.4", "@babel/eslint-parser": "~7.19.1",