Commit 70ee0c2
committed
feat: add .ts extensions to all relative imports for rewriteRelativeImportExtensions
Migrates all relative import/export specifiers across the repo to include
explicit .ts/.tsx file extensions. This enables TypeScript's
rewriteRelativeImportExtensions compiler option to produce correct .js
extensions in compiled output, fixing ESM resolution under Node.js.
Also includes:
- heft-typescript-plugin: inject rewriteRelativeImportExtensions and
allowImportingTsExtensions in tsconfigLoader; enhance wrapWriteFile
to rewrite .js specifiers when jsExtensionOverride is set; remove
the old addJsExtensionToImports approach
- ESLint import/extensions rule added to local-eslint-config
- ESLint rule disabled for ts-loader and composite-test projects
- require() calls use .js extensions (not rewritten by TS)
- esm-node-import-test: new build-test validating ESM imports work
- rush.json: register esm-node-import-test project
Fixes #56441 parent 2281b23 commit 70ee0c2
File tree
1,097 files changed
+3912
-3745
lines changed- apps
- api-documenter/src
- cli
- documenters
- markdown
- test
- nodes
- plugin
- utils
- test
- api-extractor/src
- aedoc
- analyzer
- test
- api
- test
- cli
- collector
- enhancers
- generators
- test
- cpu-profile-summarizer/src
- heft/src
- cli
- actions
- configuration
- operations/runners
- pluginFramework
- logging
- tests
- plugins
- utilities
- test
- lockfile-explorer-web/src
- components/ConnectionModal
- containers
- BookmarksSidebar
- LockfileEntryDetailsView
- LockfileViewer
- PackageJsonViewer
- SelectedEntryPreview
- helpers
- parsing
- test
- store
- slices
- lockfile-explorer/src
- cli
- explorer
- lint
- actions
- graph
- test
- utils
- playwright-browser-tunnel
- src
- tunneledBrowserConnection
- tests
- rundown/src
- cli
- rush-mcp-server/src
- pluginFramework
- tools
- rush/src
- test
- trace-import/src
- zipsync/src
- cli
- test
- build-tests-samples
- heft-node-jest-tutorial/src/guide
- 02-manual-mock
- heft-serverless-stack-tutorial/src
- stacks
- test
- heft-storybook-v6-react-tutorial/src
- test
- heft-storybook-v9-react-tutorial/src
- test
- heft-web-rig-app-tutorial/src
- heft-web-rig-library-tutorial/src
- test
- heft-webpack-basic-tutorial/src
- test
- packlets-tutorial/src
- packlets
- data-model
- logging
- reports
- build-tests
- api-documenter-test/src
- api-extractor-scenarios
- etc
- bundlerModuleResolution
- dynamicImportType
- src
- ambientNameConflict2
- ambientNameConflict
- apiItemKinds
- bundlerModuleResolution
- circularImport2
- circularImport
- docReferencesAlias
- docReferencesNamespaceAlias
- renamed
- sub
- dynamicImportType
- exportImportStarAs2
- exportImportStarAs3
- exportImportStarAs
- exportImportedExternalDefault
- exportStar2
- exportStar3
- exportStarAs2
- exportStarAs3
- exportStarAs
- exportStar
- includeForgottenExports
- namedDefaultImport
- namespaceImports2
- namespaceImports
- referenceTokens
- api-extractor-test-01/src
- ReexportedClass3
- api-extractor-test-02/src
- api-extractor-test-04/src
- api-extractor-test-05/dist
- hashed-folder-copy-plugin-webpack5-test/src
- heft-jest-preset-test/src/test
- heft-jest-reporters-test/src/test
- heft-minimal-rig-usage-test/src/test
- heft-rspack-everything-test/src/test
- heft-sass-test/src
- test
- heft-typescript-composite-test
- heft-web-rig-library-test/src/test
- heft-webpack4-everything-test/src/test
- heft-webpack5-everything-test/src/test
- localization-plugin-test-01
- src
- localization-plugin-test-02
- src
- localization-plugin-test-03
- src
- rush-mcp-example-plugin/src
- rush-package-manager-integration-test/src
- eslint
- eslint-patch/src
- eslint-bulk-suppressions
- cli
- utils
- exports
- eslint-plugin-packlets/src
- test
- eslint-plugin-security/src
- test
- eslint-plugin/src
- test
- heft-plugins
- heft-api-extractor-plugin/src
- heft-isolated-typescript-transpile-plugin/src
- heft-jest-plugin/src
- exports
- test
- heft-json-schema-typings-plugin/src
- test
- heft-lint-plugin/src
- test
- heft-rspack-plugin/src
- heft-sass-plugin/src
- heft-typescript-plugin/src
- heft-vscode-extension-plugin/src
- heft-webpack4-plugin/src
- heft-webpack5-plugin/src
- test
- libraries
- api-extractor-model/src
- items
- mixins
- model
- credential-cache/src
- test
- debug-certificate-manager/src
- heft-config-file/src
- test
- load-themed-styles/src/test
- localization-utilities/src
- parsers
- test
- test
- lookup-by-path/src
- test
- module-minifier/src
- test
- node-core-library/src
- disposables
- objects
- test
- test
- user
- npm-check-fork/src
- interfaces
- tests
- operation-graph/src
- test
- package-deps-hash/src
- test
- package-extractor/src
- scripts/createLinks
- cli
- actions
- utilities
- test
- problem-matcher/src
- test
- rig-package/src
- test
- rush-lib/src
- api
- packageManager
- test
- cli
- actions
- test
- parsing
- test
- scriptActions
- test
- rush-mock-flush-telemetry-plugin
- logic
- base
- buildCache
- test
- cobuild
- test
- deploy
- incremental
- test
- installManager
- npm
- operations
- test
- pnpm
- test
- policy
- selectors
- test
- setup
- test
- versionMismatch
- yarn
- pluginFramework
- PluginLoader
- scripts
- utilities
- test
- rush-pnpm-kit-v10/src
- rush-pnpm-kit-v8/src
- rush-pnpm-kit-v9/src
- rush-sdk/src
- rush-themed-ui/src
- components/Button
- rushell/src
- test
- stream-collator/src
- test
- terminal/src
- test
- tree-pattern/src
- ts-command-line/src
- parameters
- providers
- test
- test-cli
- typings-generator/src
- test
- worker-pool/src
- repo-scripts
- doc-plugin-rush-stack/src
- repo-toolbox/src
- cli
- rush-plugins
- rush-amazon-s3-build-cache-plugin/src
- test
- rush-azure-storage-build-cache-plugin/src
- test
- rush-bridge-cache-plugin/src
- rush-buildxl-graph-plugin/src
- test
- rush-http-build-cache-plugin/src
- test
- rush-litewatch-plugin/src
- test
- rush-mcp-docs-plugin/src
- rush-redis-cobuild-plugin/src
- test
- rush-resolver-cache-plugin/src
- test
- rush-serve-plugin/src
- vscode-extensions
- debug-certificate-manager-vscode-extension/src
- rush-vscode-command-webview/src
- ControlledFormComponents
- Message
- ParameterView
- ParameterForm
- ProjectView
- Toolbar
- hooks
- store
- hooks
- slices
- rush-vscode-extension/src
- logic
- providers
- test/suite
- webpack
- hashed-folder-copy-plugin/src
- test
- loader-load-themed-styles/src
- test
- loader-raw-script/src
- test
- preserve-dynamic-require-plugin/src
- set-webpack-public-path-plugin/src
- test
- webpack-deep-imports-plugin/src
- webpack-embedded-dependencies-plugin/src
- test
- webpack-plugin-utilities/src
- webpack-workspace-resolve-plugin/src
- test
- webpack4-localization-plugin/src
- loaders
- webpack4-module-minifier-plugin/src
- test
- workerPool
- webpack5-load-themed-styles-loader/src/test
- webpack5-localization-plugin/src
- loaders
- test
- webpack5-module-minifier-plugin/src
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1,097 files changed
+3912
-3745
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 13 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments