From 93608600d10ba08fc24002e6c0ebb9200ba08979 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 13 Jul 2024 17:16:53 +0000 Subject: [PATCH] internal: Publish new version --- .changeset/big-crews-pump.md | 50 ---- .changeset/cold-melons-beam.md | 8 - .changeset/eighty-sheep-occur.md | 5 - .changeset/healthy-buses-design.md | 7 - .changeset/hip-queens-design.md | 6 - .changeset/hot-kangaroos-dream.md | 32 --- .changeset/hungry-spies-design.md | 45 ---- .changeset/light-tables-guess.md | 53 ---- .changeset/purple-cougars-unite.md | 35 --- .changeset/purple-cougars-unite2.md | 23 -- .changeset/rich-frogs-move.md | 28 -- .changeset/rich-stingrays-look.md | 13 - .changeset/sharp-birds-tie.md | 15 -- .changeset/silly-eagles-knock.md | 7 - .changeset/smooth-houses-tickle.md | 13 - .changeset/spotty-humans-walk.md | 5 - .changeset/stupid-worms-beam.md | 6 - .changeset/wet-crabs-sort.md | 5 - .changeset/wet-mirrors-visit.md | 9 - .changeset/wild-lobsters-raise.md | 6 - examples/benchmark/CHANGELOG.md | 9 + examples/benchmark/package.json | 2 +- examples/coin-app/CHANGELOG.md | 9 + examples/coin-app/package.json | 8 +- examples/normalizr-github/CHANGELOG.md | 8 + examples/normalizr-github/package.json | 2 +- examples/normalizr-redux/CHANGELOG.md | 7 + examples/normalizr-redux/package.json | 2 +- examples/normalizr-relationships/CHANGELOG.md | 8 + examples/normalizr-relationships/package.json | 2 +- packages/core/CHANGELOG.md | 246 ++++++++++++++++++ packages/core/package.json | 4 +- packages/endpoint/CHANGELOG.md | 94 +++++++ packages/endpoint/package.json | 2 +- packages/graphql/CHANGELOG.md | 91 +++++++ packages/graphql/package.json | 4 +- packages/img/CHANGELOG.md | 9 + packages/img/package.json | 4 +- packages/normalizr/CHANGELOG.md | 136 +++++++++- packages/normalizr/package.json | 2 +- packages/react/CHANGELOG.md | 218 ++++++++++++++++ packages/react/package.json | 4 +- packages/rest/CHANGELOG.md | 91 +++++++ packages/rest/package.json | 4 +- packages/ssr/CHANGELOG.md | 6 + packages/ssr/package.json | 2 +- packages/test/CHANGELOG.md | 117 +++++++++ packages/test/package.json | 2 +- yarn.lock | 37 ++- 49 files changed, 1092 insertions(+), 409 deletions(-) delete mode 100644 .changeset/big-crews-pump.md delete mode 100644 .changeset/cold-melons-beam.md delete mode 100644 .changeset/eighty-sheep-occur.md delete mode 100644 .changeset/healthy-buses-design.md delete mode 100644 .changeset/hip-queens-design.md delete mode 100644 .changeset/hot-kangaroos-dream.md delete mode 100644 .changeset/hungry-spies-design.md delete mode 100644 .changeset/light-tables-guess.md delete mode 100644 .changeset/purple-cougars-unite.md delete mode 100644 .changeset/purple-cougars-unite2.md delete mode 100644 .changeset/rich-frogs-move.md delete mode 100644 .changeset/rich-stingrays-look.md delete mode 100644 .changeset/sharp-birds-tie.md delete mode 100644 .changeset/silly-eagles-knock.md delete mode 100644 .changeset/smooth-houses-tickle.md delete mode 100644 .changeset/spotty-humans-walk.md delete mode 100644 .changeset/stupid-worms-beam.md delete mode 100644 .changeset/wet-crabs-sort.md delete mode 100644 .changeset/wet-mirrors-visit.md delete mode 100644 .changeset/wild-lobsters-raise.md diff --git a/.changeset/big-crews-pump.md b/.changeset/big-crews-pump.md deleted file mode 100644 index e125f7ffde71..000000000000 --- a/.changeset/big-crews-pump.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -'@data-client/core': minor -'@data-client/react': patch -'@data-client/test': patch ---- - -BREAKING CHANGE: setResponseAction.payload -> setResponseAction.response - -This only affects those writing custom [Managers](https://dataclient.io/docs/concepts/managers) that -inspect `SET_RESPONSE_TYPE` `action.payload`. - -#### Before - -```ts -import { SET_RESPONSE_TYPE, type Manager, type Middleware } from '@data-client/react'; - -export default class MyManager implements Manager { - getMiddleware = (): Middleware => controller => next => async action => { - switch (action.type) { - case SET_RESPONSE_TYPE: - console.log('Resolved with value', action.payload); - return next(action); - default: - return next(action); - } - }; - - cleanup() {} -} -``` - -#### After - -```ts -import { SET_RESPONSE_TYPE, type Manager, type Middleware } from '@data-client/react'; - -export default class MyManager implements Manager { - getMiddleware = (): Middleware => controller => next => async action => { - switch (action.type) { - case SET_RESPONSE_TYPE: - console.log('Resolved with value', action.response); - return next(action); - default: - return next(action); - } - }; - - cleanup() {} -} -``` \ No newline at end of file diff --git a/.changeset/cold-melons-beam.md b/.changeset/cold-melons-beam.md deleted file mode 100644 index 12aaf4f2c79b..000000000000 --- a/.changeset/cold-melons-beam.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@data-client/core': minor ---- - -Renamed FETCH action.meta.createdAt to fetchedAt to be consistent with other actions like -SET_RESPONSE. - -BREAKING CHANGE: fetchAction.meta.createdAt -> fetchAction.meta.fetchedAt diff --git a/.changeset/eighty-sheep-occur.md b/.changeset/eighty-sheep-occur.md deleted file mode 100644 index 26941c724680..000000000000 --- a/.changeset/eighty-sheep-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@data-client/core': patch ---- - -internal: Simplify fetchReducer code diff --git a/.changeset/healthy-buses-design.md b/.changeset/healthy-buses-design.md deleted file mode 100644 index cbaeaf9f1a55..000000000000 --- a/.changeset/healthy-buses-design.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@data-client/core': minor ---- - -Remove throttle from FETCH_TYPE action - -BREAKING CHANGE: action.meta.throttle -> !action.endpoint.sideEffect \ No newline at end of file diff --git a/.changeset/hip-queens-design.md b/.changeset/hip-queens-design.md deleted file mode 100644 index f76d1acbb89b..000000000000 --- a/.changeset/hip-queens-design.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@data-client/core': minor -'@data-client/react': patch ---- - -action.meta.args -> action.args diff --git a/.changeset/hot-kangaroos-dream.md b/.changeset/hot-kangaroos-dream.md deleted file mode 100644 index 3f4ba3b8df9e..000000000000 --- a/.changeset/hot-kangaroos-dream.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -'@data-client/core': minor ---- - -Add `actions` export - -`actions` is a namespace for all action creators. It is typically -preferred to use [Controller's](https://dataclient.io/docs/api/Controller) type-safe dispatch methods, as -members of this namespace could have breaking changes in a minor release. - -```ts -import { actions, type Manager, type Middleware } from '@data-client/core'; - -export default class MyManager implements Manager { - getMiddleware = (): Middleware => controller => next => { - const todo = { id: '5', title: 'my first todo' }; - - // These do the same thing - controller.dispatch( - actions.createSet(Todo, { args: [{ id: todo.id }], value: todo }), - ); - // This is simpler; type-enforced; and will only change in major versions - controller.set(Todo, { id: todo.id }, todo); - - return async action => next(action); - }; - - cleanup() {} -} -``` - -BREAKING CHANGE: Removed `createFetch`, `createSet`, `createSetResponse` from export. Use action.createFetch instead. diff --git a/.changeset/hungry-spies-design.md b/.changeset/hungry-spies-design.md deleted file mode 100644 index 20522139d2ef..000000000000 --- a/.changeset/hungry-spies-design.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -'@data-client/normalizr': minor -'@data-client/endpoint': minor -'@data-client/graphql': minor -'@data-client/rest': minor -'@data-client/react': patch -'@data-client/core': patch ---- - -Change Schema.normalize `visit()` interface; removing non-contextual arguments. - -```ts -/** Visits next data + schema while recurisvely normalizing */ -export interface Visit { - (schema: any, value: any, parent: any, key: any, args: readonly any[]): any; - creating?: boolean; -} -``` - -This results in a 10% normalize performance boost. - -```ts title="Before" -processedEntity[key] = visit( - processedEntity[key], - processedEntity, - key, - this.schema[key], - addEntity, - visitedEntities, - storeEntities, - args, -); -``` - -```ts title="After" -processedEntity[key] = visit( - this.schema[key], - processedEntity[key], - processedEntity, - key, - args, -); -``` - -The information needed from these arguments are provided by [closing](https://en.wikipedia.org/wiki/Closure_(computer_programming)) `visit()` around them. \ No newline at end of file diff --git a/.changeset/light-tables-guess.md b/.changeset/light-tables-guess.md deleted file mode 100644 index 7600dd0df2bb..000000000000 --- a/.changeset/light-tables-guess.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -'@data-client/core': minor -'@data-client/react': patch -'@data-client/test': patch ---- - -BREAKING CHANGE: remove fetchAction.payload - -This only affects those writing custom [Managers](https://dataclient.io/docs/concepts/managers) that -inspect `FETCH_TYPE` `action.fetch`. - -#### Before - -```ts -import { FETCH_TYPE, type Manager, type Middleware } from '@data-client/react'; - -export default class MyManager implements Manager { - getMiddleware = (): Middleware => controller => next => async action => { - switch (action.type) { - case FETCH_TYPE: - // consume fetch, and print the resolution - action.fetch().then(response => console.log(response)); - default: - return next(action); - } - }; - - cleanup() {} -} -``` - -#### After - -```ts -import { FETCH_TYPE, type Manager, type Middleware } from '@data-client/react'; - -export default class MyManager implements Manager { - getMiddleware = (): Middleware => controller => next => async action => { - switch (action.type) { - case FETCH_TYPE: - // consume fetch, and print the resolution - action - .endpoint(...action.meta.args) - .fetch() - .then(response => console.log(response)); - default: - return next(action); - } - }; - - cleanup() {} -} -``` diff --git a/.changeset/purple-cougars-unite.md b/.changeset/purple-cougars-unite.md deleted file mode 100644 index 654186944535..000000000000 --- a/.changeset/purple-cougars-unite.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -'@data-client/normalizr': minor -'@data-client/endpoint': minor -'@data-client/graphql': minor -'@data-client/rest': minor -'@data-client/react': patch -'@data-client/core': patch ---- - -Change Schema.normalize interface from direct data access, to using functions like `getEntity` - -```ts -interface SchemaSimple { - normalize( - input: any, - parent: any, - key: any, - args: any[], - visit: (schema: any, value: any, parent: any, key: any, args: readonly any[]) => any, - addEntity: (...args: any) => any, - getEntity: (...args: any) => any, - checkLoop: (...args: any) => any, - ): any; -} -``` - -We also add `checkLoop()`, which moves some logic in [Entity](https://dataclient.io/rest/api/Entity) -to the core normalize algorithm. - -```ts -/** Returns true if a circular reference is found */ -export interface CheckLoop { - (entityKey: string, pk: string, input: object): boolean; -} -``` \ No newline at end of file diff --git a/.changeset/purple-cougars-unite2.md b/.changeset/purple-cougars-unite2.md deleted file mode 100644 index 2e256c64be48..000000000000 --- a/.changeset/purple-cougars-unite2.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -'@data-client/normalizr': minor -'@data-client/endpoint': minor -'@data-client/graphql': minor -'@data-client/rest': minor -'@data-client/react': patch -'@data-client/core': patch ---- - -Change Schema.denormalize `unvisit` to have [schema](https://dataclient.io/rest/api/schema) argument first. - -```ts -interface SchemaSimple { - denormalize( - input: {}, - args: readonly any[], - unvisit: (schema: any, input: any) => any, - ): T; -} -``` - - - diff --git a/.changeset/rich-frogs-move.md b/.changeset/rich-frogs-move.md deleted file mode 100644 index 4cb49d9c5e63..000000000000 --- a/.changeset/rich-frogs-move.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -'@data-client/normalizr': minor ---- - -Change normalize() interface - -```ts -function normalize( - schema, - input, - args, - { entities, indexes, entityMeta }, - { date, expiresAt, fetchedAt }, -); -``` - -#### Usage - -```ts -const { result, entities, indexes, entityMeta } = normalize( - action.endpoint.schema, - payload, - action.args, - state, - action.meta, -); -``` - diff --git a/.changeset/rich-stingrays-look.md b/.changeset/rich-stingrays-look.md deleted file mode 100644 index ca9a8489eced..000000000000 --- a/.changeset/rich-stingrays-look.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@data-client/react': minor ---- - -Call fetches immediately - do not wait for idle - -[NetworkManager](https://dataclient.io/docs/api/NetworkManager) will fetch -immediately, rather than waiting for idle. With React 18+ it is expected for -React to better handle work with concurrent mode and batching. Due to this, it -is not longer deemed the best performance to wait for idle and instead we should -fetch immediately. - -`IdlingNetworkManager` is still available to keep the previous behavior. \ No newline at end of file diff --git a/.changeset/sharp-birds-tie.md b/.changeset/sharp-birds-tie.md deleted file mode 100644 index 8de1eccec100..000000000000 --- a/.changeset/sharp-birds-tie.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@data-client/normalizr': minor ---- - -Change denormalize() interface - -```ts -function denormalize(schema, input, entities, args); -``` - -#### Usage - -```ts -const value = denormalize(endpoint.schema, input, state.entities, args); -``` diff --git a/.changeset/silly-eagles-knock.md b/.changeset/silly-eagles-knock.md deleted file mode 100644 index 542b444c0f0a..000000000000 --- a/.changeset/silly-eagles-knock.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@data-client/test': patch -'@data-client/img': patch -'@data-client/ssr': patch ---- - -Expand peerdep support range to include ^0.14.0 diff --git a/.changeset/smooth-houses-tickle.md b/.changeset/smooth-houses-tickle.md deleted file mode 100644 index 78cfae6b3527..000000000000 --- a/.changeset/smooth-houses-tickle.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@data-client/normalizr': minor ---- - -Change MemoCache methods interface - -```ts -class MemoCache { - denormalize(schema, input, entities, args): { data, paths }; - query(schema, args, entities, indexes): data; - buildQueryKey(schema, args, entities, indexes): normalized; -} -``` \ No newline at end of file diff --git a/.changeset/spotty-humans-walk.md b/.changeset/spotty-humans-walk.md deleted file mode 100644 index 8a02d42c2a3d..000000000000 --- a/.changeset/spotty-humans-walk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@data-client/react': patch ---- - -More robust requestIdleCallback wrapper diff --git a/.changeset/stupid-worms-beam.md b/.changeset/stupid-worms-beam.md deleted file mode 100644 index fd233c3e7f15..000000000000 --- a/.changeset/stupid-worms-beam.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@data-client/core': minor -'@data-client/react': patch ---- - -action.meta.key -> action.key diff --git a/.changeset/wet-crabs-sort.md b/.changeset/wet-crabs-sort.md deleted file mode 100644 index 891452b1ea9c..000000000000 --- a/.changeset/wet-crabs-sort.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@data-client/test': patch ---- - -Add missing types export to @data-client/test/browser diff --git a/.changeset/wet-mirrors-visit.md b/.changeset/wet-mirrors-visit.md deleted file mode 100644 index 433b8baea7af..000000000000 --- a/.changeset/wet-mirrors-visit.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@data-client/endpoint': patch ---- - -Validate after marking cirucular reference loops - -This should not change any behavior as validate should be deterministic so if it fails -it will fail again and failure measure throwing which exits the whole stack. -This improves code grouping. (And possibly cache locality improvement - though didn't check.) \ No newline at end of file diff --git a/.changeset/wild-lobsters-raise.md b/.changeset/wild-lobsters-raise.md deleted file mode 100644 index d4b1624a5a94..000000000000 --- a/.changeset/wild-lobsters-raise.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@data-client/core': minor -'@data-client/react': patch ---- - -Get rid of fetch action.meta.nm. This is not used anywhere. diff --git a/examples/benchmark/CHANGELOG.md b/examples/benchmark/CHANGELOG.md index 121e0b698fac..ec9ec329bd50 100644 --- a/examples/benchmark/CHANGELOG.md +++ b/examples/benchmark/CHANGELOG.md @@ -1,5 +1,14 @@ # example-benchmark +## 0.4.53 + +### Patch Changes + +- Updated dependencies [[`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1), [`96f7eb0`](https://github.com/reactive/data-client/commit/96f7eb0c97db75bd0ec663d0fb0db8cf3ee808d5), [`3ffa454`](https://github.com/reactive/data-client/commit/3ffa454def38b35a23520444f80b307732a8a89b), [`ee509fb`](https://github.com/reactive/data-client/commit/ee509fb9c7681f060521f358f76b55ca0cb600ec), [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716), [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716), [`7bd322d`](https://github.com/reactive/data-client/commit/7bd322d585b0893561b3ffb3c5ad47b2764c18bd), [`9df0f7c`](https://github.com/reactive/data-client/commit/9df0f7c670c919d956312d2535c298d2553f5840)]: + - @data-client/core@0.14.0 + - @data-client/normalizr@0.14.0 + - @data-client/endpoint@0.14.0 + ## 0.4.52 ### Patch Changes diff --git a/examples/benchmark/package.json b/examples/benchmark/package.json index 06bd69ff21d2..193b618baf23 100644 --- a/examples/benchmark/package.json +++ b/examples/benchmark/package.json @@ -1,6 +1,6 @@ { "name": "example-benchmark", - "version": "0.4.52", + "version": "0.4.53", "description": "Benchmark for normalizr", "main": "index.js", "author": "Nathaniel Tucker", diff --git a/examples/coin-app/CHANGELOG.md b/examples/coin-app/CHANGELOG.md index 6d4be2b53b4b..5e5179197da6 100644 --- a/examples/coin-app/CHANGELOG.md +++ b/examples/coin-app/CHANGELOG.md @@ -1,5 +1,14 @@ # coinbase-lite +## 0.0.9 + +### Patch Changes + +- Updated dependencies [[`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1), [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`6325384`](https://github.com/reactive/data-client/commit/632538421bf21440a12bb32cb3c8cccd3a5c4cbb), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`8aabe18`](https://github.com/reactive/data-client/commit/8aabe189330bdef2f36dd2c76c9e0ff80659468b), [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716), [`9df0f7c`](https://github.com/reactive/data-client/commit/9df0f7c670c919d956312d2535c298d2553f5840)]: + - @data-client/react@0.14.0 + - @data-client/rest@0.14.0 + - @data-client/img@0.14.0 + ## 0.0.8 ### Patch Changes diff --git a/examples/coin-app/package.json b/examples/coin-app/package.json index 15fb7774a430..bb879510d349 100644 --- a/examples/coin-app/package.json +++ b/examples/coin-app/package.json @@ -1,6 +1,6 @@ { "name": "coinbase-lite", - "version": "0.0.8", + "version": "0.0.9", "packageManager": "yarn@4.3.1", "description": "Coin App", "scripts": { @@ -42,9 +42,9 @@ "@anansi/core": "^0.20.0", "@anansi/router": "^0.10.0", "@babel/runtime": "^7.22.15", - "@data-client/img": "^0.13.4", - "@data-client/react": "^0.13.4", - "@data-client/rest": "^0.13.4", + "@data-client/img": "^0.14.0", + "@data-client/react": "^0.14.0", + "@data-client/rest": "^0.14.0", "d3": "^7.9.0", "history": "*", "react": "^18.3.0", diff --git a/examples/normalizr-github/CHANGELOG.md b/examples/normalizr-github/CHANGELOG.md index 0fee661c81ca..938c42c76242 100644 --- a/examples/normalizr-github/CHANGELOG.md +++ b/examples/normalizr-github/CHANGELOG.md @@ -1,5 +1,13 @@ # normalizr-github-example +## 0.1.36 + +### Patch Changes + +- Updated dependencies [[`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`7bd322d`](https://github.com/reactive/data-client/commit/7bd322d585b0893561b3ffb3c5ad47b2764c18bd)]: + - @data-client/normalizr@0.14.0 + - @data-client/endpoint@0.14.0 + ## 0.1.35 ### Patch Changes diff --git a/examples/normalizr-github/package.json b/examples/normalizr-github/package.json index e38c4ab8bef4..a286d35f179f 100644 --- a/examples/normalizr-github/package.json +++ b/examples/normalizr-github/package.json @@ -1,6 +1,6 @@ { "name": "normalizr-github-example", - "version": "0.1.35", + "version": "0.1.36", "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 12baf28a427b..3cc4c3736828 100644 --- a/examples/normalizr-redux/CHANGELOG.md +++ b/examples/normalizr-redux/CHANGELOG.md @@ -1,5 +1,12 @@ # normalizr-redux-example +## 0.1.34 + +### Patch Changes + +- Updated dependencies [[`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`7bd322d`](https://github.com/reactive/data-client/commit/7bd322d585b0893561b3ffb3c5ad47b2764c18bd)]: + - @data-client/endpoint@0.14.0 + ## 0.1.33 ### Patch Changes diff --git a/examples/normalizr-redux/package.json b/examples/normalizr-redux/package.json index a2a4dafe14a7..2ec814ec874b 100644 --- a/examples/normalizr-redux/package.json +++ b/examples/normalizr-redux/package.json @@ -1,6 +1,6 @@ { "name": "normalizr-redux-example", - "version": "0.1.33", + "version": "0.1.34", "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 d7c5f5e304a6..c6725c1feee6 100644 --- a/examples/normalizr-relationships/CHANGELOG.md +++ b/examples/normalizr-relationships/CHANGELOG.md @@ -1,5 +1,13 @@ # normalizr-relationships +## 0.1.36 + +### Patch Changes + +- Updated dependencies [[`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`7bd322d`](https://github.com/reactive/data-client/commit/7bd322d585b0893561b3ffb3c5ad47b2764c18bd)]: + - @data-client/normalizr@0.14.0 + - @data-client/endpoint@0.14.0 + ## 0.1.35 ### Patch Changes diff --git a/examples/normalizr-relationships/package.json b/examples/normalizr-relationships/package.json index a059de6a4328..c19e96f2796e 100644 --- a/examples/normalizr-relationships/package.json +++ b/examples/normalizr-relationships/package.json @@ -1,6 +1,6 @@ { "name": "normalizr-relationships", - "version": "0.1.35", + "version": "0.1.36", "description": "And example of using Normalizr with relationships", "main": "index.js", "author": "Paul Armstrong", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index aae631aa51ed..152d77724da5 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,251 @@ # @data-client/core +## 0.14.0 + +### Minor Changes + +- [#3141](https://github.com/reactive/data-client/pull/3141) [`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1) Thanks [@ntucker](https://github.com/ntucker)! - BREAKING CHANGE: setResponseAction.payload -> setResponseAction.response + + This only affects those writing custom [Managers](https://dataclient.io/docs/concepts/managers) that + inspect `SET_RESPONSE_TYPE` `action.payload`. + + #### Before + + ```ts + import { + SET_RESPONSE_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case SET_RESPONSE_TYPE: + console.log('Resolved with value', action.payload); + return next(action); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + + #### After + + ```ts + import { + SET_RESPONSE_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case SET_RESPONSE_TYPE: + console.log('Resolved with value', action.response); + return next(action); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + +- [`96f7eb0`](https://github.com/reactive/data-client/commit/96f7eb0c97db75bd0ec663d0fb0db8cf3ee808d5) Thanks [@ntucker](https://github.com/ntucker)! - Renamed FETCH action.meta.createdAt to fetchedAt to be consistent with other actions like + SET_RESPONSE. + + BREAKING CHANGE: fetchAction.meta.createdAt -> fetchAction.meta.fetchedAt + +- [#3138](https://github.com/reactive/data-client/pull/3138) [`ee509fb`](https://github.com/reactive/data-client/commit/ee509fb9c7681f060521f358f76b55ca0cb600ec) Thanks [@ntucker](https://github.com/ntucker)! - Remove throttle from FETCH_TYPE action + + BREAKING CHANGE: action.meta.throttle -> !action.endpoint.sideEffect + +- [#3143](https://github.com/reactive/data-client/pull/3143) [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716) Thanks [@ntucker](https://github.com/ntucker)! - action.meta.args -> action.args + +- [#3143](https://github.com/reactive/data-client/pull/3143) [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716) Thanks [@ntucker](https://github.com/ntucker)! - Add `actions` export + + `actions` is a namespace for all action creators. It is typically + preferred to use [Controller's](https://dataclient.io/docs/api/Controller) type-safe dispatch methods, as + members of this namespace could have breaking changes in a minor release. + + ```ts + import { actions, type Manager, type Middleware } from '@data-client/core'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => { + const todo = { id: '5', title: 'my first todo' }; + + // These do the same thing + controller.dispatch( + actions.createSet(Todo, { args: [{ id: todo.id }], value: todo }), + ); + // This is simpler; type-enforced; and will only change in major versions + controller.set(Todo, { id: todo.id }, todo); + + return async action => next(action); + }; + + cleanup() {} + } + ``` + + BREAKING CHANGE: Removed `createFetch`, `createSet`, `createSetResponse` from export. Use action.createFetch instead. + +- [#3141](https://github.com/reactive/data-client/pull/3141) [`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1) Thanks [@ntucker](https://github.com/ntucker)! - BREAKING CHANGE: remove fetchAction.payload + + This only affects those writing custom [Managers](https://dataclient.io/docs/concepts/managers) that + inspect `FETCH_TYPE` `action.fetch`. + + #### Before + + ```ts + import { + FETCH_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case FETCH_TYPE: + // consume fetch, and print the resolution + action.fetch().then(response => console.log(response)); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + + #### After + + ```ts + import { + FETCH_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case FETCH_TYPE: + // consume fetch, and print the resolution + action + .endpoint(...action.meta.args) + .fetch() + .then(response => console.log(response)); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + +- [#3143](https://github.com/reactive/data-client/pull/3143) [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716) Thanks [@ntucker](https://github.com/ntucker)! - action.meta.key -> action.key + +- [#3139](https://github.com/reactive/data-client/pull/3139) [`9df0f7c`](https://github.com/reactive/data-client/commit/9df0f7c670c919d956312d2535c298d2553f5840) Thanks [@ntucker](https://github.com/ntucker)! - Get rid of fetch action.meta.nm. This is not used anywhere. + +### Patch Changes + +- [`3ffa454`](https://github.com/reactive/data-client/commit/3ffa454def38b35a23520444f80b307732a8a89b) Thanks [@ntucker](https://github.com/ntucker)! - internal: Simplify fetchReducer code + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize `visit()` interface; removing non-contextual arguments. + + ```ts + /** Visits next data + schema while recurisvely normalizing */ + export interface Visit { + (schema: any, value: any, parent: any, key: any, args: readonly any[]): any; + creating?: boolean; + } + ``` + + This results in a 10% normalize performance boost. + + ```ts title="Before" + processedEntity[key] = visit( + processedEntity[key], + processedEntity, + key, + this.schema[key], + addEntity, + visitedEntities, + storeEntities, + args, + ); + ``` + + ```ts title="After" + processedEntity[key] = visit( + this.schema[key], + processedEntity[key], + processedEntity, + key, + args, + ); + ``` + + The information needed from these arguments are provided by [closing]() `visit()` around them. + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize interface from direct data access, to using functions like `getEntity` + + ```ts + interface SchemaSimple { + normalize( + input: any, + parent: any, + key: any, + args: any[], + visit: ( + schema: any, + value: any, + parent: any, + key: any, + args: readonly any[], + ) => any, + addEntity: (...args: any) => any, + getEntity: (...args: any) => any, + checkLoop: (...args: any) => any, + ): any; + } + ``` + + We also add `checkLoop()`, which moves some logic in [Entity](https://dataclient.io/rest/api/Entity) + to the core normalize algorithm. + + ```ts + /** Returns true if a circular reference is found */ + export interface CheckLoop { + (entityKey: string, pk: string, input: object): boolean; + } + ``` + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.denormalize `unvisit` to have [schema](https://dataclient.io/rest/api/schema) argument first. + + ```ts + interface SchemaSimple { + denormalize( + input: {}, + args: readonly any[], + unvisit: (schema: any, input: any) => any, + ): T; + } + ``` + +- Updated dependencies [[`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36)]: + - @data-client/normalizr@0.14.0 + ## 0.13.5 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 4af8ecd37605..a99ede7c5af2 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/core", - "version": "0.13.5", + "version": "0.14.0", "description": "High performance mutable data framework.", "sideEffects": false, "main": "dist/index.js", @@ -121,7 +121,7 @@ }, "dependencies": { "@babel/runtime": "^7.17.0", - "@data-client/normalizr": "^0.12.3", + "@data-client/normalizr": "^0.14.0", "flux-standard-action": "^2.1.1" }, "devDependencies": { diff --git a/packages/endpoint/CHANGELOG.md b/packages/endpoint/CHANGELOG.md index 3e6130a1b671..cd459b5bf86e 100644 --- a/packages/endpoint/CHANGELOG.md +++ b/packages/endpoint/CHANGELOG.md @@ -1,5 +1,99 @@ # @data-client/endpoint +## 0.14.0 + +### Minor Changes + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize `visit()` interface; removing non-contextual arguments. + + ```ts + /** Visits next data + schema while recurisvely normalizing */ + export interface Visit { + (schema: any, value: any, parent: any, key: any, args: readonly any[]): any; + creating?: boolean; + } + ``` + + This results in a 10% normalize performance boost. + + ```ts title="Before" + processedEntity[key] = visit( + processedEntity[key], + processedEntity, + key, + this.schema[key], + addEntity, + visitedEntities, + storeEntities, + args, + ); + ``` + + ```ts title="After" + processedEntity[key] = visit( + this.schema[key], + processedEntity[key], + processedEntity, + key, + args, + ); + ``` + + The information needed from these arguments are provided by [closing]() `visit()` around them. + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize interface from direct data access, to using functions like `getEntity` + + ```ts + interface SchemaSimple { + normalize( + input: any, + parent: any, + key: any, + args: any[], + visit: ( + schema: any, + value: any, + parent: any, + key: any, + args: readonly any[], + ) => any, + addEntity: (...args: any) => any, + getEntity: (...args: any) => any, + checkLoop: (...args: any) => any, + ): any; + } + ``` + + We also add `checkLoop()`, which moves some logic in [Entity](https://dataclient.io/rest/api/Entity) + to the core normalize algorithm. + + ```ts + /** Returns true if a circular reference is found */ + export interface CheckLoop { + (entityKey: string, pk: string, input: object): boolean; + } + ``` + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.denormalize `unvisit` to have [schema](https://dataclient.io/rest/api/schema) argument first. + + ```ts + interface SchemaSimple { + denormalize( + input: {}, + args: readonly any[], + unvisit: (schema: any, input: any) => any, + ): T; + } + ``` + +### Patch Changes + +- [#3133](https://github.com/reactive/data-client/pull/3133) [`7bd322d`](https://github.com/reactive/data-client/commit/7bd322d585b0893561b3ffb3c5ad47b2764c18bd) Thanks [@ntucker](https://github.com/ntucker)! - Validate after marking cirucular reference loops + + This should not change any behavior as validate should be deterministic so if it fails + it will fail again and failure measure throwing which exits the whole stack. + This improves code grouping. (And possibly cache locality improvement - though didn't check.) + ## 0.13.4 ### Patch Changes diff --git a/packages/endpoint/package.json b/packages/endpoint/package.json index dfb6c8d75b59..cba2d1b35f4a 100644 --- a/packages/endpoint/package.json +++ b/packages/endpoint/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/endpoint", - "version": "0.13.4", + "version": "0.14.0", "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 3a2425464d8f..1ecaf80864de 100644 --- a/packages/graphql/CHANGELOG.md +++ b/packages/graphql/CHANGELOG.md @@ -1,5 +1,96 @@ # @data-client/graphql +## 0.14.0 + +### Minor Changes + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize `visit()` interface; removing non-contextual arguments. + + ```ts + /** Visits next data + schema while recurisvely normalizing */ + export interface Visit { + (schema: any, value: any, parent: any, key: any, args: readonly any[]): any; + creating?: boolean; + } + ``` + + This results in a 10% normalize performance boost. + + ```ts title="Before" + processedEntity[key] = visit( + processedEntity[key], + processedEntity, + key, + this.schema[key], + addEntity, + visitedEntities, + storeEntities, + args, + ); + ``` + + ```ts title="After" + processedEntity[key] = visit( + this.schema[key], + processedEntity[key], + processedEntity, + key, + args, + ); + ``` + + The information needed from these arguments are provided by [closing]() `visit()` around them. + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize interface from direct data access, to using functions like `getEntity` + + ```ts + interface SchemaSimple { + normalize( + input: any, + parent: any, + key: any, + args: any[], + visit: ( + schema: any, + value: any, + parent: any, + key: any, + args: readonly any[], + ) => any, + addEntity: (...args: any) => any, + getEntity: (...args: any) => any, + checkLoop: (...args: any) => any, + ): any; + } + ``` + + We also add `checkLoop()`, which moves some logic in [Entity](https://dataclient.io/rest/api/Entity) + to the core normalize algorithm. + + ```ts + /** Returns true if a circular reference is found */ + export interface CheckLoop { + (entityKey: string, pk: string, input: object): boolean; + } + ``` + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.denormalize `unvisit` to have [schema](https://dataclient.io/rest/api/schema) argument first. + + ```ts + interface SchemaSimple { + denormalize( + input: {}, + args: readonly any[], + unvisit: (schema: any, input: any) => any, + ): T; + } + ``` + +### Patch Changes + +- Updated dependencies [[`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`7bd322d`](https://github.com/reactive/data-client/commit/7bd322d585b0893561b3ffb3c5ad47b2764c18bd)]: + - @data-client/endpoint@0.14.0 + ## 0.13.4 ### Patch Changes diff --git a/packages/graphql/package.json b/packages/graphql/package.json index 30ef830f8cdd..5f5c52a100d5 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/graphql", - "version": "0.13.4", + "version": "0.14.0", "description": "Endpoints for GraphQL APIs", "homepage": "https://dataclient.io/docs/graphql", "repository": { @@ -105,7 +105,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.17.0", - "@data-client/endpoint": "^0.13.4" + "@data-client/endpoint": "^0.14.0" }, "devDependencies": { "@anansi/browserslist-config": "^1.4.2", diff --git a/packages/img/CHANGELOG.md b/packages/img/CHANGELOG.md index 8e6abc4d6140..89e73d49cb96 100644 --- a/packages/img/CHANGELOG.md +++ b/packages/img/CHANGELOG.md @@ -1,5 +1,14 @@ # @data-client/img +## 0.14.0 + +### Patch Changes + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Expand peerdep support range to include ^0.14.0 + +- Updated dependencies [[`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`7bd322d`](https://github.com/reactive/data-client/commit/7bd322d585b0893561b3ffb3c5ad47b2764c18bd)]: + - @data-client/endpoint@0.14.0 + ## 0.13.4 ### Patch Changes diff --git a/packages/img/package.json b/packages/img/package.json index 1ba247202a8f..fb90072c9c5d 100644 --- a/packages/img/package.json +++ b/packages/img/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/img", - "version": "0.13.4", + "version": "0.14.0", "description": "Suspenseful images", "homepage": "https://dataclient.io/docs/guides/img-media#just-images", "repository": { @@ -70,7 +70,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.17.0", - "@data-client/endpoint": "^0.13.4" + "@data-client/endpoint": "^0.14.0" }, "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/normalizr/CHANGELOG.md b/packages/normalizr/CHANGELOG.md index 14da1107b8fa..7170b0e4e6c6 100644 --- a/packages/normalizr/CHANGELOG.md +++ b/packages/normalizr/CHANGELOG.md @@ -1,5 +1,137 @@ # Change Log +## 0.14.0 + +### Minor Changes + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize `visit()` interface; removing non-contextual arguments. + + ```ts + /** Visits next data + schema while recurisvely normalizing */ + export interface Visit { + (schema: any, value: any, parent: any, key: any, args: readonly any[]): any; + creating?: boolean; + } + ``` + + This results in a 10% normalize performance boost. + + ```ts title="Before" + processedEntity[key] = visit( + processedEntity[key], + processedEntity, + key, + this.schema[key], + addEntity, + visitedEntities, + storeEntities, + args, + ); + ``` + + ```ts title="After" + processedEntity[key] = visit( + this.schema[key], + processedEntity[key], + processedEntity, + key, + args, + ); + ``` + + The information needed from these arguments are provided by [closing]() `visit()` around them. + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize interface from direct data access, to using functions like `getEntity` + + ```ts + interface SchemaSimple { + normalize( + input: any, + parent: any, + key: any, + args: any[], + visit: ( + schema: any, + value: any, + parent: any, + key: any, + args: readonly any[], + ) => any, + addEntity: (...args: any) => any, + getEntity: (...args: any) => any, + checkLoop: (...args: any) => any, + ): any; + } + ``` + + We also add `checkLoop()`, which moves some logic in [Entity](https://dataclient.io/rest/api/Entity) + to the core normalize algorithm. + + ```ts + /** Returns true if a circular reference is found */ + export interface CheckLoop { + (entityKey: string, pk: string, input: object): boolean; + } + ``` + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.denormalize `unvisit` to have [schema](https://dataclient.io/rest/api/schema) argument first. + + ```ts + interface SchemaSimple { + denormalize( + input: {}, + args: readonly any[], + unvisit: (schema: any, input: any) => any, + ): T; + } + ``` + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change normalize() interface + + ```ts + function normalize( + schema, + input, + args, + { entities, indexes, entityMeta }, + { date, expiresAt, fetchedAt }, + ); + ``` + + #### Usage + + ```ts + const { result, entities, indexes, entityMeta } = normalize( + action.endpoint.schema, + payload, + action.args, + state, + action.meta, + ); + ``` + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change denormalize() interface + + ```ts + function denormalize(schema, input, entities, args); + ``` + + #### Usage + + ```ts + const value = denormalize(endpoint.schema, input, state.entities, args); + ``` + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change MemoCache methods interface + + ```ts + class MemoCache { + denormalize(schema, input, entities, args): { data; paths }; + query(schema, args, entities, indexes): data; + buildQueryKey(schema, args, entities, indexes): normalized; + } + ``` + ## 0.12.3 ### Patch Changes @@ -295,7 +427,7 @@ pk(): string { return `${this.trade_id}`; } - static key = "Ticker"; + static key = 'Ticker'; static schema = { price: Number, @@ -315,7 +447,7 @@ pk(): string { return `${this.trade_id}`; } - static key = "Ticker"; + static key = 'Ticker'; static schema = { price: Number, diff --git a/packages/normalizr/package.json b/packages/normalizr/package.json index d797bf5db7d1..1737f09436e9 100644 --- a/packages/normalizr/package.json +++ b/packages/normalizr/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/normalizr", - "version": "0.12.3", + "version": "0.14.0", "description": "Normalizes and denormalizes JSON according to schema for Redux and Flux applications", "homepage": "https://dataclient.io/docs/concepts/normalization", "keywords": [ diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 8f261191884c..c83db588d3ca 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,223 @@ # @data-client/react +## 0.14.0 + +### Minor Changes + +- [#3146](https://github.com/reactive/data-client/pull/3146) [`6325384`](https://github.com/reactive/data-client/commit/632538421bf21440a12bb32cb3c8cccd3a5c4cbb) Thanks [@ntucker](https://github.com/ntucker)! - Call fetches immediately - do not wait for idle + + [NetworkManager](https://dataclient.io/docs/api/NetworkManager) will fetch + immediately, rather than waiting for idle. With React 18+ it is expected for + React to better handle work with concurrent mode and batching. Due to this, it + is not longer deemed the best performance to wait for idle and instead we should + fetch immediately. + + `IdlingNetworkManager` is still available to keep the previous behavior. + +### Patch Changes + +- [#3141](https://github.com/reactive/data-client/pull/3141) [`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1) Thanks [@ntucker](https://github.com/ntucker)! - BREAKING CHANGE: setResponseAction.payload -> setResponseAction.response + + This only affects those writing custom [Managers](https://dataclient.io/docs/concepts/managers) that + inspect `SET_RESPONSE_TYPE` `action.payload`. + + #### Before + + ```ts + import { + SET_RESPONSE_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case SET_RESPONSE_TYPE: + console.log('Resolved with value', action.payload); + return next(action); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + + #### After + + ```ts + import { + SET_RESPONSE_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case SET_RESPONSE_TYPE: + console.log('Resolved with value', action.response); + return next(action); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + +- [#3143](https://github.com/reactive/data-client/pull/3143) [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716) Thanks [@ntucker](https://github.com/ntucker)! - action.meta.args -> action.args + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize `visit()` interface; removing non-contextual arguments. + + ```ts + /** Visits next data + schema while recurisvely normalizing */ + export interface Visit { + (schema: any, value: any, parent: any, key: any, args: readonly any[]): any; + creating?: boolean; + } + ``` + + This results in a 10% normalize performance boost. + + ```ts title="Before" + processedEntity[key] = visit( + processedEntity[key], + processedEntity, + key, + this.schema[key], + addEntity, + visitedEntities, + storeEntities, + args, + ); + ``` + + ```ts title="After" + processedEntity[key] = visit( + this.schema[key], + processedEntity[key], + processedEntity, + key, + args, + ); + ``` + + The information needed from these arguments are provided by [closing]() `visit()` around them. + +- [#3141](https://github.com/reactive/data-client/pull/3141) [`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1) Thanks [@ntucker](https://github.com/ntucker)! - BREAKING CHANGE: remove fetchAction.payload + + This only affects those writing custom [Managers](https://dataclient.io/docs/concepts/managers) that + inspect `FETCH_TYPE` `action.fetch`. + + #### Before + + ```ts + import { + FETCH_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case FETCH_TYPE: + // consume fetch, and print the resolution + action.fetch().then(response => console.log(response)); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + + #### After + + ```ts + import { + FETCH_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case FETCH_TYPE: + // consume fetch, and print the resolution + action + .endpoint(...action.meta.args) + .fetch() + .then(response => console.log(response)); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize interface from direct data access, to using functions like `getEntity` + + ```ts + interface SchemaSimple { + normalize( + input: any, + parent: any, + key: any, + args: any[], + visit: ( + schema: any, + value: any, + parent: any, + key: any, + args: readonly any[], + ) => any, + addEntity: (...args: any) => any, + getEntity: (...args: any) => any, + checkLoop: (...args: any) => any, + ): any; + } + ``` + + We also add `checkLoop()`, which moves some logic in [Entity](https://dataclient.io/rest/api/Entity) + to the core normalize algorithm. + + ```ts + /** Returns true if a circular reference is found */ + export interface CheckLoop { + (entityKey: string, pk: string, input: object): boolean; + } + ``` + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.denormalize `unvisit` to have [schema](https://dataclient.io/rest/api/schema) argument first. + + ```ts + interface SchemaSimple { + denormalize( + input: {}, + args: readonly any[], + unvisit: (schema: any, input: any) => any, + ): T; + } + ``` + +- [`8aabe18`](https://github.com/reactive/data-client/commit/8aabe189330bdef2f36dd2c76c9e0ff80659468b) Thanks [@ntucker](https://github.com/ntucker)! - More robust requestIdleCallback wrapper + +- [#3143](https://github.com/reactive/data-client/pull/3143) [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716) Thanks [@ntucker](https://github.com/ntucker)! - action.meta.key -> action.key + +- [#3139](https://github.com/reactive/data-client/pull/3139) [`9df0f7c`](https://github.com/reactive/data-client/commit/9df0f7c670c919d956312d2535c298d2553f5840) Thanks [@ntucker](https://github.com/ntucker)! - Get rid of fetch action.meta.nm. This is not used anywhere. + +- Updated dependencies [[`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1), [`96f7eb0`](https://github.com/reactive/data-client/commit/96f7eb0c97db75bd0ec663d0fb0db8cf3ee808d5), [`3ffa454`](https://github.com/reactive/data-client/commit/3ffa454def38b35a23520444f80b307732a8a89b), [`ee509fb`](https://github.com/reactive/data-client/commit/ee509fb9c7681f060521f358f76b55ca0cb600ec), [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716), [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`f4cf8a4`](https://github.com/reactive/data-client/commit/f4cf8a4df3dfe852d98058abd06178f751ae8716), [`9df0f7c`](https://github.com/reactive/data-client/commit/9df0f7c670c919d956312d2535c298d2553f5840)]: + - @data-client/core@0.14.0 + ## 0.13.6 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index d9dab056dbd9..63e68cd693e4 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/react", - "version": "0.13.6", + "version": "0.14.0", "description": "High performance mutable data rendering in React.", "homepage": "https://dataclient.io", "repository": { @@ -169,7 +169,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.17.0", - "@data-client/core": "^0.13.5", + "@data-client/core": "^0.14.0", "@data-client/use-enhanced-reducer": "^0.1.10" }, "peerDependencies": { diff --git a/packages/rest/CHANGELOG.md b/packages/rest/CHANGELOG.md index 9e35436bc472..4d449dacec60 100644 --- a/packages/rest/CHANGELOG.md +++ b/packages/rest/CHANGELOG.md @@ -1,5 +1,96 @@ # @data-client/rest +## 0.14.0 + +### Minor Changes + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize `visit()` interface; removing non-contextual arguments. + + ```ts + /** Visits next data + schema while recurisvely normalizing */ + export interface Visit { + (schema: any, value: any, parent: any, key: any, args: readonly any[]): any; + creating?: boolean; + } + ``` + + This results in a 10% normalize performance boost. + + ```ts title="Before" + processedEntity[key] = visit( + processedEntity[key], + processedEntity, + key, + this.schema[key], + addEntity, + visitedEntities, + storeEntities, + args, + ); + ``` + + ```ts title="After" + processedEntity[key] = visit( + this.schema[key], + processedEntity[key], + processedEntity, + key, + args, + ); + ``` + + The information needed from these arguments are provided by [closing]() `visit()` around them. + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.normalize interface from direct data access, to using functions like `getEntity` + + ```ts + interface SchemaSimple { + normalize( + input: any, + parent: any, + key: any, + args: any[], + visit: ( + schema: any, + value: any, + parent: any, + key: any, + args: readonly any[], + ) => any, + addEntity: (...args: any) => any, + getEntity: (...args: any) => any, + checkLoop: (...args: any) => any, + ): any; + } + ``` + + We also add `checkLoop()`, which moves some logic in [Entity](https://dataclient.io/rest/api/Entity) + to the core normalize algorithm. + + ```ts + /** Returns true if a circular reference is found */ + export interface CheckLoop { + (entityKey: string, pk: string, input: object): boolean; + } + ``` + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Change Schema.denormalize `unvisit` to have [schema](https://dataclient.io/rest/api/schema) argument first. + + ```ts + interface SchemaSimple { + denormalize( + input: {}, + args: readonly any[], + unvisit: (schema: any, input: any) => any, + ): T; + } + ``` + +### Patch Changes + +- Updated dependencies [[`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36), [`7bd322d`](https://github.com/reactive/data-client/commit/7bd322d585b0893561b3ffb3c5ad47b2764c18bd)]: + - @data-client/endpoint@0.14.0 + ## 0.13.4 ### Patch Changes diff --git a/packages/rest/package.json b/packages/rest/package.json index fdc0d3b68696..4de277a6c604 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/rest", - "version": "0.13.4", + "version": "0.14.0", "description": "Endpoints for REST APIs", "homepage": "https://dataclient.io/rest", "repository": { @@ -131,7 +131,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.17.0", - "@data-client/endpoint": "^0.13.4", + "@data-client/endpoint": "^0.14.0", "path-to-regexp": "^6.2.1" }, "devDependencies": { diff --git a/packages/ssr/CHANGELOG.md b/packages/ssr/CHANGELOG.md index 569f3e436d1c..b62b6db8a35a 100644 --- a/packages/ssr/CHANGELOG.md +++ b/packages/ssr/CHANGELOG.md @@ -1,5 +1,11 @@ # @data-client/ssr +## 0.12.14 + +### Patch Changes + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Expand peerdep support range to include ^0.14.0 + ## 0.12.13 ### Patch Changes diff --git a/packages/ssr/package.json b/packages/ssr/package.json index 1f5531ec4bb5..721ac5eb63dc 100644 --- a/packages/ssr/package.json +++ b/packages/ssr/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/ssr", - "version": "0.12.13", + "version": "0.12.14", "description": "Server Side Rendering helpers for Data Client", "homepage": "https://dataclient.io/docs/guides/ssr", "repository": { diff --git a/packages/test/CHANGELOG.md b/packages/test/CHANGELOG.md index 626ff7b96101..806c5a7c541e 100644 --- a/packages/test/CHANGELOG.md +++ b/packages/test/CHANGELOG.md @@ -1,5 +1,122 @@ # @data-client/test +## 0.14.0 + +### Patch Changes + +- [#3141](https://github.com/reactive/data-client/pull/3141) [`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1) Thanks [@ntucker](https://github.com/ntucker)! - BREAKING CHANGE: setResponseAction.payload -> setResponseAction.response + + This only affects those writing custom [Managers](https://dataclient.io/docs/concepts/managers) that + inspect `SET_RESPONSE_TYPE` `action.payload`. + + #### Before + + ```ts + import { + SET_RESPONSE_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case SET_RESPONSE_TYPE: + console.log('Resolved with value', action.payload); + return next(action); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + + #### After + + ```ts + import { + SET_RESPONSE_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case SET_RESPONSE_TYPE: + console.log('Resolved with value', action.response); + return next(action); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + +- [#3141](https://github.com/reactive/data-client/pull/3141) [`d225595`](https://github.com/reactive/data-client/commit/d2255959489b71cfdfcaf4be72fd272231d392f1) Thanks [@ntucker](https://github.com/ntucker)! - BREAKING CHANGE: remove fetchAction.payload + + This only affects those writing custom [Managers](https://dataclient.io/docs/concepts/managers) that + inspect `FETCH_TYPE` `action.fetch`. + + #### Before + + ```ts + import { + FETCH_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case FETCH_TYPE: + // consume fetch, and print the resolution + action.fetch().then(response => console.log(response)); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + + #### After + + ```ts + import { + FETCH_TYPE, + type Manager, + type Middleware, + } from '@data-client/react'; + + export default class MyManager implements Manager { + getMiddleware = (): Middleware => controller => next => async action => { + switch (action.type) { + case FETCH_TYPE: + // consume fetch, and print the resolution + action + .endpoint(...action.meta.args) + .fetch() + .then(response => console.log(response)); + default: + return next(action); + } + }; + + cleanup() {} + } + ``` + +- [#3134](https://github.com/reactive/data-client/pull/3134) [`2ad1811`](https://github.com/reactive/data-client/commit/2ad1811149cdc419f6462ace08efdb7766195b36) Thanks [@ntucker](https://github.com/ntucker)! - Expand peerdep support range to include ^0.14.0 + +- [`39471f5`](https://github.com/reactive/data-client/commit/39471f5e2a76e4bb4ee401020875ffa324f3eaf2) Thanks [@ntucker](https://github.com/ntucker)! - Add missing types export to @data-client/test/browser + ## 0.13.0 ### Patch Changes diff --git a/packages/test/package.json b/packages/test/package.json index 0a9f6729234d..d15c2bb8e909 100644 --- a/packages/test/package.json +++ b/packages/test/package.json @@ -1,6 +1,6 @@ { "name": "@data-client/test", - "version": "0.13.0", + "version": "0.14.0", "description": "Testing utilities for Data Client", "homepage": "https://dataclient.io/docs/guides/storybook", "repository": { diff --git a/yarn.lock b/yarn.lock index 92f3be163039..df6e4b81c433 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3170,19 +3170,19 @@ __metadata: languageName: node linkType: hard -"@data-client/core@npm:^0.13.5, @data-client/core@workspace:^, @data-client/core@workspace:packages/core": +"@data-client/core@npm:^0.14.0, @data-client/core@workspace:^, @data-client/core@workspace:packages/core": version: 0.0.0-use.local resolution: "@data-client/core@workspace:packages/core" dependencies: "@anansi/browserslist-config": "npm:^1.4.2" "@babel/runtime": "npm:^7.17.0" - "@data-client/normalizr": "npm:^0.12.3" + "@data-client/normalizr": "npm:^0.14.0" "@types/node": "npm:^20.0.0" flux-standard-action: "npm:^2.1.1" languageName: unknown linkType: soft -"@data-client/endpoint@npm:^0.13.4, @data-client/endpoint@workspace:*, @data-client/endpoint@workspace:^, @data-client/endpoint@workspace:packages/endpoint": +"@data-client/endpoint@npm:^0.14.0, @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: @@ -3199,18 +3199,18 @@ __metadata: dependencies: "@anansi/browserslist-config": "npm:^1.4.2" "@babel/runtime": "npm:^7.17.0" - "@data-client/endpoint": "npm:^0.13.4" + "@data-client/endpoint": "npm:^0.14.0" "@types/node": "npm:^20.0.0" languageName: unknown linkType: soft -"@data-client/img@npm:^0.13.4, @data-client/img@workspace:packages/img": +"@data-client/img@npm:^0.14.0, @data-client/img@workspace:packages/img": version: 0.0.0-use.local resolution: "@data-client/img@workspace:packages/img" dependencies: "@anansi/browserslist-config": "npm:^1.4.2" "@babel/runtime": "npm:^7.17.0" - "@data-client/endpoint": "npm:^0.13.4" + "@data-client/endpoint": "npm:^0.14.0" "@data-client/react": "workspace:*" "@types/node": "npm:^20.0.0" "@types/react": "npm:^18.0.30" @@ -3224,7 +3224,16 @@ __metadata: languageName: unknown linkType: soft -"@data-client/normalizr@npm:^0.12.3, @data-client/normalizr@workspace:*, @data-client/normalizr@workspace:^, @data-client/normalizr@workspace:packages/normalizr": +"@data-client/normalizr@npm:^0.12.3": + version: 0.12.3 + resolution: "@data-client/normalizr@npm:0.12.3" + dependencies: + "@babel/runtime": "npm:^7.17.0" + checksum: 10c0/4eb5b24d69160b42f321d4479de54b053ead5845795d49ebf20b10726fc2846326710c6d5fb2a40aa285ca33cbc4f762987ded55e8c4e0ffefe36f2fc024de29 + languageName: node + linkType: hard + +"@data-client/normalizr@npm:^0.14.0, @data-client/normalizr@workspace:*, @data-client/normalizr@workspace:^, @data-client/normalizr@workspace:packages/normalizr": version: 0.0.0-use.local resolution: "@data-client/normalizr@workspace:packages/normalizr" dependencies: @@ -3235,13 +3244,13 @@ __metadata: languageName: unknown linkType: soft -"@data-client/react@npm:^0.13.4, @data-client/react@workspace:*, @data-client/react@workspace:^, @data-client/react@workspace:packages/react": +"@data-client/react@npm:^0.14.0, @data-client/react@workspace:*, @data-client/react@workspace:^, @data-client/react@workspace:packages/react": version: 0.0.0-use.local resolution: "@data-client/react@workspace:packages/react" dependencies: "@anansi/browserslist-config": "npm:^1.4.2" "@babel/runtime": "npm:^7.17.0" - "@data-client/core": "npm:^0.13.5" + "@data-client/core": "npm:^0.14.0" "@data-client/use-enhanced-reducer": "npm:^0.1.10" "@react-navigation/native": "npm:^6.1.6" "@types/node": "npm:^20.0.0" @@ -3277,13 +3286,13 @@ __metadata: languageName: node linkType: hard -"@data-client/rest@npm:^0.13.4, @data-client/rest@workspace:*, @data-client/rest@workspace:packages/rest": +"@data-client/rest@npm:^0.14.0, @data-client/rest@workspace:*, @data-client/rest@workspace:packages/rest": version: 0.0.0-use.local resolution: "@data-client/rest@workspace:packages/rest" dependencies: "@anansi/browserslist-config": "npm:^1.4.2" "@babel/runtime": "npm:^7.17.0" - "@data-client/endpoint": "npm:^0.13.4" + "@data-client/endpoint": "npm:^0.14.0" "@types/node": "npm:^20.0.0" path-to-regexp: "npm:^6.2.1" languageName: unknown @@ -10489,9 +10498,9 @@ __metadata: "@anansi/webpack-config": "npm:^19.0.0" "@babel/core": "npm:^7.22.15" "@babel/runtime": "npm:^7.22.15" - "@data-client/img": "npm:^0.13.4" - "@data-client/react": "npm:^0.13.4" - "@data-client/rest": "npm:^0.13.4" + "@data-client/img": "npm:^0.14.0" + "@data-client/react": "npm:^0.14.0" + "@data-client/rest": "npm:^0.14.0" "@linaria/babel-preset": "npm:*" "@linaria/core": "npm:*" "@linaria/react": "npm:*"