Publishing Packages
You can publish packages to the Pure registry using the standard npm publish command. Publish tokens are separate from compile API keys.
Prerequisites
Section titled “Prerequisites”- You have a Pure account with an organization.
- You have created a publish token (see below).
- Your project has a
package.jsonwith a validnameandversion.
Create a publish token
Section titled “Create a publish token”In the dashboard, go to Registry → Tokens → New publish token. Give it a name and click Create. Copy the token — it is shown once.
Authenticate
Section titled “Authenticate”Add the token to ~/.npmrc:
//registry.pure.dev/:_authToken=<your-publish-token>Or set it in the environment for CI:
npm config set //registry.pure.dev/:_authToken "$PURE_REGISTRY_TOKEN"Publish
Section titled “Publish”Point npm at the Pure registry and publish:
npm publish --registry https://registry.pure.devOr 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.
Package naming
Section titled “Package naming”- 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.
Versioning
Section titled “Versioning”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.
What gets published
Section titled “What gets published”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 scopes
Section titled “Token scopes”| Token type | Can install | Can publish |
|---|---|---|
| Read token | Yes | No |
| Publish token | Yes | Yes |
Use read tokens in environments that only need to npm install. Reserve publish tokens for CI pipelines that produce releases.
Revoking tokens
Section titled “Revoking tokens”Go to Registry → Tokens, find the token, and click Revoke. Revoked tokens stop working immediately.