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

Should sources be tracked? #259

Open
dchacke opened this issue Aug 14, 2024 · 0 comments
Open

Should sources be tracked? #259

dchacke opened this issue Aug 14, 2024 · 0 comments

Comments

@dchacke
Copy link

dchacke commented Aug 14, 2024

Importmap doesn’t seem to track any sources so running update can trigger a download from a different source than the one from which a package was originally installed.

$ bin/importmap pin [email protected] --from unpkg
Pinning "imask" to vendor/javascript/imask.js via download from https://unpkg.com/[email protected]/esm/index.js

$ bin/importmap update 
Pinning "imask" to vendor/javascript/imask.js via download from https://ga.jspm.io/npm:[email protected]/esm/index.js

There’s no guarantee that different sources serve the same files. For example, https://ga.jspm.io/npm:[email protected]/esm/index.js is different from https://unpkg.com/[email protected]/esm/index.js

I suggest keeping track of the source for each dependency and reusing it when updating. SO user Alex suggests an implementation here (under update 2).

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