Skip to content

Commit b0d8875

Browse files
committed
refactor: use regex to replace any path separator
1 parent fa90b60 commit b0d8875

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tools/node-modules/node-modules-dependencies-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class NodeModulesDependenciesBuilder
9595
.resolve(`${depDescription.name}/package.json`, {
9696
paths: [parentModulesPath],
9797
})
98-
.replace("package.json", "");
98+
.replace(/[\\/]+package\.json$/, "");
9999

100100
// if we already resolved this dependency, we return null to avoid a duplicate resolution
101101
if (

0 commit comments

Comments
 (0)