fix: don't fail when cafile is set

close #4877
This commit is contained in:
Zoltan Kochan
2022-06-11 04:27:18 +03:00
parent f7390f53f0
commit 25798aad17
5 changed files with 33 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/config": patch
"pnpm": patch
---
Don't fail when the cafile setting is specified [#4877](https://github.com/pnpm/pnpm/issues/4877). This fixes a regression introduced in pnpm v7.2.0.

View File

@@ -34,7 +34,7 @@
"dependencies": {
"@pnpm/constants": "workspace:6.1.0",
"@pnpm/error": "workspace:3.0.1",
"@pnpm/npm-conf": "1.0.3",
"@pnpm/npm-conf": "1.0.4",
"@pnpm/pnpmfile": "workspace:2.0.3",
"@pnpm/read-project-manifest": "workspace:3.0.3",
"@pnpm/types": "workspace:8.1.0",

View File

@@ -0,0 +1 @@
xxx

View File

@@ -790,3 +790,17 @@ test('getConfig() sets sideEffectsCacheRead and sideEffectsCacheWrite when side-
expect(config.sideEffectsCacheRead).toBeTruthy()
expect(config.sideEffectsCacheWrite).toBeTruthy()
})
test('getConfig() should read cafile', async () => {
const { config } = await getConfig({
cliOptions: {
cafile: path.join(__dirname, 'cafile.txt'),
},
packageManager: {
name: 'pnpm',
version: '1.0.0',
},
})
expect(config).toBeDefined()
expect(config.ca).toBe('xxx')
})

13
pnpm-lock.yaml generated
View File

@@ -345,7 +345,7 @@ importers:
'@pnpm/config': workspace:15.2.0
'@pnpm/constants': workspace:6.1.0
'@pnpm/error': workspace:3.0.1
'@pnpm/npm-conf': 1.0.3
'@pnpm/npm-conf': 1.0.4
'@pnpm/pnpmfile': workspace:2.0.3
'@pnpm/prepare': workspace:*
'@pnpm/read-project-manifest': workspace:3.0.3
@@ -364,7 +364,7 @@ importers:
dependencies:
'@pnpm/constants': link:../constants
'@pnpm/error': link:../error
'@pnpm/npm-conf': 1.0.3
'@pnpm/npm-conf': 1.0.4
'@pnpm/pnpmfile': link:../pnpmfile
'@pnpm/read-project-manifest': link:../read-project-manifest
'@pnpm/types': link:../types
@@ -5129,6 +5129,15 @@ packages:
dependencies:
'@pnpm/network.ca-file': 1.0.1
config-chain: 1.1.13
dev: true
/@pnpm/npm-conf/1.0.4:
resolution: {integrity: sha512-o5YFq/+ksEJMbSzzkaQDHlp00aonLDU5xNPVTRL12hTWBbVSSeWXxPukq75h+mvXnoOWT95vV2u1HSTw2C4XOw==}
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:
resolution: {integrity: sha512-eUeRVUxnr9xP50ESMuRDrWYN/AQmaV2g/Wvs3ckHBx7XFJw8ljix66L7R1S1FoUqxNn0BeyPeIE9ANwn/syIAQ==}