feat(mise): corepack module and npm globals migration on node upgrade - #2
Merged
Merged
Conversation
- Add module_corepack.sh: runs `corepack enable` after mise configures node, restoring pnpm/yarn shims that are bundled inside each Node.js install but disabled by default - Add db_confirm() helper to core_files.sh for default-yes prompts - Update module_mise.sh: snapshot global npm packages before a node version upgrade, then prompt the user to reinstall them into the new version (with a warning that version pins and custom config won't carry) - Wire corepack module into build.sh and module registration (runs after mise so node is guaranteed to exist) Fixes the regression where upgrading node via `mise use -g node@lts` silently dropped globally-installed npm packages (e.g. pnpm) from the new install.
Owner
Author
|
@copilot review |
The db_confirm helper used ${reply,,} (bash 4+ feature) which broke
the bash 3.x compatibility test. Replace with tr '[:upper:]' '[:lower:]'
for portable case folding.
Also rebuild devboost.sh to include the fix.
Agent-Logs-Url: https://github.com/rolfsormo/devboost/sessions/0a9f64de-8440-41db-b9f4-a77f33dc1cb4
Co-authored-by: rolfsormo <1366797+rolfsormo@users.noreply.github.com>
Found and fixed one bug during review: Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
module_corepack: runscorepack enableafter mise configures node, automatically restoring the pnpm/yarn shims that are bundled inside every Node.js install but disabled by default. This fixes the regression where running devboost would silently breakpnpm(andyarn) by upgrading to a fresh node install with no shims.db_confirmhelper: added tocore/core_files.shfor default-yes/no interactive prompts — reusable by other modules.Root cause
mise use -g node@ltsupgraded node from 24.15.0 → 24.16.0. The new install is a fresh node with no global npm packages and corepack shims disabled, sopnpmdisappeared from$PATH.Test plan
devboost applyon a machine with a mise-managed node that has global npm packages — confirm prompt appears and packages reinstall correctlydevboost applywhen node version is already current — confirm no prompt appearsdevboost plan— confirm both "Would configure mise toolchains" and "Would run: corepack enable" appear, no crashespnpm --versionworks in a new shell