Skip to content

Commit cb49939

Browse files
authored
fix: pnpm workspaces respect exclude flag (#34)
1 parent 8ab0225 commit cb49939

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib/workspaces/pnpm-workspaces-parser.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
import * as debugModule from 'debug';
2-
import * as pathUtil from 'path';
32
import * as fs from 'fs';
4-
5-
const debug = debugModule('snyk-pnpm-workspaces');
3+
import * as pathUtil from 'path';
64
import * as lockFileParser from 'snyk-nodejs-lockfile-parser';
5+
import { ScannedNodeProject } from 'snyk-nodejs-lockfile-parser/dist/dep-graph-builders/types';
76
import { MultiProjectResultCustom, ScannedProjectCustom } from '../types';
87
import { sortTargetFiles } from './workspace-utils';
9-
import { ScannedNodeProject } from 'snyk-nodejs-lockfile-parser/dist/dep-graph-builders/types';
8+
9+
const debug = debugModule('snyk-pnpm-workspaces');
1010

1111
export async function processPnpmWorkspaces(
1212
root: string,
1313
settings: {
1414
strictOutOfSync?: boolean;
1515
dev?: boolean;
1616
optional?: boolean;
17+
exclude?: string;
1718
},
1819
targetFiles: string[],
1920
): Promise<MultiProjectResultCustom> {
@@ -51,6 +52,7 @@ export async function processPnpmWorkspaces(
5152
settings.strictOutOfSync === undefined
5253
? true
5354
: settings.strictOutOfSync,
55+
exclude: settings.exclude,
5456
});
5557
result.scannedProjects = result.scannedProjects.concat(
5658
scannedProjects as ScannedProjectCustom[],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"lodash.isempty": "^4.4.0",
4343
"lodash.sortby": "^4.7.0",
4444
"micromatch": "4.0.8",
45-
"snyk-nodejs-lockfile-parser": "1.58.19",
45+
"snyk-nodejs-lockfile-parser": "2.4.3",
4646
"snyk-resolve-deps": "4.8.0"
4747
},
4848
"overrides": {

0 commit comments

Comments
 (0)