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

register-hook-require entry point #257

Merged
merged 1 commit into from Nov 19, 2021

Conversation

brettz9
Copy link
Contributor

@brettz9 brettz9 commented Oct 22, 2019

Provide a source-map-support/register-hook-require entry-point (fixes #239)

@brettz9
Copy link
Contributor Author

brettz9 commented Oct 22, 2019

Btw, off topic, but just a heads up that on my local machine (Mac) after a local npm i, none of the server-based tests worked in Firefox, and on Chrome the test at http://127.0.0.1:1337/ (running node server.js within /header-test) failed and caused the server script to exit with the following error:

fs.js:114
    throw err;
    ^

Error: ENOENT: no such file or directory, open 'script.map'
    at Object.openSync (fs.js:443:3)
    at Object.readFileSync (fs.js:343:35)
    at Server.<anonymous> (/Users/brett/node-source-map-support/header-test/server.js:27:18)
    at Server.emit (events.js:198:13)
    at parserOnIncoming (_http_server.js:677:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)

@eyexpo-thomas
Copy link

@brettz9 What is the status of this?

@brettz9
Copy link
Contributor Author

brettz9 commented Nov 7, 2019

I'm not a maintainer here, @eyexpo-thomas . @evanw ?

@jonsadka
Copy link

Any chance this feature is still being worked on? Looks like this will help a handful of people with source map issues in nyc (istanbuljs/nyc#619)

@Raynos
Copy link

Raynos commented Jan 5, 2021

@LinusU this is a small & useful feature for supporting nyc.

It's related to istanbuljs/nyc#619 (comment)

Currently i fix the stacktraces with source maps on nyc by editing my test suite.

With this feature merged & released instead I could do

nyc -a -r html -- node --require source-map-support/register-hook-require test/index.js

Which means the code coverage tooling can have working stacktraces / source maps without editing the source code of my test suite.

@TwitchBronBron
Copy link

@evanw any movement on reviewing/merging this?

@LinusU LinusU merged commit b2b82e0 into evanw:master Nov 19, 2021
@LinusU
Copy link
Collaborator

LinusU commented Nov 19, 2021

Sorry for the delay on this, released as 0.5.21

@brettz9 would you be able to submit a follow up PR that adds documentation for this to the readme? ❤️

@brettz9
Copy link
Contributor Author

brettz9 commented Nov 19, 2021

@LinusU : I'm afraid I am not doing well health-wise these days, and this isn't fresh in my memory (and probably more submitted originally just to overcome a road block). Maybe you could ask on #239 ?

@LinusU
Copy link
Collaborator

LinusU commented Nov 19, 2021

@brettz9 no worries, wish you all the best, take care of yourself!

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.

Feature Request: Provide a source-map-support/register-hook-require entry-point.
6 participants