mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-23 23:29:17 -05:00
fix(deps): update @pnpm/npm-conf (#5489)
Co-authored-by: chlorine <nicksonlvqq@gmail.com>
This commit is contained in:
6
.changeset/eighty-schools-dream.md
Normal file
6
.changeset/eighty-schools-dream.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/config": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Print a warning when cannot read the builtin npm configuration.
|
||||
@@ -36,7 +36,7 @@
|
||||
"@pnpm/error": "workspace:*",
|
||||
"@pnpm/git-utils": "workspace:*",
|
||||
"@pnpm/matcher": "workspace:*",
|
||||
"@pnpm/npm-conf": "2.0.0",
|
||||
"@pnpm/npm-conf": "2.0.1",
|
||||
"@pnpm/pnpmfile": "workspace:*",
|
||||
"@pnpm/read-project-manifest": "workspace:*",
|
||||
"@pnpm/types": "workspace:*",
|
||||
|
||||
@@ -27,6 +27,8 @@ const env = {
|
||||
[PATH]: __dirname,
|
||||
}
|
||||
|
||||
const defaultWarning = expect.stringMatching(/Load npm builtin configs failed/)
|
||||
|
||||
test('getConfig()', async () => {
|
||||
const { config } = await getConfig({
|
||||
cliOptions: {},
|
||||
@@ -370,6 +372,7 @@ test('convert shamefully-flatten to hoist-pattern=* and warn', async () => {
|
||||
expect(config.hoistPattern).toStrictEqual(['*'])
|
||||
expect(config.shamefullyHoist).toBeTruthy()
|
||||
expect(warnings).toStrictEqual([
|
||||
defaultWarning,
|
||||
'The "shamefully-flatten" setting has been renamed to "shamefully-hoist". ' +
|
||||
'Also, in most cases you won\'t need "shamefully-hoist". ' +
|
||||
'Since v4, a semistrict node_modules structure is on by default (via hoist-pattern=[*]).',
|
||||
@@ -720,6 +723,7 @@ test('warn user unknown settings in npmrc', async () => {
|
||||
})
|
||||
|
||||
expect(warnings).toStrictEqual([
|
||||
defaultWarning,
|
||||
'Your .npmrc file contains unknown setting: typo-setting, mistake-setting',
|
||||
])
|
||||
|
||||
@@ -731,7 +735,9 @@ test('warn user unknown settings in npmrc', async () => {
|
||||
},
|
||||
})
|
||||
|
||||
expect(noWarnings).toStrictEqual([])
|
||||
expect(noWarnings).toStrictEqual([
|
||||
defaultWarning,
|
||||
])
|
||||
})
|
||||
|
||||
test('getConfig() converts noproxy to noProxy', async () => {
|
||||
@@ -923,5 +929,9 @@ test('return a warning when the .npmrc has an env variable that does not exist',
|
||||
},
|
||||
})
|
||||
|
||||
expect(warnings[0]).toContain('Failed to replace env in config: ${ENV_VAR_123}') // eslint-disable-line
|
||||
const expected = [
|
||||
expect.stringContaining('Failed to replace env in config: ${ENV_VAR_123}') // eslint-disable-line
|
||||
]
|
||||
|
||||
expect(warnings).toEqual(expect.arrayContaining(expected))
|
||||
})
|
||||
|
||||
15
pnpm-lock.yaml
generated
15
pnpm-lock.yaml
generated
@@ -478,8 +478,8 @@ importers:
|
||||
specifier: workspace:*
|
||||
version: link:../matcher
|
||||
'@pnpm/npm-conf':
|
||||
specifier: 2.0.0
|
||||
version: 2.0.0
|
||||
specifier: 2.0.1
|
||||
version: 2.0.1
|
||||
'@pnpm/pnpmfile':
|
||||
specifier: workspace:*
|
||||
version: link:../pnpmfile
|
||||
@@ -7434,6 +7434,15 @@ packages:
|
||||
dependencies:
|
||||
'@pnpm/network.ca-file': 1.0.1
|
||||
config-chain: 1.1.13
|
||||
dev: true
|
||||
|
||||
/@pnpm/npm-conf/2.0.1:
|
||||
resolution: {integrity: sha512-3+0d2togeuHF4WNfjMLK0MPiM2nqX31dYoaQhLTl5fNmFzn2iciB/MGs1LNMM34bcty6PYoSq0sFI77GfJ1D8g==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
'@pnpm/network.ca-file': 1.0.1
|
||||
config-chain: 1.1.13
|
||||
dev: false
|
||||
|
||||
/@pnpm/npm-lifecycle/2.0.0-1_typanion@3.12.0:
|
||||
resolution: {integrity: sha512-eUeRVUxnr9xP50ESMuRDrWYN/AQmaV2g/Wvs3ckHBx7XFJw8ljix66L7R1S1FoUqxNn0BeyPeIE9ANwn/syIAQ==}
|
||||
@@ -17135,7 +17144,7 @@ time:
|
||||
/@pnpm/meta-updater/0.2.0: '2022-09-14T15:47:23.242Z'
|
||||
/@pnpm/network.agent/0.0.3: '2022-06-12T19:51:53.044Z'
|
||||
/@pnpm/nopt/0.2.1: '2021-06-01T19:45:54.552Z'
|
||||
/@pnpm/npm-conf/2.0.0: '2022-07-31T00:06:52.248Z'
|
||||
/@pnpm/npm-conf/2.0.1: '2022-10-13T22:29:40.601Z'
|
||||
/@pnpm/npm-lifecycle/2.0.0-1: '2022-02-21T22:36:47.308Z'
|
||||
/@pnpm/npm-package-arg/1.0.0: '2022-06-28T12:48:31.287Z'
|
||||
/@pnpm/os.env.path-extender/0.2.6: '2022-08-08T10:36:30.986Z'
|
||||
|
||||
Reference in New Issue
Block a user