Skip to content
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

Normalize paths when looking up items on outputCache #1038

Merged
merged 2 commits into from
May 13, 2020

Conversation

cspotcode
Copy link
Collaborator

@cspotcode cspotcode commented May 12, 2020

Fixes #1037

  • add regression test. Intentionally throw an error, assert that the line number is correct

@coveralls
Copy link

coveralls commented May 12, 2020

Coverage Status

Coverage remained the same at 81.137% when pulling f588826 on ab/fix-source-maps-on-windows into 2397f3a on master.

@cspotcode
Copy link
Collaborator Author

The failures look like a mistake in how I set up the CI stuff. I need to mark those Coveralls - run-* executions as not affecting the CI success/failure.

@cspotcode
Copy link
Collaborator Author

Results of manual, local test, using the reproduction from #1037. Line number is correct.

Since our build script spits out a tarball now, this made it easy to switch from Linux to Windows, install the tarball, and test.

D:\Personal-dev\@TypeStrong\ts-node-repros\1037>npm install ..\..\ts-node\tests\ts-node-packed.tgz
npm WARN 1037 No repository field.
npm WARN 1037 No license field.

+ ts-node@8.10.1
updated 1 package and audited 9 packages in 1.053s
found 0 vulnerabilities


D:\Personal-dev\@TypeStrong\ts-node-repros\1037>.\node_modules\.bin\ts-node.cmd .\example.ts

D:\Personal-dev\@TypeStrong\ts-node-repros\1037\example.ts:8
    throw new Error("aaa")
          ^
Error: aaa
    at main (D:\Personal-dev\@TypeStrong\ts-node-repros\1037\example.ts:8:11)
    at Object.<anonymous> (D:\Personal-dev\@TypeStrong\ts-node-repros\1037\example.ts:17:3)
    at Module._compile (internal/modules/cjs/loader.js:1185:30)
    at Module.m._compile (D:\Personal-dev\@TypeStrong\ts-node-repros\1037\node_modules\ts-node\src\index.ts:858:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
    at Object.require.extensions.<computed> [as .ts] (D:\Personal-dev\@TypeStrong\ts-node-repros\1037\node_modules\ts-node\src\index.ts:861:12)
    at Module.load (internal/modules/cjs/loader.js:1034:32)
    at Function.Module._load (internal/modules/cjs/loader.js:923:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at main (D:\Personal-dev\@TypeStrong\ts-node-repros\1037\node_modules\ts-node\src\bin.ts:227:14)

D:\Personal-dev\@TypeStrong\ts-node-repros\1037>

@cspotcode cspotcode force-pushed the ab/fix-source-maps-on-windows branch from 4f43556 to f588826 Compare May 12, 2020 17:58
@cspotcode
Copy link
Collaborator Author

I wasn't 100% sure that the sourcemap tests were proving that line numbers are correct. So I added a silly amount of whitespace to be sure.

@cspotcode cspotcode merged commit 907935c into master May 13, 2020
@cspotcode cspotcode deleted the ab/fix-source-maps-on-windows branch May 17, 2020 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source maps broken under Windows since 8.10.0 (ESM support)
3 participants