From 6d6e86814cad1154f2e1f2d6a86a1f1902fbdf1a Mon Sep 17 00:00:00 2001 From: MrBBot Date: Fri, 6 Jan 2023 10:05:04 +0000 Subject: [PATCH] Only update `package-lock.json` when running changeset version script (#2506) #2489 broke the `Release` CI with an error that `patch-package` couldn't be found when running `changeset-version.js`. It looks like the `npm install` script in `changeset-version.js` is only installing production dependencies. Moving `patch-package` to `dependencies` leads to another error that `ink` cannot be found to apply the patch to. However, the only reason we run `npm install` here is to update `package-lock.json`, so we don't need to be running `postinstall` scripts. Therefore, this PR adds the `--package-lock-only` flag. See https://docs.npmjs.com/cli/v9/commands/npm-install. --- .github/changeset-version.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/changeset-version.js b/.github/changeset-version.js index 10916dfbc8b7..ac9b1ddabd0c 100644 --- a/.github/changeset-version.js +++ b/.github/changeset-version.js @@ -6,4 +6,4 @@ const { execSync } = require("node:child_process"); // This is a workaround until this is handled automatically by `changeset version`. // See https://github.com/changesets/changesets/issues/421. execSync("npx changeset version"); -execSync("npm install"); +execSync("npm install --package-lock-only");