lib: don't parse windows drive letters as schemes#50580
lib: don't parse windows drive letters as schemes#50580nodejs-github-bot merged 3 commits intonodejs:mainfrom
Conversation
We were incorrectly parsing windows drive letters as schemes. This was polluting the source map cache with malformed file paths. Fixes: nodejs#50523
|
@bcoe @cspotcode Any thoughts? Thanks in advance. |
bcoe
left a comment
There was a problem hiding this comment.
This looks like a reasonable fix to me. I'm not a maintainer but giving my 👍
|
Hello, is anyone paying attention to this small fix? I am expecting this to be merged and backported to 18.x as soon as possible. Thank you guys. Pinging some members with source-map-cache review experience. Hope this doesn't bothers much. |
|
This looks like a trivial fix but I think it would be better to raise the issue to https://github.com/tc39/source-map-rfc as well. |
legendecas
left a comment
There was a problem hiding this comment.
LGTM with the comment change
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
|
The failure doesn't seem related to this PR. sequential.test-watch-mode-inspect was marked flaky. |
|
Thank you for your contribution! |
Commit Queue failed- Loading data for nodejs/node/pull/50580 ✔ Done loading data for nodejs/node/pull/50580 ----------------------------------- PR info ------------------------------------ Title lib: don't parse windows drive letters as schemes (#50580) Author 华 (@PaperStrike, first-time contributor) Branch PaperStrike:abs-win-path-sources -> nodejs:main Labels author ready, needs-ci, source maps Commits 3 - lib: don't parse windows drive letters as schemes - lib: typo fixes - lib: update sourcesToAbsolute comment Committers 1 - 华 PR-URL: https://github.com/nodejs/node/pull/50580 Fixes: https://github.com/nodejs/node/issues/50523 Reviewed-By: Chengzhong Wu ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/50580 Fixes: https://github.com/nodejs/node/issues/50523 Reviewed-By: Chengzhong Wu -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 06 Nov 2023 15:38:17 GMT ✔ Approvals: 1 ✔ - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/50580#pullrequestreview-1764032021 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2023-12-05T06:11:16Z: https://ci.nodejs.org/job/node-test-pull-request/56095/ - Querying data for job/node-test-pull-request/56095/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 50580 From https://github.com/nodejs/node * branch refs/pull/50580/merge -> FETCH_HEAD ✔ Fetched commits as 9def0a9f94f0..f41d75815fa4 -------------------------------------------------------------------------------- Auto-merging lib/internal/source_map/source_map_cache.js [main 6a092ac015] lib: don't parse windows drive letters as schemes Author: 华 Date: Mon Nov 6 12:22:41 2023 +0000 4 files changed, 49 insertions(+) create mode 100644 test/fixtures/source-map/ts-node-win32.js create mode 100644 test/fixtures/source-map/ts-node.ts [main 0bbf0ed739] lib: typo fixes Author: 华 Date: Sat Nov 25 10:40:29 2023 +0000 3 files changed, 4 insertions(+), 4 deletions(-) Auto-merging lib/internal/source_map/source_map_cache.js [main 6865310b7c] lib: update sourcesToAbsolute comment Author: 华 Date: Wed Nov 29 17:09:19 2023 +0000 1 file changed, 1 insertion(+) ✔ Patches applied There are 3 commits in the PR. Attempting autorebase. Rebasing (2/6)https://github.com/nodejs/node/actions/runs/7097155769 |
|
Landed in 77e3dfc |
The windows drive letters are incorrectly parsed as schemes, which pollutes the source map cache with malformed file paths.
Fixes: #50523