diff --git a/exchanges/throw-on-error/README.md b/exchanges/throw-on-error/README.md new file mode 100644 index 000000000..b5539940e --- /dev/null +++ b/exchanges/throw-on-error/README.md @@ -0,0 +1,15 @@ +# @urql/exchange-throw-on-error (Exchange factory) + +`@urql/exchange-throw-on-error` is an exchange for the [`urql`](../../README.md) GraphQL client that makes field access to data throw an error if the field was errored. + +It is built on top of the [`graphql-toe`](https://github.com/graphile/graphql-toe) package. + +## Quick Start Guide + +First install `@urql/exchange-throw-on-error` alongside `urql`: + +```sh +yarn add @urql/exchange-throw-on-error +# or +npm install --save @urql/exchange-throw-on-error +``` diff --git a/exchanges/throw-on-error/jsr.json b/exchanges/throw-on-error/jsr.json new file mode 100644 index 000000000..647962dc9 --- /dev/null +++ b/exchanges/throw-on-error/jsr.json @@ -0,0 +1,15 @@ +{ + "name": "@urql/exchange-throw-on-error", + "version": "0.0.0", + "exports": { + ".": "./src/index.ts" + }, + "exclude": [ + "node_modules", + "cypress", + "**/*.test.*", + "**/*.spec.*", + "**/*.test.*.snap", + "**/*.spec.*.snap" + ] +} diff --git a/exchanges/throw-on-error/package.json b/exchanges/throw-on-error/package.json new file mode 100644 index 000000000..abe0c7962 --- /dev/null +++ b/exchanges/throw-on-error/package.json @@ -0,0 +1,67 @@ +{ + "name": "@urql/exchange-throw-on-error", + "version": "0.0.0", + "description": "An exchange for throw-on-error support in urql", + "sideEffects": false, + "homepage": "https://formidable.com/open-source/urql/docs/", + "bugs": "https://github.com/urql-graphql/urql/issues", + "license": "MIT", + "author": "urql GraphQL Contributors", + "repository": { + "type": "git", + "url": "https://github.com/urql-graphql/urql.git", + "directory": "exchanges/throw-on-error" + }, + "keywords": [ + "urql", + "graphql client", + "graphql", + "exchanges", + "throw on error" + ], + "main": "dist/urql-exchange-throw-on-error", + "module": "dist/urql-exchange-throw-on-error.mjs", + "types": "dist/urql-exchange-throw-on-error.d.ts", + "source": "src/index.ts", + "exports": { + ".": { + "types": "./dist/urql-exchange-throw-on-error.d.ts", + "import": "./dist/urql-exchange-throw-on-error.mjs", + "require": "./dist/urql-exchange-throw-on-error.js", + "source": "./src/index.ts" + }, + "./package.json": "./package.json" + }, + "files": [ + "LICENSE", + "CHANGELOG.md", + "README.md", + "dist/" + ], + "scripts": { + "test": "vitest", + "clean": "rimraf dist", + "check": "tsc --noEmit", + "lint": "eslint --ext=js,jsx,ts,tsx .", + "build": "rollup -c ../../scripts/rollup/config.mjs", + "prepare": "node ../../scripts/prepare/index.js", + "prepublishOnly": "run-s clean build" + }, + "devDependencies": { + "@urql/core": "workspace:*", + "graphql": "^16.9.0", + "vitest": "^2.1.1" + }, + "peerDependencies": { + "@urql/core": "^5.0.0" + }, + "dependencies": { + "@urql/core": "^5.0.0", + "graphql-toe": "^0.1.2", + "wonka": "^6.3.2" + }, + "publishConfig": { + "access": "public", + "provenance": true + } +} diff --git a/exchanges/throw-on-error/src/index.ts b/exchanges/throw-on-error/src/index.ts new file mode 100644 index 000000000..624436472 --- /dev/null +++ b/exchanges/throw-on-error/src/index.ts @@ -0,0 +1 @@ +export { throwOnErrorExchange } from './throwOnErrorExchange'; diff --git a/exchanges/throw-on-error/src/throwOnErrorExchange.test.ts b/exchanges/throw-on-error/src/throwOnErrorExchange.test.ts new file mode 100644 index 000000000..e4d08881f --- /dev/null +++ b/exchanges/throw-on-error/src/throwOnErrorExchange.test.ts @@ -0,0 +1,259 @@ +import { pipe, map, fromValue, toPromise, take } from 'wonka'; +import { vi, expect, it, beforeEach } from 'vitest'; +import { GraphQLError } from 'graphql'; + +import { + gql, + createClient, + Operation, + ExchangeIO, + Client, + CombinedError, +} from '@urql/core'; + +import { throwOnErrorExchange } from './throwOnErrorExchange'; + +const dispatchDebug = vi.fn(); + +const query = gql` + { + topLevel + topLevelList + object { + inner + } + objectList { + inner + } + } +`; +const mockData = { + topLevel: 'topLevel', + topLevelList: ['topLevelList'], + object: { inner: 'inner' }, + objectList: [{ inner: 'inner' }], +}; + +let client: Client, op: Operation; +beforeEach(() => { + client = createClient({ + url: 'http://0.0.0.0', + exchanges: [], + }); + op = client.createRequestOperation('query', { key: 1, query, variables: {} }); +}); + +it('throws on top level field error', async () => { + const forward: ExchangeIO = ops$ => + pipe( + ops$, + map( + operation => + ({ + operation, + data: { + ...mockData, + topLevel: null, + }, + error: new CombinedError({ + graphQLErrors: [ + new GraphQLError('top level error', { path: ['topLevel'] }), + ], + }), + }) as any + ) + ); + + const res = await pipe( + fromValue(op), + throwOnErrorExchange()({ forward, client, dispatchDebug }), + take(1), + toPromise + ); + + expect(() => res.data?.topLevel).toThrow('top level error'); + expect(() => res.data).not.toThrow(); + expect(() => res.data?.topLevelList[0]).not.toThrow(); +}); + +it('throws on top level list element error', async () => { + const forward: ExchangeIO = ops$ => + pipe( + ops$, + map( + operation => + ({ + operation, + data: { + ...mockData, + topLevelList: ['topLevelList', null], + }, + error: new CombinedError({ + graphQLErrors: [ + new GraphQLError('top level list error', { + path: ['topLevelList', 1], + }), + ], + }), + }) as any + ) + ); + + const res = await pipe( + fromValue(op), + throwOnErrorExchange()({ forward, client, dispatchDebug }), + take(1), + toPromise + ); + + expect(() => res.data?.topLevelList[1]).toThrow('top level list error'); + expect(() => res.data).not.toThrow(); + expect(() => res.data?.topLevelList[0]).not.toThrow(); +}); + +it('throws on object field error', async () => { + const forward: ExchangeIO = ops$ => + pipe( + ops$, + map( + operation => + ({ + operation, + data: { + ...mockData, + object: null, + }, + error: new CombinedError({ + graphQLErrors: [ + new GraphQLError('object field error', { path: ['object'] }), + ], + }), + }) as any + ) + ); + + const res = await pipe( + fromValue(op), + throwOnErrorExchange()({ forward, client, dispatchDebug }), + take(1), + toPromise + ); + + expect(() => res.data?.object).toThrow('object field error'); + expect(() => res.data?.object.inner).toThrow('object field error'); + expect(() => res.data).not.toThrow(); + expect(() => res.data?.topLevel).not.toThrow(); +}); + +it('throws on object inner field error', async () => { + const forward: ExchangeIO = ops$ => + pipe( + ops$, + map( + operation => + ({ + operation, + data: { + ...mockData, + object: { + inner: null, + }, + }, + error: new CombinedError({ + graphQLErrors: [ + new GraphQLError('object inner field error', { + path: ['object', 'inner'], + }), + ], + }), + }) as any + ) + ); + + const res = await pipe( + fromValue(op), + throwOnErrorExchange()({ forward, client, dispatchDebug }), + take(1), + toPromise + ); + + expect(() => res.data?.object.inner).toThrow('object inner field error'); + expect(() => res.data).not.toThrow(); + expect(() => res.data?.object).not.toThrow(); +}); + +it('throws on object list field error', async () => { + const forward: ExchangeIO = ops$ => + pipe( + ops$, + map( + operation => + ({ + operation, + data: { + ...mockData, + objectList: null, + }, + error: new CombinedError({ + graphQLErrors: [ + new GraphQLError('object list field error', { + path: ['objectList'], + }), + ], + }), + }) as any + ) + ); + + const res = await pipe( + fromValue(op), + throwOnErrorExchange()({ forward, client, dispatchDebug }), + take(1), + toPromise + ); + + expect(() => res.data?.objectList).toThrow('object list field error'); + expect(() => res.data?.objectList[0]).toThrow('object list field error'); + expect(() => res.data?.objectList[0].inner).toThrow( + 'object list field error' + ); + expect(() => res.data).not.toThrow(); + expect(() => res.data?.topLevel).not.toThrow(); +}); + +it('throws on object inner field error', async () => { + const forward: ExchangeIO = ops$ => + pipe( + ops$, + map( + operation => + ({ + operation, + data: { + ...mockData, + objectList: [{ inner: 'inner' }, { inner: null }], + }, + error: new CombinedError({ + graphQLErrors: [ + new GraphQLError('object list inner field error', { + path: ['objectList', 1, 'inner'], + }), + ], + }), + }) as any + ) + ); + + const res = await pipe( + fromValue(op), + throwOnErrorExchange()({ forward, client, dispatchDebug }), + take(1), + toPromise + ); + + expect(() => res.data?.objectList[1].inner).toThrow( + 'object list inner field error' + ); + expect(() => res.data).not.toThrow(); + expect(() => res.data?.objectList[0].inner).not.toThrow(); +}); diff --git a/exchanges/throw-on-error/src/throwOnErrorExchange.ts b/exchanges/throw-on-error/src/throwOnErrorExchange.ts new file mode 100644 index 000000000..ac1088a99 --- /dev/null +++ b/exchanges/throw-on-error/src/throwOnErrorExchange.ts @@ -0,0 +1,19 @@ +import type { Exchange } from '@urql/core'; +import { mapExchange } from '@urql/core'; +import { toe } from 'graphql-toe'; + +/** Exchange factory that maps the fields of the data to throw an error on access if the field was errored. + * + * @returns the created throw-on-error {@link Exchange}. + */ +export const throwOnErrorExchange = (): Exchange => { + return mapExchange({ + onResult(result) { + if (result.data) { + const errors = result.error && result.error.graphQLErrors; + result.data = toe({ data: result.data, errors }); + } + return result; + }, + }); +}; diff --git a/exchanges/throw-on-error/tsconfig.json b/exchanges/throw-on-error/tsconfig.json new file mode 100644 index 000000000..596e2cf72 --- /dev/null +++ b/exchanges/throw-on-error/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src"] +} diff --git a/exchanges/throw-on-error/vitest.config.ts b/exchanges/throw-on-error/vitest.config.ts new file mode 100644 index 000000000..656152483 --- /dev/null +++ b/exchanges/throw-on-error/vitest.config.ts @@ -0,0 +1,4 @@ +import { mergeConfig } from 'vitest/config'; +import baseConfig from '../../vitest.config'; + +export default mergeConfig(baseConfig, {}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3772eef1f..cb3e72d1c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -353,6 +353,25 @@ importers: specifier: ^0.30.1 version: 0.30.1(jsdom@25.0.0)(terser@5.32.0) + exchanges/throw-on-error: + dependencies: + '@urql/core': + specifier: ^5.0.0 + version: 5.0.6(graphql@16.9.0) + graphql-toe: + specifier: ^0.1.2 + version: 0.1.2 + wonka: + specifier: ^6.3.2 + version: 6.3.2 + devDependencies: + graphql: + specifier: ^16.6.0 + version: 16.9.0 + vitest: + specifier: ^2.1.1 + version: 2.1.1(@types/node@22.5.5)(jsdom@25.0.0)(terser@5.32.0) + packages/core: dependencies: '@0no-co/graphql.web': @@ -1014,6 +1033,7 @@ packages: '@babel/plugin-proposal-dynamic-import@7.13.8': resolution: {integrity: sha512-ONWKj0H6+wIRCkZi9zSbZtE/r73uOhMVHh256ys0UzfM7I3d4n+spZNWjOnJv2gzopumP2Wxi186vI8N0Y2JyQ==} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead. peerDependencies: '@babel/core': ^7.0.0-0 @@ -1030,16 +1050,19 @@ packages: '@babel/plugin-proposal-export-namespace-from@7.12.13': resolution: {integrity: sha512-INAgtFo4OnLN3Y/j0VwAgw3HDXcDtX+C/erMvWzuV9v71r7urb6iyMXu7eM9IgLr1ElLlOkaHjJ0SbCmdOQ3Iw==} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-json-strings@7.13.8': resolution: {integrity: sha512-w4zOPKUFPX1mgvTmL/fcEqy34hrQ1CRcGxdphBc6snDnnqJ47EZDIyop6IwXzAC8G916hsIuXB2ZMBCExC5k7Q==} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-logical-assignment-operators@7.13.8': resolution: {integrity: sha512-aul6znYB4N4HGweImqKn59Su9RS8lbUIqxtXTOcAGtNIDczoEFv+l1EhmX8rUBp3G1jMjKJm8m0jXVp63ZpS4A==} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead. peerDependencies: '@babel/core': ^7.0.0-0 @@ -1095,12 +1118,14 @@ packages: '@babel/plugin-proposal-private-methods@7.13.0': resolution: {integrity: sha512-MXyyKQd9inhx1kDYPkFRVOBXQ20ES8Pto3T7UZ92xj2mY0EVD8oAVzeyYuVfy/mxAdTSIayOvg+aVzcHV2bn6Q==} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-unicode-property-regex@7.12.13': resolution: {integrity: sha512-XyJmZidNfofEkqFV5VC/bLabGmO5QzenPO/YOfGuEbgU+2sSwMmio3YLb4WtBgcmmdwZHyVyv8on77IUjQ5Gvg==} engines: {node: '>=4'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead. peerDependencies: '@babel/core': ^7.0.0-0 @@ -1891,9 +1916,6 @@ packages: '@jridgewell/sourcemap-codec@1.4.14': resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} @@ -2489,9 +2511,6 @@ packages: '@types/chai@4.3.16': resolution: {integrity: sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==} - '@types/chai@4.3.4': - resolution: {integrity: sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==} - '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -2890,11 +2909,6 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - acorn@8.10.0: - resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} - engines: {node: '>=0.4.0'} - hasBin: true - acorn@8.12.1: resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} engines: {node: '>=0.4.0'} @@ -5326,9 +5340,6 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-func-name@2.0.0: - resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} - get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} @@ -5464,6 +5475,9 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + graphql-toe@0.1.2: + resolution: {integrity: sha512-XK04wXEHbLY33YHoPAnLMIafRKSOn7FTWzTCob23GC6o8DnO4ibkA8Aje+Udee8QdXx46TV6m6LQM9iU8C9vwQ==} + graphql@16.6.0: resolution: {integrity: sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} @@ -6688,10 +6702,6 @@ packages: magic-string@0.25.9: resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} - magic-string@0.30.0: - resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} - engines: {node: '>=12'} - magic-string@0.30.11: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} @@ -7678,9 +7688,6 @@ packages: path@0.12.7: resolution: {integrity: sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==} - pathe@1.1.0: - resolution: {integrity: sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==} - pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} @@ -7707,9 +7714,6 @@ packages: picocolors@0.2.1: resolution: {integrity: sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==} - picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - picocolors@1.1.0: resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} @@ -9116,9 +9120,6 @@ packages: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} - std-env@3.3.2: - resolution: {integrity: sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==} - std-env@3.7.0: resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} @@ -9433,9 +9434,6 @@ packages: tiny-warning@1.0.3: resolution: {integrity: sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==} - tinybench@2.4.0: - resolution: {integrity: sha512-iyziEiyFxX4kyxSp+MtY1oCH/lvjH3PxFN8PGCDeqcZWAJ/i+9y+nL85w99PxVzrIvew/GSkSbDYtiGVa85Afg==} - tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -10323,11 +10321,6 @@ packages: engines: {node: ^16.13.0 || >=18.0.0} hasBin: true - why-is-node-running@2.2.2: - resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} - engines: {node: '>=8'} - hasBin: true - why-is-node-running@2.3.0: resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} engines: {node: '>=8'} @@ -10736,7 +10729,7 @@ snapshots: '@babel/traverse': 7.25.6 '@babel/types': 7.25.6 convert-source-map: 1.9.0 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 lodash: 4.17.21 @@ -10759,7 +10752,7 @@ snapshots: '@babel/traverse': 7.21.5(supports-color@5.5.0) '@babel/types': 7.22.4 convert-source-map: 1.9.0 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -10779,7 +10772,7 @@ snapshots: '@babel/traverse': 7.25.6 '@babel/types': 7.25.6 convert-source-map: 2.0.0 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -10878,7 +10871,7 @@ snapshots: '@babel/helper-module-imports': 7.24.7 '@babel/helper-plugin-utils': 7.24.8 '@babel/traverse': 7.25.6 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) lodash.debounce: 4.0.8 resolve: 1.22.8 semver: 6.3.1 @@ -10892,7 +10885,7 @@ snapshots: '@babel/helper-module-imports': 7.24.7 '@babel/helper-plugin-utils': 7.24.8 '@babel/traverse': 7.25.6 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) lodash.debounce: 4.0.8 resolve: 1.22.8 semver: 6.3.1 @@ -10904,7 +10897,7 @@ snapshots: '@babel/core': 7.25.2 '@babel/helper-compilation-targets': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -12471,7 +12464,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.18.6 '@babel/parser': 7.22.4 '@babel/types': 7.22.4 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.7(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -12483,7 +12476,7 @@ snapshots: '@babel/parser': 7.25.6 '@babel/template': 7.25.0 '@babel/types': 7.25.6 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -12706,7 +12699,7 @@ snapshots: '@cypress/vite-dev-server@5.0.4': dependencies: - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4(supports-color@8.1.1) find-up: 6.3.0 node-html-parser: 5.3.3 transitivePeerDependencies: @@ -12745,7 +12738,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.2 @@ -12769,7 +12762,7 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -12823,7 +12816,7 @@ snapshots: dependencies: '@types/istanbul-lib-coverage': 2.0.3 '@types/istanbul-reports': 3.0.0 - '@types/node': 22.5.5 + '@types/node': 18.19.50 '@types/yargs': 15.0.13 chalk: 4.1.2 @@ -12868,8 +12861,6 @@ snapshots: '@jridgewell/sourcemap-codec@1.4.14': {} - '@jridgewell/sourcemap-codec@1.4.15': {} - '@jridgewell/sourcemap-codec@1.5.0': {} '@jridgewell/trace-mapping@0.3.17': @@ -13775,14 +13766,12 @@ snapshots: '@types/chai@4.3.16': {} - '@types/chai@4.3.4': {} - '@types/estree@1.0.5': {} '@types/glob@7.1.3': dependencies: '@types/minimatch': 3.0.4 - '@types/node': 22.5.5 + '@types/node': 18.19.50 '@types/hast@2.3.1': dependencies: @@ -13812,7 +13801,7 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 22.5.5 + '@types/node': 18.19.50 '@types/mdast@3.0.3': dependencies: @@ -13837,6 +13826,7 @@ snapshots: '@types/node@22.5.5': dependencies: undici-types: 6.19.8 + optional: true '@types/parse-json@4.0.0': {} @@ -13866,7 +13856,7 @@ snapshots: '@types/responselike@1.0.0': dependencies: - '@types/node': 22.5.5 + '@types/node': 18.19.50 '@types/scheduler@0.16.1': {} @@ -13907,7 +13897,7 @@ snapshots: '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.0)(typescript@5.6.2) '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.6.2) '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -13925,7 +13915,7 @@ snapshots: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.2) '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) eslint: 8.57.0 optionalDependencies: typescript: 5.6.2 @@ -13941,7 +13931,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.2) '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.6.2) - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: @@ -13955,7 +13945,7 @@ snapshots: dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -14001,6 +13991,13 @@ snapshots: transitivePeerDependencies: - graphql + '@urql/core@5.0.6(graphql@16.9.0)': + dependencies: + '@0no-co/graphql.web': 1.0.8(graphql@16.9.0) + wonka: 6.3.2 + transitivePeerDependencies: + - graphql + '@vitest/expect@0.30.1': dependencies: '@vitest/spy': 0.30.1 @@ -14022,6 +14019,14 @@ snapshots: optionalDependencies: vite: 3.2.10(@types/node@18.19.50)(terser@5.32.0) + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@3.2.10(@types/node@22.5.5)(terser@5.32.0))': + dependencies: + '@vitest/spy': 2.1.1 + estree-walker: 3.0.3 + magic-string: 0.30.11 + optionalDependencies: + vite: 3.2.10(@types/node@22.5.5)(terser@5.32.0) + '@vitest/pretty-format@2.1.1': dependencies: tinyrainbow: 1.2.0 @@ -14031,7 +14036,7 @@ snapshots: '@vitest/utils': 0.30.1 concordance: 5.0.4 p-limit: 4.0.0 - pathe: 1.1.0 + pathe: 1.1.2 '@vitest/runner@2.1.1': dependencies: @@ -14040,8 +14045,8 @@ snapshots: '@vitest/snapshot@0.30.1': dependencies: - magic-string: 0.30.0 - pathe: 1.1.0 + magic-string: 0.30.11 + pathe: 1.1.2 pretty-format: 27.5.1 '@vitest/snapshot@2.1.1': @@ -14299,21 +14304,19 @@ snapshots: acorn@7.4.1: {} - acorn@8.10.0: {} - acorn@8.12.1: {} after@0.8.2: {} agent-base@6.0.2: dependencies: - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color agent-base@7.1.1: dependencies: - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -15182,7 +15185,7 @@ snapshots: assertion-error: 1.1.0 check-error: 1.0.2 deep-eql: 4.1.3 - get-func-name: 2.0.0 + get-func-name: 2.0.2 loupe: 2.3.6 pathval: 1.1.1 type-detect: 4.0.8 @@ -16032,17 +16035,17 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.4(supports-color@5.5.0): + debug@4.3.4(supports-color@8.1.1): dependencies: ms: 2.1.2 optionalDependencies: - supports-color: 5.5.0 + supports-color: 8.1.1 - debug@4.3.4(supports-color@8.1.1): + debug@4.3.7(supports-color@5.5.0): dependencies: - ms: 2.1.2 + ms: 2.1.3 optionalDependencies: - supports-color: 8.1.1 + supports-color: 5.5.0 debug@4.3.7(supports-color@6.1.0): dependencies: @@ -16717,7 +16720,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -17298,8 +17301,6 @@ snapshots: get-caller-file@2.0.5: {} - get-func-name@2.0.0: {} - get-func-name@2.0.2: {} get-intrinsic@1.2.4: @@ -17484,6 +17485,8 @@ snapshots: graphemer@1.4.0: {} + graphql-toe@0.1.2: {} + graphql@16.6.0: {} graphql@16.9.0: {} @@ -17772,14 +17775,14 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -17818,14 +17821,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color https-proxy-agent@7.0.5: dependencies: agent-base: 7.1.1 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -18631,7 +18634,7 @@ snapshots: dependencies: chalk: 5.3.0 commander: 11.0.0 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4(supports-color@8.1.1) execa: 7.2.0 lilconfig: 2.1.0 listr2: 6.6.1(enquirer@2.4.1) @@ -18779,7 +18782,7 @@ snapshots: loupe@2.3.6: dependencies: - get-func-name: 2.0.0 + get-func-name: 2.0.2 loupe@3.1.1: dependencies: @@ -18820,10 +18823,6 @@ snapshots: dependencies: sourcemap-codec: 1.4.8 - magic-string@0.30.0: - dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - magic-string@0.30.11: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -20012,8 +20011,6 @@ snapshots: process: 0.11.10 util: 0.10.4 - pathe@1.1.0: {} - pathe@1.1.2: {} pathval@1.1.1: {} @@ -20040,8 +20037,6 @@ snapshots: picocolors@0.2.1: {} - picocolors@1.0.0: {} - picocolors@1.1.0: {} picomatch@2.3.1: {} @@ -21711,7 +21706,7 @@ snapshots: socks-proxy-agent@8.0.4: dependencies: agent-base: 7.1.1 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -21888,8 +21883,6 @@ snapshots: statuses@2.0.1: {} - std-env@3.3.2: {} - std-env@3.7.0: {} stream-browserify@2.0.2: @@ -22047,7 +22040,7 @@ snapshots: strip-literal@1.0.1: dependencies: - acorn: 8.10.0 + acorn: 8.12.1 strip-outer@1.0.1: dependencies: @@ -22295,8 +22288,6 @@ snapshots: tiny-warning@1.0.3: {} - tinybench@2.4.0: {} - tinybench@2.9.0: {} tinyexec@0.3.0: {} @@ -22435,7 +22426,7 @@ snapshots: tuf-js@2.2.1: dependencies: '@tufjs/models': 2.0.1 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) make-fetch-happen: 13.0.1 transitivePeerDependencies: - supports-color @@ -22537,7 +22528,8 @@ snapshots: undici-types@5.26.5: {} - undici-types@6.19.8: {} + undici-types@6.19.8: + optional: true undici@5.28.4: dependencies: @@ -22828,14 +22820,14 @@ snapshots: unist-util-stringify-position: 2.0.3 vfile-message: 2.0.4 - vite-node@0.30.1(@types/node@22.5.5)(terser@5.32.0): + vite-node@0.30.1(@types/node@18.19.50)(terser@5.32.0): dependencies: cac: 6.7.14 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.7(supports-color@5.5.0) mlly: 1.7.1 pathe: 1.1.2 - picocolors: 1.0.0 - vite: 3.2.10(@types/node@22.5.5)(terser@5.32.0) + picocolors: 1.1.0 + vite: 3.2.10(@types/node@18.19.50)(terser@5.32.0) transitivePeerDependencies: - '@types/node' - less @@ -22848,7 +22840,7 @@ snapshots: vite-node@2.1.1(@types/node@18.19.50)(terser@5.32.0): dependencies: cac: 6.7.14 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) pathe: 1.1.2 vite: 3.2.10(@types/node@18.19.50)(terser@5.32.0) transitivePeerDependencies: @@ -22860,6 +22852,21 @@ snapshots: - supports-color - terser + vite-node@2.1.1(@types/node@22.5.5)(terser@5.32.0): + dependencies: + cac: 6.7.14 + debug: 4.3.7(supports-color@5.5.0) + pathe: 1.1.2 + vite: 3.2.10(@types/node@22.5.5)(terser@5.32.0) + transitivePeerDependencies: + - '@types/node' + - less + - sass + - stylus + - sugarss + - supports-color + - terser + vite-plugin-solid@2.10.2(solid-js@1.8.17)(vite@3.2.10(@types/node@22.5.5)(terser@5.32.0)): dependencies: '@babel/core': 7.25.2 @@ -22875,7 +22882,7 @@ snapshots: vite-tsconfig-paths@4.2.0(typescript@5.6.2)(vite@3.2.10(@types/node@22.5.5)(terser@5.32.0)): dependencies: - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.4(supports-color@8.1.1) globrex: 0.1.2 tsconfck: 2.1.1(typescript@5.6.2) optionalDependencies: @@ -22886,7 +22893,7 @@ snapshots: vite-tsconfig-paths@4.3.2(typescript@5.6.2)(vite@3.2.10(@types/node@18.19.50)(terser@5.32.0)): dependencies: - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) globrex: 0.1.2 tsconfck: 3.1.3(typescript@5.6.2) optionalDependencies: @@ -22934,32 +22941,32 @@ snapshots: vitest@0.30.1(jsdom@22.1.0)(terser@5.32.0): dependencies: - '@types/chai': 4.3.4 + '@types/chai': 4.3.16 '@types/chai-subset': 1.3.3 - '@types/node': 22.5.5 + '@types/node': 18.19.50 '@vitest/expect': 0.30.1 '@vitest/runner': 0.30.1 '@vitest/snapshot': 0.30.1 '@vitest/spy': 0.30.1 '@vitest/utils': 0.30.1 - acorn: 8.10.0 + acorn: 8.12.1 acorn-walk: 8.2.0 cac: 6.7.14 chai: 4.3.7 concordance: 5.0.4 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.7(supports-color@5.5.0) local-pkg: 0.4.3 - magic-string: 0.30.0 - pathe: 1.1.0 - picocolors: 1.0.0 + magic-string: 0.30.11 + pathe: 1.1.2 + picocolors: 1.1.0 source-map: 0.6.1 - std-env: 3.3.2 + std-env: 3.7.0 strip-literal: 1.0.1 - tinybench: 2.4.0 + tinybench: 2.9.0 tinypool: 0.4.0 - vite: 3.2.10(@types/node@22.5.5)(terser@5.32.0) - vite-node: 0.30.1(@types/node@22.5.5)(terser@5.32.0) - why-is-node-running: 2.2.2 + vite: 3.2.10(@types/node@18.19.50)(terser@5.32.0) + vite-node: 0.30.1(@types/node@18.19.50)(terser@5.32.0) + why-is-node-running: 2.3.0 optionalDependencies: jsdom: 22.1.0 transitivePeerDependencies: @@ -22972,32 +22979,32 @@ snapshots: vitest@0.30.1(jsdom@25.0.0)(terser@5.32.0): dependencies: - '@types/chai': 4.3.4 + '@types/chai': 4.3.16 '@types/chai-subset': 1.3.3 - '@types/node': 22.5.5 + '@types/node': 18.19.50 '@vitest/expect': 0.30.1 '@vitest/runner': 0.30.1 '@vitest/snapshot': 0.30.1 '@vitest/spy': 0.30.1 '@vitest/utils': 0.30.1 - acorn: 8.10.0 + acorn: 8.12.1 acorn-walk: 8.2.0 cac: 6.7.14 chai: 4.3.7 concordance: 5.0.4 - debug: 4.3.4(supports-color@5.5.0) + debug: 4.3.7(supports-color@5.5.0) local-pkg: 0.4.3 - magic-string: 0.30.0 - pathe: 1.1.0 - picocolors: 1.0.0 + magic-string: 0.30.11 + pathe: 1.1.2 + picocolors: 1.1.0 source-map: 0.6.1 - std-env: 3.3.2 + std-env: 3.7.0 strip-literal: 1.0.1 - tinybench: 2.4.0 + tinybench: 2.9.0 tinypool: 0.4.0 - vite: 3.2.10(@types/node@22.5.5)(terser@5.32.0) - vite-node: 0.30.1(@types/node@22.5.5)(terser@5.32.0) - why-is-node-running: 2.2.2 + vite: 3.2.10(@types/node@18.19.50)(terser@5.32.0) + vite-node: 0.30.1(@types/node@18.19.50)(terser@5.32.0) + why-is-node-running: 2.3.0 optionalDependencies: jsdom: 25.0.0 transitivePeerDependencies: @@ -23018,7 +23025,7 @@ snapshots: '@vitest/spy': 2.1.1 '@vitest/utils': 2.1.1 chai: 5.1.1 - debug: 4.3.7(supports-color@6.1.0) + debug: 4.3.7(supports-color@5.5.0) magic-string: 0.30.11 pathe: 1.1.2 std-env: 3.7.0 @@ -23041,6 +23048,39 @@ snapshots: - supports-color - terser + vitest@2.1.1(@types/node@22.5.5)(jsdom@25.0.0)(terser@5.32.0): + dependencies: + '@vitest/expect': 2.1.1 + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@3.2.10(@types/node@22.5.5)(terser@5.32.0)) + '@vitest/pretty-format': 2.1.1 + '@vitest/runner': 2.1.1 + '@vitest/snapshot': 2.1.1 + '@vitest/spy': 2.1.1 + '@vitest/utils': 2.1.1 + chai: 5.1.1 + debug: 4.3.7(supports-color@5.5.0) + magic-string: 0.30.11 + pathe: 1.1.2 + std-env: 3.7.0 + tinybench: 2.9.0 + tinyexec: 0.3.0 + tinypool: 1.0.1 + tinyrainbow: 1.2.0 + vite: 3.2.10(@types/node@22.5.5)(terser@5.32.0) + vite-node: 2.1.1(@types/node@22.5.5)(terser@5.32.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.5.5 + jsdom: 25.0.0 + transitivePeerDependencies: + - less + - msw + - sass + - stylus + - sugarss + - supports-color + - terser + vlq@1.0.1: {} vm-browserify@1.1.2: {} @@ -23310,11 +23350,6 @@ snapshots: dependencies: isexe: 3.1.1 - why-is-node-running@2.2.2: - dependencies: - siginfo: 2.0.0 - stackback: 0.0.2 - why-is-node-running@2.3.0: dependencies: siginfo: 2.0.0