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

Make index map specification more precise #81

Open
takikawa opened this issue Apr 10, 2024 · 0 comments
Open

Make index map specification more precise #81

takikawa opened this issue Apr 10, 2024 · 0 comments

Comments

@takikawa
Copy link
Contributor

Currently the structure of index maps are described in the spec like this:

It shares the version and file field from the regular source map, but gains a new sections field.

This makes it clear that version, file (optionally), and sections fields are present in an index map. What's not explicitly spelled out is if this excludes other fields such as mappings or sources in the top-level map or if that falls under "unrecognized properties", and if it must be an index map if a sections field exists.

In practice, implementations I've seen will check if the sections field is present and decide whether it's intended to be an index map based on that (and ignoring extra entries that are irrelevant to an index map). Maybe the spec can just codify this behavior?

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

1 participant