Skip to content

Commit a9df430

Browse files
jdollen1ru4l
andauthored
Typecheck fix (#7882)
Co-authored-by: Laurin Quast <laurinquast@googlemail.com>
1 parent 908c456 commit a9df430

12 files changed

Lines changed: 611 additions & 774 deletions

File tree

deployment/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@graphql-hive/gateway": "^2.1.19",
2626
"@types/js-yaml": "4.0.9",
2727
"@types/mime-types": "2.1.4",
28-
"@types/node": "22.10.5",
28+
"@types/node": "24.10.9",
2929
"@types/tmp": "0.2.6",
3030
"json-schema-to-typescript": "15.0.3",
3131
"tmp": "0.2.5",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"@theguild/eslint-config": "0.13.1",
8686
"@theguild/federation-composition": "0.22.1",
8787
"@theguild/prettier-config": "2.0.7",
88-
"@types/node": "22.10.5",
88+
"@types/node": "24.10.9",
8989
"bob-the-bundler": "7.0.1",
9090
"cypress": "13.17.0",
9191
"dotenv": "16.4.7",
@@ -149,6 +149,7 @@
149149
"estree-util-value-to-estree": "^3.3.3",
150150
"@types/nodemailer>@aws-sdk/client-sesv2": "-",
151151
"tar@6.x.x": "^7.5.11",
152+
"typescript": "5.7.3",
152153
"diff@<8.0.3": "^8.0.3",
153154
"lodash-es@4.x.x": "^4.17.23",
154155
"lodash@4.x.x": "^4.17.23",

packages/libraries/cli/src/commands/app/create.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ export default class AppCreate extends Command<typeof AppCreate> {
147147

148148
if (result.addDocumentsToAppDeployment.error) {
149149
if (result.addDocumentsToAppDeployment.error.details) {
150-
const affectedOperation = buffer.at(
151-
result.addDocumentsToAppDeployment.error.details.index,
152-
);
150+
const affectedOperation =
151+
buffer[result.addDocumentsToAppDeployment.error.details.index];
153152

154153
const maxCharacters = 40;
155154

packages/libraries/cli/src/helpers/target-input.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ export function parse(str: string): ParseError | ParseOk {
2828
}
2929

3030
const parts = str.split('/');
31-
32-
const organizationSlug = parts.at(0);
33-
const projectSlug = parts.at(1);
34-
const targetSlug = parts.at(2);
31+
const [organizationSlug, projectSlug, targetSlug] = parts;
3532

3633
if (!organizationSlug || !projectSlug || !targetSlug || parts.length > 3) {
3734
return {

packages/libraries/core/src/client/http-client.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,16 @@ export async function makeFetchCall(
150150
const timeoutSignal = AbortSignal.timeout(config.timeout ?? 20_000);
151151
const signal = config.signal ? abortSignalAny([config.signal, timeoutSignal]) : timeoutSignal;
152152

153+
let body: BodyInit | undefined | null;
154+
if (typeof config.body === 'string') {
155+
body = config.body;
156+
} else if (config.body) {
157+
body = new Uint8Array(config.body).buffer;
158+
}
159+
153160
const response = await ((config.fetchImplementation ?? fetch) as typeof fetch)(endpoint, {
154161
method: config.method,
155-
body: config.body,
162+
body,
156163
headers: {
157164
'x-request-id': requestId,
158165
...actionHeader,

packages/libraries/external-composition/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
},
6262
"devDependencies": {
6363
"@apollo/composition": "2.13.2",
64-
"@types/node": "22.10.5",
64+
"@types/node": "24.10.9",
6565
"esbuild": "0.25.9",
6666
"fastify": "5.8.1",
6767
"graphql": "16.9.0"

packages/libraries/laboratory/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"@tanstack/router-plugin": "^1.154.13",
7777
"@types/crypto-js": "^4.2.2",
7878
"@types/lodash": "^4.17.23",
79-
"@types/node": "^24.10.9",
79+
"@types/node": "24.10.9",
8080
"@types/react": "18.3.18",
8181
"@types/react-dom": "18.3.5",
8282
"@vitejs/plugin-react": "^5.1.2",
@@ -118,7 +118,7 @@
118118
"tslib": "^2.8.1",
119119
"tsup": "^8.5.1",
120120
"tw-animate-css": "^1.4.0",
121-
"typescript": "~5.9.3",
121+
"typescript": "5.7.3",
122122
"typescript-eslint": "^8.53.1",
123123
"unplugin-dts": "1.0.0-beta.6",
124124
"vite": "npm:rolldown-vite@7.1.14",

packages/migrations/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@graphql-hive/core": "workspace:*",
2020
"@hive/service-common": "workspace:*",
2121
"@types/bcryptjs": "2.4.6",
22-
"@types/node": "22.10.5",
22+
"@types/node": "24.10.9",
2323
"@types/pg": "8.11.10",
2424
"@whatwg-node/fetch": "0.10.13",
2525
"bcryptjs": "2.4.3",

packages/services/schema/src/composition-scheduler.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ export class CompositionScheduler {
103103
};
104104

105105
// catch uncaught exception from worker thread. Worker thread gets terminated.
106-
worker.on('error', error => {
107-
const errorText =
108-
error instanceof Error
109-
? error.toString()
110-
: typeof error === 'string'
111-
? error
112-
: JSON.stringify(error);
113-
this.logger.error('Worker error (error=%s)', errorText);
106+
worker.on('error', err => {
107+
const error =
108+
err instanceof Error
109+
? err
110+
: typeof err === 'string'
111+
? new Error(err)
112+
: new Error(JSON.stringify(err));
113+
this.logger.error('Worker error (error=%s)', error.message);
114114
Sentry.captureException(error, {
115115
extra: {
116116
requestId: workerState?.args.requestId ?? '',

packages/services/storage/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@sentry/node": "7.120.2",
2222
"@sentry/types": "7.120.2",
2323
"@tgriesser/schemats": "9.0.1",
24-
"@types/node": "22.10.5",
24+
"@types/node": "24.10.9",
2525
"@types/pg": "8.11.10",
2626
"dotenv": "16.4.7",
2727
"fast-json-stable-stringify": "2.1.0",

0 commit comments

Comments
 (0)