Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore(npm): publish mise package#10183

Merged
jdx merged 3 commits into
mainfrom
chore/npm-mise-package-default
May 31, 2026
Merged

chore(npm): publish mise package#10183
jdx merged 3 commits into
mainfrom
chore/npm-mise-package-default

Conversation

@jdx

@jdx jdx commented May 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • document mise as the default npm install/npx package while keeping @jdxcode/mise noted as legacy
  • publish the scoped @jdxcode/mise package set first, then publish the unscoped mise wrapper
  • allow the unscoped wrapper to reuse the existing @jdxcode/mise-<os>-<arch> platform packages

Trusted publishing settings

For the new mise npm package, configure npm trusted publishing with:

  • Publisher: GitHub Actions
  • Organization/user: jdx
  • Repository: mise
  • Workflow filename: npm-publish.yml
  • Environment name: blank, unless an environment is added to the GitHub job

Tests

  • git diff --check
  • bash -n scripts/release-npm.sh
  • shellcheck scripts/release-npm.sh

This PR was generated by an AI coding assistant.


Note

Medium Risk
Release workflow and install-time npm dependency wiring change; misconfiguration could break installs or publish the wrong package names until trusted publishing is set up for mise.

Overview
Adds a second npm publish in CI: first the existing @jdxcode/mise scoped platform packages, then an unscoped mise meta-package that skips re-publishing per-OS/arch tarballs and installs via the existing @jdxcode/mise-<os>-<arch> packages.

scripts/release-npm.sh gains NPM_PLATFORM_PREFIX (defaults to NPM_PREFIX) and PUBLISH_PLATFORM_PACKAGES (default on). When platform publish is off, only the wrapper package.json and installArchSpecificPackage.js are built, with the installer resolving $NPM_PLATFORM_PREFIX instead of $NPM_PREFIX.

docs/installing-mise.md documents npm install -g mise, npx mise, and the mise npm page, while noting @jdxcode/mise remains published as legacy.

Reviewed by Cursor Bugbot for commit 8fdfe60. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Documentation

    • Updated npm install instructions to reference the new mise package (legacy @jdxcode/mise still available).
    • Updated examples and links to use mise.
  • Chores

    • Publishing workflow updated to support separate per-platform package names and an option to skip platform-specific publishes, and to adjust installer behavior to target the new package naming.

@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The release script now supports a separate per-platform npm prefix and a toggle to skip platform package publishing; the CI workflow calls the script with NPM_PREFIX=mise, NPM_PLATFORM_PREFIX=@jdxcode/mise``, and PUBLISH_PLATFORM_PACKAGES=0; docs now show `mise` as the primary install package.

Changes

NPM Package Publishing with Primary/Platform Split

Layer / File(s) Summary
Release script: platform-specific package publishing control
scripts/release-npm.sh
Adds NPM_PLATFORM_PREFIX (defaults to NPM_PREFIX) and PUBLISH_PLATFORM_PACKAGES (defaults to 1), conditionally skips or runs the per-platform packaging/publishing loop, uses NPM_PLATFORM_PREFIX-$os-$arch for generated package names, and updates the generated installArchSpecificPackage.js to install/resolve using NPM_PLATFORM_PREFIX.
Workflow configuration
.github/workflows/npm-publish.yml
The publish step invokes the release script with NPM_PREFIX=mise, NPM_PLATFORM_PREFIX=@jdxcode/mise``, and PUBLISH_PLATFORM_PACKAGES=0, marking `mise` as the primary package and disabling platform-specific publishing for this workflow run.
Documentation update
docs/installing-mise.md
Installation examples and links now reference the primary mise npm package instead of @jdxcode/mise, and note that the legacy @jdxcode/mise remains available.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🐰 A little hop for the release script bright,
Primary mise steps into the light,
Platform names tucked in a prefix new,
CI flags decide what it will do,
Docs and install commands sing in sight. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title "chore(npm): publish mise package" directly and specifically describes the main change: publishing an unscoped 'mise' npm package alongside the legacy scoped package.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/npm-mise-package-default

Comment @coderabbitai help to get the list of available commands and usage tips.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 63d7522. Configure here.

Comment thread scripts/release-npm.sh
@greptile-apps

greptile-apps Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces an unscoped mise npm package alongside the existing @jdxcode/mise package by running release-npm.sh twice in the publish workflow — once to publish platform-specific binaries under @jdxcode/mise, and once to publish a wrapper-only mise umbrella that delegates to those same platform packages.

  • release-npm.sh gains NPM_PLATFORM_PREFIX (for platform package naming in installArchSpecificPackage.js) and PUBLISH_PLATFORM_PACKAGES (to skip the per-platform publish loop on the second run), plus a cp README.md step so both umbrella packages include a README.
  • The workflow chains the two release-npm.sh calls sequentially, ensuring platform packages exist on npm before the mise wrapper is published.
  • Docs are updated to recommend npm install -g mise / npx mise with @jdxcode/mise noted as legacy.

Confidence Score: 5/5

Safe to merge — the two-pass publish strategy is well-structured, variable defaults are correctly set, and the second run properly clears the working directory before building the unscoped wrapper.

The changes are limited to a release script and its workflow invocation. The new NPM_PLATFORM_PREFIX variable is wired consistently between where packages are named (platform package.json) and where they are looked up (installArchSpecificPackage.js). The PUBLISH_PLATFORM_PACKAGES=0 path correctly recreates the npm staging directory before writing the wrapper package, avoiding any leftover artifacts from the first run. No logic errors or broken contracts were found.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/npm-publish.yml Adds second release-npm.sh invocation for the unscoped mise wrapper, passing NPM_PLATFORM_PREFIX=@jdxcode/mise and PUBLISH_PLATFORM_PACKAGES=0 to reuse existing platform packages without re-publishing them.
scripts/release-npm.sh Introduces NPM_PLATFORM_PREFIX (platform package name prefix, defaults to NPM_PREFIX) and PUBLISH_PLATFORM_PACKAGES flag; gates the per-platform publish loop on the flag; adds README.md copy for umbrella packages.
docs/installing-mise.md Updates install instructions to reference the new unscoped mise package; notes @jdxcode/mise as the legacy package and links both on npmjs.com.

Reviews (3): Last reviewed commit: "Merge branch 'main' into chore/npm-mise-..." | Re-trigger Greptile

Comment thread scripts/release-npm.sh Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
scripts/release-npm.sh (1)

44-64: ⚡ Quick win

Platform package name should use NPM_PLATFORM_PREFIX, not NPM_PREFIX.

The generated platform package.json names the package $NPM_PREFIX-$os-$arch (Line 46), but the install resolver in installArchSpecificPackage.js looks it up via $NPM_PLATFORM_PREFIX (Lines 101, 107). Today these coincide because the platform-publishing run leaves NPM_PLATFORM_PREFIX defaulted to NPM_PREFIX, so nothing breaks. However, since this PR introduces NPM_PLATFORM_PREFIX precisely to decouple platform package naming, any run with PUBLISH_PLATFORM_PACKAGES=1 and NPM_PLATFORM_PREFIX != NPM_PREFIX would publish platform packages under one name while the resolver requests another, producing uninstallable packages. Aligning the producer with the consumer makes the new abstraction internally consistent.

♻️ Use the platform prefix for platform package naming
-  "name": "$NPM_PREFIX-$os-$arch",
+  "name": "$NPM_PLATFORM_PREFIX-$os-$arch",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/release-npm.sh` around lines 44 - 64, The package.json producer in
scripts/release-npm.sh currently writes "name": "$NPM_PREFIX-$os-$arch" but the
consumer (installArchSpecificPackage.js) expects the platform package to be
named with NPM_PLATFORM_PREFIX; update the here-doc that generates package.json
to use NPM_PLATFORM_PREFIX (i.e. "name": "$NPM_PLATFORM_PREFIX-$os-$arch") so
produced platform packages match the resolver (see NPM_PLATFORM_PREFIX and
NPM_PREFIX and the package generation block that writes package.json).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@scripts/release-npm.sh`:
- Around line 44-64: The package.json producer in scripts/release-npm.sh
currently writes "name": "$NPM_PREFIX-$os-$arch" but the consumer
(installArchSpecificPackage.js) expects the platform package to be named with
NPM_PLATFORM_PREFIX; update the here-doc that generates package.json to use
NPM_PLATFORM_PREFIX (i.e. "name": "$NPM_PLATFORM_PREFIX-$os-$arch") so produced
platform packages match the resolver (see NPM_PLATFORM_PREFIX and NPM_PREFIX and
the package generation block that writes package.json).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dd7b7fae-8bef-4d02-a600-da94d884c094

📥 Commits

Reviewing files that changed from the base of the PR and between 2377123 and 63d7522.

📒 Files selected for processing (3)
  • .github/workflows/npm-publish.yml
  • docs/installing-mise.md
  • scripts/release-npm.sh

jdx commented May 31, 2026

Copy link
Copy Markdown
Owner Author

Addressed the PR feedback in 6017e85:

  • platform package package.json now uses NPM_PLATFORM_PREFIX for its package name, matching the generated installer lookup
  • wrapper publish path now copies README.md into releases/npm even when PUBLISH_PLATFORM_PACKAGES=0

Re-ran:

  • git diff --check
  • bash -n scripts/release-npm.sh
  • shellcheck scripts/release-npm.sh
  • dry-run wrapper generation confirming README.md, name: mise, and scoped platform lookup

This comment was generated by an AI coding assistant.

@github-actions

github-actions Bot commented May 31, 2026

Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.16 x -- echo 25.8 ± 1.0 24.4 37.0 1.00 ± 0.05
mise x -- echo 25.7 ± 0.9 24.3 35.6 1.00

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.16 env 24.9 ± 0.6 23.9 30.2 1.01 ± 0.03
mise env 24.6 ± 0.3 23.8 26.0 1.00

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.16 hook-env 25.4 ± 0.4 24.6 28.7 1.00
mise hook-env 25.5 ± 0.3 24.6 28.4 1.00 ± 0.02

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.16 ls 21.6 ± 0.3 20.8 22.7 1.00
mise ls 21.7 ± 0.4 20.8 23.3 1.01 ± 0.02

xtasks/test/perf

Command mise-2026.5.16 mise Variance
install (cached) 181ms 176ms +2%
ls (cached) 89ms 87ms +2%
bin-paths (cached) 94ms 92ms +2%
task-ls (cached) 168ms 168ms +0%

@jdx jdx merged commit 6749dfe into main May 31, 2026
18 of 20 checks passed
@jdx jdx deleted the chore/npm-mise-package-default branch May 31, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant