diff --git a/.changeset/angry-spoons-play.md b/.changeset/angry-spoons-play.md deleted file mode 100644 index cc46bd9df689..000000000000 --- a/.changeset/angry-spoons-play.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@data-client/react': patch ---- - -Use controller.getResponseMeta() in hooks - -No behavior change, just anticipating API updates to controller \ No newline at end of file diff --git a/.changeset/mean-hotels-attack.md b/.changeset/mean-hotels-attack.md deleted file mode 100644 index b13af435cbc7..000000000000 --- a/.changeset/mean-hotels-attack.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@data-client/endpoint': patch -'@data-client/graphql': patch -'@data-client/rest': patch ---- - -Update getOptimisticResponse snapshot types to include getResponseMeta diff --git a/.changeset/silent-candles-stick.md b/.changeset/silent-candles-stick.md deleted file mode 100644 index 0de5fe40fd5a..000000000000 --- a/.changeset/silent-candles-stick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@data-client/react': patch ---- - -docs: Add links to platforms diff --git a/.changeset/wide-berries-smell.md b/.changeset/wide-berries-smell.md deleted file mode 100644 index ff4e285839ad..000000000000 --- a/.changeset/wide-berries-smell.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -'@data-client/endpoint': patch -'@data-client/graphql': patch -'@data-client/rest': patch ---- - -Support dynamic invalidation/deletes - -Returning `undefined` from [Entity.process](https://dataclient.io/rest/api/Entity#process) -will cause the [Entity](https://dataclient.io/rest/api/Entity) to be [invalidated](https://dataclient.io/docs/concepts/expiry-policy#invalidate-entity). -This this allows us to invalidate dynamically; based on the particular response data. - -```ts -class PriceLevel extends Entity { - price = 0; - amount = 0; - - pk() { - return this.price; - } - - static process( - input: [number, number], - parent: any, - key: string | undefined, - ): any { - const [price, amount] = input; - if (amount === 0) return undefined; - return { price, amount }; - } -} -``` diff --git a/examples/benchmark/CHANGELOG.md b/examples/benchmark/CHANGELOG.md index 41940b1d91a5..0201158adc44 100644 --- a/examples/benchmark/CHANGELOG.md +++ b/examples/benchmark/CHANGELOG.md @@ -1,5 +1,14 @@ # example-benchmark +## 0.4.74 + +### Patch Changes + +- Updated dependencies [[`a6af54c`](https://github.com/reactive/data-client/commit/a6af54c1bc2193de47c96938df74b243cb82bfe6), [`d84899d`](https://github.com/reactive/data-client/commit/d84899de4fb784375ab7a34fff6fe23a2ed98037)]: + - @data-client/endpoint@0.14.25 + - @data-client/core@0.14.24 + - @data-client/normalizr@0.14.22 + ## 0.4.73 ### Patch Changes diff --git a/examples/benchmark/package.json b/examples/benchmark/package.json index cf080bb8a2d1..a5cbbf6b9998 100644 --- a/examples/benchmark/package.json +++ b/examples/benchmark/package.json @@ -1,6 +1,6 @@ { "name": "example-benchmark", - "version": "0.4.73", + "version": "0.4.74", "description": "Benchmark for normalizr", "main": "index.js", "author": "Nathaniel Tucker", diff --git a/examples/normalizr-github/CHANGELOG.md b/examples/normalizr-github/CHANGELOG.md index 7200e378eebb..d0b246c77c8a 100644 --- a/examples/normalizr-github/CHANGELOG.md +++ b/examples/normalizr-github/CHANGELOG.md @@ -1,5 +1,13 @@ # normalizr-github-example +## 0.1.50 + +### Patch Changes + +- Updated dependencies [[`a6af54c`](https://github.com/reactive/data-client/commit/a6af54c1bc2193de47c96938df74b243cb82bfe6), [`d84899d`](https://github.com/reactive/data-client/commit/d84899de4fb784375ab7a34fff6fe23a2ed98037)]: + - @data-client/endpoint@0.14.25 + - @data-client/normalizr@0.14.22 + ## 0.1.49 ### Patch Changes diff --git a/examples/normalizr-github/package.json b/examples/normalizr-github/package.json index 1fa99cc0a639..019bdbd76c4a 100644 --- a/examples/normalizr-github/package.json +++ b/examples/normalizr-github/package.json @@ -1,6 +1,6 @@ { "name": "normalizr-github-example", - "version": "0.1.49", + "version": "0.1.50", "description": "And example of using Normalizr with github", "main": "index.js", "author": "Paul Armstrong", diff --git a/examples/normalizr-redux/CHANGELOG.md b/examples/normalizr-redux/CHANGELOG.md index 78868ccea938..e4801ba8088c 100644 --- a/examples/normalizr-redux/CHANGELOG.md +++ b/examples/normalizr-redux/CHANGELOG.md @@ -1,5 +1,13 @@ # normalizr-redux-example +## 0.1.48 + +### Patch Changes + +- Updated dependencies [[`a6af54c`](https://github.com/reactive/data-client/commit/a6af54c1bc2193de47c96938df74b243cb82bfe6), [`d84899d`](https://github.com/reactive/data-client/commit/d84899de4fb784375ab7a34fff6fe23a2ed98037)]: + - @data-client/endpoint@0.14.25 + - @data-client/normalizr@0.14.22 + ## 0.1.47 ### Patch Changes diff --git a/examples/normalizr-redux/package.json b/examples/normalizr-redux/package.json index 943658513e6f..d9670bf740f9 100644 --- a/examples/normalizr-redux/package.json +++ b/examples/normalizr-redux/package.json @@ -1,6 +1,6 @@ { "name": "normalizr-redux-example", - "version": "0.1.47", + "version": "0.1.48", "description": "And example of using Normalizr with Redux", "main": "index.js", "author": "Paul Armstrong", diff --git a/examples/normalizr-relationships/CHANGELOG.md b/examples/normalizr-relationships/CHANGELOG.md index b0b43db9b345..21c1fc06e3a3 100644 --- a/examples/normalizr-relationships/CHANGELOG.md +++ b/examples/normalizr-relationships/CHANGELOG.md @@ -1,5 +1,13 @@ # normalizr-relationships +## 0.1.50 + +### Patch Changes + +- Updated dependencies [[`a6af54c`](https://github.com/reactive/data-client/commit/a6af54c1bc2193de47c96938df74b243cb82bfe6), [`d84899d`](https://github.com/reactive/data-client/commit/d84899de4fb784375ab7a34fff6fe23a2ed98037)]: + - @data-client/endpoint@0.14.25 + - @data-client/normalizr@0.14.22 + ## 0.1.49 ### Patch Changes diff --git a/examples/normalizr-relationships/package.json b/examples/normalizr-relationships/package.json index ecf92ee7c940..3fdf98da396a 100644 --- a/examples/normalizr-relationships/package.json +++ b/examples/normalizr-relationships/package.json @@ -1,6 +1,6 @@ { "name": "normalizr-relationships", - "version": "0.1.49", + "version": "0.1.50", "description": "And example of using Normalizr with relationships", "main": "index.js", "author": "Paul Armstrong", diff --git a/packages/endpoint/CHANGELOG.md b/packages/endpoint/CHANGELOG.md index e6dcfcd6ad09..05396a0319eb 100644 --- a/packages/endpoint/CHANGELOG.md +++ b/packages/endpoint/CHANGELOG.md @@ -1,5 +1,38 @@ # @data-client/endpoint +## 0.14.25 + +### Patch Changes + +- [#3417](https://github.com/reactive/data-client/pull/3417) [`a6af54c`](https://github.com/reactive/data-client/commit/a6af54c1bc2193de47c96938df74b243cb82bfe6) Thanks [@ntucker](https://github.com/ntucker)! - Update getOptimisticResponse snapshot types to include getResponseMeta + +- [#3407](https://github.com/reactive/data-client/pull/3407) [`d84899d`](https://github.com/reactive/data-client/commit/d84899de4fb784375ab7a34fff6fe23a2ed98037) Thanks [@ntucker](https://github.com/ntucker)! - Support dynamic invalidation/deletes + + Returning `undefined` from [Entity.process](https://dataclient.io/rest/api/Entity#process) + will cause the [Entity](https://dataclient.io/rest/api/Entity) to be [invalidated](https://dataclient.io/docs/concepts/expiry-policy#invalidate-entity). + This this allows us to invalidate dynamically; based on the particular response data. + + ```ts + class PriceLevel extends Entity { + price = 0; + amount = 0; + + pk() { + return this.price; + } + + static process( + input: [number, number], + parent: any, + key: string | undefined, + ): any { + const [price, amount] = input; + if (amount === 0) return undefined; + return { price, amount }; + } + } + ``` + ## 0.14.21 ### Patch Changes diff --git a/packages/endpoint/package.json b/packages/endpoint/package.json index 83cff0a65bc1..87b4de98a979 100644 --- a/packages/endpoint/package.json +++ b/packages/endpoint/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/endpoint", - "version": "0.14.21", + "version": "0.14.25", "description": "Declarative Network Interface Definitions", "homepage": "https://dataclient.io/docs/guides/custom-protocol", "keywords": [ diff --git a/packages/graphql/CHANGELOG.md b/packages/graphql/CHANGELOG.md index 4da14c2e9a0b..6267173bc208 100644 --- a/packages/graphql/CHANGELOG.md +++ b/packages/graphql/CHANGELOG.md @@ -1,5 +1,41 @@ # @data-client/graphql +## 0.14.25 + +### Patch Changes + +- [#3417](https://github.com/reactive/data-client/pull/3417) [`a6af54c`](https://github.com/reactive/data-client/commit/a6af54c1bc2193de47c96938df74b243cb82bfe6) Thanks [@ntucker](https://github.com/ntucker)! - Update getOptimisticResponse snapshot types to include getResponseMeta + +- [#3407](https://github.com/reactive/data-client/pull/3407) [`d84899d`](https://github.com/reactive/data-client/commit/d84899de4fb784375ab7a34fff6fe23a2ed98037) Thanks [@ntucker](https://github.com/ntucker)! - Support dynamic invalidation/deletes + + Returning `undefined` from [Entity.process](https://dataclient.io/rest/api/Entity#process) + will cause the [Entity](https://dataclient.io/rest/api/Entity) to be [invalidated](https://dataclient.io/docs/concepts/expiry-policy#invalidate-entity). + This this allows us to invalidate dynamically; based on the particular response data. + + ```ts + class PriceLevel extends Entity { + price = 0; + amount = 0; + + pk() { + return this.price; + } + + static process( + input: [number, number], + parent: any, + key: string | undefined, + ): any { + const [price, amount] = input; + if (amount === 0) return undefined; + return { price, amount }; + } + } + ``` + +- Updated dependencies [[`a6af54c`](https://github.com/reactive/data-client/commit/a6af54c1bc2193de47c96938df74b243cb82bfe6), [`d84899d`](https://github.com/reactive/data-client/commit/d84899de4fb784375ab7a34fff6fe23a2ed98037)]: + - @data-client/endpoint@0.14.25 + ## 0.14.21 ### Patch Changes diff --git a/packages/graphql/package.json b/packages/graphql/package.json index 1e554dba6731..d62f3f852c52 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/graphql", - "version": "0.14.21", + "version": "0.14.25", "description": "Quickly define typed GraphQL resources and endpoints", "homepage": "https://dataclient.io/docs/graphql", "repository": { @@ -107,7 +107,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.20.0", - "@data-client/endpoint": "^0.14.21" + "@data-client/endpoint": "^0.14.25" }, "devDependencies": { "@anansi/browserslist-config": "^1.4.2", diff --git a/packages/img/package.json b/packages/img/package.json index c29eec0ccb1d..0444187c5a30 100644 --- a/packages/img/package.json +++ b/packages/img/package.json @@ -75,7 +75,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.20.0", - "@data-client/endpoint": "^0.14.21" + "@data-client/endpoint": "^0.14.25" }, "peerDependencies": { "@data-client/react": "^0.1.0 || ^0.2.0 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 629eb2107edf..b4c21df345f2 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,15 @@ # @data-client/react +## 0.14.25 + +### Patch Changes + +- [#3398](https://github.com/reactive/data-client/pull/3398) [`d716159`](https://github.com/reactive/data-client/commit/d716159634a067790cd330c4a8c1660fe5f92973) Thanks [@ntucker](https://github.com/ntucker)! - Use controller.getResponseMeta() in hooks + + No behavior change, just anticipating API updates to controller + +- [`d6eab29`](https://github.com/reactive/data-client/commit/d6eab2993c3da86d06753cbb50caebc5e19309e2) Thanks [@ntucker](https://github.com/ntucker)! - docs: Add links to platforms + ## 0.14.24 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 66826a3e4da4..c9e12b92fec4 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/react", - "version": "0.14.24", + "version": "0.14.25", "description": "Async State Management without the Management. REST, GraphQL, SSE, Websockets, Fetch", "homepage": "https://dataclient.io", "repository": { diff --git a/packages/rest/CHANGELOG.md b/packages/rest/CHANGELOG.md index b542be8dec71..46f019d836cc 100644 --- a/packages/rest/CHANGELOG.md +++ b/packages/rest/CHANGELOG.md @@ -1,5 +1,41 @@ # @data-client/rest +## 0.14.25 + +### Patch Changes + +- [#3417](https://github.com/reactive/data-client/pull/3417) [`a6af54c`](https://github.com/reactive/data-client/commit/a6af54c1bc2193de47c96938df74b243cb82bfe6) Thanks [@ntucker](https://github.com/ntucker)! - Update getOptimisticResponse snapshot types to include getResponseMeta + +- [#3407](https://github.com/reactive/data-client/pull/3407) [`d84899d`](https://github.com/reactive/data-client/commit/d84899de4fb784375ab7a34fff6fe23a2ed98037) Thanks [@ntucker](https://github.com/ntucker)! - Support dynamic invalidation/deletes + + Returning `undefined` from [Entity.process](https://dataclient.io/rest/api/Entity#process) + will cause the [Entity](https://dataclient.io/rest/api/Entity) to be [invalidated](https://dataclient.io/docs/concepts/expiry-policy#invalidate-entity). + This this allows us to invalidate dynamically; based on the particular response data. + + ```ts + class PriceLevel extends Entity { + price = 0; + amount = 0; + + pk() { + return this.price; + } + + static process( + input: [number, number], + parent: any, + key: string | undefined, + ): any { + const [price, amount] = input; + if (amount === 0) return undefined; + return { price, amount }; + } + } + ``` + +- Updated dependencies [[`a6af54c`](https://github.com/reactive/data-client/commit/a6af54c1bc2193de47c96938df74b243cb82bfe6), [`d84899d`](https://github.com/reactive/data-client/commit/d84899de4fb784375ab7a34fff6fe23a2ed98037)]: + - @data-client/endpoint@0.14.25 + ## 0.14.22 ### Patch Changes diff --git a/packages/rest/package.json b/packages/rest/package.json index 19c989b20996..dd1ffc90e6de 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/rest", - "version": "0.14.22", + "version": "0.14.25", "description": "Quickly define typed REST resources and endpoints", "homepage": "https://dataclient.io/rest", "repository": { @@ -135,7 +135,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.20.0", - "@data-client/endpoint": "^0.14.21", + "@data-client/endpoint": "^0.14.25", "path-to-regexp": "^6.3.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index c6b4cd7ae714..5fd4ae5db2f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3090,7 +3090,7 @@ __metadata: languageName: unknown linkType: soft -"@data-client/endpoint@npm:^0.14.21, @data-client/endpoint@workspace:*, @data-client/endpoint@workspace:^, @data-client/endpoint@workspace:packages/endpoint": +"@data-client/endpoint@npm:^0.14.25, @data-client/endpoint@workspace:*, @data-client/endpoint@workspace:^, @data-client/endpoint@workspace:packages/endpoint": version: 0.0.0-use.local resolution: "@data-client/endpoint@workspace:packages/endpoint" dependencies: @@ -3113,7 +3113,7 @@ __metadata: dependencies: "@anansi/browserslist-config": "npm:^1.4.2" "@babel/runtime": "npm:^7.20.0" - "@data-client/endpoint": "npm:^0.14.21" + "@data-client/endpoint": "npm:^0.14.25" "@types/jest": "npm:^29.5.14" "@types/node": "npm:^22.0.0" nock: "npm:13.3.1" @@ -3127,7 +3127,7 @@ __metadata: dependencies: "@anansi/browserslist-config": "npm:^1.4.2" "@babel/runtime": "npm:^7.20.0" - "@data-client/endpoint": "npm:^0.14.21" + "@data-client/endpoint": "npm:^0.14.25" "@data-client/react": "workspace:*" "@testing-library/react": "npm:^16.1.0" "@types/jest": "npm:^29.5.14" @@ -3210,7 +3210,7 @@ __metadata: dependencies: "@anansi/browserslist-config": "npm:^1.4.2" "@babel/runtime": "npm:^7.20.0" - "@data-client/endpoint": "npm:^0.14.21" + "@data-client/endpoint": "npm:^0.14.25" "@data-client/react": "workspace:*" "@data-client/test": "workspace:*" "@types/jest": "npm:^29.5.14"