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

Redirect source-map-support to @cspotcode/source-map-support #1496

Merged
merged 2 commits into from
Oct 10, 2021

Conversation

cspotcode
Copy link
Collaborator

@cspotcode cspotcode commented Oct 10, 2021

Fixes #1441

Facilitated by cspotcode/node-source-map-support#23 and cspotcode/node-source-map-support#30

Uses the new redirection feature from @cspotcode/source-map-support to transparently redirect libraries that try to use source-map-support to instead use @cspotcode/source-map-support

This seems like a dirty hack, and it is, but @cspotcode/source-map-support also supports the better solution to this class of problem: cspotcode/node-source-map-support#28

If anyone in the future is reading this, please keep in mind that we are only forced to do this because source-map-support has not merged the corresponding PR to their repository.

Thus we redirect the require() and maintain API compatibility. Any third-party libraries that want to avoid this potential gotcha can upgrade to @cspotcode/source-map-support.

@codecov
Copy link

codecov bot commented Oct 10, 2021

Codecov Report

Merging #1496 (05cfdf0) into main (8a9ae84) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
src/index.ts 77.86% <100.00%> (+0.05%) ⬆️

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.

Risk of accidentally registering both source-map-support and @cspotcode/source-map-support
1 participant