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