Skip to content

Commit 7dfef71

Browse files
committed
refactor: deprecate transform option isolatedModules
Deprecate the option in favor of https://www.typescriptlang.org/tsconfig/#isolatedModules
1 parent 3ed6a4f commit 7dfef71

File tree

80 files changed

+348
-86
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+348
-86
lines changed

e2e/const-enum/jest-transpiler-cjs.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export default {
66
[TS_JS_TRANSFORM_PATTERN]: [
77
'ts-jest',
88
{
9-
tsconfig: '<rootDir>/tsconfig-cjs.spec.json',
10-
isolatedModules: true,
9+
tsconfig: '<rootDir>/tsconfig-cjs-transpiler.spec.json',
1110
},
1211
],
1312
},

e2e/const-enum/jest-transpiler-esm.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export default {
77
[TS_JS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/tsconfig-esm.spec.json',
11-
isolatedModules: true,
10+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1211
useESM: true,
1312
},
1413
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-cjs.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true,
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-esm.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true,
5+
}
6+
}

e2e/enum/jest-transpiler-cjs.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export default {
66
[ESM_TS_JS_TRANSFORM_PATTERN]: [
77
'ts-jest',
88
{
9-
tsconfig: '<rootDir>/tsconfig-cjs.spec.json',
10-
isolatedModules: true,
9+
tsconfig: '<rootDir>/tsconfig-cjs-transpiler.spec.json',
1110
},
1211
],
1312
},

e2e/enum/jest-transpiler-esm.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export default {
77
[TS_JS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/tsconfig-esm.spec.json',
11-
isolatedModules: true,
10+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1211
useESM: true,
1312
},
1413
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-cjs.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-esm.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}

e2e/esm-features/jest-compiler-esm.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
[TS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/tsconfig-esm.spec.json',
10+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1111
useESM: true,
1212
},
1313
],

e2e/esm-features/jest-transpiler-esm.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export default {
77
[TS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/tsconfig-esm.spec.json',
11-
isolatedModules: true,
10+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1211
useESM: true,
1312
},
1413
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-esm.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}

e2e/extend-ts-jest/jest-transpiler-cjs.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export default {
66
[TS_JS_TRANSFORM_PATTERN]: [
77
'ts-jest',
88
{
9-
tsconfig: '<rootDir>/tsconfig-cjs.spec.json',
10-
isolatedModules: true,
9+
tsconfig: '<rootDir>/tsconfig-cjs-transpiler.spec.json',
1110
},
1211
],
1312
},

e2e/extend-ts-jest/jest-transpiler-esm.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export default {
77
[TS_JS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/tsconfig-esm.spec.json',
11-
isolatedModules: true,
10+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1211
useESM: true,
1312
},
1413
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-cjs.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-esm.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}

e2e/hoist-jest/jest-transpiler-cjs.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export default {
66
[TS_JS_TRANSFORM_PATTERN]: [
77
'ts-jest',
88
{
9-
tsconfig: '<rootDir>/tsconfig-cjs.spec.json',
10-
isolatedModules: true,
9+
tsconfig: '<rootDir>/tsconfig-cjs-transpiler.spec.json',
1110
},
1211
],
1312
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-cjs.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}

e2e/presets/jest-transpiler-cjs.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export default {
66
[TS_JS_TRANSFORM_PATTERN]: [
77
'ts-jest',
88
{
9-
tsconfig: '<rootDir>/tsconfig-cjs.spec.json',
10-
isolatedModules: true,
9+
tsconfig: '<rootDir>/tsconfig-cjs-transpiler.spec.json',
1110
},
1211
],
1312
},

e2e/presets/jest-transpiler-esm.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export default {
77
[TS_JS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/tsconfig-esm.spec.json',
11-
isolatedModules: true,
10+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1211
useESM: true,
1312
},
1413
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-cjs.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-esm.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}

e2e/source-map/jest-transpiler-cjs.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export default {
66
[TS_TRANSFORM_PATTERN]: [
77
'ts-jest',
88
{
9-
tsconfig: '<rootDir>/../tsconfig-cjs.spec.json',
10-
isolatedModules: true,
9+
tsconfig: '<rootDir>/tsconfig-cjs-transpiler.spec.json',
1110
},
1211
],
1312
},

e2e/source-map/jest-transpiler-esm.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export default {
77
[TS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/../tsconfig-esm.spec.json',
11-
isolatedModules: true,
10+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1211
useESM: true,
1312
},
1413
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../tsconfig-cjs.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../tsconfig-esm.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}

e2e/test-utils/jest-transpiler-cjs.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export default {
66
[TS_TRANSFORM_PATTERN]: [
77
'ts-jest',
88
{
9-
tsconfig: '<rootDir>/../tsconfig-cjs.spec.json',
10-
isolatedModules: true,
9+
tsconfig: '<rootDir>/tsconfig-cjs-transpiler.spec.json',
1110
},
1211
],
1312
},

e2e/test-utils/jest-transpiler-esm.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export default {
77
[TS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/../tsconfig-esm.spec.json',
11-
isolatedModules: true,
10+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1211
useESM: true,
1312
},
1413
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../tsconfig-cjs.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../tsconfig-esm.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}

e2e/transform-js/jest-transpiler-cjs.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export default {
66
[ESM_TS_JS_TRANSFORM_PATTERN]: [
77
'ts-jest',
88
{
9-
tsconfig: '<rootDir>/tsconfig-cjs.spec.json',
10-
isolatedModules: true,
9+
tsconfig: '<rootDir>/tsconfig-cjs-transpiler.spec.json',
1110
},
1211
],
1312
},

e2e/transform-js/jest-transpiler-esm.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export default {
77
[TS_JS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/tsconfig-esm.spec.json',
11-
isolatedModules: true,
10+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1211
useESM: true,
1312
},
1413
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-cjs.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-esm.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}

e2e/transform-tsx/jest-transpiler-cjs.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export default {
77
[TS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/tsconfig-cjs.spec.json',
11-
isolatedModules: true,
10+
tsconfig: '<rootDir>/tsconfig-cjs-transpiler.spec.json',
1211
},
1312
],
1413
},

e2e/transform-tsx/jest-transpiler-esm.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ export default {
88
[TS_TRANSFORM_PATTERN]: [
99
'ts-jest',
1010
{
11-
tsconfig: '<rootDir>/tsconfig-esm.spec.json',
12-
isolatedModules: true,
11+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1312
useESM: true,
1413
},
1514
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-cjs.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig-esm.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}

e2e/transformer-in-ts/jest-transpiler-cjs.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ export default {
66
[TS_TRANSFORM_PATTERN]: [
77
'ts-jest',
88
{
9-
tsconfig: '<rootDir>/../tsconfig-cjs.spec.json',
9+
tsconfig: '<rootDir>/tsconfig-cjs-transpiler.spec.json',
1010
astTransformers: {
1111
before: [
1212
{
1313
path: '<rootDir>/../../src/transformers/hoist-jest.ts',
1414
},
1515
],
1616
},
17-
isolatedModules: true,
1817
},
1918
],
2019
},

e2e/transformer-in-ts/jest-transpiler-esm.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ export default {
77
[TS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/../tsconfig-esm.spec.json',
10+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1111
astTransformers: {
1212
before: [
1313
{
1414
path: '<rootDir>/../../src/transformers/hoist-jest.ts',
1515
},
1616
],
1717
},
18-
isolatedModules: true,
1918
useESM: true,
2019
},
2120
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../tsconfig-cjs.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../tsconfig-esm.spec.json",
3+
"compilerOptions": {
4+
"isolatedModules": true
5+
}
6+
}

e2e/transformer-options/jest-transpiler-cjs.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
[TS_TRANSFORM_PATTERN]: [
88
'ts-jest',
99
{
10-
tsconfig: '<rootDir>/tsconfig-cjs.spec.json',
10+
tsconfig: '<rootDir>/tsconfig-cjs-transpiler.spec.json',
1111
astTransformers: {
1212
before: [
1313
{
@@ -18,7 +18,6 @@ export default {
1818
},
1919
],
2020
},
21-
isolatedModules: true,
2221
},
2322
],
2423
},

e2e/transformer-options/jest-transpiler-esm.config.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
[TS_TRANSFORM_PATTERN]: [
99
'ts-jest',
1010
{
11-
tsconfig: '<rootDir>/tsconfig-esm.spec.json',
11+
tsconfig: '<rootDir>/tsconfig-esm-transpiler.spec.json',
1212
astTransformers: {
1313
before: [
1414
{
@@ -19,7 +19,6 @@ export default {
1919
},
2020
],
2121
},
22-
isolatedModules: true,
2322
useESM: true,
2423
},
2524
],

0 commit comments

Comments
 (0)