Typecheck fix (#7882)

Co-authored-by: Laurin Quast <laurinquast@googlemail.com>
This commit is contained in:
jdolle 2026-03-19 11:48:22 -07:00 committed by GitHub
parent 908c456184
commit a9df430804
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 619 additions and 782 deletions

View file

@ -25,7 +25,7 @@
"@graphql-hive/gateway": "^2.1.19",
"@types/js-yaml": "4.0.9",
"@types/mime-types": "2.1.4",
"@types/node": "22.10.5",
"@types/node": "24.10.9",
"@types/tmp": "0.2.6",
"json-schema-to-typescript": "15.0.3",
"tmp": "0.2.5",

View file

@ -85,7 +85,7 @@
"@theguild/eslint-config": "0.13.1",
"@theguild/federation-composition": "0.22.1",
"@theguild/prettier-config": "2.0.7",
"@types/node": "22.10.5",
"@types/node": "24.10.9",
"bob-the-bundler": "7.0.1",
"cypress": "13.17.0",
"dotenv": "16.4.7",
@ -149,6 +149,7 @@
"estree-util-value-to-estree": "^3.3.3",
"@types/nodemailer>@aws-sdk/client-sesv2": "-",
"tar@6.x.x": "^7.5.11",
"typescript": "5.7.3",
"diff@<8.0.3": "^8.0.3",
"lodash-es@4.x.x": "^4.17.23",
"lodash@4.x.x": "^4.17.23",

View file

@ -147,9 +147,8 @@ export default class AppCreate extends Command<typeof AppCreate> {
if (result.addDocumentsToAppDeployment.error) {
if (result.addDocumentsToAppDeployment.error.details) {
const affectedOperation = buffer.at(
result.addDocumentsToAppDeployment.error.details.index,
);
const affectedOperation =
buffer[result.addDocumentsToAppDeployment.error.details.index];
const maxCharacters = 40;

View file

@ -28,10 +28,7 @@ export function parse(str: string): ParseError | ParseOk {
}
const parts = str.split('/');
const organizationSlug = parts.at(0);
const projectSlug = parts.at(1);
const targetSlug = parts.at(2);
const [organizationSlug, projectSlug, targetSlug] = parts;
if (!organizationSlug || !projectSlug || !targetSlug || parts.length > 3) {
return {

View file

@ -150,9 +150,16 @@ export async function makeFetchCall(
const timeoutSignal = AbortSignal.timeout(config.timeout ?? 20_000);
const signal = config.signal ? abortSignalAny([config.signal, timeoutSignal]) : timeoutSignal;
let body: BodyInit | undefined | null;
if (typeof config.body === 'string') {
body = config.body;
} else if (config.body) {
body = new Uint8Array(config.body).buffer;
}
const response = await ((config.fetchImplementation ?? fetch) as typeof fetch)(endpoint, {
method: config.method,
body: config.body,
body,
headers: {
'x-request-id': requestId,
...actionHeader,

View file

@ -61,7 +61,7 @@
},
"devDependencies": {
"@apollo/composition": "2.13.2",
"@types/node": "22.10.5",
"@types/node": "24.10.9",
"esbuild": "0.25.9",
"fastify": "5.8.1",
"graphql": "16.9.0"

View file

@ -76,7 +76,7 @@
"@tanstack/router-plugin": "^1.154.13",
"@types/crypto-js": "^4.2.2",
"@types/lodash": "^4.17.23",
"@types/node": "^24.10.9",
"@types/node": "24.10.9",
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"@vitejs/plugin-react": "^5.1.2",
@ -118,7 +118,7 @@
"tslib": "^2.8.1",
"tsup": "^8.5.1",
"tw-animate-css": "^1.4.0",
"typescript": "~5.9.3",
"typescript": "5.7.3",
"typescript-eslint": "^8.53.1",
"unplugin-dts": "1.0.0-beta.6",
"vite": "npm:rolldown-vite@7.1.14",

View file

@ -19,7 +19,7 @@
"@graphql-hive/core": "workspace:*",
"@hive/service-common": "workspace:*",
"@types/bcryptjs": "2.4.6",
"@types/node": "22.10.5",
"@types/node": "24.10.9",
"@types/pg": "8.11.10",
"@whatwg-node/fetch": "0.10.13",
"bcryptjs": "2.4.3",

View file

@ -103,14 +103,14 @@ export class CompositionScheduler {
};
// catch uncaught exception from worker thread. Worker thread gets terminated.
worker.on('error', error => {
const errorText =
error instanceof Error
? error.toString()
: typeof error === 'string'
? error
: JSON.stringify(error);
this.logger.error('Worker error (error=%s)', errorText);
worker.on('error', err => {
const error =
err instanceof Error
? err
: typeof err === 'string'
? new Error(err)
: new Error(JSON.stringify(err));
this.logger.error('Worker error (error=%s)', error.message);
Sentry.captureException(error, {
extra: {
requestId: workerState?.args.requestId ?? '',

View file

@ -21,7 +21,7 @@
"@sentry/node": "7.120.2",
"@sentry/types": "7.120.2",
"@tgriesser/schemats": "9.0.1",
"@types/node": "22.10.5",
"@types/node": "24.10.9",
"@types/pg": "8.11.10",
"dotenv": "16.4.7",
"fast-json-stable-stringify": "2.1.0",

View file

@ -9,7 +9,7 @@ await import('./index.js');
// Not having this caused hell
process.stdout.on('error', function (err) {
if (err.code == 'EPIPE') {
if ('code' in err && err.code === 'EPIPE') {
process.exit(0);
}
});

File diff suppressed because it is too large Load diff