Publish and maintain a release
Publish a package to the registry that serves its namespace, then look after its releases: a published version never changes, and one that should no longer be installed is yanked.
Publish a version
Sign in once, check the package, pin its dependencies, then push:
$ datumhue login
$ datumhue pkg check ballpit
$ datumhue pkg update ballpit
$ datumhue pkg push ballpit --dry-run
$ datumhue pkg push ballpit
datumhue loginopens the sign-in page in your browser. Your sign-in must own the package's scope, the@scopeof its name.datumhue logoutsigns you out again.pkg checkreads the manifest and the layout, and checks the license a free package must declare (Package licenses).pkg updatewritespackage.lock.kdl, which pins every dependency (Depend on another package).pkg push --dry-runbuilds the package and stops before sending it.pkg pushthen publishes exactly what the lock pins, and fails if a pinned dependency has been yanked since.
--namespace names the registry namespace to publish to. Without it,
pkg push uses the default its
--namespace entry names. Related
packages publish together from their workspace
(Work on several packages together).
Release a new version
A published version is never overwritten. To change a release, raise
version in the manifest and push again. People who depend on your
package move to the new version when their range takes it and they run
datumhue pkg update; datumhue pkg outdated shows them it is there.
In a build script, datumhue pkg update --dry-run exits with code 3
when the lock file would change, so a stale lock can fail the build.
Retire a version
Yank a version that should no longer be installed:
$ datumhue pkg dependents @alice/ball-pit
$ datumhue pkg yank @alice/ball-pit 1.2.0 --reason "crashes on start"
pkg dependentslists the published packages, in every namespace of the deployment, that depend on yours, so you know who a yank reaches before you make it.- A yanked version drops out of new resolutions and catalog listings,
and
pkg updatemoves dependents off it. Installs already pinned to it keep working, and nothing is deleted. --reasonis shown wherever the version is skipped.datumhue pkg yank @alice/ball-pit 1.2.0 --undolists it again.