diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index de4fa0a5d..ead9126e2 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:ef104a520c849ffde60495342ecf099dfb6256eab0fbd173228f447bc73d1aa9 + digest: sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430 # created: 2023-07-10T21:36:52.433664553Z diff --git a/package.json b/package.json index b37f2a03a..4b1362de0 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@compodoc/compodoc": "1.1.21", "@types/mocha": "^9.0.0", "@types/ncp": "^2.0.1", - "@types/node": "^18.0.0", + "@types/node": "^20.5.0", "@types/node-fetch": "^2.5.4", "@types/object-hash": "^3.0.0", "@types/proxyquire": "^1.3.28", @@ -38,7 +38,7 @@ "codecov": "^3.1.0", "execa": "^5.0.0", "google-proto-files": "^3.0.3", - "gts": "^3.1.0", + "gts": "^5.0.0", "linkinator": "^4.0.0", "long": "^4.0.0", "mkdirp": "^2.0.0", @@ -52,7 +52,7 @@ "sinon": "^15.0.0", "stream-events": "^1.0.4", "ts-loader": "^8.0.0", - "typescript": "^4.6.4", + "typescript": "^5.1.6", "uglify-js": "^3.17.0", "walkdir": "^0.4.0", "webpack": "^4.0.0", diff --git a/src/apitypes.ts b/src/apitypes.ts index b3b36817c..8a6d49087 100644 --- a/src/apitypes.ts +++ b/src/apitypes.ts @@ -48,7 +48,7 @@ export type RawResponseType = Operation | {} | null; export type ResultTuple = [ ResponseType | [ResponseType], NextPageRequestType | undefined, - RawResponseType | undefined + RawResponseType | undefined, ]; export interface SimpleCallbackFunction { diff --git a/src/clientInterface.ts b/src/clientInterface.ts index 4eb54cf9a..0d544e50c 100644 --- a/src/clientInterface.ts +++ b/src/clientInterface.ts @@ -49,7 +49,7 @@ export interface Descriptors { export interface Callback< ResponseObject, NextRequestObject, - RawResponseObject + RawResponseObject, > { ( err: Error | null | undefined, @@ -69,7 +69,7 @@ export interface LROperation export interface PaginationCallback< RequestObject, ResponseObject, - ResponseType + ResponseType, > { ( err: Error | null, @@ -82,7 +82,7 @@ export interface PaginationCallback< export interface PaginationResponse< RequestObject, ResponseObject, - ResponseType + ResponseType, > { values?: ResponseType[]; nextPageRequest?: RequestObject; diff --git a/src/locationService.ts b/src/locationService.ts index e85c9ef56..bfe49b865 100644 --- a/src/locationService.ts +++ b/src/locationService.ts @@ -372,7 +372,7 @@ export class LocationsClient { [ protos.google.cloud.location.ILocation[], protos.google.cloud.location.IListLocationsRequest | null, - protos.google.cloud.location.IListLocationsResponse + protos.google.cloud.location.IListLocationsResponse, ] >; listLocations( @@ -438,7 +438,7 @@ export class LocationsClient { [ protos.google.cloud.location.ILocation[], protos.google.cloud.location.IListLocationsRequest | null, - protos.google.cloud.location.IListLocationsResponse + protos.google.cloud.location.IListLocationsResponse, ] > | void { request = request || {}; diff --git a/test/showcase-echo-client/src/v1beta1/echo_client.ts b/test/showcase-echo-client/src/v1beta1/echo_client.ts index 1d083a3a2..92e785460 100644 --- a/test/showcase-echo-client/src/v1beta1/echo_client.ts +++ b/test/showcase-echo-client/src/v1beta1/echo_client.ts @@ -510,7 +510,7 @@ export class EchoClient { [ protos.google.showcase.v1beta1.IEchoResponse, protos.google.showcase.v1beta1.IEchoRequest | undefined, - {} | undefined + {} | undefined, ] >; echo( @@ -548,7 +548,7 @@ export class EchoClient { [ protos.google.showcase.v1beta1.IEchoResponse, protos.google.showcase.v1beta1.IEchoRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -596,7 +596,7 @@ export class EchoClient { [ protos.google.showcase.v1beta1.IBlockResponse, protos.google.showcase.v1beta1.IBlockRequest | undefined, - {} | undefined + {} | undefined, ] >; block( @@ -634,7 +634,7 @@ export class EchoClient { [ protos.google.showcase.v1beta1.IBlockResponse, protos.google.showcase.v1beta1.IBlockRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -796,7 +796,7 @@ export class EchoClient { protos.google.showcase.v1beta1.IWaitMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; wait( @@ -849,7 +849,7 @@ export class EchoClient { protos.google.showcase.v1beta1.IWaitMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -932,7 +932,7 @@ export class EchoClient { [ protos.google.showcase.v1beta1.IEchoResponse[], protos.google.showcase.v1beta1.IPagedExpandRequest | null, - protos.google.showcase.v1beta1.IPagedExpandResponse + protos.google.showcase.v1beta1.IPagedExpandResponse, ] >; pagedExpand( @@ -972,7 +972,7 @@ export class EchoClient { [ protos.google.showcase.v1beta1.IEchoResponse[], protos.google.showcase.v1beta1.IPagedExpandRequest | null, - protos.google.showcase.v1beta1.IPagedExpandResponse + protos.google.showcase.v1beta1.IPagedExpandResponse, ] > | void { request = request || {}; diff --git a/test/unit/apiCallable.ts b/test/unit/apiCallable.ts index 988380ff4..71f2904a4 100644 --- a/test/unit/apiCallable.ts +++ b/test/unit/apiCallable.ts @@ -66,8 +66,8 @@ describe('createApiCall', () => { const now = new Date(); const originalDeadline = now.getTime() + 100; const expectedDeadline = now.getTime() + 200; - assert(resp! > originalDeadline); - assert(resp! <= expectedDeadline); + assert((resp as any)! > originalDeadline); + assert((resp as any)! <= expectedDeadline); done(); }); }); diff --git a/test/unit/longrunning.ts b/test/unit/longrunning.ts index d6a25c3b6..0ec804a3c 100644 --- a/test/unit/longrunning.ts +++ b/test/unit/longrunning.ts @@ -435,11 +435,11 @@ describe('longrunning', () => { const client = mockOperationsClient({expectedCalls: 0}); const apiCall = createApiCall(func, client); const [operation] = (await apiCall({})) as unknown as [ - longrunning.Operation + longrunning.Operation, ]; assert.notStrictEqual(operation, null); const [finalResult] = (await operation!.promise()) as unknown as [ - string + string, ]; assert.strictEqual(finalResult, RESPONSE_VAL); }); diff --git a/tools/package.json b/tools/package.json index 1daeb9949..7d2ce0cae 100644 --- a/tools/package.json +++ b/tools/package.json @@ -41,11 +41,11 @@ "@types/ncp": "^2.0.1", "@types/uglify-js": "^3.17.0", "c8": "^8.0.0", - "gts": "^3.1.1", + "gts": "^5.0.0", "mocha": "^9.0.0", "ncp": "^2.0.0", "protobufjs": "7.2.4", - "typescript": "^4.6.4" + "typescript": "^5.1.6" }, "engines": { "node": ">=14" diff --git a/tools/test/fixtures/echo.js b/tools/test/fixtures/echo.js index 76c665675..e2db51487 100644 --- a/tools/test/fixtures/echo.js +++ b/tools/test/fixtures/echo.js @@ -16,13 +16,12 @@ // Lots of comments we can delete in uglify async function main() { - // Showcases auto-pagination functionality. - - // Let's say we have an API call that returns results grouped into pages. - // It accepts 4 parameters (just like gRPC stub calls do): - return 'SUCCESS'; - } - - main().catch(console.error); - // More comments - + // Showcases auto-pagination functionality. + + // Let's say we have an API call that returns results grouped into pages. + // It accepts 4 parameters (just like gRPC stub calls do): + return 'SUCCESS'; +} + +main().catch(console.error); +// More comments