npm-publish-nexus

0.1.4 • Public • Published

npm-publish-nexus

Safe NPM package publish for Nexus.

Why

The Disallow override option does not work properly on Nexus (at least for the scoped packages).

That's why to integrate the publishing into CI requires a validation of the package version existence before publishing.

This package does it.

Installation

npm i -D npm-publish-nexus

Usage

Setup variables

export NPM_NEXUS_PUBLISHER_EMAIL=<email>
export NPM_NEXUS_PUBLISHER_AUTH=<base64versionof(login:password)>

Then add to your package.json scripts a script with

npm-publish-nexus --domain=https://example.com --repo=npm-local

where domain is the domain where the Nexus is hosted and repo is the name of the local repository.

Finally, run the script and you will see an output similar to

The following versions are found for package @bla/bla:
 - @bla/bla@1.0.3
 - @bla/bla@1.0.0
 - @bla/bla@1.0.4
 - @bla/bla@1.0.5
The current version is already deployed, skipping publishing...

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i npm-publish-nexus

Weekly Downloads

540

Version

0.1.4

License

MIT

Last publish

Collaborators

  • smnbbrv