Migrate all packages in a verdaccio to another npm registry with npm publish.
npm i verdaccio-migrate
import verdaccioMigrate from "verdaccio-migrate";
const from = "https://registry.npmjs.org/"; // source registry url
const to = "http://localhost:4873/"; // target registry url
verdaccioMigrate(from, to).then(
({
succeeded, // ['@my/pkg1@0.0.1', '@my/pkg1@0.0.2']
failed,
skipped,
}) => {
// migrated
}
);
npx verdaccio-migrate --from=https://registry.npmjs.org/ --to=http://localhost:4873/
For more details, checkout npm-migrate-all.