-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix!: mark v1beta1 client as deprecated #937
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
{ | ||
"updateTime": "2020-02-07T18:50:00.377881Z", | ||
"updateTime": "2020-02-20T22:37:26.236453Z", | ||
"sources": [ | ||
{ | ||
"git": { | ||
"name": ".", | ||
"remote": "[email protected]:googleapis/nodejs-firestore.git", | ||
"sha": "a2c941c3c14fe509d1ca245e07e4c1487c6861c0" | ||
} | ||
}, | ||
{ | ||
"git": { | ||
"name": "googleapis", | ||
"remote": "https://github.com/googleapis/googleapis.git", | ||
"sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", | ||
"internalRef": "293710856" | ||
"sha": "3eaaaf8626ce5b0c0bc7eee05e143beffa373b01", | ||
"internalRef": "296274723" | ||
} | ||
}, | ||
{ | ||
"template": { | ||
"name": "node_library", | ||
"origin": "synthtool.gcp", | ||
"version": "2019.10.17" | ||
"version": "2020.2.4" | ||
} | ||
} | ||
], | ||
|
@@ -45,97 +52,5 @@ | |
"generator": "gapic-generator-typescript" | ||
} | ||
} | ||
], | ||
"newFiles": [ | ||
{ | ||
"path": ".gitignore" | ||
}, | ||
{ | ||
"path": ".mocharc.json" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/admin/v1/field.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/admin/v1/firestore_admin.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/admin/v1/index.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/admin/v1/location.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/admin/v1/operation.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/v1/common.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/v1/document.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/v1/firestore.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/v1/query.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/v1/write.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/v1beta1/common.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/v1beta1/document.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/v1beta1/firestore.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/v1beta1/query.proto" | ||
}, | ||
{ | ||
"path": "protos/google/firestore/v1beta1/write.proto" | ||
}, | ||
{ | ||
"path": "protos/protos.json" | ||
}, | ||
{ | ||
"path": "src/v1/firestore_admin_client.ts" | ||
}, | ||
{ | ||
"path": "src/v1/firestore_admin_client_config.json" | ||
}, | ||
{ | ||
"path": "src/v1/firestore_admin_proto_list.json" | ||
}, | ||
{ | ||
"path": "src/v1/firestore_client.ts" | ||
}, | ||
{ | ||
"path": "src/v1/firestore_client_config.json" | ||
}, | ||
{ | ||
"path": "src/v1/firestore_proto_list.json" | ||
}, | ||
{ | ||
"path": "src/v1beta1/firestore_client.ts" | ||
}, | ||
{ | ||
"path": "src/v1beta1/firestore_client_config.json" | ||
}, | ||
{ | ||
"path": "src/v1beta1/firestore_proto_list.json" | ||
}, | ||
{ | ||
"path": "test/gapic-firestore-v1.ts" | ||
}, | ||
{ | ||
"path": "test/gapic-firestore-v1beta1.ts" | ||
}, | ||
{ | ||
"path": "test/gapic-firestore_admin-v1.ts" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,13 +75,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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @AlanGasperini @alexander-fenster so this is a funny use for synthtool :) For cases where a specific API version itself is deprecated, how do we let customers know? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lukesneeringer Is there any annotation that might help mark the whole API version 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') | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know specifically which tools/situations where this will be surfaced? I think the TypeScript compiler, and eslint will do stuff. Should we consider emitting runtime warnings for users not using these kinds of tools though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shows up in the generated docs (barely legible) and as a warning in VSCode/IntelliJ.