npm-migrate
Migrate all versions of a selected package from a registry to another one.
Usage
const migrate = const moduleName = 'my-private-module'const from = 'http://your-old.private-registry.com:8080'const to = 'http://nice-new.private-registry.org:8080' // optionalconst options = debug: false // default // list of migrated packages
What it does
- Fetches all versions (or just those not already migrated) as tarballs from old registry
- Extracts & updates
package.json
: thepublishConfig.registry
field to the new registry url - Publishes each version to the new registry
- Cleans up after itself
Known issues
- The dates of every version published will be reset to the date and time you run this script
- The migrating user will be added as maintainer
Changelog
- v1.2.0 - Work with scoped packages
- v1.3.0 - Compare both registries and migrate only the remaining versions not in the new registry