Skip to content

fix(global): ignore project node version for global pm#1866

Open
leno23 wants to merge 5 commits into
voidzero-dev:mainfrom
leno23:codex/global-pm-node-default-1621
Open

fix(global): ignore project node version for global pm#1866
leno23 wants to merge 5 commits into
voidzero-dev:mainfrom
leno23:codex/global-pm-node-default-1621

Conversation

@leno23

@leno23 leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a managed-global-package Node.js resolver that skips project-level .node-version and package.json engine fields.
  • Uses that resolver for vp install -g / vp add -g, global update node-mismatch checks, and global outdated registry lookups.
  • Keeps explicit --node, VP_NODE_VERSION, session file, user default, and LTS fallback behavior intact.

Closes #1621

Test Plan

  • git diff --check
  • RUSTUP_TOOLCHAIN=stable rustfmt --edition 2024 --check crates/vite_global_cli/src/cli.rs crates/vite_global_cli/src/commands/env/config.rs crates/vite_global_cli/src/commands/global/install.rs crates/vite_global_cli/src/commands/global/mod.rs

Attempted but blocked locally:

  • cargo fmt --check and cargo test -p vite-global-cli test_resolve_global_package_version -- --nocapture were blocked because the repo nightly toolchain (nightly-2026-06-10) was partially installed and rustup stalled while downloading the required components.
  • Running the focused cargo test with RUSTUP_TOOLCHAIN=stable reached dependency resolution but failed because this workspace needs nightly -Z bindeps for fspy from vite-task.

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 4794213
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a33b584203c3a0008d269b3

@leno23 leno23 marked this pull request as ready for review June 18, 2026 04:57

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56a86e765a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vite_global_cli/src/commands/global/install.rs
@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Pushed a targeted clippy fix for the unused current_dir import in crates/vite_global_cli/src/commands/global/install.rs. git diff --check passes locally; cargo fmt could not run because the local nightly rustfmt binary is missing its librustc_driver dylib.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up pushed: updated the failing global snap fixtures from the latest CI diffs. The pnpm project-node fixture now uses Node 22.13.0 so latest pnpm can still exercise the intended inheritance behavior, and the global-install nodeVersion snapshots match the current CI runtime. Local checks: git diff --check. Targeted snap-test could not run locally because this checkout is missing packages/cli/dist, and pnpm -F vite-plus build-ts is blocked by the local tsdown/rolldown install state (missing rolldown/dist/index.mjs).

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Pushed another CI fix in 2b563c8: pinned the devEngines precedence test to Node 22.13.0 so the musl job does not chase a Node release without a checksum entry, and updated the pnpm project-node-version snapshot to match the current CLI output. Local git diff --check passes; the targeted cargo test could not start locally because the configured Rust toolchain manifest is missing on this machine, so I am letting CI validate it.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the Codex corepack fallback finding in 4794213: the auto-install path now passes the already resolved project Node version into the managed corepack install instead of resolving with None/global defaults.

Local validation:

  • git diff --check passed

I attempted cargo fmt --check -- crates/vite_global_cli/src/shim/corepack.rs, but this checkout's configured nightly rustfmt cannot start because its librustc_driver dylib is missing, so CI will need to cover Rust formatting/tests.

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.

Do not resolve project-level Node.js version for global pm commands

1 participant