Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"handwritten/cloud-profiler": "7.0.0",
"handwritten/datastore": "10.1.1",
"handwritten/error-reporting": "3.0.6",
"handwritten/firestore": "8.6.0",
"handwritten/firestore": "8.7.0",
"handwritten/google-cloud-dns": "5.3.2",
"handwritten/logging": "11.3.0",
"handwritten/logging-bunyan": "5.1.2",
Expand Down
29 changes: 28 additions & 1 deletion changelog.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
{
"repository": "googleapis/google-cloud-node",
"entries": [
{
"changes": [
{
"type": "feat",
"sha": "ecf348bed2cc5678d78e4950f6aa417e73ab26b4",
"message": "Add support for 16MB documents",
"issues": [
"8649"
],
"scope": "firestore"
},
{
"type": "fix",
"sha": "506b8b69952b7baf6bd04235598e58932ccec57f",
"message": "Eager evict idle REST clients on gRPC transition",
"issues": [
"8817"
],
"scope": "firestore"
}
],
"version": "8.7.0",
"language": "JAVASCRIPT",
"artifactName": "@google-cloud/firestore",
"id": "ebf68e66-0a0b-45ef-8183-b418a77cb6eb",
"createTime": "2026-07-21T14:57:44.177Z"
},
{
"changes": [
{
Expand Down Expand Up @@ -82363,5 +82390,5 @@
"createTime": "2023-01-28T04:18:24.718Z"
}
],
"updateTime": "2026-07-20T21:33:13.651Z"
"updateTime": "2026-07-21T14:57:44.177Z"
}
12 changes: 12 additions & 0 deletions handwritten/firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@

[1]: https://www.npmjs.com/package/@google-cloud/firestore?activeTab=versions

## [8.7.0](https://github.com/googleapis/google-cloud-node/compare/firestore-v8.6.0...firestore-v8.7.0) (2026-07-21)


### Features

* **firestore:** Add support for 16MB documents ([#8649](https://github.com/googleapis/google-cloud-node/issues/8649)) ([ecf348b](https://github.com/googleapis/google-cloud-node/commit/ecf348bed2cc5678d78e4950f6aa417e73ab26b4))


### Bug Fixes

* **firestore:** Eager evict idle REST clients on gRPC transition ([#8817](https://github.com/googleapis/google-cloud-node/issues/8817)) ([506b8b6](https://github.com/googleapis/google-cloud-node/commit/506b8b69952b7baf6bd04235598e58932ccec57f))

## [8.6.0](https://github.com/googleapis/google-cloud-node/compare/firestore-v8.5.0...firestore-v8.6.0) (2026-05-11)


Expand Down
2 changes: 1 addition & 1 deletion handwritten/firestore/dev/src/v1/firestore_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export class FirestoreClient {
{
'grpc.max_receive_message_length': maxMessageLength,
'grpc.max_send_message_length': maxMessageLength,
'grpc-node.flow_control_window': flowControlWindowSize
'grpc-node.flow_control_window': flowControlWindowSize,
},
clientOpts.grpcOptions, // Can overwrite grpc options
);
Expand Down
29 changes: 17 additions & 12 deletions handwritten/firestore/dev/system-test/large_document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,11 @@ describe('Large Document Integration Tests', function () {
]);
});

after(async function () {
after(async () => {
if (db && collectionName) {
try {
// Delete documents in parallel
await Promise.all([
docRef.delete(),
docA.delete(),
docB.delete(),
]);
await Promise.all([docRef.delete(), docA.delete(), docB.delete()]);
} catch (e) {
// Suppress cleanup errors
}
Expand All @@ -102,7 +98,10 @@ describe('Large Document Integration Tests', function () {

it('can query multiple large documents', async () => {
const colRef = db.collection(collectionName);
const query = colRef.where(FieldPath.documentId(), 'in', ['doc_a', 'doc_b']);
const query = colRef.where(FieldPath.documentId(), 'in', [
'doc_a',
'doc_b',
]);
const snapshot = await query.get();
expect(snapshot.size).to.equal(2);
snapshot.forEach(doc => {
Expand All @@ -123,7 +122,7 @@ describe('Large Document Integration Tests', function () {
(error: any) => {
unsubscribe();
reject(error);
}
},
);
});
await deferred;
Expand All @@ -134,14 +133,16 @@ describe('Large Document Integration Tests', function () {
const snapshot = await transaction.get(docRef);
expect((snapshot as any).exists).to.be.true;
transaction.update(docRef, {
transaction_timestamp: FieldValue.serverTimestamp()
transaction_timestamp: FieldValue.serverTimestamp(),
});
});
});

it('can paginate large documents safely', async () => {
const colRef = db.collection(collectionName);
const query = colRef.where(FieldPath.documentId(), 'in', ['doc_a', 'doc_b']).orderBy(FieldPath.documentId());
const query = colRef
.where(FieldPath.documentId(), 'in', ['doc_a', 'doc_b'])
.orderBy(FieldPath.documentId());

// Page 1
const snapshot1 = await query.limit(1).get();
Expand All @@ -161,14 +162,18 @@ describe('Large Document Integration Tests', function () {
});

it('gracefully rejects oversized payloads', async () => {
const oversizedDoc = db.collection(collectionName).doc('temp_oversized_doc');
const oversizedDoc = db
.collection(collectionName)
.doc('temp_oversized_doc');
// Generate ~16.1MB payload
const targetBytes = 16 * 1024 * 1024 + 102400;
const largePayload = generateAsciiString(targetBytes);

try {
await oversizedDoc.set({chunk: largePayload});
throw new Error('Setting a document exceeding the 16MB limit should fail.');
throw new Error(
'Setting a document exceeding the 16MB limit should fail.',
);
} catch (error: any) {
expect(error.code).to.equal(3); // INVALID_ARGUMENT (gRPC status code 3)
}
Expand Down
20 changes: 14 additions & 6 deletions handwritten/firestore/dev/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -810,9 +810,13 @@ describe('instantiation', () => {
it('defaults flow_control_window to 256 KB', async () => {
const firestore = new Firestore.Firestore(DEFAULT_SETTINGS);
// Trigger client creation & initialize() which calls createStub
await firestore['_clientPool'].run('tag', /* requiresGrpc= */ true, async (client: any) => {
await client.initialize();
});
await firestore['_clientPool'].run(
'tag',
/* requiresGrpc= */ true,
async (client: any) => {
await client.initialize();
},
);

expect(createStubSpy.calledOnce).to.be.true;
const clientOpts = createStubSpy.firstCall.args[1];
Expand All @@ -830,9 +834,13 @@ describe('instantiation', () => {
},
});
// Trigger client creation & initialize() which calls createStub
await firestore['_clientPool'].run('tag', /* requiresGrpc= */ true, async (client: any) => {
await client.initialize();
});
await firestore['_clientPool'].run(
'tag',
/* requiresGrpc= */ true,
async (client: any) => {
await client.initialize();
},
);

expect(createStubSpy.calledOnce).to.be.true;
const clientOpts = createStubSpy.firstCall.args[1];
Expand Down
2 changes: 1 addition & 1 deletion handwritten/firestore/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@google-cloud/firestore",
"description": "Firestore Client Library for Node.js",
"version": "8.6.0",
"version": "8.7.0",
"license": "Apache-2.0",
"author": "Google Inc.",
"engines": {
Expand Down
Loading