fix(firestore): unblock Cloud RAD docs generation - #9474
Merged
Merged
Conversation
- 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.
Contributor
There was a problem hiding this comment.
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.
feywind
marked this pull request as ready for review
September 30, 2026 17:33
MarkDuckworth
approved these changes
Sep 30, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks Cloud RAD (devsite) docs generation for
@google-cloud/firestoreafter the pnpm workspace migration.Changes
build/types.tscemits declarations tobuild/types/src(declarationDir). Those files import../protos/firestore_v1_proto_api, buttscdoesn't copy the hand-maintained proto.d.tsfiles, so API Extractor reported TS2307 for each import.postcompilenow copiesdev/protos/*.d.tsintobuild/types/protos. The directory is created inscripts/init-directories.js, the same way as the existing Windows-safemkdirp.Firestoreclass and default export doc comments includedsamples/quickstart.js/firestore_quickstartthroughregion_tag:. That sample isn't in this repo anymore, so api-documenter failed withcould 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 literalregion_tag).Testing
@google-cloud/cloud-rad(with fix: support pnpm workspaces and custom declaration directories nodejs-cloud-rad#195) againsthandwritten/firestore: 0 TS2307 errors, YAML generated, and the placeholder renders as text.pnpm run docs(jsdoc) succeeds with no missing-sample warnings.gts checkon the changed files: 0 errors.Not in this PR
scripts/api-report.mjsalso runsnode_modules/.bin/api-extractorthroughexecaNode. That path doesn't exist under pnpm, and the script swallows the error and exits 0, leaving anapi-extractor.jsonbehind. That needs a separate fix.