Skip to content

Commit e680691

Browse files
fix: run pnpm dedupe --offline in cleanups (#1611)
## PR Checklist - [x] Addresses an existing open issue: fixes #1610 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Doesn't impact `pnpm lint:packages`, just the migration/setup scripts. 💖
1 parent 80a80cc commit e680691

4 files changed

+6
-6
lines changed

Diff for: src/shared/createCleanupCommands.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe("createCleanupCommands", () => {
1919
});
2020

2121
expect(actual).toEqual([
22-
"pnpm dedupe",
22+
"pnpm dedupe --offline",
2323
"pnpm build",
2424
"pnpm lint --fix",
2525
"pnpm format --write",

Diff for: src/shared/createCleanupCommands.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function createCleanupCommands({
66
}: Pick<Options, "bin" | "mode">) {
77
return [
88
// There's no need to dedupe when initializing from the fixed template
9-
...(mode === "initialize" ? [] : ["pnpm dedupe"]),
9+
...(mode === "initialize" ? [] : ["pnpm dedupe --offline"]),
1010
// n/no-missing-import rightfully reports on a missing the bin .js file
1111
...(bin ? ["pnpm build"] : []),
1212
"pnpm lint --fix",

Diff for: src/steps/finalizeDependencies.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe("finalize", () => {
4444
"npx all-contributors-cli generate",
4545
],
4646
[
47-
"pnpm dedupe",
47+
"pnpm dedupe --offline",
4848
],
4949
]
5050
`);
@@ -65,7 +65,7 @@ describe("finalize", () => {
6565
"npx all-contributors-cli generate",
6666
],
6767
[
68-
"pnpm dedupe",
68+
"pnpm dedupe --offline",
6969
],
7070
]
7171
`);
@@ -95,7 +95,7 @@ describe("finalize", () => {
9595
"pnpm add @eslint-community/eslint-plugin-eslint-comments@latest @eslint/js@latest @types/eslint-plugin-markdown@latest @types/eslint__js@latest @types/node@latest eslint@latest eslint-plugin-jsdoc@latest eslint-plugin-n@latest eslint-plugin-regexp@latest husky@latest lint-staged@latest prettier@latest prettier-plugin-curly@latest prettier-plugin-packagejson@latest prettier-plugin-sh@latest tsup@latest typescript@latest typescript-eslint@latest -D",
9696
],
9797
[
98-
"pnpm dedupe",
98+
"pnpm dedupe --offline",
9999
],
100100
]
101101
`);

Diff for: src/steps/finalizeDependencies.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ export async function finalizeDependencies(options: Options) {
7373
);
7474
}
7575

76-
await execaCommand(`pnpm dedupe`);
76+
await execaCommand(`pnpm dedupe --offline`);
7777
}

0 commit comments

Comments
 (0)