Skip to content

Should sources be tracked? #259

@dchacke

Description

@dchacke

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions