Reliverse Docs

dler publish

Publish packages to NPM, JSR, GitHub Releases, or multiple registries

Publish packages to NPM, JSR (coming soon), GitHub Releases, Vercel (coming soon), or multiple registries with version bumping, dist-tags, access control, and concurrent publishing.

Usage

dler publish [options]

Description

The publish command handles the complete package publishing workflow including version bumping, building, testing, and publishing to one or more registries. It supports monorepo publishing with concurrent processing and comprehensive error handling.

Quick Start

Basic publish

dler publish

Dry run to test

dler publish --dry-run

Full release workflow

dler publish --release --version patch

Package Selection

OptionTypeDescription
--filter <packages>stringPackage(s) to include (supports wildcards and comma-separated values like 'rempts,@reliverse/build'). Takes precedence over --ignore.
--ignore <packages>stringPackage(s) to ignore (supports wildcards like @reliverse/*).
--cwd <path>stringWorking directory (monorepo root).

Version Control

OptionTypeDescription
--bump <type>'major' | 'minor' | 'patch' | 'premajor' | 'preminor' | 'prepatch' | 'prerelease'Version bump type (default: patch).
--bump-disablebooleanDisable version bumping for all published packages.
--tag <tag>stringnpm dist-tag (default: latest).
--version <version>'patch' | 'minor' | 'major' | stringVersion to release (only used with --release).

Registry Options

OptionTypeDescription
--registry <registry>'npm' | 'jsr' | 'vercel' | 'npm-jsr' | 'none'Registry to publish to (default: npm).
--access <level>'public' | 'restricted'Access level (default: public).
--bun-registry <url>stringRegistry URL for bun publish (overrides .npmrc and bunfig.toml).

Authentication

OptionTypeDescription
--otp <code>stringOne-time password for 2FA authentication.
--auth-type <type>'web' | 'legacy'Authentication method (default: legacy). Note: web auth is not supported.

Release Workflow

OptionTypeDescription
--releasebooleanRun full release workflow (test, build, version, tag, publish, GitHub).
--githubbooleanCreate GitHub release (only used with --release).
--no-testbooleanSkip tests during release (only used with --release).
--no-buildbooleanSkip build during release (only used with --release).

Publishing Options

OptionTypeDescription
--concurrency <number>numberNumber of packages to publish concurrently (default: 3).
--kind <type>'library' | 'browser-app' | 'native-app' | 'cli'Package kind (default: library).
--gzip-level <level>stringLevel of gzip compression when packing (0-9, default: 9).

Output Control

OptionTypeDescription
--verbosebooleanVerbose mode (default: false).
--dry-runbooleanSimulate publishing without actually publishing.
--with-npm-logsbooleanDisplay bun publish logs directly to terminal (default: true).
--silentbooleanSuppress all output from bun publish (default: false).
--no-progressbooleanHide progress bar from bun publish (default: false).
--no-summarybooleanDon't print publish summary from bun publish (default: false).
--skip-tip-2fabooleanSkip the 2FA tip message and wait when using --with-npm-logs.
--stop-on-errorbooleanStop on first error instead of collecting all errors (default: false).

Security

OptionTypeDescription
--ca <cert>stringCertificate Authority signing certificate (inline).
--cafile <path>stringPath to Certificate Authority certificate file.
--ignore-scriptsbooleanSkip lifecycle scripts during packing and publishing.

Examples

Basic Publishing

# Publish all packages to npm
dler publish

# Publish specific packages
dler publish --filter "@reliverse/ui,@reliverse/utils"

# Skip specific packages
dler publish --ignore "@reliverse/docs"

# Dry run to test
dler publish --dry-run

Version Control

# Publish with specific version bump
dler publish --bump major

# Publish with custom dist-tag
dler publish --tag beta

# Disable version bumping
dler publish --bump-disable

Registry Options

# Publish to specific registry
dler publish --registry npm-jsr

# Set access level
dler publish --access restricted

# Use custom registry URL
dler publish --bun-registry "https://registry.npmjs.org/"

Authentication

# With 2FA
dler publish --otp 123456

# Legacy authentication
dler publish --auth-type legacy

Full Release Workflow

# Complete release with testing, building, and GitHub release
dler publish --release --version patch

# Release without tests
dler publish --release --version minor --no-test

# Release without building
dler publish --release --version major --no-build

# Release with GitHub release
dler publish --release --version patch --github

Advanced Options

# Verbose output
dler publish --verbose

# Hide npm logs
dler publish --with-npm-logs false

# Concurrent publishing
dler publish --concurrency 5

# Stop on first error
dler publish --stop-on-error

Release Workflow

When using --release, the command follows this workflow:

  1. Test: Run tests (unless --no-test is specified)
  2. Build: Build packages (unless --no-build is specified)
  3. Version: Bump version numbers
  4. Publish: Publish to registries
  5. Git Tag: Create git tags
  6. GitHub Release: Create GitHub releases (if --github is specified)

Configuration

Publishing behavior can be customized through dler.ts configuration:

export default defineConfig({
  publish: {
    registry: "npm",
    access: "public",
    tag: "latest",
    bump: "patch",
    concurrency: 3,
  },
  release: {
    github: true,
    test: true,
    build: true,
  }
})

Environment Variables

The command automatically loads .env files for authentication:

  • NPM_TOKEN - NPM authentication token
  • JSR_TOKEN - JSR authentication token
  • GITHUB_TOKEN - GitHub authentication token

Registries

Supported Registries

  • npm: Node Package Manager
  • jsr: JavaScript Registry (coming soon)
  • vercel: Vercel platform (coming soon)
  • npm-jsr: Publish to both npm and jsr
  • none: Skip publishing (useful for version bumping only)

Registry URLs

Use --bun-registry to override the default registry URL for bun publish operations.

Package Types

Package Kind

KindDescription
libraryStandard npm package (default)
browser-appBrowser application
native-appNative application
cliCommand-line interface

Error Handling

  • Graceful failures: Continues with other packages if one fails
  • Detailed errors: Shows specific error messages for each package
  • Stop on error: Use --stop-on-error to fail fast
  • Dry run: Test the entire workflow without publishing

Private Packages

Packages with "private": true in their package.json are automatically skipped during publishing with a debug message.

Requirements

  • Bun runtime: This command requires Bun to be available
  • Authentication: Valid tokens for target registries
  • Built packages: Packages should be built before publishing
  • Valid package.json: All packages must have valid metadata

On this page