From 6198dfe2413d196152f923157dd0e5e093316703 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Wed, 8 Sep 2021 15:30:46 -0600 Subject: [PATCH] upgrade typescript independently of a larger lockfile re-roll (#967) * upgrade typescript independently of a larger lockfile re-roll * Upgrade typescript project wide --- package.json | 3 ++- packages/addon-shim/package.json | 2 +- packages/compat/package.json | 2 +- packages/core/package.json | 2 +- packages/core/src/js-handlebars.ts | 11 +++++------ packages/hbs-loader/package.json | 2 +- packages/macros/package.json | 2 +- packages/shared-internals/package.json | 2 +- packages/util/package.json | 2 +- packages/webpack/package.json | 2 +- tsconfig.json | 3 ++- yarn.lock | 10 +++++----- 12 files changed, 22 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index bffc7a533..d1546ed73 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,8 @@ "prettier": "^2.3.1", "release-it": "^14.2.1", "release-it-lerna-changelog": "^3.1.0", - "release-it-yarn-workspaces": "^2.0.0" + "release-it-yarn-workspaces": "^2.0.0", + "typescript": "4.4.2" }, "publishConfig": { "registry": "https://registry.npmjs.org" diff --git a/packages/addon-shim/package.json b/packages/addon-shim/package.json index 66594f21f..fbb47f5b9 100644 --- a/packages/addon-shim/package.json +++ b/packages/addon-shim/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "@types/semver": "^7.3.6", - "typescript": "~4.0.0", + "typescript": "*", "webpack": "^5" }, "engines": { diff --git a/packages/compat/package.json b/packages/compat/package.json index d155ca09f..a1aac4605 100644 --- a/packages/compat/package.json +++ b/packages/compat/package.json @@ -83,7 +83,7 @@ "ember-cli-htmlbars-3": "npm:ember-cli-htmlbars@3", "@glimmer/syntax": "0.80.0", "ember-engines": "^0.8.15", - "typescript": "~4.0.0" + "typescript": "*" }, "peerDependencies": { "@embroider/core": "0.44.1" diff --git a/packages/core/package.json b/packages/core/package.json index 98b76651f..3af90676c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -76,7 +76,7 @@ "@types/tmp": "^0.1.0", "fixturify": "^2.1.1", "tmp": "^0.1.0", - "typescript": "~4.0.0" + "typescript": "*" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/packages/core/src/js-handlebars.ts b/packages/core/src/js-handlebars.ts index 56ec53767..27300a73b 100644 --- a/packages/core/src/js-handlebars.ts +++ b/packages/core/src/js-handlebars.ts @@ -1,15 +1,14 @@ // This is handlebars plus helpers specifically for generating Javascript. -import { compile, registerHelper } from 'handlebars'; +import handlebars from 'handlebars'; import jsStringEscape from 'js-string-escape'; -registerHelper('js-string-escape', jsStringEscape); +handlebars.registerHelper('js-string-escape', jsStringEscape); -registerHelper('json-stringify', function (input: any, indent?: number) { +handlebars.registerHelper('json-stringify', function (input: any, indent?: number) { return JSON.stringify(input, null, indent); }); -registerHelper('eq', function (a: any, b: any) { +handlebars.registerHelper('eq', function (a: any, b: any) { return a === b; }); - -export { compile }; +export const compile = handlebars.compile; diff --git a/packages/hbs-loader/package.json b/packages/hbs-loader/package.json index 45673a95b..6d754bfb5 100644 --- a/packages/hbs-loader/package.json +++ b/packages/hbs-loader/package.json @@ -22,7 +22,7 @@ "dependencies": {}, "devDependencies": { "@types/node": "^15.12.2", - "typescript": "~4.0.0" + "typescript": "*" }, "peerDependencies": { "@embroider/core": "0.44.1", diff --git a/packages/macros/package.json b/packages/macros/package.json index 4865db0df..700cb2404 100644 --- a/packages/macros/package.json +++ b/packages/macros/package.json @@ -44,7 +44,7 @@ "@types/node": "^15.12.2", "@types/resolve": "^1.20.0", "@types/semver": "^7.3.6", - "typescript": "~4.0.0" + "typescript": "*" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/packages/shared-internals/package.json b/packages/shared-internals/package.json index 5aa8cf0a3..9a760cfff 100644 --- a/packages/shared-internals/package.json +++ b/packages/shared-internals/package.json @@ -40,7 +40,7 @@ "@types/tmp": "^0.1.0", "fixturify": "^2.1.1", "tmp": "^0.1.0", - "typescript": "~4.0.0" + "typescript": "*" }, "engines": { "node": "12.* || 14.* || >= 16" diff --git a/packages/util/package.json b/packages/util/package.json index f7e7d51ee..220b637c9 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -75,7 +75,7 @@ "prettier": "^2.2.1", "qunit": "^2.16.0", "qunit-dom": "^1.6.0", - "typescript": "~4.0.0", + "typescript": "*", "webpack": "^5" }, "engines": { diff --git a/packages/webpack/package.json b/packages/webpack/package.json index c374b649b..1084e4e02 100644 --- a/packages/webpack/package.json +++ b/packages/webpack/package.json @@ -50,7 +50,7 @@ "@types/lodash": "^4.14.170", "@types/mini-css-extract-plugin": "^1.4.3", "@types/node": "^15.12.2", - "typescript": "~4.0.0", + "typescript": "*", "webpack": "^5.38.1" }, "peerDependencies": { diff --git a/tsconfig.json b/tsconfig.json index 48eed7afb..806e5a09f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,8 @@ "experimentalDecorators": true, "allowUnreachableCode": false, "strict": true, - "skipLibCheck": true + "skipLibCheck": true, + "useUnknownInCatchVariables": false }, "exclude": [ "node_modules", diff --git a/yarn.lock b/yarn.lock index c3600cbcc..092c61d99 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17397,16 +17397,16 @@ typescript-memoize@^1.0.0-alpha.3, typescript-memoize@^1.0.1: resolved "https://registry.yarnpkg.com/typescript-memoize/-/typescript-memoize-1.0.1.tgz#0a8199aa28f6fe18517f6e9308ef7bfbe9a98d59" integrity sha512-oJNge1qUrOK37d5Y6Ly2txKeuelYVsFtNF6U9kXIN7juudcQaHJQg2MxLOy0CqtkW65rVDYuTCOjnSIVPd8z3w== +typescript@*, typescript@4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" + integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== + typescript@^4.1.5: version "4.3.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== -typescript@~4.0.0: - version "4.0.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.7.tgz#7168032c43d2a2671c95c07812f69523c79590af" - integrity sha512-yi7M4y74SWvYbnazbn8/bmJmX4Zlej39ZOqwG/8dut/MYoSQ119GY9ZFbbGsD4PFZYWxqik/XsP3vk3+W5H3og== - uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"