From 6a4ec6a859930769a2ad2f8989e81529e6a62043 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Wed, 21 Jul 2021 15:56:31 -0400 Subject: [PATCH] fix unrelated test breakage --- package-lock.json | 14 +++++++------- package.json | 2 +- src/test/index.spec.ts | 5 +++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index f6b779fe9..546f5d6cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.1", + "@tsconfig/node16": "^1.0.2", "arg": "^4.1.0", "create-require": "^1.1.0", "diff": "^4.0.1", @@ -1086,9 +1086,9 @@ "integrity": "sha512-RKkL8eTdPv6t5EHgFKIVQgsDapugbuOptNd9OOunN/HAkzmmTnZELx1kNCK0rSdUYGmiFMM3rRQMAWiyp023LQ==" }, "node_modules/@tsconfig/node16": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.1.tgz", - "integrity": "sha512-FTgBI767POY/lKNDNbIzgAX6miIDBs6NTCbdlDb8TrWovHsSvaVIZDlTqym29C6UqhzwcJx4CYr+AlrMywA0cA==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" }, "node_modules/@types/argparse": { "version": "1.0.38", @@ -7255,9 +7255,9 @@ "integrity": "sha512-RKkL8eTdPv6t5EHgFKIVQgsDapugbuOptNd9OOunN/HAkzmmTnZELx1kNCK0rSdUYGmiFMM3rRQMAWiyp023LQ==" }, "@tsconfig/node16": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.1.tgz", - "integrity": "sha512-FTgBI767POY/lKNDNbIzgAX6miIDBs6NTCbdlDb8TrWovHsSvaVIZDlTqym29C6UqhzwcJx4CYr+AlrMywA0cA==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" }, "@types/argparse": { "version": "1.0.38", diff --git a/package.json b/package.json index d7872b0f8..c28492c17 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,7 @@ "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.1", + "@tsconfig/node16": "^1.0.2", "arg": "^4.1.0", "create-require": "^1.1.0", "diff": "^4.0.1", diff --git a/src/test/index.spec.ts b/src/test/index.spec.ts index c8c8a7e4b..e3de30b41 100644 --- a/src/test/index.spec.ts +++ b/src/test/index.spec.ts @@ -1248,6 +1248,7 @@ test.suite('ts-node', (test) => { semver.gte(ts.version, '3.5.0') && semver.gte(process.versions.node, '14.0.0') ) { + const libAndTarget = semver.gte(process.versions.node, '16.0.0') ? 'es2021' : 'es2020'; test('implicitly uses @tsconfig/node14 or @tsconfig/node16 compilerOptions when both TS and node versions support it', async (t) => { // node14 and node16 configs are identical, hence the "or" const { @@ -1261,8 +1262,8 @@ test.suite('ts-node', (test) => { expect(err1).to.equal(null); t.like(JSON.parse(stdout1), { compilerOptions: { - target: 'es2020', - lib: ['es2020'], + target: libAndTarget, + lib: [libAndTarget], }, }); const {