Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:A5c ai Babysitter publish package from tag

From Leeroopedia
Knowledge Sources
Domains Release_Pipeline, Package_Publication
Last Updated 2026-10-23 00:00 GMT

Overview

CLI tool for publishing npm packages from a release tag under a candidate dist-tag (never production channels).

Description

The publish-package-from-tag.mjs script publishes a single workspace package to npm under a candidate dist-tag. It reads the release version from the release plan or a tag reference, builds the package (unless --skip-build), then runs npm publish --tag <candidate-tag> --access public --ignore-scripts. It never writes the latest, staging, or develop dist-tags — those are only moved by the channel promotion step.

The script resolves the package to publish via --workspace, reads the release plan via readReleasePlan, and uses reconcileReleaseVersion to ensure the exact version matches the release plan.

Usage

  • Release pipeline Step 4: After build and validation, publish each package in the release matrix to npm under a candidate dist-tag.

Code Reference

Source Location

  • Repository: Babysitter
  • File: scripts/publish-package-from-tag.mjs:L1-375

Signature

node scripts/publish-package-from-tag.mjs \
  --workspace=<package-name> \
  [--release-version=<v>] \
  [--skip-build]
# Env: NODE_AUTH_TOKEN (npm auth token)

Import

# CLI script — run directly
node scripts/publish-package-from-tag.mjs --workspace=@a5c-ai/babysitter-sdk

I/O Contract

Inputs

Name Type Required Description
--workspace string Yes Package name to publish
--release-version string No Explicit version override
--skip-build boolean No Skip the build step
NODE_AUTH_TOKEN string (env) Yes npm authentication token

Outputs

Name Type Description
npm publish result npm output Package published under candidate dist-tag
dist-tag string Candidate dist-tag (never latest/staging/develop)

Usage Examples

Publish a Single Package

# Publish the SDK package
NODE_AUTH_TOKEN=npm_abc123 node scripts/publish-package-from-tag.mjs \
  --workspace=@a5c-ai/babysitter-sdk

# Skip build (already built)
NODE_AUTH_TOKEN=npm_abc123 node scripts/publish-package-from-tag.mjs \
  --workspace=@a5c-ai/babysitter-sdk \
  --skip-build

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment