AFFiNE/packages/frontend/graphql/src/fetcher.ts

221 lines
5.7 KiB
TypeScript
Raw Normal View History

import type { ExecutionResult } from 'graphql';
import { isNil, isObject, merge } from 'lodash-es';
import { GraphQLError } from './error';
import type { GraphQLQuery } from './graphql';
import type { Mutations, Queries } from './schema';
export type NotArray<T> = T extends Array<unknown> ? never : T;
2023-06-21 09:08:32 +03:00
export type _QueryVariables<Q extends GraphQLQuery> =
Q['id'] extends Queries['name']
? Extract<Queries, { name: Q['id'] }>['variables']
: Q['id'] extends Mutations['name']
? Extract<Mutations, { name: Q['id'] }>['variables']
: undefined;
2024-02-23 12:37:13 +03:00
export type QueryVariables<Q extends GraphQLQuery> =
_QueryVariables<Q> extends never | Record<string, never>
? never
: _QueryVariables<Q>;
export type QueryResponse<Q extends GraphQLQuery> = Extract<
Queries | Mutations,
{ name: Q['id'] }
>['response'];
type NullableKeys<T> = {
[K in keyof T]: null extends T[K] ? K : never;
}[keyof T];
type NonNullableKeys<T> = {
[K in keyof T]: null extends T[K] ? never : K;
}[keyof T];
export type RecursiveMaybeFields<T> = T extends
| number
| boolean
| string
| null
| undefined
? T
: {
[K in NullableKeys<T>]?: RecursiveMaybeFields<T[K]>;
} & {
[K in NonNullableKeys<T>]: RecursiveMaybeFields<T[K]>;
};
type AllowedRequestContext = Omit<RequestInit, 'method' | 'body'>;
export interface RequestBody {
operationName?: string;
variables: any;
query: string;
form?: FormData;
}
type QueryVariablesOption<Q extends GraphQLQuery> =
QueryVariables<Q> extends never
? {
variables?: undefined;
}
: { variables: RecursiveMaybeFields<QueryVariables<Q>> };
export type RequestOptions<Q extends GraphQLQuery> = QueryVariablesOption<Q> & {
/**
* parameter passed to `fetch` function
*/
context?: AllowedRequestContext;
/**
* Whether keep null or undefined value in variables.
*
* if `false` given, `{ a: 0, b: undefined, c: null }` will be converted to `{ a: 0 }`
*
* @default true
*/
keepNilVariables?: boolean;
};
export type QueryOptions<Q extends GraphQLQuery> = RequestOptions<Q> & {
query: Q;
};
export type MutationOptions<M extends GraphQLQuery> = RequestOptions<M> & {
mutation: M;
};
function filterEmptyValue(vars: any) {
const newVars: Record<string, any> = {};
Object.entries(vars).forEach(([key, value]) => {
if (isNil(value)) {
return;
}
if (isObject(value) && !(value instanceof File)) {
newVars[key] = filterEmptyValue(value);
return;
}
newVars[key] = value;
});
return newVars;
}
2023-06-21 09:08:32 +03:00
export function transformToForm(body: RequestBody) {
const form = new FormData();
2023-06-21 09:08:32 +03:00
const gqlBody: {
name?: string;
query: string;
variables: any;
map: any;
} = {
query: body.query,
variables: body.variables,
map: {},
};
if (body.operationName) {
2023-06-21 09:08:32 +03:00
gqlBody.name = body.operationName;
}
const map: Record<string, string[]> = {};
const files: File[] = [];
2023-06-21 09:08:32 +03:00
if (body.variables) {
let i = 0;
const buildMap = (key: string, value: any) => {
2023-06-21 09:08:32 +03:00
if (value instanceof File) {
map['' + i] = [key];
files[i] = value;
2023-06-21 09:08:32 +03:00
i++;
} else if (Array.isArray(value)) {
value.forEach((v, index) => {
buildMap(`${key}.${index}`, v);
});
} else if (isObject(value)) {
Object.entries(value).forEach(([k, v]) => {
buildMap(`${key}.${k}`, v);
});
2023-06-21 09:08:32 +03:00
}
};
buildMap('variables', body.variables);
}
form.set('operations', JSON.stringify(gqlBody));
form.set('map', JSON.stringify(map));
for (const [i, file] of files.entries()) {
form.set(`${i}`, file);
}
2023-06-21 09:08:32 +03:00
return form;
}
function formatRequestBody<Q extends GraphQLQuery>({
query,
variables,
keepNilVariables,
2023-06-21 09:08:32 +03:00
}: QueryOptions<Q>): RequestBody | FormData {
const body: RequestBody = {
query: query.query,
variables:
chore: bump up all non-major dependencies (#7433) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [@aws-sdk/client-s3](https://togithub.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3) ([source](https://togithub.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3)) | [`3.609.0` -> `3.614.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-s3/3.609.0/3.614.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@aws-sdk%2fclient-s3/3.614.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@aws-sdk%2fclient-s3/3.614.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@aws-sdk%2fclient-s3/3.609.0/3.614.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@aws-sdk%2fclient-s3/3.609.0/3.614.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@aws-sdk/client-s3](https://togithub.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3) ([source](https://togithub.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3)) | [`3.609.0` -> `3.614.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-s3/3.609.0/3.614.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@aws-sdk%2fclient-s3/3.614.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@aws-sdk%2fclient-s3/3.614.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@aws-sdk%2fclient-s3/3.609.0/3.614.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@aws-sdk%2fclient-s3/3.609.0/3.614.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@fal-ai/serverless-client](https://togithub.com/fal-ai/fal-js) ([source](https://togithub.com/fal-ai/fal-js/tree/HEAD/libs/client)) | [`^0.12.0` -> `^0.13.0`](https://renovatebot.com/diffs/npm/@fal-ai%2fserverless-client/0.12.0/0.13.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@fal-ai%2fserverless-client/0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@fal-ai%2fserverless-client/0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@fal-ai%2fserverless-client/0.12.0/0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@fal-ai%2fserverless-client/0.12.0/0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@google-cloud/opentelemetry-cloud-monitoring-exporter](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-js) | [`^0.18.0` -> `^0.19.0`](https://renovatebot.com/diffs/npm/@google-cloud%2fopentelemetry-cloud-monitoring-exporter/0.18.0/0.19.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@google-cloud%2fopentelemetry-cloud-monitoring-exporter/0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@google-cloud%2fopentelemetry-cloud-monitoring-exporter/0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@google-cloud%2fopentelemetry-cloud-monitoring-exporter/0.18.0/0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@google-cloud%2fopentelemetry-cloud-monitoring-exporter/0.18.0/0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@google-cloud/opentelemetry-cloud-trace-exporter](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-js) | [`2.2.0` -> `2.3.0`](https://renovatebot.com/diffs/npm/@google-cloud%2fopentelemetry-cloud-trace-exporter/2.2.0/2.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@google-cloud%2fopentelemetry-cloud-trace-exporter/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@google-cloud%2fopentelemetry-cloud-trace-exporter/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@google-cloud%2fopentelemetry-cloud-trace-exporter/2.2.0/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@google-cloud%2fopentelemetry-cloud-trace-exporter/2.2.0/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@google-cloud/opentelemetry-resource-util](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-js) | [`2.2.0` -> `2.3.0`](https://renovatebot.com/diffs/npm/@google-cloud%2fopentelemetry-resource-util/2.2.0/2.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@google-cloud%2fopentelemetry-resource-util/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@google-cloud%2fopentelemetry-resource-util/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@google-cloud%2fopentelemetry-resource-util/2.2.0/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@google-cloud%2fopentelemetry-resource-util/2.2.0/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@marsidev/react-turnstile](https://togithub.com/marsidev/react-turnstile) | [`0.7.1` -> `0.7.2`](https://renovatebot.com/diffs/npm/@marsidev%2freact-turnstile/0.7.1/0.7.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@marsidev%2freact-turnstile/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@marsidev%2freact-turnstile/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@marsidev%2freact-turnstile/0.7.1/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@marsidev%2freact-turnstile/0.7.1/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [@napi-rs/cli](https://togithub.com/napi-rs/napi-rs) | [`3.0.0-alpha.56` -> `3.0.0-alpha.58`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.0.0-alpha.56/3.0.0-alpha.58) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.0.0-alpha.58?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.0.0-alpha.58?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.0.0-alpha.56/3.0.0-alpha.58?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.0.0-alpha.56/3.0.0-alpha.58?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@nx/vite](https://nx.dev) ([source](https://togithub.com/nrwl/nx/tree/HEAD/packages/vite)) | [`19.4.1` -> `19.4.3`](https://renovatebot.com/diffs/npm/@nx%2fvite/19.4.1/19.4.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nx%2fvite/19.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nx%2fvite/19.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nx%2fvite/19.4.1/19.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nx%2fvite/19.4.1/19.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@playwright/test](https://playwright.dev) ([source](https://togithub.com/microsoft/playwright)) | [`=1.44.1` -> `=1.45.1`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.44.1/1.45.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.44.1/1.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.44.1/1.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@prisma/client](https://www.prisma.io) ([source](https://togithub.com/prisma/prisma/tree/HEAD/packages/client)) | [`5.16.1` -> `5.16.2`](https://renovatebot.com/diffs/npm/@prisma%2fclient/5.16.1/5.16.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@prisma%2fclient/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@prisma%2fclient/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@prisma%2fclient/5.16.1/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@prisma%2fclient/5.16.1/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [@prisma/instrumentation](https://www.prisma.io) ([source](https://togithub.com/prisma/prisma/tree/HEAD/packages/instrumentation)) | [`5.16.1` -> `5.16.2`](https://renovatebot.com/diffs/npm/@prisma%2finstrumentation/5.16.1/5.16.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@prisma%2finstrumentation/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@prisma%2finstrumentation/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@prisma%2finstrumentation/5.16.1/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@prisma%2finstrumentation/5.16.1/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [@sentry/esbuild-plugin](https://togithub.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/esbuild-plugin) ([source](https://togithub.com/getsentry/sentry-javascript-bundler-plugins)) | [`2.20.1` -> `2.21.1`](https://renovatebot.com/diffs/npm/@sentry%2fesbuild-plugin/2.20.1/2.21.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@sentry%2fesbuild-plugin/2.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@sentry%2fesbuild-plugin/2.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@sentry%2fesbuild-plugin/2.20.1/2.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@sentry%2fesbuild-plugin/2.20.1/2.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@sentry/react](https://togithub.com/getsentry/sentry-javascript/tree/master/packages/react) ([source](https://togithub.com/getsentry/sentry-javascript)) | [`8.15.0` -> `8.17.0`](https://renovatebot.com/diffs/npm/@sentry%2freact/8.15.0/8.17.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@sentry%2freact/8.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@sentry%2freact/8.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@sentry%2freact/8.15.0/8.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@sentry%2freact/8.15.0/8.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@sentry/react](https://togithub.com/getsentry/sentry-javascript/tree/master/packages/react) ([source](https://togithub.com/getsentry/sentry-javascript)) | [`8.15.0` -> `8.17.0`](https://renovatebot.com/diffs/npm/@sentry%2freact/8.15.0/8.17.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@sentry%2freact/8.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@sentry%2freact/8.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@sentry%2freact/8.15.0/8.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@sentry%2freact/8.15.0/8.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@sentry/webpack-plugin](https://togithub.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/webpack-plugin) ([source](https://togithub.com/getsentry/sentry-javascript-bundler-plugins)) | [`2.20.1` -> `2.21.1`](https://renovatebot.com/diffs/npm/@sentry%2fwebpack-plugin/2.20.1/2.21.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@sentry%2fwebpack-plugin/2.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@sentry%2fwebpack-plugin/2.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@sentry%2fwebpack-plugin/2.20.1/2.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@sentry%2fwebpack-plugin/2.20.1/2.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@swc/core](https://swc.rs) ([source](https://togithub.com/swc-project/swc)) | [`1.6.7` -> `1.6.13`](https://renovatebot.com/diffs/npm/@swc%2fcore/1.6.7/1.6.13) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@swc%2fcore/1.6.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@swc%2fcore/1.6.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@swc%2fcore/1.6.7/1.6.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@swc%2fcore/1.6.7/1.6.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@types/mixpanel-browser](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mixpanel-browser) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mixpanel-browser)) | [`2.49.0` -> `2.49.1`](https://renovatebot.com/diffs/npm/@types%2fmixpanel-browser/2.49.0/2.49.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fmixpanel-browser/2.49.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fmixpanel-browser/2.49.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fmixpanel-browser/2.49.0/2.49.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fmixpanel-browser/2.49.0/2.49.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@types/ws](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws)) | [`8.5.10` -> `8.5.11`](https://renovatebot.com/diffs/npm/@types%2fws/8.5.10/8.5.11) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fws/8.5.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fws/8.5.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fws/8.5.10/8.5.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fws/8.5.10/8.5.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [electron](https://togithub.com/electron/electron) | [`~30.1.0` -> `~30.2.0`](https://renovatebot.com/diffs/npm/electron/30.1.2/30.2.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/electron/30.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/electron/30.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/electron/30.1.2/30.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/electron/30.1.2/30.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [file-type](https://togithub.com/sindresorhus/file-type) | [`19.1.0` -> `19.1.1`](https://renovatebot.com/diffs/npm/file-type/19.1.0/19.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/file-type/19.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/file-type/19.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/file-type/19.1.0/19.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/file-type/19.1.0/19.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [foxact](https://foxact.skk.moe) ([source](https://togithub.com/SukkaW/foxact)) | [`0.2.35` -> `0.2.36`](https://renovatebot.com/diffs/npm/foxact/0.2.35/0.2.36) | [![age](https://developer.mend.io/api/mc/badges/age/npm/foxact/0.2.36?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/foxact/0.2.36?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/foxact/0.2.35/0.2.36?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/foxact/0.2.35/0.2.36?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [glob](https://togithub.com/isaacs/node-glob) | [`10.4.3` -> `10.4.5`](https://renovatebot.com/diffs/npm/glob/10.4.3/10.4.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/glob/10.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/glob/10.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/glob/10.4.3/10.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/glob/10.4.3/10.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [i18next](https://www.i18next.com) ([source](https://togithub.com/i18next/i18next)) | [`23.11.5` -> `23.12.1`](https://renovatebot.com/diffs/npm/i18next/23.11.5/23.12.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/i18next/23.12.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/i18next/23.12.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/i18next/23.11.5/23.12.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/i18next/23.11.5/23.12.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [jotai](https://togithub.com/pmndrs/jotai) | [`2.8.4` -> `2.9.0`](https://renovatebot.com/diffs/npm/jotai/2.8.4/2.9.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/jotai/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/jotai/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/jotai/2.8.4/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/jotai/2.8.4/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [jotai](https://togithub.com/pmndrs/jotai) | [`2.8.4` -> `2.9.0`](https://renovatebot.com/diffs/npm/jotai/2.8.4/2.9.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/jotai/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/jotai/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/jotai/2.8.4/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/jotai/2.8.4/2.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [jotai-scope](https://togithub.com/jotaijs/jotai-scope) | [`^0.6.0` -> `^0.7.0`](https://renovatebot.com/diffs/npm/jotai-scope/0.6.0/0.7.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/jotai-scope/0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/jotai-scope/0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/jotai-scope/0.6.0/0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/jotai-scope/0.6.0/0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [lucide-react](https://lucide.dev) ([source](https://togithub.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react)) | [`^0.400.0` -> `^0.408.0`](https://renovatebot.com/diffs/npm/lucide-react/0.400.0/0.408.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/lucide-react/0.408.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/lucide-react/0.408.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/lucide-react/0.400.0/0.408.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/lucide-react/0.400.0/0.408.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [napi](https://togithub.com/napi-rs/napi-rs) | `3.0.0-alpha.5` -> `3.0.0-alpha.7` | [![age](https://developer.mend.io/api/mc/badges/age/crate/napi/3.0.0-alpha.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/napi/3.0.0-alpha.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/napi/3.0.0-alpha.5/3.0.0-alpha.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/napi/3.0.0-alpha.5/3.0.0-alpha.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | [napi-derive](https://togithub.com/napi-rs/napi-rs) | `3.0.0-alpha.4` -> `3.0.0-alpha.5` | [![age](https://developer.mend.io/api/mc/badges/age/crate/napi-derive/3.0.0-alpha.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/napi-derive/3.0.0-alpha.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/napi-derive/3.0.0-alpha.4/3.0.0-alpha.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/napi-derive/3.0.0-alpha.4/3.0.0-alpha.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | [node](https://nodejs.org) ([source](https://togithub.com/nodejs/node)) | `20.15.0` -> `20.15.1` | [![age](https://developer.mend.io/api/mc/badges/age/node-version/node/v20.15.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/node-version/node/v20.15.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/node-version/node/v20.15.0/v20.15.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/node-version/node/v20.15.0/v20.15.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | patch | | [nx](https://nx.dev) ([source](https://togithub.com/nrwl/nx/tree/HEAD/packages/nx)) | [`19.4.1` -> `19.4.3`](https://renovatebot.com/diffs/npm/nx/19.4.1/19.4.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/nx/19.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/nx/19.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/nx/19.4.1/19.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/nx/19.4.1/19.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [openai](https://togithub.com/openai/openai-node) | [`4.52.3` -> `4.52.7`](https://renovatebot.com/diffs/npm/openai/4.52.3/4.52.7) | [![age](https://developer.mend.io/api/mc/badges/age/npm/openai/4.52.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/openai/4.52.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/openai/4.52.3/4.52.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/openai/4.52.3/4.52.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [playwright](https://playwright.dev) ([source](https://togithub.com/microsoft/playwright)) | [`=1.44.1` -> `=1.45.1`](https://renovatebot.com/diffs/npm/playwright/1.44.1/1.45.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/playwright/1.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/playwright/1.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/playwright/1.44.1/1.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/playwright/1.44.1/1.45.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [prettier](https://prettier.io) ([source](https://togithub.com/prettier/prettier)) | [`3.3.2` -> `3.3.3`](https://renovatebot.com/diffs/npm/prettier/3.3.2/3.3.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prettier/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prettier/3.3.2/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.3.2/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [prisma](https://www.prisma.io) ([source](https://togithub.com/prisma/prisma/tree/HEAD/packages/cli)) | [`5.16.1` -> `5.16.2`](https://renovatebot.com/diffs/npm/prisma/5.16.1/5.16.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/prisma/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prisma/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prisma/5.16.1/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prisma/5.16.1/5.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [react-virtuoso](https://virtuoso.dev/) ([source](https://togithub.com/petyosi/react-virtuoso)) | [`4.7.11` -> `4.7.12`](https://renovatebot.com/diffs/npm/react-virtuoso/4.7.11/4.7.12) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-virtuoso/4.7.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-virtuoso/4.7.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-virtuoso/4.7.11/4.7.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-virtuoso/4.7.11/4.7.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [serde](https://serde.rs) ([source](https://togithub.com/serde-rs/serde)) | `1.0.203` -> `1.0.204` | [![age](https://developer.mend.io/api/mc/badges/age/crate/serde/1.0.204?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/serde/1.0.204?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/serde/1.0.203/1.0.204?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/serde/1.0.203/1.0.204?slim=true)](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | [storybook-dark-mode](https://togithub.com/hipstersmoothie/storybook-dark-mode) | [`4.0.1` -> `4.0.2`](https://renovatebot.com/diffs/npm/storybook-dark-mode/4.0.1/4.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/storybook-dark-mode/4.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/storybook-dark-mode/4.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/storybook-dark-mode/4.0.1/4.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/storybook-dark-mode/4.0.1/4.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [tailwind-merge](https://togithub.com/dcastil/tailwind-merge) | [`2.3.0` -> `2.4.0`](https://renovatebot.com/diffs/npm/tailwind-merge/2.3.0/2.4.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/tailwind-merge/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tailwind-merge/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tailwind-merge/2.3.0/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tailwind-merge/2.3.0/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [typedoc](https://typedoc.org) ([source](https://togithub.com/TypeStrong/TypeDoc)) | [`0.26.3` -> `0.26.4`](https://renovatebot.com/diffs/npm/typedoc/0.26.3/0.26.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/typedoc/0.26.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typedoc/0.26.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typedoc/0.26.3/0.26.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typedoc/0.26.3/0.26.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [uuid](https://togithub.com/uuid-rs/uuid) | `1.9.1` -> `1.10.0` | [![age](https://developer.mend.io/api/mc/badges/age/crate/uuid/1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/uuid/1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/uuid/1.9.1/1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/uuid/1.9.1/1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | minor | | [vitest-fetch-mock](https://togithub.com/IanVS/vitest-fetch-mock) | [`^0.2.2` -> `^0.3.0`](https://renovatebot.com/diffs/npm/vitest-fetch-mock/0.2.2/0.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vitest-fetch-mock/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest-fetch-mock/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest-fetch-mock/0.2.2/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest-fetch-mock/0.2.2/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [webpack](https://togithub.com/webpack/webpack) | [`5.92.1` -> `5.93.0`](https://renovatebot.com/diffs/npm/webpack/5.92.1/5.93.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/webpack/5.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/webpack/5.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/webpack/5.92.1/5.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/webpack/5.92.1/5.93.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [wrangler](https://togithub.com/cloudflare/workers-sdk) ([source](https://togithub.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler)) | [`3.63.1` -> `3.64.0`](https://renovatebot.com/diffs/npm/wrangler/3.63.1/3.64.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/wrangler/3.64.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/wrangler/3.64.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/wrangler/3.63.1/3.64.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/wrangler/3.63.1/3.64.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | --- ### Release Notes <details> <summary>aws/aws-sdk-js-v3 (@&#8203;aws-sdk/client-s3)</summary> ### [`v3.614.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#36140-2024-07-10) [Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.613.0...v3.614.0) **Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3) ### [`v3.613.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#36130-2024-07-09) [Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.609.0...v3.613.0) **Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3) </details> <details> <summary>fal-ai/fal-js (@&#8203;fal-ai/serverless-client)</summary> ### [`v0.13.0`](https://togithub.com/fal-ai/fal-js/compare/4ea43b4cead83ed4f8d9f13d0c8da5c9d3c44c65...cf300e9cc0d65ab999a506f07e3806e239d4d3d9) [Compare Source](https://togithub.com/fal-ai/fal-js/compare/4ea43b4cead83ed4f8d9f13d0c8da5c9d3c44c65...cf300e9cc0d65ab999a506f07e3806e239d4d3d9) </details> <details> <summary>GoogleCloudPlatform/opentelemetry-operations-js (@&#8203;google-cloud/opentelemetry-cloud-monitoring-exporter)</summary> ### [`v0.19.0`](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-js/compare/@google-cloud/opentelemetry-cloud-monitoring-exporter@0.18.0...@google-cloud/opentelemetry-cloud-monitoring-exporter@0.19.0) [Compare Source](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-js/compare/@google-cloud/opentelemetry-cloud-monitoring-exporter@0.18.0...@google-cloud/opentelemetry-cloud-monitoring-exporter@0.19.0) </details> <details> <summary>marsidev/react-turnstile (@&#8203;marsidev/react-turnstile)</summary> ### [`v0.7.2`](https://togithub.com/marsidev/react-turnstile/releases/tag/v0.7.2) [Compare Source](https://togithub.com/marsidev/react-turnstile/compare/v0.7.1...v0.7.2) #####    🐞 Bug Fixes - Resetting widgets solved ref back to false on widget unmount  -  by [@&#8203;kkatsi](https://togithub.com/kkatsi) [<samp>(77f36)</samp>](https://togithub.com/marsidev/react-turnstile/commit/77f3686) #####     [View changes on GitHub](https://togithub.com/marsidev/react-turnstile/compare/v0.7.1...v0.7.2) </details> <details> <summary>napi-rs/napi-rs (@&#8203;napi-rs/cli)</summary> ### [`v3.0.0-alpha.58`](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.57...@napi-rs/cli@3.0.0-alpha.58) [Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.57...@napi-rs/cli@3.0.0-alpha.58) ### [`v3.0.0-alpha.57`](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.56...@napi-rs/cli@3.0.0-alpha.57) [Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.56...@napi-rs/cli@3.0.0-alpha.57) </details> <details> <summary>nrwl/nx (@&#8203;nx/vite)</summary> ### [`v19.4.3`](https://togithub.com/nrwl/nx/releases/tag/19.4.3) [Compare Source](https://togithub.com/nrwl/nx/compare/19.4.2...19.4.3) #### 19.4.3 (2024-07-12) ##### 🚀 Features - **core:** avoid forking process for nx:noop ([#&#8203;26869](https://togithub.com/nrwl/nx/pull/26869)) - **js:** add createNodesV2 for typescript plugin ([#&#8203;26788](https://togithub.com/nrwl/nx/pull/26788)) - **nx-dev:** add customers & company pages ([#&#8203;26813](https://togithub.com/nrwl/nx/pull/26813)) - **nx-dev:** Add more OSS logos ([#&#8203;26922](https://togithub.com/nrwl/nx/pull/26922)) ##### 🩹 Fixes - **core:** load isolated plugins in parallel ([#&#8203;26874](https://togithub.com/nrwl/nx/pull/26874)) - **core:** report should work if project graph errors ([#&#8203;26858](https://togithub.com/nrwl/nx/pull/26858)) - **misc:** properly set the value of the bitbucket option for ci work… ([#&#8203;26890](https://togithub.com/nrwl/nx/pull/26890)) - **misc:** add more ab testing for setting up ci and nx cloud ([#&#8203;26907](https://togithub.com/nrwl/nx/pull/26907)) - **vite:** Only attempt to amend test object if one exists ([#&#8203;26822](https://togithub.com/nrwl/nx/pull/26822)) - **vue:** bump vue-tsc version to 2.x.x ([#&#8203;26867](https://togithub.com/nrwl/nx/pull/26867)) ##### ❤️ Thank You - Craigory Coppola [@&#8203;AgentEnder](https://togithub.com/AgentEnder) - Jason Jean [@&#8203;FrozenPandaz](https://togithub.com/FrozenPandaz) - Jasper McCulloch - Leosvel Pérez Espinosa [@&#8203;leosvelperez](https://togithub.com/leosvelperez) - Nicholas Cunningham [@&#8203;ndcunningham](https://togithub.com/ndcunningham) ### [`v19.4.2`](https://togithub.com/nrwl/nx/releases/tag/19.4.2) [Compare Source](https://togithub.com/nrwl/nx/compare/19.4.1...19.4.2) #### 19.4.2 (2024-07-08) ##### 🚀 Features - **core:** add support for wildcards in dependsOn ([#&#8203;19611](https://togithub.com/nrwl/nx/pull/19611)) - **linter:** support `eslint.config.cjs` and `*.cjs` extension with flat config ([#&#8203;26637](https://togithub.com/nrwl/nx/pull/26637)) ##### 🩹 Fixes - **core:** ensure better create nodes error messaging ([#&#8203;26811](https://togithub.com/nrwl/nx/pull/26811)) - **misc:** adjust nx cloud ab test ([#&#8203;26866](https://togithub.com/nrwl/nx/pull/26866)) ##### ❤️ Thank You - Ben Snyder - Craigory Coppola [@&#8203;AgentEnder](https://togithub.com/AgentEnder) - Jason Jean [@&#8203;FrozenPandaz](https://togithub.com/FrozenPandaz) - Pavlo [@&#8203;fxposter](https://togithub.com/fxposter) </details> <details> <summary>microsoft/playwright (@&#8203;playwright/test)</summary> ### [`v1.45.1`](https://togithub.com/microsoft/playwright/compare/v1.45.0...e8989f83d9801cdaadc3803b5341c601c9593947) [Compare Source](https://togithub.com/microsoft/playwright/compare/v1.45.0...v1.45.1) ### [`v1.45.0`](https://togithub.com/microsoft/playwright/compare/v1.44.1...4f3f6eecae490af444dd9298c9eaeb0c596915b7) [Compare Source](https://togithub.com/microsoft/playwright/compare/v1.44.1...v1.45.0) </details> <details> <summary>prisma/prisma (@&#8203;prisma/client)</summary> ### [`v5.16.2`](https://togithub.com/prisma/prisma/releases/tag/5.16.2) [Compare Source](https://togithub.com/prisma/prisma/compare/5.16.1...5.16.2) Today, we are issuing the 5.16.2 patch release to fix an issue in Prisma client. #### Fix in Prisma Client - [nextjs app deployed to vercel edge can't import prisma WASM modul ](https://togithub.com/prisma/prisma/issues/24673) </details> <details> <summary>getsentry/sentry-javascript-bundler-plugins (@&#8203;sentry/esbuild-plugin)</summary> ### [`v2.21.1`](https://togithub.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2211) [Compare Source](https://togithub.com/getsentry/sentry-javascript-bundler-plugins/compare/2.21.0...2.21.1) - fix: Do not delete files before all upload tasks executed ([#&#8203;572](https://togithub.com/getsentry/sentry-javascript-bundler-plugins/issues/572)) Work in this release contributed by [@&#8203;tyouzu1](https://togithub.com/tyouzu1). Thank you for your contribution! ### [`v2.21.0`](https://togithub.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2210) [Compare Source](https://togithub.com/getsentry/sentry-javascript-bundler-plugins/compare/2.20.1...2.21.0) - fix: Use `sequential` and `post` order for vite artifact deletion ([#&#8203;568](https://togithub.com/getsentry/sentry-javascript-bundler-plugins/issues/568)) - feat: Add option to disable sourcemaps ([#&#8203;561](https://togithub.com/getsentry/sentry-javascript-bundler-plugins/issues/561)) Work in this release contributed by [@&#8203;tyouzu1](https://togithub.com/tyouzu1). Thank you for your contribution! </details> <details> <summary>getsentry/sentry-javascript (@&#8203;sentry/react)</summary> ### [`v8.17.0`](https://togithub.com/getsentry/sentry-javascript/blob/HEAD/CHANGELOG.md#8170) [Compare Source](https://togithub.com/getsentry/sentry-javascript/compare/8.16.0...8.17.0) - feat: Upgrade OTEL deps ([#&#8203;12809](https://togithub.com/getsentry/sentry-javascript/issues/12809)) - fix(nuxt): Add module to build:transpile script ([#&#8203;12843](https://togithub.com/getsentry/sentry-javascript/issues/12843)) - fix(browser): Allow SDK initialization in NW.js apps ([#&#8203;12846](https://togithub.com/getsentry/sentry-javascript/issues/12846)) ### [`v8.16.0`](https://togithub.com/getsentry/sentry-javascript/blob/HEAD/CHANGELOG.md#8160) [Compare Source](https://togithub.com/getsentry/sentry-javascript/compare/8.15.0...8.16.0) ##### Important Changes - **feat(nextjs): Use spans generated by Next.js for App Router ([#&#8203;12729](https://togithub.com/getsentry/sentry-javascript/issues/12729))** Previously, the `@sentry/nextjs` SDK automatically recorded spans in the form of transactions for each of your top-level server components (pages, layouts, ...). This approach had a few drawbacks, the main ones being that traces didn't have a root span, and more importantly, if you had data stream to the client, its duration was not captured because the server component spans had finished before the data could finish streaming. With this release, we will capture the duration of App Router requests in their entirety as a single transaction with server component spans being descendants of that transaction. This means you will get more data that is also more accurate. Note that this does not apply to the Edge runtime. For the Edge runtime, the SDK will emit transactions as it has before. Generally speaking, this change means that you will see less *transactions* and more *spans* in Sentry. You will no longer receive server component transactions like `Page Server Component (/path/to/route)` (unless using the Edge runtime), and you will instead receive transactions for your App Router SSR requests that look like `GET /path/to/route`. If you are on Sentry SaaS, this may have an effect on your quota consumption: Less transactions, more spans. - **- feat(nestjs): Add nest cron monitoring support ([#&#8203;12781](https://togithub.com/getsentry/sentry-javascript/issues/12781))** The `@sentry/nestjs` SDK now includes a `@SentryCron` decorator that can be used to augment the native NestJS `@Cron` decorator to send check-ins to Sentry before and after each cron job run: ```typescript import { Cron } from '@&#8203;nestjs/schedule'; import { SentryCron, MonitorConfig } from '@&#8203;sentry/nestjs'; import type { MonitorConfig } from '@&#8203;sentry/types'; const monitorConfig: MonitorConfig = { schedule: { type: 'crontab', value: '* * * * *', }, checkinMargin: 2, // In minutes. Optional. maxRuntime: 10, // In minutes. Optional. timezone: 'America/Los_Angeles', // Optional. }; export class MyCronService { @&#8203;Cron('* * * * *') @&#8203;SentryCron('my-monitor-slug', monitorConfig) handleCron() { // Your cron job logic here } } ``` ##### Other Changes - feat(node): Allow to pass instrumentation config to `httpIntegration` ([#&#8203;12761](https://togithub.com/getsentry/sentry-javascript/issues/12761)) - feat(nuxt): Add server error hook ([#&#8203;12796](https://togithub.com/getsentry/sentry-javascript/issues/12796)) - feat(nuxt): Inject sentry config with Nuxt `addPluginTemplate` ([#&#8203;12760](https://togithub.com/getsentry/sentry-javascript/issues/12760)) - fix: Apply stack frame metadata before event processors ([#&#8203;12799](https://togithub.com/getsentry/sentry-javascript/issues/12799)) - fix(feedback): Add missing `h` import in `ScreenshotEditor` ([#&#8203;12784](https://togithub.com/getsentry/sentry-javascript/issues/12784)) - fix(node): Ensure `autoSessionTracking` is enabled by default ([#&#8203;12790](https://togithub.com/getsentry/sentry-javascript/issues/12790)) - ref(feedback): Let CropCorner inherit the existing h prop ([#&#8203;12814](https://togithub.com/getsentry/sentry-javascript/issues/12814)) - ref(otel): Ensure we never swallow args for ContextManager ([#&#8203;12798](https://togithub.com/getsentry/sentry-javascript/issues/12798)) </details> <details> <summary>swc-project/swc (@&#8203;swc/core)</summary> ### [`v1.6.13`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#1613---2024-07-06) [Compare Source](https://togithub.com/swc-project/swc/compare/v1.6.12...v1.6.13) ##### Bug Fixes - **(es/parser)** Revert [#&#8203;9141](https://togithub.com/swc-project/swc/issues/9141) ([#&#8203;9171](https://togithub.com/swc-project/swc/issues/9171)) ([8b66d5e](https://togithub.com/swc-project/swc/commit/8b66d5e89b3489da0339de33a439ba365a60d2ce)) - **(es/testing)** Fix `PluginCommentProxy` ([#&#8203;9170](https://togithub.com/swc-project/swc/issues/9170)) ([d86ca2d](https://togithub.com/swc-project/swc/commit/d86ca2d49ec72614ec8c2493a28f27267e6f8b8f)) ##### Features - **(es/typescript)** Improve fast TS strip ([#&#8203;9166](https://togithub.com/swc-project/swc/issues/9166)) ([ee8dc28](https://togithub.com/swc-project/swc/commit/ee8dc28d4d5399b1996bc0eba066270a582d04b6)) - **(es/typescript)** Improve fast TS strip ([#&#8203;9167](https://togithub.com/swc-project/swc/issues/9167)) ([98af589](https://togithub.com/swc-project/swc/commit/98af5890dac03a9acac4e62ddb62bc1f3495d9a2)) ##### Testing - **(es/minfiier)** Improve comment testing ([#&#8203;9164](https://togithub.com/swc-project/swc/issues/9164)) ([f90574d](https://togithub.com/swc-project/swc/commit/f90574d04571023f5ccfe694003e6a25ef89cafb)) ### [`v1.6.12`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#1612---2024-07-06) [Compare Source](https://togithub.com/swc-project/swc/compare/v1.6.7...v1.6.12) ##### Bug Fixes - **(ci)** Restore disabled CI checks ([#&#8203;9002](https://togithub.com/swc-project/swc/issues/9002)) ([cdfd4c8](https://togithub.com/swc-project/swc/commit/cdfd4c85e42e912767893d1f3c1ed5d4867a51af)) - **(es/decorators)** Fix bugs of `2022-03` implementation ([#&#8203;9145](https://togithub.com/swc-project/swc/issues/9145)) ([8a3ae44](https://togithub.com/swc-project/swc/commit/8a3ae4437096d23aeeabadaefb5416f7a6a94644)) - **(es/loader)** Exclude `.json` from default extension list ([#&#8203;9134](https://togithub.com/swc-project/swc/issues/9134)) ([e94e5e7](https://togithub.com/swc-project/swc/commit/e94e5e70c377fae13cd5575f7d4ce84d9d5f10f7)) - **(es/minifier)** Fix `undefined` judgement ([#&#8203;9146](https://togithub.com/swc-project/swc/issues/9146)) ([1a739b7](https://togithub.com/swc-project/swc/commit/1a739b79286aab3ccfd2b4597f11a79776b024b3)) - **(es/renamer)** Fix renaming of default-exported declarations ([#&#8203;9135](https://togithub.com/swc-project/swc/issues/9135)) ([45f671d](https://togithub.com/swc-project/swc/commit/45f671d8d85b0c3955c88ec3cf3d68d8fa6134c5)) - **(es/renamer)** Remove `FastJsWord` ([#&#8203;9136](https://togithub.com/swc-project/swc/issues/9136)) ([42b4caf](https://togithub.com/swc-project/swc/commit/42b4caf5735bc0a025024cf968ef16cd06d9f0dc)) - **(es/typescript)** Fix tricky cases in TS fast strip ([#&#8203;9159](https://togithub.com/swc-project/swc/issues/9159)) ([2bc51b8](https://togithub.com/swc-project/swc/commit/2bc51b8ab25130f355cc1bad4c60d58376485698)) - **(es/typescript)** Fix replacement logic of fast TS strip ([#&#8203;9163](https://togithub.com/swc-project/swc/issues/9163)) ([c5acafe](https://togithub.com/swc-project/swc/commit/c5acafe3869084a3f192a4aac0f120d5bb69e524)) ##### Features - **(bindings/ts)** Add transform/strip-only mode ([#&#8203;9138](https://togithub.com/swc-project/swc/issues/9138)) ([a08bb46](https://togithub.com/swc-project/swc/commit/a08bb46ebd50734b150a1fff100b8312223372a2)) - **(es/testing)** Improve comment testing story ([#&#8203;9150](https://togithub.com/swc-project/swc/issues/9150)) ([3638e97](https://togithub.com/swc-project/swc/commit/3638e97c8083a607a9ce295c7465501a7dc379f8)) - **(es/typescript)** Add `swc_fast_ts_strip` ([#&#8203;9143](https://togithub.com/swc-project/swc/issues/9143)) ([b129343](https://togithub.com/swc-project/swc/commit/b129343c949c43c0ad3eb4ad4676e75dc37067e3)) - **(es/typescript)** Improve fast TS stripper ([#&#8203;9152](https://togithub.com/swc-project/swc/issues/9152)) ([9fca4ab](https://togithub.com/swc-project/swc/commit/9fca4ab5557be4f92ba425b39fdc417a4da9a587)) - **(es/typescript)** Improve fast TS stripper ([#&#8203;9153](https://togithub.com/swc-project/swc/issues/9153)) ([732d748](https://togithub.com/swc-project/swc/commit/732d748d4eb7c19d11e37b06f5064d4eca5bf4d8)) - **(es/typescript)** Improve fast TS strip ([#&#8203;9154](https://togithub.com/swc-project/swc/issues/9154)) ([05c7210](https://togithub.com/swc-project/swc/commit/05c721030a0b419058524bff99367aa80ce29536)) ##### Performance - **(es)** Reduce allocations for dynamic stacks ([#&#8203;9133](https://togithub.com/swc-project/swc/issues/9133)) ([648830a](https://togithub.com/swc-project/swc/commit/648830a9a9a65915226d2a250e3dfd61684a79b1)) ##### Refactor - **(bindings/ts)** Inline Wasm file into `wasm.js` ([#&#8203;9139](https://togithub.com/swc-project/swc/issues/9139)) ([307b6f2](https://togithub.com/swc-project/swc/commit/307b6f27a6860c65f835776549e96cd658cfc817)) - **(es/parser)** Improve readability ([#&#8203;9141](https://togithub.com/swc-project/swc/issues/9141)) ([9d9fe66](https://togithub.com/swc-project/swc/commit/9d9fe6625bd4a7e05e9f29971e8f1a5c5e2470a8)) </details> <details> <summary>electron/electron (electron)</summary> ### [`v30.2.0`](https://togithub.com/electron/electron/releases/tag/v30.2.0): electron v30.2.0 [Compare Source](https://togithub.com/electron/electron/compare/v30.1.2...v30.2.0) ##### Release Notes for v30.2.0 ##### Features - Enabled the Windows Control Overlay API on Linux. [#&#8203;42683](https://togithub.com/electron/electron/pull/42683) <span style="font-size:small;">(Also in [31](https://togithub.com/electron/electron/pull/42682), [32](https://togithub.com/electron/electron/pull/42681))</span> - Expose `systemPreferences` to `utilityProcess`. [#&#8203;42600](https://togithub.com/electron/electron/pull/42600) <span style="font-size:small;">(Also in [31](https://togithub.com/electron/electron/pull/42598), [32](https://togithub.com/electron/electron/pull/42599))</span> ##### Fixes - Fixed a focus issue when calling `BrowserWindow.setTopBrowserView`. [#&#8203;42735](https://togithub.com/electron/electron/pull/42735) <span style="font-size:small;">(Also in [31](https://togithub.com/electron/electron/pull/42734), [32](https://togithub.com/electron/electron/pull/42733))</span> - Fixed an issue where `fetch`-dependent interfaces could be missing in Web Workers with `nodeIntegrationInWorker` enabled. [#&#8203;42596](https://togithub.com/electron/electron/pull/42596) <span style="font-size:small;">(Also in [31](https://togithub.com/electron/electron/pull/42597), [32](https://togithub.com/electron/electron/pull/42595))</span> - Fixed an issue where `navigator.mediaDevices.enumerateDevices` could return broken results in some cases after calling `session.setPermissionCheckHandler`. [#&#8203;42807](https://togithub.com/electron/electron/pull/42807) <span style="font-size:small;">(Also in [31](https://togithub.com/electron/electron/pull/42809), [32](https://togithub.com/electron/electron/pull/42808))</span> - Fixed an issue where control could fail to return properly after saving a dialog using showOpenDialogSync on Linux. [#&#8203;42676](https://togithub.com/electron/electron/pull/42676) <span style="font-size:small;">(Also in [29](https://togithub.com/electron/electron/pull/42679), [31](https://togithub.com/electron/electron/pull/42678), [32](https://togithub.com/electron/electron/pull/42677))</span> - Fixed an issue where the user-specified default path did not work in some circumstances when using Linux dialogs. [#&#8203;42687](https://togithub.com/electron/electron/pull/42687) <span style="font-size:small;">(Also in [31](https://togithub.com/electron/electron/pull/42685), [32](https://togithub.com/electron/electron/pull/42680))</span> - Fixed potentially incorrect exit code in UtilityProcess. [#&#8203;42395](https://togithub.com/electron/electron/pull/42395) <span style="font-size:small;">(Also in [29](https://togithub.com/electron/electron/pull/42396), [31](https://togithub.com/electron/electron/pull/42397))</span> ##### Other Changes - Security: backported fix for CVE-2024-5493. [#&#8203;42590](https://togithub.com/electron/electron/pull/42590) - Security: backported fix for CVE-2024-5831. - Security: backported fix for CVE-2024-5832. [#&#8203;42602](https://togithub.com/electron/electron/pull/42602) - Security: backported fix for CVE-2024-6100. - Security: backported fix for CVE-2024-6101. - Security: backported fix for CVE-2024-6103. [#&#8203;42617](https://togithub.com/electron/electron/pull/42617) - Security: backported fix for CVE-2024-6291. - Security: backported fix for CVE-2024-6293. - Security: backported fix for CVE-2024-6290. - Security: backported fix for CVE-2024-6292. - Security: backported fix for chromium:346197738. [#&#8203;42693](https://togithub.com/electron/electron/pull/42693) - Updated Node.js to v20.15.0. [#&#8203;42613](https://togithub.com/electron/electron/pull/42613) </details> <details> <summary>si </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuOSIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2024-07-15 11:20:22 +03:00
(keepNilVariables ?? true) ? variables : filterEmptyValue(variables),
};
if (query.operationName) {
body.operationName = query.operationName;
}
2023-06-21 09:08:32 +03:00
if (query.containsFile) {
return transformToForm(body);
}
return body;
}
2024-04-17 09:12:29 +03:00
export const gqlFetcherFactory = (
endpoint: string,
fetcher: (input: string, init?: RequestInit) => Promise<Response> = fetch
) => {
const gqlFetch = async <Query extends GraphQLQuery>(
options: QueryOptions<Query>
): Promise<QueryResponse<Query>> => {
const body = formatRequestBody(options);
const isFormData = body instanceof FormData;
const headers: Record<string, string> = {
'x-operation-name': options.query.operationName,
'x-definition-name': options.query.definitionName,
};
if (!isFormData) {
headers['content-type'] = 'application/json';
}
2024-04-17 09:12:29 +03:00
const ret = fetcher(
endpoint,
merge(options.context, {
method: 'POST',
headers,
body: isFormData ? body : JSON.stringify(body),
2024-04-17 09:12:29 +03:00
})
).then(async res => {
if (res.headers.get('content-type')?.startsWith('application/json')) {
const result = (await res.json()) as ExecutionResult;
if (res.status >= 400 || result.errors) {
if (result.errors && result.errors.length > 0) {
// throw the first error is enough
const firstError = result.errors[0];
throw new GraphQLError(firstError.message, firstError);
} else {
throw new GraphQLError('Empty GraphQL error body');
}
} else if (result.data) {
// we have to cast here because the type of result.data is a union type
return result.data as any;
}
}
2024-04-17 09:12:29 +03:00
throw new GraphQLError(
'GraphQL query responds unexpected result, query ' +
options.query.operationName
);
});
return ret;
};
return gqlFetch;
};