Skip to content

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%) ⬆️
@cspotcode cspotcode merged commit 8ad5292 into main Oct 10, 2021
@cspotcode cspotcode added this to the 10.3.0 milestone Oct 10, 2021
cspotcode added a commit that referenced this pull request Oct 11, 2021
…support (#1497) * Update package.json * update package-lock.json
@cspotcode cspotcode deleted the source-map-support-redirect branch October 11, 2021 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants