Skip to content

fix(firestore): unblock Cloud RAD docs generation - #9474

Merged
feywind merged 1 commit into
mainfrom
reporx/firestore-docs
Sep 30, 2026
Merged

feywind merged 1 commit into
mainfrom
reporx/firestore-docs

Conversation

@feywind

@feywind feywind commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Unblocks Cloud RAD (devsite) docs generation for @google-cloud/firestore after the pnpm workspace migration.

Changes

  • Missing proto declarations under build/types. tsc emits declarations to build/types/src (declarationDir). Those files import ../protos/firestore_v1_proto_api, but tsc doesn't copy the hand-maintained proto .d.ts files, so API Extractor reported TS2307 for each import. postcompile now copies dev/protos/*.d.ts into build/types/protos. The directory is created in scripts/init-directories.js, the same way as the existing Windows-safe mkdirp.
  • Missing quickstart sample. The Firestore class and default export doc comments included samples/quickstart.js / firestore_quickstart through region_tag:. That sample isn't in this repo anymore, so api-documenter failed with could not find sample firestore_quickstart. The example is now a placeholder that still names the sample path and region tag, but doesn't trigger the region tag lookup (the docs tools key on the literal region_tag).

Testing

Not in this PR

scripts/api-report.mjs also runs node_modules/.bin/api-extractor through execaNode. That path doesn't exist under pnpm, and the script swallows the error and exits 0, leaving an api-extractor.json behind. That needs a separate fix.

- Copy the proto .d.ts files into build/types/protos during postcompile so
  the relative '../protos/*' imports in the emitted declarations resolve for
  API Extractor (Cloud RAD and api-report).
- Replace the firestore_quickstart region_tag include with a placeholder.
  The sample no longer exists in this repo, and the missing region tag made
  api-documenter fail.
@product-auto-label product-auto-label Bot added the api: firestore Issues related to the Firestore API. label Sep 29, 2026

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

Copy link
Copy Markdown
Contributor

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 replaces unavailable quickstart sample references with placeholders in index.ts and updates the build process to copy hand-maintained proto declaration files (.d.ts) to the build directory. The review feedback recommends improving cross-platform compatibility (particularly for Windows) by moving the file-copying logic from the package.json shell script into the Node.js initialization script (init-directories.js) using standard fs APIs.

Comment thread handwritten/firestore/package.json
Comment thread handwritten/firestore/scripts/init-directories.js
@feywind
feywind marked this pull request as ready for review September 30, 2026 17:33
@feywind
feywind requested review from a team as code owners September 30, 2026 17:33
@feywind
feywind merged commit 5f580f0 into main Sep 30, 2026
51 checks passed
@feywind
feywind deleted the reporx/firestore-docs branch September 30, 2026 18:08
feywind pushed a commit that referenced this pull request Oct 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[9.3.1](firestore-v9.3.0...firestore-v9.3.1)
(2026-10-01)


### Bug Fixes

* **ci:** Deduplicate pnpm install in run_single_test and refine turbo
compile inputs
([#9439](#9439))
([102b3f6](102b3f6))
* **firestore:** Unblock Cloud RAD docs generation
([#9474](#9474))
([5f580f0](5f580f0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the Firestore API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants