jspm / generator

JSPM Import Map Generator
Apache License 2.0
166 stars 21 forks source link

In use version set and import map lockfile extraction #108

Closed guybedford closed 2 years ago

guybedford commented 2 years ago

Currently the lockfile version extraction from import maps used in the htmlGenerate function works best with the direct scoped form of import maps which is not the default output (where scopes correspond to package boundaries for versioning resulting in duplication).

Instead the version resolver should be updated in the installer to deal in terms of an "in use package version set", where resolutions are prioritised from this pool based on the resolution rules, using new versions only when semver forces this or when the latest: true option is used.

The version collection from the import map would then work seamlessly with the version resolution in prepopulating this in use version set.

//cc @vovacodes this feature will likely solve your use case for the lockfile here.

guybedford commented 2 years ago

Added in https://github.com/jspm/generator/pull/134.