Right now the importmap of a pilet treats non-version specified dependencies as "exact", i.e.,
{
"imports": {
"@angular/core": ""
}
}
will resolve to the currently used version of Angular. As an example, if node_modules/@angular/core/package.json has version 16.0.1 in there this is equivalent to
{
"imports": {
"@angular/core@16.0.1": ""
}
}
However, under some circumstances we might prefer to have a different behavior such as using major-versions only:
{
"imports": {
"@angular/core@16.x": ""
}
}
Background
While the exact behavior is a good default (after all we'll only the version if that's exactly the version you tested with) you might (e.g., for performance reasons) prefer to be a bit less strict - following semver rules.
Rewriting the importmap with explicit versions is a first way out, but suffers from maintainability and verbose. A better alternative is to change the default behavior - e.g., shifting from exact to match-major.
Discussion
Right now the idea is to set this default in the pilet.json via the importmapVersions key. What values should be possible here? all, match-major, any-patch, exact.
New Feature Proposal
Description
Right now the importmap of a pilet treats non-version specified dependencies as "exact", i.e.,
will resolve to the currently used version of Angular. As an example, if
node_modules/@angular/core/package.json
has version16.0.1
in there this is equivalent toHowever, under some circumstances we might prefer to have a different behavior such as using major-versions only:
Background
While the exact behavior is a good default (after all we'll only the version if that's exactly the version you tested with) you might (e.g., for performance reasons) prefer to be a bit less strict - following semver rules.
Rewriting the importmap with explicit versions is a first way out, but suffers from maintainability and verbose. A better alternative is to change the default behavior - e.g., shifting from
exact
tomatch-major
.Discussion
Right now the idea is to set this default in the
pilet.json
via theimportmapVersions
key. What values should be possible here?all
,match-major
,any-patch
,exact
.