Skip to content

chore(deps): update @google-cloud/firestore to ^8.0.0#3105

Open
ouzkilic wants to merge 2 commits intofirebase:mainfrom
ouzkilic:fix/update-google-cloud-firestore-optional-dep
Open

chore(deps): update @google-cloud/firestore to ^8.0.0#3105
ouzkilic wants to merge 2 commits intofirebase:mainfrom
ouzkilic:fix/update-google-cloud-firestore-optional-dep

Conversation

@ouzkilic
Copy link
Copy Markdown

@ouzkilic ouzkilic commented Apr 8, 2026

Summary

Update @google-cloud/firestore optional dependency range from ^7.11.0 to
^8.0.0 to eliminate the vulnerable @tootallnate/once@2.0.0 transitive dependency.

Problem

@tootallnate/once versions prior to 3.0.1 are vulnerable to Incorrect Control
Flow Scoping (CWE-705). When AbortSignal is used, Promises remain permanently
pending after abort, causing stalled requests and degraded availability.

The vulnerability chain through @google-cloud/firestore@^7.11.0:
google-gax@4 → retry-request@7 → teeny-request@9 → http-proxy-agent@5 → @tootallnate/once@2.0.0

Fix

@google-cloud/firestore@8.x uses an updated dependency chain that no longer
includes @tootallnate/once:
google-gax@5 → retry-request@8 → teeny-request@10 → http-proxy-agent@7 (no @tootallnate/once)

Additionally, replaced the internal import of DEFAULT_DATABASE_ID from
@google-cloud/firestore/build/src/path with a local constant '(default)',
as v8 no longer ships .d.ts for that internal module.

Note on @google-cloud/storage

@google-cloud/storage@7.19.0 (latest) still pulls in the same vulnerable chain
via teeny-request@9. This needs to be addressed separately upstream in the
googleapis/google-cloud-node repository.

Testing

  • Existing test suite passes (6187 tests)
  • npm ls @tootallnate/once shows reduced/no results after update

@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 8, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the @google-cloud/firestore dependency to version 8.0.0 and updates several internal dependencies. It also replaces deep imports of the DEFAULT_DATABASE_ID constant with local definitions in the source and test files. The reviewer feedback suggests exporting this constant from a central location to eliminate duplication and ensure consistency across the codebase.

@lahirumaramba
Copy link
Copy Markdown
Member

Thanks for your contribution. This is a breaking dependency upgrade and should be included in a major version release. We will look into this.

@ouzkilic ouzkilic force-pushed the fix/update-google-cloud-firestore-optional-dep branch from 59bf98f to 3a060ec Compare April 10, 2026 07:29
…tallnate/once vulnerability

Replace internal import of DEFAULT_DATABASE_ID from @google-cloud/firestore/build/src/path
with a local constant, as v8 no longer ships .d.ts for that internal module.
Address review feedback: instead of duplicating the '(default)' string
in 3 places, export the constant from the source module and import it
in test files.
@ouzkilic ouzkilic force-pushed the fix/update-google-cloud-firestore-optional-dep branch from 3a060ec to b58a3a8 Compare April 10, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants