The Rust CLI registers only `--prod` on `install`, so the `pnpm install …` command the verify-deps-before-run gate reproduces from a production-only install — built with pnpm's `--production` spelling — was rejected by the argument parser, aborting every `pnpm run` (Closes pnpm/pnpm#14147). `--production` is the setting name behind `--prod`, and the TypeScript CLI accepts it on every command where `--prod` selects dependency groups, so restore it as an alias there too (`audit`, `licenses` and `outdated` already had it), and emit the documented `--prod` in the reproduction command in both stacks. Closes #14147
17 lines
659 B
TypeScript
17 lines
659 B
TypeScript
import { describe, expect, test } from '@jest/globals'
|
|
|
|
import { createInstallArgs } from '../src/runDepsStatusCheck.js'
|
|
|
|
describe('createInstallArgs', () => {
|
|
test.each([
|
|
[{ production: true, optional: true }, ['--prod']],
|
|
[{ production: true, optional: false }, ['--prod', '--no-optional']],
|
|
[{ dev: true, optional: true }, ['--dev']],
|
|
[{ dev: true, optional: false }, ['--dev', '--no-optional']],
|
|
[{ production: true, dev: true, optional: true }, []],
|
|
[{ production: true, dev: true, optional: false }, ['--no-optional']],
|
|
])('%o -> %o', (opts, expected) => {
|
|
expect(createInstallArgs(opts)).toStrictEqual(expected)
|
|
})
|
|
})
|