Skip to content

fix: Set source maps support via API #181

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

Merged
merged 1 commit into from
Aug 8, 2025
Merged

Conversation

varungandhi-src
Copy link
Contributor

@varungandhi-src varungandhi-src commented Aug 8, 2025

env on different systems behaves differently. On macOS,
env ABC XYZ will invoke ABC with argument XYZ.
On some Linux variants, you need env -S ABC XYZ for that.
On Alpine, the -S flag is not supported, and there is seemingly
no way of passing arguments.

So this patch undoes the accidental breakage in #179
and uses the getSourceMapsSupport API.

Technically, both process.setSourceMapsEnabled and
module.setSourceMapsSupport are experimental functions,
so to be safe, we do a dynamic existence check before calling
them for portability across Node versions.

@varungandhi-src varungandhi-src merged commit 37a9e99 into scip Aug 8, 2025
2 checks passed
@varungandhi-src varungandhi-src deleted the vg/fix-shebang branch August 8, 2025 03:32
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.

1 participant