Skip to content

Commit 405301c

Browse files
committed
deps: minimatch@5.0.1
1 parent 7eaf32f commit 405301c

File tree

23 files changed

+2177
-3191
lines changed

23 files changed

+2177
-3191
lines changed

lib/workspaces/get-workspaces.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ const mapWorkspaces = require('@npmcli/map-workspaces')
33
const minimatch = require('minimatch')
44
const rpj = require('read-package-json-fast')
55

6+
// minimatch wants forward slashes only for glob patterns
7+
const globify = pattern => pattern.replace('\\', '/')
8+
69
// Returns an Map of paths to workspaces indexed by workspace name
710
// { foo => '/path/to/foo' }
811
const getWorkspaces = async (filters, { path, includeWorkspaceRoot, relativeFrom }) => {
@@ -22,7 +25,8 @@ const getWorkspaces = async (filters, { path, includeWorkspaceRoot, relativeFrom
2225
for (const [workspaceName, workspacePath] of workspaces.entries()) {
2326
if (filterArg === workspaceName
2427
|| resolve(relativeFrom || path, filterArg) === workspacePath
25-
|| minimatch(workspacePath, `${resolve(relativeFrom || path, filterArg)}/*`)) {
28+
|| minimatch(workspacePath, `${globify(resolve(relativeFrom || path, filterArg))}/*`)
29+
) {
2630
res.set(workspaceName, workspacePath)
2731
}
2832
}

node_modules/@npmcli/map-workspaces/node_modules/minimatch/LICENSE

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)