Skip to content

Publishing Packages

You can publish packages to the Pure registry using the standard npm publish command. Publish tokens are separate from compile API keys.

  • You have a Pure account with an organization.
  • You have created a publish token (see below).
  • Your project has a package.json with a valid name and version.

In the dashboard, go to Registry → Tokens → New publish token. Give it a name and click Create. Copy the token — it is shown once.

Add the token to ~/.npmrc:

//registry.pure.dev/:_authToken=<your-publish-token>

Or set it in the environment for CI:

Terminal window
npm config set //registry.pure.dev/:_authToken "$PURE_REGISTRY_TOKEN"

Point npm at the Pure registry and publish:

Terminal window
npm publish --registry https://registry.pure.dev

Or add the registry to your project’s package.json publishConfig:

{
"name": "@my-org/my-package",
"version": "1.0.0",
"publishConfig": {
"registry": "https://registry.pure.dev"
}
}

Then just run npm publish.

  • Packages published to the Pure registry should use a scoped name matching your organization: @my-org/my-package.
  • Unscoped package names are allowed but may conflict with npmjs.org packages during proxy lookups. Scoped names are strongly recommended.

Standard semver versioning applies. You cannot overwrite an existing version — attempting to publish @my-org/[email protected] when that version already exists returns HTTP 409. Increment the version in package.json before re-publishing.

Pure’s registry accepts standard npm tarballs (the output of npm pack). The contents are your choice — the registry does not enforce that the package contains a native binary. However, the intended use case is publishing packages built with the Pure compiler (native .node modules), and the registry is optimized for that workflow.

Token typeCan installCan publish
Read tokenYesNo
Publish tokenYesYes

Use read tokens in environments that only need to npm install. Reserve publish tokens for CI pipelines that produce releases.

Go to Registry → Tokens, find the token, and click Revoke. Revoked tokens stop working immediately.