Skip to content

Commit

Permalink
fix: downgrade @pnpm/npm-conf to remove annoying builtin warning (#5521)
Browse files Browse the repository at this point in the history
close #5518
  • Loading branch information
lvqq committed Oct 19, 2022
1 parent 844e82f commit e7fd8a8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/flat-kings-tell.md
@@ -0,0 +1,5 @@
---
"@pnpm/config": patch
---

Downgrade @pnpm/npm-conf to remove annoying builtin warning
2 changes: 1 addition & 1 deletion packages/config/package.json
Expand Up @@ -36,7 +36,7 @@
"@pnpm/error": "workspace:*",
"@pnpm/git-utils": "workspace:*",
"@pnpm/matcher": "workspace:*",
"@pnpm/npm-conf": "2.0.1",
"@pnpm/npm-conf": "2.0.0",
"@pnpm/pnpmfile": "workspace:*",
"@pnpm/read-project-manifest": "workspace:*",
"@pnpm/types": "workspace:*",
Expand Down
8 changes: 1 addition & 7 deletions packages/config/test/index.ts
Expand Up @@ -27,8 +27,6 @@ const env = {
[PATH]: __dirname,
}

const defaultWarning = expect.stringMatching(/Load npm builtin configs failed/)

test('getConfig()', async () => {
const { config } = await getConfig({
cliOptions: {},
Expand Down Expand Up @@ -372,7 +370,6 @@ 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=[*]).',
Expand Down Expand Up @@ -723,7 +720,6 @@ test('warn user unknown settings in npmrc', async () => {
})

expect(warnings).toStrictEqual([
defaultWarning,
'Your .npmrc file contains unknown setting: typo-setting, mistake-setting',
])

Expand All @@ -735,9 +731,7 @@ test('warn user unknown settings in npmrc', async () => {
},
})

expect(noWarnings).toStrictEqual([
defaultWarning,
])
expect(noWarnings).toStrictEqual([])
})

test('getConfig() converts noproxy to noProxy', async () => {
Expand Down
15 changes: 12 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e7fd8a8

Please sign in to comment.