From fd682fb4177e1f9bde768c1b7581c7bc50e64262 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 21:10:02 +0000 Subject: [PATCH 1/3] Update Rush command guidance in copilot instructions Agent-Logs-Url: https://github.com/microsoft/rushstack/sessions/5a9639e9-0f43-402c-aa26-b6303dd01505 Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com> --- .github/copilot-instructions.md | 36 ++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 6f7d69f118d..c487c8570f6 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -140,7 +140,7 @@ The standard directory structure for a Rush monorepo is as follows: // Allow certain dependencies to use multiple different versions "allowedAlternativeVersions": { - "typescript": ["~4.5.0", "~4.6.0"] + "typescript": ["~4.6.0"] } } ``` @@ -193,32 +193,36 @@ Choose the correct command tool based on different scenarios: ## 3.2 Common Commands Explained -1. `rush update` - - Function: Install and update dependencies +1. `rush install` + - Function: Install dependencies based on existing shrinkwrap file + - Features: + - Most common day-to-day dependency command + - Read-only operation, won't modify shrinkwrap file + - Suitable for CI environment - Important parameters: - `-p, --purge`: Clean before installation - `--bypass-policy`: Bypass gitPolicy rules - `--no-link`: Don't create project symlinks - - `--network-concurrency COUNT`: Limit concurrent network requests - Use cases: - After first cloning repository - After pulling new Git changes - - After modifying package.json - - When dependencies need updating + - After switching branches + - CI/CD pipeline + - Ensuring dependency version consistency + - Avoiding accidental shrinkwrap file updates -2. `rush install` - - Function: Install dependencies based on existing shrinkwrap file - - Features: - - Read-only operation, won't modify shrinkwrap file - - Suitable for CI environment +2. `rush update` + - Function: Update dependencies and lockfiles - Important parameters: - `-p, --purge`: Clean before installation - `--bypass-policy`: Bypass gitPolicy rules - `--no-link`: Don't create project symlinks + - `--network-concurrency COUNT`: Limit concurrent network requests - Use cases: - - CI/CD pipeline - - Ensuring dependency version consistency - - Avoiding accidental shrinkwrap file updates + - Run only when `rush install` explicitly reports that `rush update` is required (do not run it preemptively) + - Commit hygiene: + - Commit files modified by `rush update` in a dedicated commit named `(chore) rush update` + - During a rebase, drop all `(chore) rush update` commits, rerun `rush update`, and create a fresh `(chore) rush update` commit 3. `rush build` - Function: Incremental project build @@ -290,7 +294,7 @@ Specify in `rush.json`: // Allow certain dependencies to use multiple versions "allowedAlternativeVersions": { - "typescript": ["~4.5.0", "~4.6.0"] + "typescript": ["~4.6.0"] } } ``` @@ -398,7 +402,7 @@ When running commands like `install`, `update`, `build`, `rebuild`, etc., by def 1. Dependency Issue Handling - Avoid directly using `npm`, `pnpm`, `yarn` package managers - Use `rush purge` to clean all temporary files - - Run `rush update --recheck` to force check all dependencies + - Run `rush install` first; only run `rush update` if `rush install` explicitly tells you to do so 2. Build Issue Handling - Use `rush rebuild` to skip cache and perform complete build From 13e8f7c03fc66d10e73bda1cd99c3c74088ae655 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 21:10:37 +0000 Subject: [PATCH 2/3] Refine rush update guidance wording Agent-Logs-Url: https://github.com/microsoft/rushstack/sessions/5a9639e9-0f43-402c-aa26-b6303dd01505 Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com> --- .github/copilot-instructions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index c487c8570f6..5aa4619691e 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -219,10 +219,10 @@ Choose the correct command tool based on different scenarios: - `--no-link`: Don't create project symlinks - `--network-concurrency COUNT`: Limit concurrent network requests - Use cases: - - Run only when `rush install` explicitly reports that `rush update` is required (do not run it preemptively) + - Run only when `rush install` fails and explicitly reports that `rush update` is required (for example, lockfile out-of-sync errors); do not run it preemptively - Commit hygiene: - Commit files modified by `rush update` in a dedicated commit named `(chore) rush update` - - During a rebase, drop all `(chore) rush update` commits, rerun `rush update`, and create a fresh `(chore) rush update` commit + - During a rebase, drop all `(chore) rush update` commits, rerun `rush update`, and create a fresh `(chore) rush update` commit so lockfile updates are regenerated from the rebased dependency state 3. `rush build` - Function: Incremental project build From e0668cec43e110da427be3c6cf1bb9bdd2e3c7b8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 21:19:11 +0000 Subject: [PATCH 3/3] Add rush update --recheck guidance for pnpm-config.json/.pnpmfile.cjs changes Agent-Logs-Url: https://github.com/microsoft/rushstack/sessions/63c96529-dda7-4592-993f-1e319c628d47 Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com> --- .github/copilot-instructions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 5aa4619691e..5f19c7f6942 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -220,6 +220,7 @@ Choose the correct command tool based on different scenarios: - `--network-concurrency COUNT`: Limit concurrent network requests - Use cases: - Run only when `rush install` fails and explicitly reports that `rush update` is required (for example, lockfile out-of-sync errors); do not run it preemptively + - Use `rush update --recheck` when you have modified `pnpm-config.json` or `.pnpmfile.cjs` and expect lockfile changes that bare `rush update` does not produce - Commit hygiene: - Commit files modified by `rush update` in a dedicated commit named `(chore) rush update` - During a rebase, drop all `(chore) rush update` commits, rerun `rush update`, and create a fresh `(chore) rush update` commit so lockfile updates are regenerated from the rebased dependency state