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

Convert the source map spec to bikeshed with minor edits #1

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

mitsuhiko
Copy link
Collaborator

Replaces tc39/source-map#24

This is a transformation of the source map v3 with minimal edits to the .bs format, alongside with a Makefile to render it locally (make build and make watch).

Remaining work:

  • indexed source maps are not addressed (same spec or separate spec?)
  • reintroduce CSS references for sourceMappingURL
  • who are the editors / former editors?
  • set up github actions / publish to gh-pages

Changes made:

These (with the exception of the change to the URL standard) are marked in the document:

  • JSON over HTTP Transport gives no longer relevant historic context to serving JSON over HTTP. Removed that reference but left the permission to prefix source maps with )]}' when served over HTTP.
  • Clarified what a column is, specifically that this is counted in UTF-16 offsets which is what most tools do today. Tighten the definition of "column" source-map#5
  • Changed the URL reference to the WhatWG URL Standard
  • Properly cited "Pavel Podivilov" (previously just mentioned as podivilov@)
  • Removed the confusing HTTP header note ("An HTTP header would address this, but is not yet agreed upon.") as a SourceMap header is actually specified in the specification. Refs Do we support Multi-level mapping source map lookups for final source map consumption source-map#11
  • Strict reading of the spec allows multiple interpretations for version. I left a marked clarification there. This might be incorrect. See Hardening: version field source-map#26

Followup work:

Random notes:

  • Not sure how the references should be done. Some references like sourceURL link to outdated resources. Maybe put into the spec?
  • base64 and VLQ probably should be documented in the spec
  • It turns out that web assembly source maps have a different proposed definition of a column. Is this canon? Should this be documented here? Source maps applied to wasm binaries WebAssembly/design#1051

Refs tc39/source-map#23

@littledan littledan merged commit 258afb8 into tc39:main Apr 12, 2023
@mitsuhiko mitsuhiko deleted the feature/bikeshed branch April 13, 2023 06:06
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.

None yet

2 participants