Skip to content

Commit

Permalink
Merge pull request #59 from snyk/fix/update-fast-globs
Browse files Browse the repository at this point in the history
[COD-268] fix: upgrade fast-globs to snyk patch
  • Loading branch information
j-sp4 committed Feb 26, 2021
2 parents 476d96d + 9a99125 commit 0d61fd8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"lodash.union": "^4.6.0",
"ignore": "^5.1.8",
"queue": "^6.0.1",
"fast-glob": "^3.2.5",
"@snyk/fast-glob": "^3.2.6-patch",
"micromatch": "^4.0.2",
"flat-cache": "^3.0.4",
"@types/uuid": "^8.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/files.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as nodePath from 'path';
import * as fs from 'fs';
import fg from 'fast-glob';
import fg from '@snyk/fast-glob';
import micromatch from 'micromatch';
import crypto from 'crypto';
import union from 'lodash.union';
Expand Down
6 changes: 3 additions & 3 deletions tests/git.analysis.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe('Functional test of analysis', () => {
});

// Test DC JSON format first
expect(Object.keys(bundle.analysisResults.suggestions).length).toEqual(119);
expect(Object.keys(bundle.analysisResults.suggestions).length).toEqual(121);

const cweSuggestion = Object.values(bundle.analysisResults.suggestions).find(
s => s.id === 'java%2Fdc_interfile_project%2FPT',
Expand All @@ -104,8 +104,8 @@ describe('Functional test of analysis', () => {
expect(cweSuggestion?.title).toBeTruthy();
expect(cweSuggestion?.text).toBeTruthy();

expect(bundle.sarifResults?.runs[0].results?.length).toEqual(119);
expect(bundle.sarifResults?.runs[0].tool?.driver.rules?.length).toEqual(119);
expect(bundle.sarifResults?.runs[0].results?.length).toEqual(121);
expect(bundle.sarifResults?.runs[0].tool?.driver.rules?.length).toEqual(121);

const cweRule = bundle.sarifResults?.runs[0].tool?.driver.rules?.find(r => r.id === 'java/PT');
expect(cweRule?.properties?.cwe).toContain('CWE-23');
Expand Down

0 comments on commit 0d61fd8

Please sign in to comment.