Skip to content

Commit

Permalink
fix!: mark v1beta1 client as deprecated (#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidt-sebastian authored Apr 9, 2020
1 parent 32d346b commit ae1cc08
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dev/src/v1beta1/firestore_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import {Transform} from 'stream';
import * as protosTypes from '../../protos/firestore_v1beta1_proto_api';
import * as gapicConfig from './firestore_client_config.json';

// tslint:disable deprecation

const version = require('../../../package.json').version;

/**
Expand All @@ -52,6 +54,7 @@ const version = require('../../../package.json').version;
* committed. Any read with an equal or greater `read_time` is guaranteed
* to see the effects of the transaction.
* @class
* @deprecated Use v1/firestore_client instead.
* @memberof v1beta1
*/
export class FirestoreClient {
Expand Down
2 changes: 2 additions & 0 deletions dev/src/v1beta1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

// tslint:disable deprecation

import {FirestoreClient} from './firestore_client';
export {FirestoreClient};

Expand Down
7 changes: 7 additions & 0 deletions dev/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"updateTime": "2020-03-22T11:28:16.621427Z",
"sources": [
{
"git": {
"name": ".",
"remote": "[email protected]:googleapis/nodejs-firestore.git",
"sha": "a2c941c3c14fe509d1ca245e07e4c1487c6861c0"
}
},
{
"git": {
"name": "googleapis",
Expand Down
15 changes: 14 additions & 1 deletion synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,26 @@
"dev/src/v1beta1/firestore_client.ts",
"/protos/protos'",
"/protos/firestore_v1beta1_proto_api'"
)
)
s.replace(
"dev/test/gapic-firestore-v1beta1.ts",
"/protos/protos'",
"/protos/firestore_v1beta1_proto_api'"
)

# Mark v1beta1 as deprecated
s.replace(
"dev/src/v1beta1/firestore_client.ts",
"@class",
"@class\n * @deprecated Use v1/firestore_client instead."
)
s.replace(
"dev/src/v1beta1/firestore_client.ts",
"const version",
"// tslint:disable deprecation\n\nconst version",
1
)

# Remove auto-generated packaging tests
os.system('rm -rf dev/system-test/fixtures dev/system-test/install.ts')

Expand Down
1 change: 1 addition & 0 deletions types/firestore.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,7 @@ declare namespace FirebaseFirestore {
/**
* The v1beta1 Veneer client. This client provides access to to the underlying
* Firestore v1beta1 RPCs.
* @deprecated Use v1 instead.
*/
export const v1beta1 : any;

Expand Down

0 comments on commit ae1cc08

Please sign in to comment.