mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
fix: ignore case, when verifying package name in the store (#4368)
close #4367
This commit is contained in:
6
.changeset/brave-ties-begin.md
Normal file
6
.changeset/brave-ties-begin.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/package-requester": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Ignore case, when verifying package name in the store [#4367](https://github.com/pnpm/pnpm/issues/4367).
|
||||
@@ -446,7 +446,7 @@ function fetchToStore (
|
||||
(
|
||||
pkgFilesIndex.name != null &&
|
||||
opts.pkg.name != null &&
|
||||
pkgFilesIndex.name !== opts.pkg.name
|
||||
pkgFilesIndex.name.toLowerCase() !== opts.pkg.name.toLowerCase()
|
||||
) ||
|
||||
(
|
||||
pkgFilesIndex.version != null &&
|
||||
|
||||
@@ -943,6 +943,28 @@ test('throw exception if the package data in the store differs from the expected
|
||||
})
|
||||
await expect(files()).resolves.toStrictEqual(expect.anything())
|
||||
}
|
||||
|
||||
{
|
||||
const requestPackage = createPackageRequester({
|
||||
resolve,
|
||||
fetchers,
|
||||
cafs,
|
||||
networkConcurrency: 1,
|
||||
storeDir,
|
||||
verifyStoreIntegrity: true,
|
||||
})
|
||||
const { files } = requestPackage.fetchPackageToStore({
|
||||
force: false,
|
||||
lockfileDir: tempy.directory(),
|
||||
pkg: {
|
||||
name: 'IS-positive',
|
||||
version: 'v1.0.0',
|
||||
id: pkgResponse.body.id,
|
||||
resolution: pkgResponse.body.resolution,
|
||||
},
|
||||
})
|
||||
await expect(files()).resolves.toStrictEqual(expect.anything())
|
||||
}
|
||||
})
|
||||
|
||||
test('the version in the bundled manifest should be normalized', async () => {
|
||||
|
||||
Reference in New Issue
Block a user