-
Notifications
You must be signed in to change notification settings - Fork 30k
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
TS transforms not working when source file path contains some chars #56296
Comments
Cc @legendecas |
FWIW, this is not related to this forged path. This is due to the source map generated with #56299 should fix this. |
I've tried pulling #56299 into #48409, there's still an issue with e.g. $ ./node --experimental-transform-types test/fixtures/typescript/ts/test-get-callsite.ts
getCallSite: [Object: null prototype] {
functionName: '',
scriptName: 'file://…/test/fixtures/typescript/ts/test-get-callsite.ts',
lineNumber: 8,
column: 18
}
(node:32692) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
$ cp test/fixtures/typescript/ts/test-get-callsite.ts dir%20with\ \$unusual\"chars\?\'åß∂ƒ©∆¬…\`.cts
$ ./node --experimental-transform-types dir%20with\ \$unusual\"chars\?\'åß∂ƒ©∆¬…\`.cts
getCallSite: [Object: null prototype] {
functionName: '',
scriptName: '…/dir%20with $unusual"chars?\'åß∂ƒ©∆¬…`.cts',
lineNumber: 2,
column: 18
}
(node:32814) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created) Notice the reported |
This sounds like a separate issue from the original crash issue. Submitted #56315 to fix the generation of the invalid source map url. |
When the source map data are invalid json strings, skip construct SourceMap on it. Additionally, suppress exceptions on source map lookups and fix test runners crash on invalid source maps. PR-URL: nodejs#56299 Refs: nodejs#56296 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Xuguang Mei <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Pietro Marchini <[email protected]>
Only invalidates source map lookup cache when a new source map is found. This improves when user codes interleave with builtin functions, like `array.map`. PR-URL: nodejs#56299 Refs: nodejs#56296 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Xuguang Mei <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Pietro Marchini <[email protected]>
When the source map data are invalid json strings, skip construct `SourceMap` on it. Additionally, suppress exceptions on source map lookups and fix test runners crash on invalid source maps. PR-URL: nodejs#56299 Refs: nodejs#56296 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Xuguang Mei <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Pietro Marchini <[email protected]>
Only invalidates source map lookup cache when a new source map is found. This improves when user codes interleave with builtin functions, like `array.map`. PR-URL: nodejs#56299 Refs: nodejs#56296 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Xuguang Mei <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Pietro Marchini <[email protected]>
`btoa` only supports latin-1 charset and produces invalid source mapping urls. PR-URL: #56315 Refs: #56296 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Version
main
Platform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Required condition: source file path contains some special chars (not sure which)
What is the expected behavior? Why is that the expected behavior?
It should not throw
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: