Skip to content

feat(use): add --here for nested projects - #916

Closed
Aschenbath wants to merge 1 commit into
nodejs:mainfrom
Aschenbath:feat/use-here-607
Closed

Aschenbath wants to merge 1 commit into
nodejs:mainfrom
Aschenbath:feat/use-here-607

Conversation

@Aschenbath

Copy link
Copy Markdown

An independent project nested under another Corepack project cannot currently direct corepack use to its own manifest when a parent already defines packageManager. Add corepack use <pattern> --here to update or create package.json in the current directory.

The option limits both manifest and environment-file lookup to that directory, validates its own devEngines.packageManager, and runs the usual installation there. Normal parent lookup remains the default. The command help and README document the option.

Validation on Node.js 24.20.0:

  • Bundle and shims built successfully.
  • Full Vitest suite in replay mode with retries disabled: 9 files passed; 181 tests passed and 1 existing expected failure (182 total).
  • Repository-wide ESLint with --max-warnings=0, TypeScript, and git diff --check passed.
  • Ten new CLI regressions cover existing/missing child manifests, parent constraints and malformed parent JSON, normal lookup and --no-here, local validation, environment-file boundaries, and a real Yarn lifecycle script that records its working directory.

The local runner isolates inherited proxy settings from CLI fixtures while retaining proxy access for the live npm-key check. Compilation caches are disabled to accommodate the small temporary filesystem. No tests were skipped for these environment adjustments.

Closes #607.

Implementation and automated validation were performed by Codex.

@aduh95

aduh95 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

This account has opened more than 10 PRs in the last 24 hours. This looks like bot activity, and will result in a ban if the behavior continues.

@aduh95 aduh95 closed this Oct 20, 2026
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.

corepack use in monorepo targets root not project package.json

2 participants