nodejs-firestore icon indicating copy to clipboard operation
nodejs-firestore copied to clipboard

Deprecation warning for servicePath can't be resolved in TypeScript.

Open dhenneke opened this issue 1 year ago • 1 comments

Environment details

  • OS: Mac OS 14.4.1 (23E224)
  • Node.js version: v18.19.1
  • npm version: 10.2.4
  • @google-cloud/firestore version: 7.6.0

Steps to reproduce

  1. Call v1.FirestoreClient.apiEndpoint
  2. 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.

dhenneke avatar Apr 15 '24 06:04 dhenneke

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:

  1. March 2021: #1433 adds the .d.ts files, such as types/v1/firestore_client.d.ts, and configures "autosynth" to automatically update them.
  2. July 2021: PR #1564 is the last autosynth PR that updates these .d.ts files.
  3. 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)

dconeybe avatar Apr 18 '24 19:04 dconeybe

v7.9.0 releases the updated auto-gen types, which includes the @deprecated tag and new getter.

MarkDuckworth avatar Jun 25 '24 16:06 MarkDuckworth