-
Notifications
You must be signed in to change notification settings - Fork 461
refactor: deprecate transform option isolatedModules
#4709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3666ed2
to
9510777
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This pull request refactors the code by deprecating the transform option "isolatedModules" in favor of using TypeScript’s native isolatedModules support. In addition, it updates various Jest configuration files to reference new tsconfig filenames and replaces the legacy commitlint.config.js file with a TypeScript version.
- Removed "isolatedModules" options from Jest transformer configurations
- Updated tsconfig file paths to use the new "-transpiler" variants
- Replaced commitlint.config.js with commitlint.config.ts for improved type safety
Reviewed Changes
File | Description |
---|---|
commitlint.config.ts | Introduces a TypeScript commitlint configuration with type annotations |
e2e/enum/jest-transpiler-cjs.config.ts | Updates tsconfig path and removes unsupported isolatedModules option |
e2e/presets/jest-transpiler-cjs.config.ts | Updates tsconfig path and removes unsupported isolatedModules option |
e2e/const-enum/jest-transpiler-cjs.config.ts | Updates tsconfig path and removes unsupported isolatedModules option |
e2e/hoist-jest/jest-transpiler-cjs.config.ts | Updates tsconfig path and removes unsupported isolatedModules option |
e2e/enum/jest-transpiler-esm.config.ts | Updates tsconfig path and removes unsupported isolatedModules option (with useESM) |
e2e/const-enum/jest-transpiler-esm.config.ts | Updates tsconfig path and removes unsupported isolatedModules option (with useESM) |
e2e/extend-ts-jest/jest-transpiler-esm.config.ts | Updates tsconfig path and removes unsupported isolatedModules option (with useESM) |
e2e/esm-features/jest-transpiler-esm.config.ts | Updates tsconfig path and removes unsupported isolatedModules option (with useESM) |
e2e/extend-ts-jest/jest-transpiler-cjs.config.ts | Updates tsconfig path and removes unsupported isolatedModules option |
e2e/esm-features/jest-compiler-esm.config.ts | Updates tsconfig path and removes unsupported isolatedModules option (with useESM) |
commitlint.config.js | Deleted in favor of the new commitlint.config.ts |
Copilot reviewed 81 out of 81 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (11)
e2e/enum/jest-transpiler-cjs.config.ts:8
- The 'isolatedModules: true' option has been removed; please ensure that '/tsconfig-cjs-transpiler.spec.json' includes all necessary settings to correctly handle module isolation.
- isolatedModules: true,
e2e/presets/jest-transpiler-cjs.config.ts:8
- After removing 'isolatedModules: true', verify that '/tsconfig-cjs-transpiler.spec.json' is properly configured to replace its functionality.
- isolatedModules: true,
e2e/const-enum/jest-transpiler-cjs.config.ts:8
- Ensure that the new tsconfig file '/tsconfig-cjs-transpiler.spec.json' compensates for the removed 'isolatedModules' option in this configuration.
- isolatedModules: true,
e2e/hoist-jest/jest-transpiler-cjs.config.ts:8
- Verify that '/tsconfig-cjs-transpiler.spec.json' is correctly set up given that the 'isolatedModules' flag has been removed.
- isolatedModules: true,
e2e/enum/jest-transpiler-esm.config.ts:8
- Since 'isolatedModules' has been removed, confirm that '/tsconfig-esm-transpiler.spec.json' properly handles module isolation along with the useESM setting.
- isolatedModules: true,
e2e/const-enum/jest-transpiler-esm.config.ts:8
- After removing the deprecated option, ensure that '/tsconfig-esm-transpiler.spec.json' is configured to deliver the same module processing behavior.
- isolatedModules: true,
e2e/extend-ts-jest/jest-transpiler-esm.config.ts:8
- Make sure that the new tsconfig '/tsconfig-esm-transpiler.spec.json' covers the configuration previously provided by the removed isolatedModules flag.
- isolatedModules: true,
e2e/esm-features/jest-transpiler-esm.config.ts:8
- Confirm that '/tsconfig-esm-transpiler.spec.json' is properly set up to replace 'isolatedModules: true' since the option has been removed.
- isolatedModules: true,
e2e/extend-ts-jest/jest-transpiler-cjs.config.ts:8
- Review the new tsconfig file '/tsconfig-cjs-transpiler.spec.json' to ensure that it covers any behaviors previously enabled by 'isolatedModules: true'.
- isolatedModules: true,
e2e/esm-features/jest-compiler-esm.config.ts:8
- Since the tsconfig has been updated to '/tsconfig-esm-transpiler.spec.json', verify that all necessary compiler options are properly defined in the new configuration, given the removal of the 'isolatedModules' flag.
- tsconfig: '<rootDir>/tsconfig-esm.spec.json',
commitlint.config.js:1
- The legacy commitlint.config.js file has been removed in favor of commitlint.config.ts; please ensure that build scripts and tooling references are updated accordingly.
-module.exports = {
Pull Request Test Coverage Report for Build 13709738379Details
💛 - Coveralls |
Deprecate the option in favor of https://www.typescriptlang.org/tsconfig/#isolatedModules
9510777
to
0abc0f3
Compare
Summary
Deprecate in favor of TypeScript isolatedModules
Test plan
Green CI
Does this PR introduce a breaking change?
Other information
N.A.