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

[feat] script.integrity and import map #435

Closed
loynoir opened this issue Sep 30, 2022 · 0 comments
Closed

[feat] script.integrity and import map #435

loynoir opened this issue Sep 30, 2022 · 0 comments

Comments

@loynoir
Copy link

loynoir commented Sep 30, 2022

Background

  • There is Subresource Integrity for old days javascript.
  • deno support import map, and invent own lock file.
  • node not yet support import map.

Feat

Now, there is ESM. I think there should have a concept update combine two, in flavor of each dependency manager reinvent different lock file.

  "imports": {},
  "scopes": {},
  "integrity": {} | ./lock/file/relative/path/to/import/map,

Additional

As ESM system differ from legacy system, I think, should iter into the inner most dependency, and update field integrity or file flatly.

Related

nodejs/node#44830

Thoughts

  • For relative path, should be compact for both filesystem and network.
  • Maybe allow .integrity as a url. Maybe user can store their import map in their dotfile repo?
  • Maybe design .integrity as an Array<Record<string,string>>, and when importId not uniq, throw error.
@loynoir loynoir closed this as completed Sep 30, 2022
@ljharb ljharb closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2022
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

2 participants