Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
304ddbc
Update to node 18+. Update all deps, except chai and chai-as-promised
MarkDuckworth Aug 1, 2025
be2c037
Fixes for google-gax major version update
MarkDuckworth Jun 13, 2025
e00f785
formatting
MarkDuckworth Aug 1, 2025
f302e88
more formatting
MarkDuckworth Aug 1, 2025
eab3a2a
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Aug 1, 2025
90a0fc9
Update .OwlBot.lock.yaml
MarkDuckworth Aug 4, 2025
bf8df48
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Aug 4, 2025
289f0c7
Update opentelemetry packages to v2
MarkDuckworth Aug 4, 2025
901afb0
Merge branch 'node-18' of github.com:googleapis/nodejs-firestore into…
MarkDuckworth Aug 4, 2025
03e8e67
fix for opentelemetry dep tree with override
MarkDuckworth Aug 4, 2025
bc11ab8
Remove ignore of no-floating-promises lint error
MarkDuckworth Aug 5, 2025
f037570
Floating promise lint error fixes (#2400)
MarkDuckworth Aug 22, 2025
fc4c934
Merge branch 'main' into node-18
MarkDuckworth Sep 15, 2025
cec047e
Merge branch 'main' into node-18
MarkDuckworth Sep 16, 2025
71ee0c8
linting
MarkDuckworth Sep 16, 2025
b4b784f
Update .OwlBot.lock.yaml
MarkDuckworth Sep 16, 2025
62cab6a
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Sep 16, 2025
5b0a9b0
update @google-cloud/opentelemetry-cloud-trace-exporter
MarkDuckworth Sep 16, 2025
c31cd4b
Skip tests failing because of gax-fallback regression
MarkDuckworth Sep 19, 2025
57e9210
Merge branch 'main' into node-18
MarkDuckworth Oct 28, 2025
61f304d
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 28, 2025
dfed5c4
Get the API report building again
MarkDuckworth Oct 28, 2025
38e473d
add renamed api-report script
MarkDuckworth Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"object": "it",
"property": "only"
}
]
],
"@typescript-eslint/no-floating-promises": ["off"]
}
}
]
Expand Down
5 changes: 2 additions & 3 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,5 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
digest: sha256:0d39e59663287ae929c1d4ccf8ebf7cef9946826c9b86eda7e85d8d752dbb584
# created: 2024-11-21T22:39:44.342569463Z
digest: sha256:ebf1487fdb5be0d02d49a20b01547be3cd15cbd03f4ded7b47c65eae7920a080
24 changes: 0 additions & 24 deletions .kokoro/continuous/node14/common.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions .kokoro/continuous/node14/lint.cfg

This file was deleted.

12 changes: 0 additions & 12 deletions .kokoro/continuous/node14/samples-test.cfg

This file was deleted.

12 changes: 0 additions & 12 deletions .kokoro/continuous/node14/system-test.cfg

This file was deleted.

Empty file removed .kokoro/continuous/node14/test.cfg
Empty file.
24 changes: 0 additions & 24 deletions .kokoro/presubmit/node14/common.cfg

This file was deleted.

12 changes: 0 additions & 12 deletions .kokoro/presubmit/node14/samples-test.cfg

This file was deleted.

12 changes: 0 additions & 12 deletions .kokoro/presubmit/node14/system-test.cfg

This file was deleted.

Empty file removed .kokoro/presubmit/node14/test.cfg
Empty file.
1,714 changes: 0 additions & 1,714 deletions api-report/firestore.api.md

This file was deleted.

42 changes: 21 additions & 21 deletions dev/conformance/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ protobufRoot.resolvePath = (origin, target) => {
return target;
};
const protoDefinition = protobufRoot.loadSync(
path.join(__dirname, 'test-definition.proto')
path.join(__dirname, 'test-definition.proto'),
);

const TEST_SUITE_TYPE = protoDefinition.lookupType('tests.TestFile');
const STRUCTURED_QUERY_TYPE = protoDefinition.lookupType(
'google.firestore.v1.StructuredQuery'
'google.firestore.v1.StructuredQuery',
);
const COMMIT_REQUEST_TYPE = protoDefinition.lookupType(
'google.firestore.v1.CommitRequest'
'google.firestore.v1.CommitRequest',
);

// Firestore instance initialized by the test runner.
Expand Down Expand Up @@ -128,11 +128,11 @@ const convertInput = {
function convertArray(arr: unknown[]): unknown[] | FieldValue {
if (arr.length > 0 && arr[0] === 'ArrayUnion') {
return FieldValue.arrayUnion(
...(convertArray(arr.slice(1)) as unknown[])
...(convertArray(arr.slice(1)) as unknown[]),
);
} else if (arr.length > 0 && arr[0] === 'ArrayRemove') {
return FieldValue.arrayRemove(
...(convertArray(arr.slice(1)) as unknown[])
...(convertArray(arr.slice(1)) as unknown[]),
);
} else {
for (let i = 0; i < arr.length; ++i) {
Expand Down Expand Up @@ -183,8 +183,8 @@ const convertInput = {
args.push(
DocumentSnapshot.fromObject(
docRef(cursor.docSnapshot.path),
convertInput.argument(cursor.docSnapshot.jsonData) as DocumentData
)
convertInput.argument(cursor.docSnapshot.jsonData) as DocumentData,
),
);
} else {
for (const jsonValue of cursor.jsonValues) {
Expand All @@ -205,8 +205,8 @@ const convertInput = {
firestore.snapshot_(
deepCopy,
readTime.toDate().toISOString(),
'json'
) as QueryDocumentSnapshot
'json',
) as QueryDocumentSnapshot,
);
}

Expand All @@ -216,13 +216,13 @@ const convertInput = {
const doc = firestore.snapshot_(
deepCopy,
readTime.toDate().toISOString(),
'json'
'json',
) as QueryDocumentSnapshot;
const type = ['unspecified', 'added', 'removed', 'modified'][
change.kind
] as DocumentChangeType;
changes.push(
new DocumentChange(type, doc, change.oldIndex, change.newIndex)
new DocumentChange(type, doc, change.oldIndex, change.newIndex),
);
}

Expand All @@ -231,7 +231,7 @@ const convertInput = {
readTime,
docs.length,
() => docs,
() => changes
() => changes,
);
},
};
Expand All @@ -243,12 +243,12 @@ const convertProto = {
const deepCopy = JSON.parse(JSON.stringify(listenRequest));
if (deepCopy.targetChange) {
deepCopy.targetChange.targetChangeType = convertProto.targetChange(
deepCopy.targetChange.targetChangeType
deepCopy.targetChange.targetChangeType,
);
}
if (deepCopy.documentChange) {
deepCopy.documentChange.document.fields = fieldsFromJson(
deepCopy.documentChange.document.fields
deepCopy.documentChange.document.fields,
);
}
return deepCopy;
Expand All @@ -257,7 +257,7 @@ const convertProto = {

/** Request handler for _commit. */
function commitHandler(
spec: ConformanceProto
spec: ConformanceProto,
): UnaryMethod<api.ICommitRequest, api.ICommitResponse> {
return request => {
const actualCommit = COMMIT_REQUEST_TYPE.fromObject(request);
Expand All @@ -280,7 +280,7 @@ function commitHandler(
function queryHandler(spec: ConformanceProto) {
return (request: api.IRunQueryRequest) => {
const actualQuery = STRUCTURED_QUERY_TYPE.fromObject(
request.structuredQuery!
request.structuredQuery!,
);
const expectedQuery = STRUCTURED_QUERY_TYPE.fromObject(spec.query);
expect(actualQuery).to.deep.equal(expectedQuery);
Expand Down Expand Up @@ -407,7 +407,7 @@ function runTest(spec: ConformanceProto) {
}
return docRef(setSpec.docRefPath).set(
convertInput.argument(spec.jsonData) as DocumentData,
setOption
setOption,
);
});
};
Expand All @@ -416,7 +416,7 @@ function runTest(spec: ConformanceProto) {
const overrides = {commit: commitHandler(spec)};
return createInstance(overrides).then(() => {
return docRef(spec.docRefPath).create(
convertInput.argument(spec.jsonData) as DocumentData
convertInput.argument(spec.jsonData) as DocumentData,
);
});
};
Expand Down Expand Up @@ -445,7 +445,7 @@ function runTest(spec: ConformanceProto) {
!actualSnap.isEqual(convertInput.snapshot(expectedSnapshot))
) {
reject(
new Error('Expected and actual snapshots do not match.')
new Error('Expected and actual snapshots do not match.'),
);
}

Expand All @@ -461,7 +461,7 @@ function runTest(spec: ConformanceProto) {
expect(expectedSnapshots).to.have.length(0);
unlisten();
reject(err);
}
},
);

for (const response of spec.responses) {
Expand Down Expand Up @@ -515,7 +515,7 @@ function runTest(spec: ConformanceProto) {
if (!testSpec.isError) {
throw err;
}
}
},
);
}

Expand Down
10 changes: 5 additions & 5 deletions dev/src/aggregate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Aggregate {
constructor(
readonly alias: string,
readonly aggregateType: AggregateType,
readonly fieldPath?: string | FieldPath
readonly fieldPath?: string | FieldPath,
) {}

/**
Expand All @@ -43,7 +43,7 @@ export class Aggregate {
} else if (this.aggregateType === 'sum') {
assert(
this.fieldPath !== undefined,
'Missing field path for sum aggregation.'
'Missing field path for sum aggregation.',
);
proto.sum = {
field: {
Expand All @@ -53,7 +53,7 @@ export class Aggregate {
} else if (this.aggregateType === 'avg') {
assert(
this.fieldPath !== undefined,
'Missing field path for average aggregation.'
'Missing field path for average aggregation.',
);
proto.avg = {
field: {
Expand Down Expand Up @@ -89,7 +89,7 @@ export class AggregateField<T> implements firestore.AggregateField<T> {
*/
private constructor(
public readonly aggregateType: AggregateType,
field?: string | FieldPath
field?: string | FieldPath,
) {
this._field = field;
}
Expand All @@ -112,7 +112,7 @@ export class AggregateField<T> implements firestore.AggregateField<T> {
(this._field !== undefined &&
other._field !== undefined &&
FieldPath.fromArgument(this._field).isEqual(
FieldPath.fromArgument(other._field)
FieldPath.fromArgument(other._field),
)))
);
}
Expand Down
8 changes: 4 additions & 4 deletions dev/src/backoff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export let delayExecution: (f: () => void, ms: number) => NodeJS.Timeout =
* @param {function} handler A handler than matches the API of `setTimeout()`.
*/
export function setTimeoutHandler(
handler: (f: () => void, ms: number) => void
handler: (f: () => void, ms: number) => void,
): void {
delayExecution = (f: () => void, ms: number) => {
handler(f, ms);
Expand Down Expand Up @@ -255,13 +255,13 @@ export class ExponentialBackoff {
backoffAndWait(): Promise<void> {
if (this.awaitingBackoffCompletion) {
return Promise.reject(
new Error('A backoff operation is already in progress.')
new Error('A backoff operation is already in progress.'),
);
}

if (this.retryCount > MAX_RETRY_ATTEMPTS) {
return Promise.reject(
new Error('Exceeded maximum number of retries allowed.')
new Error('Exceeded maximum number of retries allowed.'),
);
}
// First schedule using the current base (which may be 0 and should be
Expand All @@ -272,7 +272,7 @@ export class ExponentialBackoff {
'ExponentialBackoff.backoffAndWait',
null,
`Backing off for ${delayWithJitterMs} ms ` +
`(base delay: ${this.currentBaseMs} ms)`
`(base delay: ${this.currentBaseMs} ms)`,
);
}

Expand Down
Loading