Skip to content

Commit cf26047

Browse files
authored
fix(dlp): resolve CommonJS compatibility issues and stabilize test (#4350)
* fix(dlp): downgrade mime to v3 to restore CommonJS compatibility * fix(dlp): downgrade mime and pixelmatch to restore CommonJS compatibility * test(dlp): use realistic mock SSN to fix DLP API likelihood filtering
1 parent 906e305 commit cf26047

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

dlp/inspectWithCustomHotwords.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function main(projectId) {
3737
],
3838
rows: [
3939
{
40-
values: [{stringValue: '111-11-1111'}, {stringValue: '222-22-2222'}],
40+
values: [{stringValue: '111-11-1111'}, {stringValue: '458-90-3124'}],
4141
},
4242
],
4343
};

dlp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"devDependencies": {
2323
"c8": "^10.0.0",
2424
"chai": "^4.5.0",
25-
"mime": "^4.0.0",
25+
"mime": "^3.0.0",
2626
"mocha": "^10.0.0",
27-
"pixelmatch": "^6.0.0",
27+
"pixelmatch": "^5.3.0",
2828
"pngjs": "^7.0.0",
2929
"proxyquire": "^2.1.3",
3030
"sinon": "^18.0.0",

dlp/system-test/inspect.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ describe('inspect', () => {
11441144
it('should inspect a table excluding findings in a particular row', () => {
11451145
const output = execSync(`node inspectWithCustomHotwords.js ${projectId}`);
11461146
assert.match(output, /Findings: 1/);
1147-
assert.match(output, /Quote: 222-22-2222/);
1147+
assert.match(output, /Quote: 458-90-3124/);
11481148
assert.notMatch(output, /Quote: 111-11-1111/);
11491149
});
11501150

0 commit comments

Comments
 (0)