ende publish
ende publish publishes your package to the JSR registry.
Package Requirements
Your package must have a name and version and an exports field in its
ende.json or jsr.json file.
- The
namefield must be unique and follow the@<scope_name>/<package_name>convention. - The
versionfield must be a valid semver version. To bump it as part of your release flow, seeende bump-version. - The
exportsfield must point to the main entry point of the package. The exports field can either be specified as a single string, or as an object mapping entrypoint names to paths in your package.
Example:
{
"name": "@scope_name/package_name",
"version": "1.0.0",
"exports": "./main.ts"
}Before you publish your package, you must create it in the registry by visiting JSR - Publish a package.
Excluding a workspace member
When run inside a workspace, ende publish
tries to publish every member that has a name and exports, and errors if any
of them is missing a version. To opt a member out, for example an internal
helper package that only exists to host shared tasks, set "publish": false
in that member's ende.json:
{
"name": "@scope/internal-helpers",
"publish": false
}The member stays part of the workspace but is skipped by ende publish. See
Excluding a workspace member from publish
for the full discussion.
Specifiers in published files
People who use your package don't have your import map, so ende publish
rewrites the specifiers in the files it uploads. Bare and import-mapped
specifiers become the relative paths or jsr: specifiers they resolve to. The
files on disk don't change.
The specifiers in the @ts-types, @deno-types, @ende-types and
@ts-self-types pragmas are rewritten too (Ende 2026.11.10+). JSR and Deno
don't know Ende's @ende-types alias, so ende publish also spells it
@ts-types. For example, with "imports": { "lib/": "./lib/" } in
ende.json:
// @ende-types="lib/add.d.ts"
import { add } from "lib/add.js";// @ts-types="./lib/add.d.ts"
import { add } from "./lib/add.js";Authentication
Run in a terminal with no token, ende publish authenticates interactively.
On GitHub Actions it can publish without a token, using OIDC, when
the job has the id-token: write permission. Anywhere else, such as another CI
system, give it a token (Ende 2026.12.01+):
--token-file <PATH>reads the token from a file. On Linux and macOS, Ende warns when other users can read that file; make it private withchmod 600 <PATH>.--token -reads the token from stdin. If stdin is a terminal, that's a usage error (exit code 2): pipe the token in, as inende publish --token - < token.txt.ENDE_PUBLISH_TOKENholds the token, when neither--tokennor--token-fileis given.
A file, or stdin, must hold just one token: a second line is an error.
--token <TOKEN> still works, but other processes on the same machine can read
a command line, so it prints a warning:
$ ende publish --token c00921b1-0d4f-4d18-b8c8-ac98227f9275
Warning Other processes on this machine can read the value of --token. Use --token-file <PATH>, --token - (stdin) or ENDE_PUBLISH_TOKEN instead.
With no token and no terminal to authenticate in, ende publish stops:
error: No means to authenticate. Pass a token with --token-file <PATH>, --token - (stdin) or ENDE_PUBLISH_TOKEN.
Registries other than jsr.io
The JSR_URL environment variable points ende publish at another registry.
ende publish then prints a Registry: line that names it. It refuses to
publish to a registry whose URL isn't https, so a token is never sent in the
clear. Plain http is allowed only for this machine (localhost or a loopback
address). A dry run sends nothing, so it isn't refused (Ende 2026.12.01+).
$ JSR_URL=http://example.com/ ENDE_PUBLISH_TOKEN=... ende publish
Registry: example.com (from JSR_URL), not jsr.io
error: JSR_URL is http://example.com/, which isn't https, so ende publish won't send a token there. Use an https registry (http is allowed only on this machine).
Examples
Publish your current workspace
ende publish
Publish your current workspace with a token from a file, bypassing interactive authentication
ende publish --token-file ~/.jsr-token
Publish with a token read from stdin
ende publish --token - < token.txt
Publish and check for errors in remote modules
ende publish --check=all
Perform a dry run to simulate publishing (-n is short for --dry-run,
Ende 2026.12.01+).
ende publish --dry-run
Publish using settings from a specific configuration file
ende publish --config custom-config.json
Command line usage:
publishPublish the current working directory's package or workspace
Options
--allow-dirty
Allow publishing if the repository has uncommitted changed.
--allow-slow-types
Allow publishing with slow types.
--cert
Load certificate authority from PEM encoded file.
--check
Set type-checking behavior. This subcommand type-checks local modules by default, so passing --check is redundant; pass --check=all to also type-check remote modules. Alternatively, use the 'ende check' subcommand.
--config, -c
Configure different aspects of ende including TypeScript, linting, and code formatting.
Typically the configuration file will be called ende.json or ende.jsonc and automatically detected; in that case this flag is not necessary.
--dry-run, -n
Prepare the package for publishing performing all checks and validations without uploading.
--env-file
Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten, so if variables with the same names already exist in the environment, their values will be preserved. Where multiple declarations for the same environment variable exist in your .env file, the first one encountered is applied. This is determined by the order of the files you pass as arguments.
--frozen-lockfile
Error out if lockfile is out of date.
--import-map
Load import map file from local file or remote URL.
--lock
Check the specified lock file. (If value is not provided, defaults to "./ende.lock").
--min-dep-age
(Unstable) The age in minutes, ISO-8601 duration or RFC3339 absolute timestamp (e.g. '120' for two hours, 'P2D' for two days, '2025-09-16' for cutoff date, '2025-09-16T12:00:00+00:00' for cutoff time, '0' to disable).
--no-check
Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored.
--no-config
Disable automatic loading of the configuration file.
--no-lock
Disable auto discovery of the lock file.
--no-provenance
Disable provenance attestation. Enabled by default on Github actions, publicly links the package to where it was built and published from.
--no-remote
Do not resolve remote modules.
--reload, -r
Reload source code cache (recompile TypeScript). With no value, reloads everything. Pass a comma-separated list of specifiers to reload only those modules; jsr:@ende/http/file-server,jsr:@ende/assert/equals reloads specific modules.
--set-version
Set version for a package to be published. This flag can be used while publishing individual packages and cannot be used in a workspace.
--token
The API token to use when publishing; - reads it from stdin. Other processes on this machine can read a token given here, so prefer --token-file or ENDE_PUBLISH_TOKEN. If none is given, interactive authentication is used.
--token-file
Read the API token to use when publishing from this file.
--unsafely-ignore-certificate-errors
DANGER: Disables verification of TLS certificates.
--vendor
Toggles local vendor folder usage for remote modules.