Skip to content

Commit b628bcb

Browse files
chore(deps)!: remove nx overrides, upgrade gts to v6, and typescript to v5 (#808)
Part of #630. - remove the nx overrides and upgraded gts and typescript - regenerated the lockfiles - reformat all code with new gts version - fixed newly uncovered typescript and gts failures - Also fix dependency conflict from accidentally using the non-workspace (npm) version of monitoring exporter. BREAKING CHANGE: typescript generated .d.ts files may not be compatible with older typescript versions. You should upgrade to typescript v5. Co-authored-by: Mend Renovate <[email protected]>
1 parent a9f41f9 commit b628bcb

File tree

46 files changed

+2652
-11213
lines changed

Some content is hidden

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

46 files changed

+2652
-11213
lines changed

e2e-test-server/package-lock.json

Lines changed: 0 additions & 5738 deletions
This file was deleted.

e2e-test-server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
"@types/express": "4.17.21",
3131
"@types/node": "14.18.63",
3232
"@vercel/ncc": "0.38.2",
33-
"gts": "5.3.1",
34-
"typescript": "4.9.5"
33+
"gts": "6.0.2",
34+
"typescript": "5.0.4"
3535
},
3636
"dependencies": {
3737
"@google-cloud/functions-framework": "^3.1.3",

e2e-test-server/src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ switch (process.env.SUBSCRIPTION_MODE) {
4646
break;
4747
default:
4848
throw new Error(
49-
`SUBSCRIPTION_MODE must be ${SubscriptionMode.PUSH}, ${SubscriptionMode.PULL}, or unset.`
49+
`SUBSCRIPTION_MODE must be ${SubscriptionMode.PUSH}, ${SubscriptionMode.PULL}, or unset.`,
5050
);
5151
}
5252

e2e-test-server/src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function pubSubPull() {
5858
});
5959
logger.info(
6060
'Listening on subscription %s for pubsub message',
61-
constants.REQUEST_SUBSCRIPTION_NAME
61+
constants.REQUEST_SUBSCRIPTION_NAME,
6262
);
6363
}
6464

@@ -107,7 +107,7 @@ function pubSubPush() {
107107
.listen(constants.PUSH_PORT, () => {
108108
logger.info(
109109
'Listening on port %s for pubsub push messages',
110-
constants.PUSH_PORT
110+
constants.PUSH_PORT,
111111
);
112112
});
113113
}
@@ -117,9 +117,9 @@ function pubSubPush() {
117117
* https://cloud.google.com/functions/docs/writing/write-event-driven-functions#cloudevent-example-nodejs
118118
*/
119119
function registerCloudFunction() {
120-
functions.cloudEvent<PubSubPushPayload>(
120+
functions.cloudEvent(
121121
'cloudFunctionHandler',
122-
cloudEvent =>
122+
(cloudEvent: functions.CloudEvent<PubSubPushPayload>) =>
123123
new Promise<void>((resolve, reject) => {
124124
logger.info('Received Cloud Event');
125125
const payload = cloudEvent.data!;
@@ -131,7 +131,7 @@ function registerCloudFunction() {
131131
nack: reject,
132132
};
133133
return onRequestMessage(message);
134-
})
134+
}),
135135
);
136136
}
137137

@@ -183,7 +183,7 @@ async function respond(testId: string, res: scenarios.Response): Promise<void> {
183183
constants.RESPONSE_TOPIC_NAME,
184184
statusCode,
185185
data,
186-
headers
186+
headers,
187187
);
188188
await responseTopic.publishMessage({
189189
data,
@@ -213,7 +213,7 @@ function main(): void {
213213
case undefined:
214214
// this happens for cloud function runs which rely on functions framework to provide the entrypoint
215215
logger.info(
216-
'Registering functions framework handler for Cloud Functions'
216+
'Registering functions framework handler for Cloud Functions',
217217
);
218218
registerCloudFunction();
219219
return;

e2e-test-server/src/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default createLogger({
1919
format: format.combine(
2020
format.splat(),
2121
format.simple(),
22-
format.colorize({all: true})
22+
format.colorize({all: true}),
2323
),
2424
transports: [new transports.Console()],
2525
});

e2e-test-server/src/scenarios.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function withTracer<R>(
5252
options: {
5353
tracerConfig?: TracerConfig;
5454
exporterConfig?: TraceExporterOptions;
55-
} = {}
55+
} = {},
5656
): Promise<R> {
5757
const exporter = new TraceExporter({
5858
projectId: constants.PROJECT_ID,
@@ -105,12 +105,12 @@ async function complexTrace(request: Request): Promise<Response> {
105105
})
106106
.end();
107107
span.end();
108-
}
108+
},
109109
);
110110
tracer.startSpan('complexTrace/child3', {attributes}).end();
111111
span.end();
112112
return span.spanContext().traceId;
113-
}
113+
},
114114
);
115115
return {statusCode: Status.OK, headers: {[constants.TRACE_ID]: traceId}};
116116
});
@@ -137,7 +137,7 @@ async function detectResource(request: Request): Promise<Response> {
137137
// semantic convention attributes to be present.
138138
resourceFilter: /.*/,
139139
},
140-
}
140+
},
141141
);
142142
}
143143

0 commit comments

Comments
 (0)