-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
10.8.1 regression - URL polluting relative file path #1790
10.8.1 regression - URL polluting relative file path #1790
Comments
To confirm: file URIs in sourcemaps should be acceptable, right? I believe they are a part of the spec, and in fact, using native paths might be less spec compliant. Is this a case where ts-node is doing something wrong, or is it that nyc is failing to understand file URIs? I don't know the answer but I think we'll need to figure that out before choosing a course of action. |
Same issue on our end. Thanks for reporting @Jason3S |
Additionally, can someone create a minimal reproducible example? Will help to get this resolved quicker. |
Please check with https://github.com/istanbuljs/istanbuljs to see if they support file URIs in sourcemaps. This may be a bug on their end. Regardless of what they say, asking will help get this resolved sooner. Specifically, I think the relevant library is istanbul-lib-source-maps: https://github.com/istanbuljs/istanbuljs/tree/master/packages/istanbul-lib-source-maps |
What real-world-problem was PR #1771 solving? I understand that it was putting Since this is a breaking change, putting it behind a command-line switch would be a way to move forwards without breaking legacy libraries like nyc and istanbul. The spec is a bit vague when it comes to URLs: https://sourcemaps.info/spec.html
So, I can understand if the Istanbul implementation doesn't handle absolute URLs in the map. Reading it, you could infer that |
It was solving this bug: #1769
We don't use that at all; we have our own source-mapping implementation. Node's source-map stuff has bugs, limitations, and performance issues. Hopefully the situation will improve in the future, but it's not there yet. But just to be totally clear, we are not using that node feature.
The intention was for it to not be breaking. Either we're triggering a bug in nyc, or we have a bug ourselves. This depends on if the sourcemaps we're generating are fully spec-compliant. As reported in #1769, putting The pragmatic solution may very well be for us to make a change on our end either way. But I want to be clear that this is not a breaking change in semver terms.
I think in our case, Have you raised this with the istanbul team to see what they say? |
I do see what you mean about #1769 using that experimental node feature. Happy to keep discussing and work towards a fix; my response above was written pretty quickly. Will await your reply. |
This issue seems related to an issue I just encountered with 10.8.1 (10.8.0 works fine): |
Thanks @CharlesSwiftConnect , can you share a few more details in a new ticket? I'll link it to this one; just helps having reproductions and subsequent investigation in their own tickets. |
same problem +1 |
This avoids issue introduced in ts-node 10.8.1 (see TypeStrong/ts-node#1790) and manifesting itself file URLs polluting relative file paths and preventing NYC from producing code coverage reports (see istanbuljs/nyc#1473)
Not to pile on, but +1. This has broken our builds because nyc creates "file:" folders in the coverage output and actions/upload-artifact fails due to the colon in the folder name |
It seems that the change is about to be rolled back: #1797 (comment) |
Glad to know other people hit this. Just spent all morning trying to figure out how these Like @jdforsythe mentions, this breaks artifact uploads; Azure DevOps in our case. e.g.
|
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ts-node](https://typestrong.org/ts-node) ([source](https://github.com/TypeStrong/ts-node)) | devDependencies | patch | [`10.8.1` -> `10.8.2`](https://renovatebot.com/diffs/npm/ts-node/10.8.1/10.8.2) | --- ### Release Notes <details> <summary>TypeStrong/ts-node</summary> ### [`v10.8.2`](https://github.com/TypeStrong/ts-node/releases/tag/v10.8.2) [Compare Source](TypeStrong/ts-node@v10.8.1...v10.8.2) **Fixed** - Revert "Use file URL for source map paths" ([#​1821](TypeStrong/ts-node#1821)) [@​cspotcode](https://github.com/cspotcode) - Fixes [#​1790](TypeStrong/ts-node#1790): ts-node 10.8.1 regression where `nyc` code coverage reports had incorrect paths - Fixes [#​1797](TypeStrong/ts-node#1797): ts-node 10.8.1 regression where breakpoints did not hit in VSCode debugging - Allow JSON imports in node 16.15 and up ([#​1792](TypeStrong/ts-node#1792)) [@​queengooborg](https://github.com/queengooborg) - JSON imports were already supported in v17.5 and up - this change extends support to >=16.15.0,<17.0.0 - These version ranges match vanilla node's support for JSON imports https://github.com/TypeStrong/ts-node/milestone/15?closed=1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Co-authored-by: cabr2-bot <[email protected]> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1446 Reviewed-by: Epsilon_02 <[email protected]> Co-authored-by: Calciumdibromid Bot <[email protected]> Co-committed-by: Calciumdibromid Bot <[email protected]>
When upgrading from 10.8.0 to 10.8.1, coverage reports started breaking.
10.8.0
10.8.1
I think this is related to Use file URL for source map paths by PaperStrike · Pull Request #1771 · TypeStrong/ts-node
Search Terms
Expected Behavior
That generating coverage reports still work.
Actual Behavior
Coverage reports are broken because they contain an absolute URL.
Steps to reproduce the problem
GitHub Repo: Jason3S/rx-stream
Minimal reproduction
Specifications
The text was updated successfully, but these errors were encountered: