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

Hardening: version field #26

Closed
mitsuhiko opened this issue Apr 6, 2023 · 1 comment
Closed

Hardening: version field #26

mitsuhiko opened this issue Apr 6, 2023 · 1 comment

Comments

@mitsuhiko
Copy link
Contributor

Today the specification says this about version:

File version (always the first entry in the object) and must be a positive integer.

It does not say that this is the source map spec version, but it implies this by showing the integer 3 everywhere for the source map version (v3). It could also be a running counter. It also is documented to come first in the file which in practice is not enforced and hard to actually enforce given that many languages only have unsorted hash maps.

Would it make sense to drop the ordering requirement and to mention that this is explicitly the version of the source map, and what meaning it has?

My recommendation would be:

  1. it refers to the source map spec version
  2. we define when this version is bumped, and what tools should assume (eg: does bumping means major version that is assumed incompatible?)
mitsuhiko added a commit to tc39/source-map-spec that referenced this issue Jul 5, 2023
mitsuhiko added a commit to tc39/source-map-spec that referenced this issue Jul 6, 2023
@mitsuhiko
Copy link
Contributor Author

We agreed on requiring the value to be 3 and it was added to the spec. I consider this closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants