mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-25 08:08:14 -05:00
fix: remove empty keys from config key check (#3105)
* fix: remove empty keys from config key check close #3104 * Update packages/config/src/index.ts Co-authored-by: Zoltan Kochan <zkochan@users.noreply.github.com> Co-authored-by: Zoltan Kochan <zkochan@users.noreply.github.com>
This commit is contained in:
5
.changeset/proud-lies-shout.md
Normal file
5
.changeset/proud-lies-shout.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/config": patch
|
||||
---
|
||||
|
||||
fix: remove empty keys from config key check
|
||||
@@ -395,7 +395,7 @@ export default async (
|
||||
const settingKeys = Object.keys({
|
||||
...npmConfig?.sources?.workspace?.data,
|
||||
...npmConfig?.sources?.project?.data,
|
||||
})
|
||||
}).filter(key => key.trim() !== '')
|
||||
const unknownKeys = []
|
||||
for (const key of settingKeys) {
|
||||
if (!rcOptions.includes(key) && !key.startsWith('//') && !(key.startsWith('@') && key.endsWith(':registry'))) {
|
||||
|
||||
@@ -634,6 +634,7 @@ test('warn user unknown settings in npmrc', async () => {
|
||||
process.chdir(tmp)
|
||||
const npmrc = [
|
||||
'typo-setting=true',
|
||||
' ',
|
||||
'mistake-setting=false',
|
||||
'//foo.bar:_authToken=aaa',
|
||||
'@qar:registry=https://registry.example.org/',
|
||||
|
||||
Reference in New Issue
Block a user