Skip to content

Commit 94da898

Browse files
authored
chore: move dependencies about to fix vulnerabilities (#2654) (#2656)
* chore: move dependencies about to fix vulnerabilities * test(firestore-bigquery-export): fix test harness on functions.test.ts
2 parents 5ed2984 + 194f4e5 commit 94da898

9 files changed

Lines changed: 2799 additions & 1276 deletions

File tree

firestore-bigquery-export/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## Version 0.2.8
2+
3+
chore: move test/build dependencies to devDependencies
4+
5+
chore: upgrade jest from 25 to 29.5.0 and ts-jest from 27 to 29.1.2
6+
7+
chore: remove unused jest-config dependency
8+
9+
chore: add minimatch override to resolve npm audit vulnerabilities
10+
111
## Version 0.2.7
212

313
chore: bump dependencies

firestore-bigquery-export/extension.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
name: firestore-bigquery-export
16-
version: 0.2.7
16+
version: 0.2.8
1717
specVersion: v1beta
1818

1919
displayName: Stream Firestore to BigQuery

firestore-bigquery-export/functions/__tests__/functions.test.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,16 @@ let restoreEnv;
7575
let functionsTest;
7676

7777
/** Helper to Mock Export */
78-
const mockExport = (document, data) => {
78+
const mockExport = (change, context = {}) => {
7979
const ref = require("../src/index").fsexportbigquery;
80-
const wrapped = functionsTest.wrap(ref);
81-
return wrapped(document, data);
80+
return ref.run({
81+
data: change,
82+
document: "example/doc1",
83+
id: "test-event-id",
84+
time: new Date().toISOString(),
85+
params: { documentId: "doc1" },
86+
...context,
87+
});
8288
};
8389

8490
describe("extension", () => {
@@ -120,9 +126,7 @@ describe("extension", () => {
120126
afterSnapshot
121127
);
122128

123-
const callResult = await mockExport(documentChange, {
124-
resource: { name: "example/doc1" },
125-
});
129+
const callResult = await mockExport(documentChange);
126130

127131
expect(callResult).toBeUndefined();
128132

@@ -154,9 +158,7 @@ describe("extension", () => {
154158
afterSnapshot
155159
);
156160

157-
const callResult = await mockExport(documentChange, {
158-
resource: { name: "example/doc1" },
159-
});
161+
const callResult = await mockExport(documentChange);
160162

161163
expect(callResult).toBeUndefined();
162164

firestore-bigquery-export/functions/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = {
1212
"^.+\\.tsx?$": [
1313
"ts-jest",
1414
{
15-
tsconfig: "<rootDir>/tsconfig.test.json",
15+
tsconfig: "<rootDir>/tsconfig.json",
1616
},
1717
],
1818
},

0 commit comments

Comments
 (0)