Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.77 KB

File metadata and controls

55 lines (40 loc) · 1.77 KB

NPM Package Management

Release Workflow

Version Commands

  • npm version prepatch --preid=beta1.2.41.2.5-beta.0 Bumps patch and starts a prerelease. Use once to begin a patch beta cycle.

  • npm version preminor --preid=beta1.2.41.3.0-beta.0 Bumps minor and starts a prerelease. Use once to begin a minor beta cycle.

  • npm version premajor --preid=beta1.2.42.0.0-beta.0 Bumps major and starts a prerelease. Use once to begin a major beta cycle.

  • npm version prerelease --preid=beta — increments the prerelease number only: 1.2.5-beta.01.2.5-beta.11.2.5-beta.2 → ...

  • Finalize a release (strip the prerelease tag):

    • npm version patch1.2.5-beta.21.2.5
    • npm version minor1.3.0-beta.21.3.0
    • npm version major2.0.0-beta.22.0.0

Typical Workflow

1. npm version prepatch --preid=beta     # start beta cycle (e.g. 1.2.5-beta.0)
2. npm publish --tag beta                # publish beta
3. npm version prerelease --preid=beta   # bump beta number (1.2.5-beta.1)
4. npm publish --tag beta                # publish next beta
   ... repeat 3-4 as needed ...
5. npm version patch                     # finalize (1.2.5)
6. npm publish                           # publish stable to latest tag

Publishing

# Beta release (does not affect `latest` tag — safe for testing)
npm publish --tag beta

# Stable release (updates `latest` — what users get with `npm install thepopebot`)
npm publish

Verifying a Release

# Dry run — see what files would be in the tarball
npm pack --dry-run

# Check a published version
npm view thepopebot versions --json
npm pack thepopebot@<version> && tar tzf thepopebot-<version>.tgz