Skip to content
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

feat!: node 12 deprecation #1774

Merged
merged 3 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 14, 16, 18]
node: [14, 16, 18, 20]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"arrify": "^2.0.0",
"extend": "^3.0.2",
"google-auth-library": "^8.0.2",
"google-gax": "^3.6.1",
"google-gax": "^4.0.0",
"heap-js": "^2.2.0",
"is-stream-ended": "^0.1.4",
"lodash.snakecase": "^4.1.1",
Expand Down
32 changes: 15 additions & 17 deletions src/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ import {
SeekResponse,
Snapshot,
} from './snapshot';
import {Subscriber, SubscriberOptions} from './subscriber';
import {Message, Subscriber, SubscriberOptions} from './subscriber';
import {Topic} from './topic';
import {promisifySome} from './util';
import {StatusError} from './message-stream';
import {DebugMessage} from './debug';

export {AckError, AckResponse, AckResponses} from './subscriber';

Expand Down Expand Up @@ -92,30 +94,26 @@ export type DetachSubscriptionResponse = EmptyResponse;

// JSDoc won't see these, so this is just to let you get typings
// in your editor of choice.
//
// NOTE: These are commented out for now because we don't want to
// break any existing clients that rely on not-entirely-correct
// typings. We'll re-enable on the next major.
/* export declare interface Subscription {
export declare interface Subscription {
on(event: 'message', listener: (message: Message) => void): this;
on(event: 'error', listener: (error: StatusError) => void): this;
on(event: 'close', listener: () => void): this;
on(event: 'debug', listener: (msg: DebugMessage) => void): this;

// Only used internally.
on(
event: 'message',
listener: (message: Message) => void
event: 'newListener',
listener: (event: string | symbol, listener: Function) => void
): this;
on(
event: 'error',
listener: (error: StatusError) => void
event: 'removeListener',
listener: (event: string | symbol, listener: Function) => void
): this;
on(event: 'close', listener: () => void): this;
on(event: 'debug', listener: (msg: DebugMessage) => void); this;

// Only used internally.
on(event: 'newListener', listener: Function): this;
on(event: 'removeListener', listener: Function): this;

// Catch-all. If you get an error about this line, it means you're
// using an unsupported event type or listener type.
on(event: string, listener: void): this;
} */
}

/**
* @typedef {object} ExpirationPolicy
Expand Down
4 changes: 2 additions & 2 deletions src/v1/publisher_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,7 @@ export class PublisherClient {
IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined,
{} | null | undefined
>
): Promise<IamProtos.google.iam.v1.Policy> {
): Promise<[IamProtos.google.iam.v1.Policy]> {
return this.iamClient.getIamPolicy(request, options, callback);
}

Expand Down Expand Up @@ -1594,7 +1594,7 @@ export class PublisherClient {
IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined,
{} | null | undefined
>
): Promise<IamProtos.google.iam.v1.Policy> {
): Promise<[IamProtos.google.iam.v1.Policy]> {
return this.iamClient.setIamPolicy(request, options, callback);
}

Expand Down
4 changes: 2 additions & 2 deletions src/v1/schema_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ export class SchemaServiceClient {
IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined,
{} | null | undefined
>
): Promise<IamProtos.google.iam.v1.Policy> {
): Promise<[IamProtos.google.iam.v1.Policy]> {
return this.iamClient.getIamPolicy(request, options, callback);
}

Expand Down Expand Up @@ -1542,7 +1542,7 @@ export class SchemaServiceClient {
IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined,
{} | null | undefined
>
): Promise<IamProtos.google.iam.v1.Policy> {
): Promise<[IamProtos.google.iam.v1.Policy]> {
return this.iamClient.setIamPolicy(request, options, callback);
}

Expand Down
4 changes: 2 additions & 2 deletions src/v1/subscriber_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2159,7 +2159,7 @@ export class SubscriberClient {
IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined,
{} | null | undefined
>
): Promise<IamProtos.google.iam.v1.Policy> {
): Promise<[IamProtos.google.iam.v1.Policy]> {
return this.iamClient.getIamPolicy(request, options, callback);
}

Expand Down Expand Up @@ -2207,7 +2207,7 @@ export class SubscriberClient {
IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined,
{} | null | undefined
>
): Promise<IamProtos.google.iam.v1.Policy> {
): Promise<[IamProtos.google.iam.v1.Policy]> {
return this.iamClient.setIamPolicy(request, options, callback);
}

Expand Down