Repository navigation
TS transforms not working when source file path contains some chars #56296
Description
Activity
Cc @legendecas
- addedsource mapsIssues and PRs related to source map support.Issues and PRs related to source map support.
on Dec 17, 2024 FWIW, this is not related to this forged path. This is due to the source map generated with
--experimental-tranform-typesis invalid, like//# sourceMappingURL=data:application/json;base64,-1. Anyway, this should not crash the test runner.#56299 should fix this.
- addedtest_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
on Dec 18, 2024 I've tried pulling #56299 into #48409, there's still an issue with e.g.
test/fixtures/typescript/ts/test-get-callsite.ts, where the ability to generate a correct source map is dependent on the presence of some chars in the path.$ ./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
lineNumberis not the same, indicating I think the source map is not being generated correctly.This sounds like a separate issue from the original crash issue. Submitted #56315 to fix the generation of the invalid source map url.
Reacted by Antoine du Hamel- added a commit that references this issue
on Dec 21, 2024 - added 3 commits that reference this issue
on Jan 2, 2025
Version
mainPlatform
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