diff --git a/.changeset/beige-fishes-relate.md b/.changeset/beige-fishes-relate.md deleted file mode 100644 index d99ec9f823..0000000000 --- a/.changeset/beige-fishes-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'next-urql': patch ---- - -Change import for `createClient` to `@urql/core`, which helps Next not depend on `urql` and hence not cause `createContext` to be called when the import is treeshaken away. diff --git a/.changeset/cuddly-needles-work.md b/.changeset/cuddly-needles-work.md deleted file mode 100644 index 6f0061e64c..0000000000 --- a/.changeset/cuddly-needles-work.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@urql/exchange-graphcache': patch ---- - -Solve issue where partial data could cause loops between related queries diff --git a/.changeset/fair-turkeys-bow.md b/.changeset/fair-turkeys-bow.md deleted file mode 100644 index 4308106ce2..0000000000 --- a/.changeset/fair-turkeys-bow.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@urql/svelte': patch -'@urql/vue': patch -'@urql/core': patch ---- - -Move remaining `Variables` generics over from `object` default to `Variables extends AnyVariables = AnyVariables`. This has been introduced previously in [#2607](https://github.com/urql-graphql/urql/pull/2607) but some missing ports have been missed due to TypeScript not catching them previously. Depending on your TypeScript version the `object` default is incompatible with `AnyVariables`. diff --git a/.changeset/healthy-hornets-warn.md b/.changeset/healthy-hornets-warn.md deleted file mode 100644 index 066d4fcbdd..0000000000 --- a/.changeset/healthy-hornets-warn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@urql/exchange-execute': patch ---- - -End iterator when teardown functions runs, previously it waited for one extra call to next, then ended the iterator diff --git a/.changeset/olive-rings-yawn.md b/.changeset/olive-rings-yawn.md deleted file mode 100644 index 516eaf2507..0000000000 --- a/.changeset/olive-rings-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@urql/exchange-execute': minor ---- - -The `context` option, which may be set to a context value or a function returning a context, can now return a `Promise` and will be correctly resolved and awaited. diff --git a/.changeset/orange-squids-care.md b/.changeset/orange-squids-care.md deleted file mode 100644 index 43b7599049..0000000000 --- a/.changeset/orange-squids-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@urql/exchange-graphcache': patch ---- - -Add skipping of garbage collection runs when the cache is waiting for optimistic, deferred or other results in layers. This means that we only take an opportunity to run garbage collection after results have settled and are hence decreasing the chance of hogging the event loop when a run isn't needed. diff --git a/.changeset/poor-items-shake.md b/.changeset/poor-items-shake.md deleted file mode 100644 index f78ca47049..0000000000 --- a/.changeset/poor-items-shake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@urql/exchange-graphcache': patch ---- - -Fix a deadlock condition in Graphcache's layers, which is caused by subscriptions (or other deferred layers) starting before one-off mutation layers. This causes the mutation to not be completed, which keeps its data preferred above the deferred layer. That in turn means that layers stop squashing, which causes new results to be missing indefinitely, when they overlap. diff --git a/.changeset/quiet-mugs-travel.md b/.changeset/quiet-mugs-travel.md deleted file mode 100644 index 98e73229ad..0000000000 --- a/.changeset/quiet-mugs-travel.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@urql/core': patch ---- - -Reuse output of `stringifyDocument` in place of repeated `print`. This will mean that we now prevent calling `print` repeatedly for identical operations and are instead only reusing the result once. - -This change has a subtle consequence of our internals. Operation keys will change due to this -refactor and we will no longer sanitise strip newlines from queries that `@urql/core` has printed. diff --git a/.changeset/swift-fireants-itch.md b/.changeset/swift-fireants-itch.md deleted file mode 100644 index ad4a55d721..0000000000 --- a/.changeset/swift-fireants-itch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@urql/core': patch ---- - -Update to `wonka@^6.1.2` to fix memory leak in `fetch` caused in Node.js by a lack of clean up after initiating a request. diff --git a/.changeset/violet-eyes-fetch.md b/.changeset/violet-eyes-fetch.md deleted file mode 100644 index d1cd4e2c46..0000000000 --- a/.changeset/violet-eyes-fetch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@urql/core': minor ---- - -Implement `mapExchange`, which replaces `errorExchange`, allowing `onOperation` and `onResult` to be called to either react to or replace operations and results. For backwards compatibility, this exchange is also exported as `errorExchange` and supports `onError`. diff --git a/exchanges/execute/CHANGELOG.md b/exchanges/execute/CHANGELOG.md index 07f8bd4856..841499c1b0 100644 --- a/exchanges/execute/CHANGELOG.md +++ b/exchanges/execute/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 2.1.0 + +### Minor Changes + +- The `context` option, which may be set to a context value or a function returning a context, can now return a `Promise` and will be correctly resolved and awaited, by [@YutaUra](https://github.com/YutaUra) (See [#2806](https://github.com/urql-graphql/urql/pull/2806)) + +### Patch Changes + +- End iterator when teardown functions runs, previously it waited for one extra call to next, then ended the iterator, by [@danielkaxis](https://github.com/danielkaxis) (See [#2803](https://github.com/urql-graphql/urql/pull/2803)) +- Updated dependencies (See [#2843](https://github.com/urql-graphql/urql/pull/2843), [#2847](https://github.com/urql-graphql/urql/pull/2847), [#2850](https://github.com/urql-graphql/urql/pull/2850), and [#2846](https://github.com/urql-graphql/urql/pull/2846)) + - @urql/core@3.1.0 + ## 2.0.0 ### Major Changes diff --git a/exchanges/execute/package.json b/exchanges/execute/package.json index e9dd606306..06e78d01d8 100644 --- a/exchanges/execute/package.json +++ b/exchanges/execute/package.json @@ -1,6 +1,6 @@ { "name": "@urql/exchange-execute", - "version": "2.0.0", + "version": "2.1.0", "description": "An exchange for executing queries against a local schema in urql", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", @@ -48,7 +48,7 @@ "prepublishOnly": "run-s clean build" }, "dependencies": { - "@urql/core": ">=3.0.0", + "@urql/core": ">=3.1.0", "wonka": "^6.0.0" }, "peerDependencies": { diff --git a/exchanges/graphcache/CHANGELOG.md b/exchanges/graphcache/CHANGELOG.md index 2bfddbf1d7..a54f3785a0 100644 --- a/exchanges/graphcache/CHANGELOG.md +++ b/exchanges/graphcache/CHANGELOG.md @@ -1,5 +1,15 @@ # @urql/exchange-graphcache +## 5.0.6 + +### Patch Changes + +- Solve issue where partial data could cause loops between related queries, by [@JoviDeCroock](https://github.com/JoviDeCroock) (See [#2831](https://github.com/urql-graphql/urql/pull/2831)) +- Add skipping of garbage collection runs when the cache is waiting for optimistic, deferred or other results in layers. This means that we only take an opportunity to run garbage collection after results have settled and are hence decreasing the chance of hogging the event loop when a run isn't needed, by [@kitten](https://github.com/kitten) (See [#2862](https://github.com/urql-graphql/urql/pull/2862)) +- ⚠️ Fix a deadlock condition in Graphcache's layers, which is caused by subscriptions (or other deferred layers) starting before one-off mutation layers. This causes the mutation to not be completed, which keeps its data preferred above the deferred layer. That in turn means that layers stop squashing, which causes new results to be missing indefinitely, when they overlap, by [@kitten](https://github.com/kitten) (See [#2861](https://github.com/urql-graphql/urql/pull/2861)) +- Updated dependencies (See [#2843](https://github.com/urql-graphql/urql/pull/2843), [#2847](https://github.com/urql-graphql/urql/pull/2847), [#2850](https://github.com/urql-graphql/urql/pull/2850), and [#2846](https://github.com/urql-graphql/urql/pull/2846)) + - @urql/core@3.1.0 + ## 5.0.5 ### Patch Changes diff --git a/exchanges/graphcache/package.json b/exchanges/graphcache/package.json index b62358cb60..0160b95266 100644 --- a/exchanges/graphcache/package.json +++ b/exchanges/graphcache/package.json @@ -1,6 +1,6 @@ { "name": "@urql/exchange-graphcache", - "version": "5.0.5", + "version": "5.0.6", "description": "A normalized and configurable cache exchange for urql", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/graphcache", @@ -62,7 +62,7 @@ "prepublishOnly": "run-s clean build" }, "dependencies": { - "@urql/core": ">=3.0.5", + "@urql/core": ">=3.1.0", "wonka": "^6.0.0" }, "peerDependencies": { diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 9b8d9876ea..90d6a46698 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,19 @@ # @urql/core +## 3.1.0 + +### Minor Changes + +- Implement `mapExchange`, which replaces `errorExchange`, allowing `onOperation` and `onResult` to be called to either react to or replace operations and results. For backwards compatibility, this exchange is also exported as `errorExchange` and supports `onError`, by [@kitten](https://github.com/kitten) (See [#2846](https://github.com/urql-graphql/urql/pull/2846)) + +### Patch Changes + +- Move remaining `Variables` generics over from `object` default to `Variables extends AnyVariables = AnyVariables`. This has been introduced previously in [#2607](https://github.com/urql-graphql/urql/pull/2607) but some missing ports have been missed due to TypeScript not catching them previously. Depending on your TypeScript version the `object` default is incompatible with `AnyVariables`, by [@kitten](https://github.com/kitten) (See [#2843](https://github.com/urql-graphql/urql/pull/2843)) +- Reuse output of `stringifyDocument` in place of repeated `print`. This will mean that we now prevent calling `print` repeatedly for identical operations and are instead only reusing the result once. + This change has a subtle consequence of our internals. Operation keys will change due to this + refactor and we will no longer sanitise strip newlines from queries that `@urql/core` has printed, by [@kitten](https://github.com/kitten) (See [#2847](https://github.com/urql-graphql/urql/pull/2847)) +- Update to `wonka@^6.1.2` to fix memory leak in `fetch` caused in Node.js by a lack of clean up after initiating a request, by [@kitten](https://github.com/kitten) (See [#2850](https://github.com/urql-graphql/urql/pull/2850)) + ## 3.0.5 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index fe01d5fbe6..2fb7d5a7ab 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@urql/core", - "version": "3.0.5", + "version": "3.1.0", "description": "The shared core for the highly customizable and versatile GraphQL client", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", diff --git a/packages/next-urql/CHANGELOG.md b/packages/next-urql/CHANGELOG.md index d4ca2e08a8..c49c606417 100644 --- a/packages/next-urql/CHANGELOG.md +++ b/packages/next-urql/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 4.0.1 + +### Patch Changes + +- Change import for `createClient` to `@urql/core`, which helps Next not depend on `urql` and hence not cause `createContext` to be called when the import is treeshaken away, by [@SleeplessOne1917](https://github.com/SleeplessOne1917) (See [#2833](https://github.com/urql-graphql/urql/pull/2833)) + ## 4.0.0 ### Major Changes diff --git a/packages/next-urql/package.json b/packages/next-urql/package.json index 529a12da7f..eec2f32d48 100644 --- a/packages/next-urql/package.json +++ b/packages/next-urql/package.json @@ -1,6 +1,6 @@ { "name": "next-urql", - "version": "4.0.0", + "version": "4.0.1", "description": "Convenience wrappers for using urql with NextJS.", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", diff --git a/packages/svelte-urql/CHANGELOG.md b/packages/svelte-urql/CHANGELOG.md index f13f23c822..111aa1725f 100644 --- a/packages/svelte-urql/CHANGELOG.md +++ b/packages/svelte-urql/CHANGELOG.md @@ -1,5 +1,13 @@ # @urql/svelte +## 3.0.2 + +### Patch Changes + +- Move remaining `Variables` generics over from `object` default to `Variables extends AnyVariables = AnyVariables`. This has been introduced previously in [#2607](https://github.com/urql-graphql/urql/pull/2607) but some missing ports have been missed due to TypeScript not catching them previously. Depending on your TypeScript version the `object` default is incompatible with `AnyVariables`, by [@kitten](https://github.com/kitten) (See [#2843](https://github.com/urql-graphql/urql/pull/2843)) +- Updated dependencies (See [#2843](https://github.com/urql-graphql/urql/pull/2843), [#2847](https://github.com/urql-graphql/urql/pull/2847), [#2850](https://github.com/urql-graphql/urql/pull/2850), and [#2846](https://github.com/urql-graphql/urql/pull/2846)) + - @urql/core@3.1.0 + ## 3.0.1 ### Patch Changes diff --git a/packages/svelte-urql/package.json b/packages/svelte-urql/package.json index 04ce61b59c..1fd2af63cf 100644 --- a/packages/svelte-urql/package.json +++ b/packages/svelte-urql/package.json @@ -1,6 +1,6 @@ { "name": "@urql/svelte", - "version": "3.0.1", + "version": "3.0.2", "description": "A highly customizable and versatile GraphQL client for Svelte", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", @@ -52,7 +52,7 @@ "svelte": "^3.0.0" }, "dependencies": { - "@urql/core": "^3.0.0", + "@urql/core": "^3.1.0", "wonka": "^6.0.0" }, "devDependencies": { diff --git a/packages/vue-urql/CHANGELOG.md b/packages/vue-urql/CHANGELOG.md index 3403fe46f6..33aa579b2a 100644 --- a/packages/vue-urql/CHANGELOG.md +++ b/packages/vue-urql/CHANGELOG.md @@ -1,5 +1,13 @@ # @urql/vue +## 1.0.3 + +### Patch Changes + +- Move remaining `Variables` generics over from `object` default to `Variables extends AnyVariables = AnyVariables`. This has been introduced previously in [#2607](https://github.com/urql-graphql/urql/pull/2607) but some missing ports have been missed due to TypeScript not catching them previously. Depending on your TypeScript version the `object` default is incompatible with `AnyVariables`, by [@kitten](https://github.com/kitten) (See [#2843](https://github.com/urql-graphql/urql/pull/2843)) +- Updated dependencies (See [#2843](https://github.com/urql-graphql/urql/pull/2843), [#2847](https://github.com/urql-graphql/urql/pull/2847), [#2850](https://github.com/urql-graphql/urql/pull/2850), and [#2846](https://github.com/urql-graphql/urql/pull/2846)) + - @urql/core@3.1.0 + ## 1.0.2 ### Patch Changes diff --git a/packages/vue-urql/package.json b/packages/vue-urql/package.json index ddf149aa34..5357370eac 100644 --- a/packages/vue-urql/package.json +++ b/packages/vue-urql/package.json @@ -1,6 +1,6 @@ { "name": "@urql/vue", - "version": "1.0.2", + "version": "1.0.3", "description": "A highly customizable and versatile GraphQL client for vue", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", @@ -56,7 +56,7 @@ "vue": "^2.7.0 || ^3.0.0" }, "dependencies": { - "@urql/core": "^3.0.0", + "@urql/core": "^3.1.0", "wonka": "^6.0.0" }, "publishConfig": {