Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: downgrade @pnpm/npm-conf to remove annoying builtin warning #5521

Merged
merged 1 commit into from Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.