You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Skip already-installed npm globals so bootstrap reruns are idempotent - #38
The npm package type now lists the installed globals with npm ls -g --depth=0 --json and runs npm install -g only for the missing ones. Each installed package gets a skip log line, the same as the winget precheck. Released as 1.3.2.
npm install -g retires and re-extracts every named package, even one that is already current. On Windows that rename fails with EBUSY while another process holds a file in the package dir open, such as an editor's running pyright language server, so a plain rerun of the bootstrap aborted at the npm step:
The npm ls exit code is ignored because it exits 1 on extraneous or invalid deps but still prints the full tree. Empty or non-JSON output (npm not installed yet) counts as nothing installed, so the install runs and fails loudly as before. A spec with a version suffix (pkg@1.2) never matches an installed name, so it always installs.
Reruns leave installed globals at their current version; upgrading them is out of scope for bootstrap.
Tested with make ci (new tests/test_npm.py), plus a dry run against real npm on Windows with the install call stubbed out: all five configured globals were detected and no install ran.
The `npm` package type now lists the installed globals with `npm ls -g --depth=0 --json` and runs `npm install -g` only for the missing ones.
`npm install -g` retires and re-extracts every named package, even one that is already current. On Windows that rename fails with EBUSY while another process holds a file in the package dir open, such as an editor's running `pyright` language server, so a plain rerun of the bootstrap aborted at the npm step. The winget step already skips installed packages the same way.
Reruns no longer upgrade npm globals; `npm update -g` does that.
Gives the changelog entry a version instead of Unreleased and bumps `pyproject.toml` and `uv.lock` to match. Drops the note telling users to run `npm update -g` by hand; upgrading installed globals is the machine's update routine, not bootstrap's.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The npm precheck must refresh Windows PATH to support reruns from a stale parent shell.
Review effort: Balanced Findings: None
Previously missed (1)
In code that hasn't changed since last review
Refresh PATH before npm checks to support same-shell reruns
bootstrap/utils.py:189
Refresh PATH before invoking npm. On Windows, an unchanged parent shell can still have the pre-install PATH; if winget detects Node is already installed, it skips run_cmd, so the refresh at utils.py:89 never runs and this check (and the subsequent install) reports npm missing. This makes the common rerun from the same shell fail instead of becoming idempotent.
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
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.
The
npmpackage type now lists the installed globals withnpm ls -g --depth=0 --jsonand runsnpm install -gonly for the missing ones. Each installed package gets a skip log line, the same as the winget precheck. Released as 1.3.2.npm install -gretires and re-extracts every named package, even one that is already current. On Windows that rename fails with EBUSY while another process holds a file in the package dir open, such as an editor's runningpyrightlanguage server, so a plain rerun of the bootstrap aborted at the npm step:The
npm lsexit code is ignored because it exits 1 on extraneous or invalid deps but still prints the full tree. Empty or non-JSON output (npm not installed yet) counts as nothing installed, so the install runs and fails loudly as before. A spec with a version suffix (pkg@1.2) never matches an installed name, so it always installs.Reruns leave installed globals at their current version; upgrading them is out of scope for bootstrap.
Tested with
make ci(newtests/test_npm.py), plus a dry run against real npm on Windows with the install call stubbed out: all five configured globals were detected and no install ran.