Skip to content

Commit 2629bcd

Browse files
author
SamTV12345
committed
chore: use new flag
1 parent dca7cce commit 2629bcd

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/static/js/pluginfw/installer.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ const wrapTaskCb = (cb: Function | null) => taskQueue.wrap(cb);
5353
const migratePluginsFromNodeModules = async () => {
5454
logger.info('start migration of plugins in node_modules');
5555
// Notes:
56-
// * Do not pass `--prod` otherwise `npm ls` will fail if there is no `package.json`.
57-
// * The `--no-production` flag is required (or the `NODE_ENV` environment variable must be
58-
// unset or set to `development`) because otherwise `npm ls` will not mention any packages
56+
// * Do not pass `--prod` otherwise `pnpm ls` will fail if there is no `package.json`.
57+
// * The `--no-prod` flag is required (or the `NODE_ENV` environment variable must be
58+
// unset or set to `development`) because otherwise `pnpm ls` will not mention any packages
5959
// that are not included in `package.json` (which is expected to not exist).
60-
const cmd = ['pnpm', 'ls', '--long', '--json', '--depth=0', '--no-production'];
60+
// (pnpm 12 renamed `--no-production` to `--no-prod`.)
61+
const cmd = ['pnpm', 'ls', '--long', '--json', '--depth=0', '--no-prod'];
6162
const [{dependencies = {}}] = JSON.parse(await runCmd(cmd,
6263
{stdio: [null, 'string']}));
6364

0 commit comments

Comments
 (0)