Skip to content

Commit 3a27b36

Browse files
fix: update npx command in setup.js (#315)
* fix: update npx command in setup.js If the `all-contributors` package is not already installed on the local machine, the script exits. We can pass `--yes` to autoinstall it. * Revert "fix: update npx command in setup.js" This reverts commit db12d40. * fix: use all-contributors-cli locally This means the setup.js doesn't need to install any packages. * Update script/setup.js * Knip ignoreDependencies for all-contributors-cli --------- Co-authored-by: Josh Goldberg <[email protected]>
1 parent f122094 commit 3a27b36

File tree

4 files changed

+151
-2
lines changed

4 files changed

+151
-2
lines changed

knip.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "https://unpkg.com/knip@next/schema.json",
33
"entry": ["src/index.ts!", "script/setup*.js"],
4+
"ignoreDependencies": ["all-contributors-cli"],
45
"project": ["src/**/*.ts!", "script/**/*.js"]
56
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"@typescript-eslint/eslint-plugin": "^5.48.2",
4242
"@typescript-eslint/parser": "^5.48.2",
4343
"@vitest/coverage-istanbul": "^0.29.0",
44+
"all-contributors-cli": "^6.24.0",
4445
"chalk": "^5.2.0",
4546
"cspell": "^6.19.2",
4647
"eslint": "^8.32.0",

pnpm-lock.yaml

Lines changed: 147 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

script/setup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ try {
181181
console.log();
182182
console.log(chalk.gray`Generating all-contributors table in README.md...`);
183183

184-
await $`npx all-contributors generate`;
184+
await $`pnpm all-contributors generate`;
185185

186186
console.log(chalk.gray`✔️ Done.`);
187187

@@ -302,7 +302,7 @@ try {
302302
console.log(
303303
chalk.gray`Removing devDependency packages only used for setup...`
304304
);
305-
await $`pnpm remove @clack/prompts chalk octokit replace-in-file -D`;
305+
await $`pnpm remove @clack/prompts all-contributors-cli chalk octokit replace-in-file -D`;
306306
console.log(chalk.gray`✔️ Done.`);
307307
}
308308

0 commit comments

Comments
 (0)