jspm / generator

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

feat: generator update API #164

Closed guybedford closed 2 years ago

guybedford commented 2 years ago

This adds a new generator.update('pkg') API, taking package names (not specifiers like all other forms) to update. Resolves https://github.com/jspm/generator/issues/148.

The uninstall API has also been updated to support pkg/ style shorthands to remove all subpaths of a package in one operation instead of needing to be explicitly enumerated.

fusionstrings commented 2 years ago

How downgrading a package workflow works with update command?

guybedford commented 2 years ago

@fusionstrings it is not possible :) Best route would be to modify the package.json constraints on the versions to meet the constraint you want to enforce (eg changing "dep": "^1.2.3" to "dep": "~1.2.3". The update() system will respect package.json constraints like install and then effectively do a downgrade.