Skip to content

Commit 42754a7

Browse files
feat: add protobufjs 2023 edition support (#6301)
* chore: upgrade typescript generator to 4.9.0 chore: updated gapic-generator-typescript WORKSPACE section to match the latest from the generator chore: added Required Typecheck Performance Selection section to .bazelrc feat: add protobufjs 2023 edition support feat: selective gapic support for typescript generation fix: catch dangling promises PiperOrigin-RevId: 751558264 Source-Link: googleapis/googleapis@f132131 Source-Link: googleapis/googleapis-gen@7aaa93d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWlvdC8uT3dsQm90LnlhbWwiLCJoIjoiN2FhYTkzZDlkNGJiZDBjODdhZGMxOGI0ZGMwMzg0Yjc4MzgwMGEzYiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWttcy1pbnZlbnRvcnkvLk93bEJvdC55YW1sIiwiaCI6IjdhYWE5M2Q5ZDRiYmQwYzg3YWRjMThiNGRjMDM4NGI3ODM4MDBhM2IifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWttcy8uT3dsQm90LnlhbWwiLCJoIjoiN2FhYTkzZDlkNGJiZDBjODdhZGMxOGI0ZGMwMzg0Yjc4MzgwMGEzYiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWxhbmd1YWdlLy5Pd2xCb3QueWFtbCIsImgiOiI3YWFhOTNkOWQ0YmJkMGM4N2FkYzE4YjRkYzAzODRiNzgzODAwYTNiIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWxpZmVzY2llbmNlcy8uT3dsQm90LnlhbWwiLCJoIjoiN2FhYTkzZDlkNGJiZDBjODdhZGMxOGI0ZGMwMzg0Yjc4MzgwMGEzYiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1hbmFnZWRpZGVudGl0aWVzLy5Pd2xCb3QueWFtbCIsImgiOiI3YWFhOTNkOWQ0YmJkM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AwYTNiIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Sofia Leon <[email protected]> Co-authored-by: sofisl <[email protected]>
1 parent abc35be commit 42754a7

228 files changed

Lines changed: 65831 additions & 31939 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-iot/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
4444
1. [Select or create a Cloud Platform project][projects].
4545
1. [Enable billing for your project][billing].
4646
1. [Enable the Google Cloud Internet of Things (IoT) Core API][enable_api].
47-
1. [Set up authentication with a service account][auth] so you can access the
47+
1. [Set up authentication][auth] so you can access the
4848
API from your local workstation.
4949

5050
### Installing the client library
@@ -151,4 +151,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
151151
[projects]: https://console.cloud.google.com/project
152152
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
153153
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudiot.googleapis.com
154-
[auth]: https://cloud.google.com/docs/authentication/getting-started
154+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local

packages/google-cloud-iot/protos/protos.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-iot/test/gapic_device_manager_v1.ts

Lines changed: 67 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,14 @@ describe('v1.DeviceManagerClient', () => {
256256
throw err;
257257
});
258258
assert(client.deviceManagerStub);
259-
client.close().then(() => {
260-
done();
261-
});
259+
client
260+
.close()
261+
.then(() => {
262+
done();
263+
})
264+
.catch(err => {
265+
throw err;
266+
});
262267
});
263268

264269
it('has close method for the non-initialized client', done => {
@@ -267,9 +272,14 @@ describe('v1.DeviceManagerClient', () => {
267272
projectId: 'bogus',
268273
});
269274
assert.strictEqual(client.deviceManagerStub, undefined);
270-
client.close().then(() => {
271-
done();
272-
});
275+
client
276+
.close()
277+
.then(() => {
278+
done();
279+
})
280+
.catch(err => {
281+
throw err;
282+
});
273283
});
274284

275285
it('has getProjectId method', async () => {
@@ -433,7 +443,9 @@ describe('v1.DeviceManagerClient', () => {
433443
);
434444
request.parent = defaultValue1;
435445
const expectedError = new Error('The client has already been closed.');
436-
client.close();
446+
client.close().catch(err => {
447+
throw err;
448+
});
437449
await assert.rejects(client.createDeviceRegistry(request), expectedError);
438450
});
439451
});
@@ -563,7 +575,9 @@ describe('v1.DeviceManagerClient', () => {
563575
);
564576
request.name = defaultValue1;
565577
const expectedError = new Error('The client has already been closed.');
566-
client.close();
578+
client.close().catch(err => {
579+
throw err;
580+
});
567581
await assert.rejects(client.getDeviceRegistry(request), expectedError);
568582
});
569583
});
@@ -698,7 +712,9 @@ describe('v1.DeviceManagerClient', () => {
698712
);
699713
request.deviceRegistry.name = defaultValue1;
700714
const expectedError = new Error('The client has already been closed.');
701-
client.close();
715+
client.close().catch(err => {
716+
throw err;
717+
});
702718
await assert.rejects(client.updateDeviceRegistry(request), expectedError);
703719
});
704720
});
@@ -829,7 +845,9 @@ describe('v1.DeviceManagerClient', () => {
829845
);
830846
request.name = defaultValue1;
831847
const expectedError = new Error('The client has already been closed.');
832-
client.close();
848+
client.close().catch(err => {
849+
throw err;
850+
});
833851
await assert.rejects(client.deleteDeviceRegistry(request), expectedError);
834852
});
835853
});
@@ -959,7 +977,9 @@ describe('v1.DeviceManagerClient', () => {
959977
);
960978
request.parent = defaultValue1;
961979
const expectedError = new Error('The client has already been closed.');
962-
client.close();
980+
client.close().catch(err => {
981+
throw err;
982+
});
963983
await assert.rejects(client.createDevice(request), expectedError);
964984
});
965985
});
@@ -1086,7 +1106,9 @@ describe('v1.DeviceManagerClient', () => {
10861106
);
10871107
request.name = defaultValue1;
10881108
const expectedError = new Error('The client has already been closed.');
1089-
client.close();
1109+
client.close().catch(err => {
1110+
throw err;
1111+
});
10901112
await assert.rejects(client.getDevice(request), expectedError);
10911113
});
10921114
});
@@ -1220,7 +1242,9 @@ describe('v1.DeviceManagerClient', () => {
12201242
);
12211243
request.device.name = defaultValue1;
12221244
const expectedError = new Error('The client has already been closed.');
1223-
client.close();
1245+
client.close().catch(err => {
1246+
throw err;
1247+
});
12241248
await assert.rejects(client.updateDevice(request), expectedError);
12251249
});
12261250
});
@@ -1350,7 +1374,9 @@ describe('v1.DeviceManagerClient', () => {
13501374
);
13511375
request.name = defaultValue1;
13521376
const expectedError = new Error('The client has already been closed.');
1353-
client.close();
1377+
client.close().catch(err => {
1378+
throw err;
1379+
});
13541380
await assert.rejects(client.deleteDevice(request), expectedError);
13551381
});
13561382
});
@@ -1484,7 +1510,9 @@ describe('v1.DeviceManagerClient', () => {
14841510
);
14851511
request.name = defaultValue1;
14861512
const expectedError = new Error('The client has already been closed.');
1487-
client.close();
1513+
client.close().catch(err => {
1514+
throw err;
1515+
});
14881516
await assert.rejects(
14891517
client.modifyCloudToDeviceConfig(request),
14901518
expectedError
@@ -1621,7 +1649,9 @@ describe('v1.DeviceManagerClient', () => {
16211649
);
16221650
request.name = defaultValue1;
16231651
const expectedError = new Error('The client has already been closed.');
1624-
client.close();
1652+
client.close().catch(err => {
1653+
throw err;
1654+
});
16251655
await assert.rejects(
16261656
client.listDeviceConfigVersions(request),
16271657
expectedError
@@ -1754,7 +1784,9 @@ describe('v1.DeviceManagerClient', () => {
17541784
);
17551785
request.name = defaultValue1;
17561786
const expectedError = new Error('The client has already been closed.');
1757-
client.close();
1787+
client.close().catch(err => {
1788+
throw err;
1789+
});
17581790
await assert.rejects(client.listDeviceStates(request), expectedError);
17591791
});
17601792
});
@@ -1884,7 +1916,9 @@ describe('v1.DeviceManagerClient', () => {
18841916
);
18851917
request.resource = defaultValue1;
18861918
const expectedError = new Error('The client has already been closed.');
1887-
client.close();
1919+
client.close().catch(err => {
1920+
throw err;
1921+
});
18881922
await assert.rejects(client.setIamPolicy(request), expectedError);
18891923
});
18901924
});
@@ -2014,7 +2048,9 @@ describe('v1.DeviceManagerClient', () => {
20142048
);
20152049
request.resource = defaultValue1;
20162050
const expectedError = new Error('The client has already been closed.');
2017-
client.close();
2051+
client.close().catch(err => {
2052+
throw err;
2053+
});
20182054
await assert.rejects(client.getIamPolicy(request), expectedError);
20192055
});
20202056
});
@@ -2145,7 +2181,9 @@ describe('v1.DeviceManagerClient', () => {
21452181
);
21462182
request.resource = defaultValue1;
21472183
const expectedError = new Error('The client has already been closed.');
2148-
client.close();
2184+
client.close().catch(err => {
2185+
throw err;
2186+
});
21492187
await assert.rejects(client.testIamPermissions(request), expectedError);
21502188
});
21512189
});
@@ -2276,7 +2314,9 @@ describe('v1.DeviceManagerClient', () => {
22762314
);
22772315
request.name = defaultValue1;
22782316
const expectedError = new Error('The client has already been closed.');
2279-
client.close();
2317+
client.close().catch(err => {
2318+
throw err;
2319+
});
22802320
await assert.rejects(client.sendCommandToDevice(request), expectedError);
22812321
});
22822322
});
@@ -2407,7 +2447,9 @@ describe('v1.DeviceManagerClient', () => {
24072447
);
24082448
request.parent = defaultValue1;
24092449
const expectedError = new Error('The client has already been closed.');
2410-
client.close();
2450+
client.close().catch(err => {
2451+
throw err;
2452+
});
24112453
await assert.rejects(client.bindDeviceToGateway(request), expectedError);
24122454
});
24132455
});
@@ -2541,7 +2583,9 @@ describe('v1.DeviceManagerClient', () => {
25412583
);
25422584
request.parent = defaultValue1;
25432585
const expectedError = new Error('The client has already been closed.');
2544-
client.close();
2586+
client.close().catch(err => {
2587+
throw err;
2588+
});
25452589
await assert.rejects(
25462590
client.unbindDeviceFromGateway(request),
25472591
expectedError

packages/google-cloud-language/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
4444
1. [Select or create a Cloud Platform project][projects].
4545
1. [Enable billing for your project][billing].
4646
1. [Enable the Natural Language API][enable_api].
47-
1. [Set up authentication with a service account][auth] so you can access the
47+
1. [Set up authentication][auth] so you can access the
4848
API from your local workstation.
4949

5050
### Installing the client library
@@ -180,4 +180,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
180180
[projects]: https://console.cloud.google.com/project
181181
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
182182
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=language.googleapis.com
183-
[auth]: https://cloud.google.com/docs/authentication/getting-started
183+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local

packages/google-cloud-language/protos/protos.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"clientLibrary": {
33
"name": "nodejs-language",
4-
"version": "7.0.1",
4+
"version": "7.0.2",
55
"language": "TYPESCRIPT",
66
"apis": [
77
{

packages/google-cloud-language/samples/generated/v1/snippet_metadata_google.cloud.language.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"clientLibrary": {
33
"name": "nodejs-language",
4-
"version": "7.0.1",
4+
"version": "7.0.2",
55
"language": "TYPESCRIPT",
66
"apis": [
77
{

packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"clientLibrary": {
33
"name": "nodejs-language",
4-
"version": "7.0.1",
4+
"version": "7.0.2",
55
"language": "TYPESCRIPT",
66
"apis": [
77
{

packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata_google.cloud.language.v1beta2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"clientLibrary": {
33
"name": "nodejs-language",
4-
"version": "7.0.1",
4+
"version": "7.0.2",
55
"language": "TYPESCRIPT",
66
"apis": [
77
{

packages/google-cloud-language/samples/generated/v2/snippet_metadata_google.cloud.language.v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"clientLibrary": {
33
"name": "nodejs-language",
4-
"version": "7.0.1",
4+
"version": "7.0.2",
55
"language": "TYPESCRIPT",
66
"apis": [
77
{

0 commit comments

Comments
 (0)