-
-
Notifications
You must be signed in to change notification settings - Fork 611
feat(typescript): process .js when allowJs is enabled #1920
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
Merged
shellscape
merged 16 commits into
master
from
ai-1896-rollup-plugin-typescript-doesn-t-properly-
Oct 22, 2025
Merged
Changes from 2 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
41d677e
feat(typescript): honor allowJs and transform .js files\n\n- Expand d…
CharlieHelps 7e8812d
feat(typescript): auto-include JS when allowJs is set; use temp outDi…
CharlieHelps 2fa02de
fix(typescript): exclude effective outDir from filter to avoid re-pro…
CharlieHelps ea9aedb
fix(typescript): use path.relative for robust outDir containment check
CharlieHelps 777d3bc
test(typescript): add regression ensuring user-configured outDir is e…
CharlieHelps f110caa
fix(typescript): gate temp outDir cleanup to non-watch; cleanup in cl…
CharlieHelps fe8e253
test(typescript): harden user outDir exclusion test (robust path chec…
CharlieHelps 96aa8db
fix(typescript): robust outDir containment; gate temp outDir cleanup …
CharlieHelps 0e1303f
test(typescript): make isInside helper treat equal path as inside; mi…
CharlieHelps a906b37
test(typescript): remove REBUILD_WITH_WATCH_OFF from incremental-watc…
CharlieHelps 3734281
fix(typescript): guard string-only filterRoot base; close watch progr…
CharlieHelps 3832864
fix(typescript): normalize Windows drive roots in containment; exclud…
CharlieHelps f52946a
docs(typescript): note default node_modules exclusion when allowJs ex…
CharlieHelps e1fa4f0
fix(typescript): default filter resolve to cwd when rootDir unset\n\n…
CharlieHelps 9012668
refactor(typescript): centralize temp outDir cleanup into a helper
CharlieHelps 933f6cd
refactor(typescript): unify program close + temp outDir cleanup via h…
CharlieHelps File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/typescript/test/fixtures/allow-js-downlevel/src/main.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| export default function run() { | ||
| const obj = { prop: { nested: 1 } }; | ||
| const a = obj.prop?.nested; | ||
| const b = {}; | ||
| b.timeout ??= 123; | ||
| return [a, b.timeout]; | ||
| } |
10 changes: 10 additions & 0 deletions
10
packages/typescript/test/fixtures/allow-js-downlevel/tsconfig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "allowJs": true, | ||
| "checkJs": false, | ||
| "target": "ES2018", | ||
| "module": "ESNext", | ||
| "lib": ["es6"] | ||
| }, | ||
| "include": ["src/**/*"] | ||
| } |
5 changes: 5 additions & 0 deletions
5
packages/typescript/test/fixtures/allow-js-from-ts/src/main.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import util from './util.js'; | ||
|
|
||
| export default function main() { | ||
| return util(); | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/typescript/test/fixtures/allow-js-from-ts/src/util.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| export default function util() { | ||
| const obj = { prop: { nested: 7 } }; | ||
| const a = obj.prop?.nested; | ||
| const c = {}; | ||
| c.timeout ??= 9; | ||
| return [a, c.timeout]; | ||
| } |
9 changes: 9 additions & 0 deletions
9
packages/typescript/test/fixtures/allow-js-from-ts/tsconfig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "allowJs": true, | ||
| "checkJs": false, | ||
| "target": "ES2018", | ||
| "module": "ESNext" | ||
| }, | ||
| "include": ["src/**/*"] | ||
| } |
2 changes: 1 addition & 1 deletion
2
packages/typescript/test/fixtures/incremental-single/tsconfig.tsbuildinfo
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.