Skip to content

Commit 690c591

Browse files
chore: [Many APIs] upgrade typescript generator to 4.9.0 (googleapis#6305)
* 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: https://github.com/googleapis/googleapis-gen/commit/7aaa93d9d4bbd0c87adc18b4dc0384b783800a3b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtYWRkcmVzc3ZhbGlkYXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjdhYWE5M2Q5ZDRiYmQwYzg3YWRjMThiNGRjMDM4NGI3ODM4MDBhM2IifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtZmxlZXRlbmdpbmUtZGVsaXZlcnkvLk93bEJvdC55YW1sIiwiaCI6IjdhYWE5M2Q5ZDRiYmQwYzg3YWRjMThiNGRjMDM4NGI3ODM4MDBhM2IifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtZmxlZXRlbmdpbmUvLk93bEJvdC55YW1sIiwiaCI6IjdhYWE5M2Q5ZDRiYmQwYzg3YWRjMThiNGRjMDM4NGI3ODM4MDBhM2IifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtbWFwc3BsYXRmb3JtZGF0YXNldHMvLk93bEJvdC55YW1sIiwiaCI6IjdhYWE5M2Q5ZDRiYmQwYzg3YWRjMThiNGRjMDM4NGI3ODM4MDBhM2IifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcGxhY2VzLy5Pd2xCb3QueWFtbCIsImgiOiI3YWFhOTNkOWQ0YmJkMGM4N2FkYzE4YjRkYzAzODRiNzgzODAwYTNiIn0= Copy-Tag: eyJwIjoicGFja2FnZXMv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LXNob3BwaW5nLW1lcmNoYW50LXByb21vdGlvbnMvLk93bEJvdC55YW1sIiwiaCI6IjdhYWE5M2Q5ZDRiYmQwYzg3YWRjMThiNGRjMDM4NGI3ODM4MDBhM2IifQ== * 🦉 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>
1 parent 930bbcf commit 690c591

89 files changed

Lines changed: 1614 additions & 626 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-maps-addressvalidation/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 Address Validation API 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
@@ -210,4 +210,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
210210
[projects]: https://console.cloud.google.com/project
211211
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
212212
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=addressvalidation.googleapis.com
213-
[auth]: https://cloud.google.com/docs/authentication/getting-started
213+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local

packages/google-maps-addressvalidation/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-maps-addressvalidation/test/gapic_address_validation_v1.ts

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,14 @@ describe('v1.AddressValidationClient', () => {
197197
throw err;
198198
});
199199
assert(client.addressValidationStub);
200-
client.close().then(() => {
201-
done();
202-
});
200+
client
201+
.close()
202+
.then(() => {
203+
done();
204+
})
205+
.catch(err => {
206+
throw err;
207+
});
203208
});
204209

205210
it('has close method for the non-initialized client', done => {
@@ -208,9 +213,14 @@ describe('v1.AddressValidationClient', () => {
208213
projectId: 'bogus',
209214
});
210215
assert.strictEqual(client.addressValidationStub, undefined);
211-
client.close().then(() => {
212-
done();
213-
});
216+
client
217+
.close()
218+
.then(() => {
219+
done();
220+
})
221+
.catch(err => {
222+
throw err;
223+
});
214224
});
215225

216226
it('has getProjectId method', async () => {
@@ -326,7 +336,9 @@ describe('v1.AddressValidationClient', () => {
326336
new protos.google.maps.addressvalidation.v1.ValidateAddressRequest()
327337
);
328338
const expectedError = new Error('The client has already been closed.');
329-
client.close();
339+
client.close().catch(err => {
340+
throw err;
341+
});
330342
await assert.rejects(client.validateAddress(request), expectedError);
331343
});
332344
});
@@ -413,7 +425,9 @@ describe('v1.AddressValidationClient', () => {
413425
new protos.google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest()
414426
);
415427
const expectedError = new Error('The client has already been closed.');
416-
client.close();
428+
client.close().catch(err => {
429+
throw err;
430+
});
417431
await assert.rejects(
418432
client.provideValidationFeedback(request),
419433
expectedError

packages/google-maps-fleetengine-delivery/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 Last Mile Fleet Solution Delivery API 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
@@ -225,4 +225,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
225225
[projects]: https://console.cloud.google.com/project
226226
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
227227
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=fleetengine.googleapis.com
228-
[auth]: https://cloud.google.com/docs/authentication/getting-started
228+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local

packages/google-maps-fleetengine-delivery/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-maps-fleetengine-delivery/test/gapic_delivery_service_v1.ts

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,14 @@ describe('v1.DeliveryServiceClient', () => {
256256
throw err;
257257
});
258258
assert(client.deliveryServiceStub);
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.DeliveryServiceClient', () => {
267272
projectId: 'bogus',
268273
});
269274
assert.strictEqual(client.deliveryServiceStub, 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 () => {
@@ -424,7 +434,9 @@ describe('v1.DeliveryServiceClient', () => {
424434
// path template: {provider_id=providers/*}
425435
request.parent = 'providers/value';
426436
const expectedError = new Error('The client has already been closed.');
427-
client.close();
437+
client.close().catch(err => {
438+
throw err;
439+
});
428440
await assert.rejects(
429441
client.createDeliveryVehicle(request),
430442
expectedError
@@ -546,7 +558,9 @@ describe('v1.DeliveryServiceClient', () => {
546558
// path template: {provider_id=providers/*}
547559
request.name = 'providers/value';
548560
const expectedError = new Error('The client has already been closed.');
549-
client.close();
561+
client.close().catch(err => {
562+
throw err;
563+
});
550564
await assert.rejects(client.getDeliveryVehicle(request), expectedError);
551565
});
552566
});
@@ -668,7 +682,9 @@ describe('v1.DeliveryServiceClient', () => {
668682
// path template: {provider_id=providers/*}
669683
request.name = 'providers/value';
670684
const expectedError = new Error('The client has already been closed.');
671-
client.close();
685+
client.close().catch(err => {
686+
throw err;
687+
});
672688
await assert.rejects(
673689
client.deleteDeliveryVehicle(request),
674690
expectedError
@@ -797,7 +813,9 @@ describe('v1.DeliveryServiceClient', () => {
797813
// path template: {provider_id=providers/*}
798814
request.deliveryVehicle.name = 'providers/value';
799815
const expectedError = new Error('The client has already been closed.');
800-
client.close();
816+
client.close().catch(err => {
817+
throw err;
818+
});
801819
await assert.rejects(
802820
client.updateDeliveryVehicle(request),
803821
expectedError
@@ -918,7 +936,9 @@ describe('v1.DeliveryServiceClient', () => {
918936
// path template: {provider_id=providers/*}
919937
request.parent = 'providers/value';
920938
const expectedError = new Error('The client has already been closed.');
921-
client.close();
939+
client.close().catch(err => {
940+
throw err;
941+
});
922942
await assert.rejects(client.batchCreateTasks(request), expectedError);
923943
});
924944
});
@@ -1036,7 +1056,9 @@ describe('v1.DeliveryServiceClient', () => {
10361056
// path template: {provider_id=providers/*}
10371057
request.parent = 'providers/value';
10381058
const expectedError = new Error('The client has already been closed.');
1039-
client.close();
1059+
client.close().catch(err => {
1060+
throw err;
1061+
});
10401062
await assert.rejects(client.createTask(request), expectedError);
10411063
});
10421064
});
@@ -1151,7 +1173,9 @@ describe('v1.DeliveryServiceClient', () => {
11511173
// path template: {provider_id=providers/*}
11521174
request.name = 'providers/value';
11531175
const expectedError = new Error('The client has already been closed.');
1154-
client.close();
1176+
client.close().catch(err => {
1177+
throw err;
1178+
});
11551179
await assert.rejects(client.getTask(request), expectedError);
11561180
});
11571181
});
@@ -1269,7 +1293,9 @@ describe('v1.DeliveryServiceClient', () => {
12691293
// path template: {provider_id=providers/*}
12701294
request.name = 'providers/value';
12711295
const expectedError = new Error('The client has already been closed.');
1272-
client.close();
1296+
client.close().catch(err => {
1297+
throw err;
1298+
});
12731299
await assert.rejects(client.deleteTask(request), expectedError);
12741300
});
12751301
});
@@ -1391,7 +1417,9 @@ describe('v1.DeliveryServiceClient', () => {
13911417
// path template: {provider_id=providers/*}
13921418
request.task.name = 'providers/value';
13931419
const expectedError = new Error('The client has already been closed.');
1394-
client.close();
1420+
client.close().catch(err => {
1421+
throw err;
1422+
});
13951423
await assert.rejects(client.updateTask(request), expectedError);
13961424
});
13971425
});
@@ -1510,7 +1538,9 @@ describe('v1.DeliveryServiceClient', () => {
15101538
// path template: {provider_id=providers/*}
15111539
request.name = 'providers/value';
15121540
const expectedError = new Error('The client has already been closed.');
1513-
client.close();
1541+
client.close().catch(err => {
1542+
throw err;
1543+
});
15141544
await assert.rejects(client.getTaskTrackingInfo(request), expectedError);
15151545
});
15161546
});

packages/google-maps-fleetengine/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 Local Rides and Deliveries API 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
@@ -318,4 +318,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
318318
[projects]: https://console.cloud.google.com/project
319319
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
320320
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=fleetengine.googleapis.com
321-
[auth]: https://cloud.google.com/docs/authentication/getting-started
321+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local

packages/google-maps-fleetengine/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-maps-fleetengine/src/v1/trip_service_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1372,4 +1372,4 @@ export class TripServiceClient {
13721372
}
13731373
return Promise.resolve();
13741374
}
1375-
}
1375+
}

packages/google-maps-fleetengine/src/v1/vehicle_service_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1867,4 +1867,4 @@ export class VehicleServiceClient {
18671867
}
18681868
return Promise.resolve();
18691869
}
1870-
}
1870+
}

0 commit comments

Comments
 (0)