Deprecation warning for servicePath can't be resolved in TypeScript.
Environment details
- OS: Mac OS 14.4.1 (23E224)
- Node.js version: v18.19.1
- npm version: 10.2.4
-
@google-cloud/firestoreversion: 7.6.0
Steps to reproduce
- Call
v1.FirestoreClient.apiEndpoint - The console logs
DeprecationWarning: Static servicePath is deprecated, please use the instance method instead.
This commit added the deprecation warning and also the new field to use: https://github.com/googleapis/nodejs-firestore/commit/d964a13818e6bc4be6547e88ffbe16be1a6ceeeb. However, it is not possible to call the apiEndpoint instance method because the TypeScript interface was not updated with the new function: https://github.com/googleapis/nodejs-firestore/blob/9da9fb031cd6eb6ee83062c339d0448f3b37903b/types/v1/firestore_client.d.ts#L111-L116
It misses both the @deprecated documentation and the new getter.
Hmm, it looks like the .d.ts files in the types subdirectory (other than firestore.d.ts) are supposed to be updated automatically by the owlbot build system; however, this appears to be broken.
Here is a timeline:
- March 2021: #1433 adds the .d.ts files, such as
types/v1/firestore_client.d.ts, and configures "autosynth" to automatically update them. - July 2021: PR #1564 is the last autosynth PR that updates these .d.ts files.
- August 2021: PR #1587 migrates from "autosynth" to "owlbot"
The .d.ts files are never updated again by any automated tools.
So it looks like something went wrong in the migration from autosynth to owlbot. I'll look into it.
(Googlers see team discussion here: https://chat.google.com/room/AAAA_3vtwIc/5IKdgmjGl8E)
v7.9.0 releases the updated auto-gen types, which includes the @deprecated tag and new getter.