mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-25 08:08:14 -05:00
6
.changeset/kind-trees-pay.md
Normal file
6
.changeset/kind-trees-pay.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/config": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Use `pnpm_config_` env variables instead of `npm_config_` [#9571](https://github.com/pnpm/pnpm/pull/9571).
|
||||
@@ -395,7 +395,8 @@ export async function getConfig (opts: {
|
||||
}
|
||||
|
||||
pnpmConfig.extraEnv = {
|
||||
npm_config_verify_deps_before_run: 'false',
|
||||
npm_config_verify_deps_before_run: 'false', // This should be removed in pnpm v11
|
||||
pnpm_config_verify_deps_before_run: 'false',
|
||||
}
|
||||
if (pnpmConfig.preferSymlinkedExecutables && !isWindows()) {
|
||||
const cwd = pnpmConfig.lockfileDir ?? pnpmConfig.dir
|
||||
|
||||
@@ -91,8 +91,8 @@ test('single package workspace', async () => {
|
||||
expect(stdout.toString()).toContain('hello from exec')
|
||||
}
|
||||
|
||||
// should set env.npm_config_verify_deps_before_run to false for the script (to skip check for nested script)
|
||||
await execPnpm([...CONFIG, 'exec', 'node', '--eval', 'assert.strictEqual(process.env.npm_config_verify_deps_before_run, "false")'])
|
||||
// should set env.pnpm_config_verify_deps_before_run to false for the script (to skip check for nested script)
|
||||
await execPnpm([...CONFIG, 'exec', 'node', '--eval', 'assert.strictEqual(process.env.pnpm_config_verify_deps_before_run, "false")'])
|
||||
})
|
||||
|
||||
test('multi-project workspace', async () => {
|
||||
@@ -339,6 +339,6 @@ test('multi-project workspace', async () => {
|
||||
expect(stdout.toString()).toContain(`hello from exec: ${process.cwd()}`)
|
||||
}
|
||||
|
||||
// should set env.npm_config_verify_deps_before_run to false for all the scripts (to skip check for nested script)
|
||||
await execPnpm([...CONFIG, 'exec', 'node', '--eval', 'assert.strictEqual(process.env.npm_config_verify_deps_before_run, "false")'])
|
||||
// should set env.pnpm_config_verify_deps_before_run to false for all the scripts (to skip check for nested script)
|
||||
await execPnpm([...CONFIG, 'exec', 'node', '--eval', 'assert.strictEqual(process.env.pnpm_config_verify_deps_before_run, "false")'])
|
||||
})
|
||||
|
||||
@@ -9,7 +9,7 @@ import { execPnpm, execPnpmSync, pnpmBinLocation } from '../utils'
|
||||
const CONFIG = ['--config.verify-deps-before-run=error'] as const
|
||||
|
||||
test('single dependency', async () => {
|
||||
const checkEnv = 'node --eval "assert.strictEqual(process.env.npm_config_verify_deps_before_run, \'false\')"'
|
||||
const checkEnv = 'node --eval "assert.strictEqual(process.env.pnpm_config_verify_deps_before_run, \'false\')"'
|
||||
|
||||
const manifests: Record<string, ProjectManifest> = {
|
||||
root: {
|
||||
@@ -295,7 +295,7 @@ test('single dependency', async () => {
|
||||
expect(stdout.toString()).toContain('hello from root')
|
||||
}
|
||||
|
||||
// should set env.npm_config_verify_deps_before_run to false for all the scripts (to skip check in nested scripts)
|
||||
// should set env.pnpm_config_verify_deps_before_run to false for all the scripts (to skip check in nested scripts)
|
||||
await execPnpm([...CONFIG, '--recursive', 'run', 'checkEnv'])
|
||||
})
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ test('single dependency', async () => {
|
||||
},
|
||||
scripts: {
|
||||
start: 'echo hello from script',
|
||||
checkEnv: 'node --eval "assert.strictEqual(process.env.npm_config_verify_deps_before_run, \'false\')"',
|
||||
checkEnv: 'node --eval "assert.strictEqual(process.env.pnpm_config_verify_deps_before_run, \'false\')"',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ test('single dependency', async () => {
|
||||
expect(stdout.toString()).toContain('hello from script')
|
||||
}
|
||||
|
||||
// should set env.npm_config_verify_deps_before_run to false for the script (to skip check in nested script)
|
||||
// should set env.pnpm_config_verify_deps_before_run to false for the script (to skip check in nested script)
|
||||
await execPnpm([...CONFIG, 'run', 'checkEnv'])
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user