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

Document how to depend on source-map 0.6.X for old nodes and 0.7.0 for new nodes #313

Closed
devongovett opened this issue Jan 21, 2018 · 7 comments

Comments

@devongovett
Copy link

We're currently working on source map support in Parcel: parcel-bundler/parcel#506. We'd love to take advantage of the WASM version of source-map in 0.7, but we also need to support Node < 8 users. Is there a way the source-map library could fall back to a JS version for Node < 8 users?

@mozilla mozilla deleted a comment from goindwalia Jan 22, 2018
@mozilla mozilla deleted a comment from jbernalvallejo Jan 22, 2018
@mozilla mozilla deleted a comment from Daweo93 Jan 22, 2018
@mozilla mozilla deleted a comment from tassilogroeper Jan 22, 2018
@mozilla mozilla deleted a comment from rewmike Jan 22, 2018
@fitzgen
Copy link
Contributor

fitzgen commented Jan 22, 2018

Folks, there's a reason that a "+1" button exists: so you don't have to leave a comment containing only "+1".

@fitzgen
Copy link
Contributor

fitzgen commented Jan 22, 2018

I have no interest maintaining two versions of source map parsing and querying, nor incurring the additional code size bloat.

I suggest using the old version of the library if you have to support old node versions, or alternatively setting up some kind of feature detection scheme.

I'll leave this issue open for adding documentation on how to depend on 0.6.X for old nodes and 0.7.0 for new ones.

@fitzgen fitzgen changed the title source-map 0.7 doesn't work in Node < 8 Document how to depend on source-map 0.6.X for old nodes and 0.7.0 for new nodes Jan 22, 2018
@deadalusai
Copy link

deadalusai commented Jan 26, 2018

For users of Yarn
For client code, adding the following snippet to package.json will pin source-map to 0.6.x versions:

"resolutions": {
    "source-map": "~0.6.1"
}

This may be useful while we wait for downstream packages to update for the changes in 0.7.0 (or pin to 0.6.x).

Is there a similar solution for NPM users?

@fimius23
Copy link

Why doesn't this project follow semver so that I'm protected from this version?

@tromey
Copy link
Contributor

tromey commented Jan 26, 2018

Why doesn't this project follow semver so that I'm protected from this version?

It does; semver treats major version 0 specially. I think it would probably be a good idea to just admit that this package is heavily used and release 1.0.

@fitzgen
Copy link
Contributor

fitzgen commented Jan 26, 2018

That sounds good to me

@jkrems
Copy link
Collaborator

jkrems commented Apr 18, 2021

In the meantime node <8 has become less relevant (I'll claim) and @parcel/source-map has been published. I'll close this issue but leave #331 open which is somewhat related.

@jkrems jkrems closed this as completed Apr 18, 2021
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

No branches or pull requests

6 participants