mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-12 18:49:41 -04:00
fix(audit): public registry responds with 502 error (#3403)
close #2848
This commit is contained in:
5
.changeset/wild-tools-taste.md
Normal file
5
.changeset/wild-tools-taste.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/audit": patch
|
||||
---
|
||||
|
||||
Escape the dependency names to avoud 502 errors from the registry.
|
||||
@@ -28,7 +28,10 @@ export default function lockfileToAuditTree (
|
||||
const dependencies = {}
|
||||
importerWalkers.forEach((importerWalker) => {
|
||||
const importerDeps = lockfileToAuditNode(importerWalker.step)
|
||||
dependencies[importerWalker.importerId] = {
|
||||
// For some reason the registry responds with 500 if the keys in dependencies have slashes
|
||||
// see issue: https://github.com/pnpm/pnpm/issues/2848
|
||||
const depName = importerWalker.importerId.replace(/\//g, '__')
|
||||
dependencies[depName] = {
|
||||
dependencies: importerDeps,
|
||||
requires: toRequires(importerDeps),
|
||||
version: '0.0.0',
|
||||
|
||||
Reference in New Issue
Block a user