How to port an NPM package to an @scope organization

NPM recently introduced @ scopes / organization modules for modules. Is there a good way to port existing modules to the organization? Are there any tools to automate it for a large number of packages? Does NPM support support redirection, so that other software can still use the old name, but receive notification of its update?

+9
source share
2 answers

You can change your .json package from:

"name": "project-name"

so that:

"name": "@scope/project-name"

and publish the package:

npm publish --access=public

. , , --access=public --access=public --access=public . access "public" publishConfig package.json:

"publishConfig": {
  "access": "public"
}

( , !)

. Https://docs.npmjs.com/getting-started/scoped-packages.

Npm , :

npm deprecate <pkg>[@<version>] <message>

, , , .

. Https://docs.npmjs.com/cli/deprecate.

+20

, , - - npm ( ""). .

, , .

0

Source: https://habr.com/ru/post/1673157/


All Articles