Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3926 +/- ##
=======================================
Coverage 98.21% 98.21%
=======================================
Files 154 154
Lines 3024 3024
Branches 601 601
=======================================
Hits 2970 2970
Misses 11 11
Partials 43 43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
67df41e to
149a09c
Compare
c0ec94d to
2dcd47b
Compare
2dcd47b to
f405bce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@data-client/core@0.18.0
Minor Changes
#3931
959465a- Allow oneCollectionschema to be used both top-level and nested.Before:
After:
#3887
84078d7- BREAKING:Schema.denormalize()is now(input, delegate)insteadof the previous
(input, args, unvisit)3-parameter signature.The new
IDenormalizeDelegateexposes
unvisit,args, and a newargsKey(fn)helper that registersa memoization dimension when output varies with endpoint args. Reading
delegate.argsdirectly does not contribute to cache invalidation —schemas that branch on args must call
argsKey. Thefnreferencedoubles as the cache path key, so it must be referentially stable
— define it on the instance or at module scope, not inline per call:
All built-in schemas (
Array,Object,Values,Union,Query,Invalidate,Lazy,Collection) have been updated. Custom schemasimplementing
SchemaSimplemust update theirdenormalizesignature.Schema.normalize()and thevisit()callback also gain an optionaltrailing
parentEntityargument tracking the nearest enclosingentity-like schema. This is additive — existing schemas don't need
changes unless they want to use it.
#3887
84078d7- Add Scalar schema for lens-dependent entity fields.Scalarmodels entity fields whose values vary by a runtime "lens" (such as theselected portfolio, currency, or locale). Multiple components can render the
same entity through different lenses simultaneously — each sees the correct
values without the entity itself ever being mutated. Lens-dependent values are
stored in a separate cell table and joined at denormalize time from endpoint
args.
New exports:
Scalar,schema.Scalar.A single
Scalarinstance can serve both as anEntity.schemafield (parententity inferred from the visit) and standalone — inside
Values(Scalar),[Scalar], orCollection([Scalar])— for cheap column-only refreshes(entity bound explicitly via
entity). Cell pks are derived from the map keyor via
Scalar.entityPk(), which defaults toEntity.pk()so custom andcomposite primary keys work with no override:
useSuspense(getCompanies, { portfolio: 'A' })anduseSuspense(getCompanies, { portfolio: 'B' })resolve to differentpct_equity/shareswhile sharing the sameCompanyrow.Scalar.queryKeyenumerates cells in its table for the current lens, soendpoints that use
Scalardirectly as their top-level schema reconstructfrom cache without a network round-trip once the cells are present.
Patch Changes
#3925
6e8e499- Fix cached journey being mutated on repeated result-cache hits.GlobalCache.getResultscalledpaths.shift()on a cache hit, mutatingthe
journeyarray stored by reference on theWeakDependencyMapLinknode. After the first hit stripped the placeholder input slot, every
subsequent hit on the same cached entry would shift off a real
EntityPath, progressively losing subscription entries. This could causemissed
countReftracking (premature GC of still-referenced entities)and incorrect
entityExpiresAtcalculations. The hit path now returns anon-mutating copy.
Updated dependencies [
959465a,84078d7,6e8e499,396d163,84078d7]:@data-client/endpoint@0.18.0
Minor Changes
#3931
959465a- Allow oneCollectionschema to be used both top-level and nested.Before:
After:
#3887
84078d7- BREAKING:Schema.denormalize()is now(input, delegate)insteadof the previous
(input, args, unvisit)3-parameter signature.The new
IDenormalizeDelegateexposes
unvisit,args, and a newargsKey(fn)helper that registersa memoization dimension when output varies with endpoint args. Reading
delegate.argsdirectly does not contribute to cache invalidation —schemas that branch on args must call
argsKey. Thefnreferencedoubles as the cache path key, so it must be referentially stable
— define it on the instance or at module scope, not inline per call:
All built-in schemas (
Array,Object,Values,Union,Query,Invalidate,Lazy,Collection) have been updated. Custom schemasimplementing
SchemaSimplemust update theirdenormalizesignature.Schema.normalize()and thevisit()callback also gain an optionaltrailing
parentEntityargument tracking the nearest enclosingentity-like schema. This is additive — existing schemas don't need
changes unless they want to use it.
#3934
396d163- Move normalizeargsand recursivevisitinto the existing normalize delegate passed to schemas.Custom
Schema.normalize()implementations should migrate fromnormalize(input, parent, key, args, visit, delegate, parentEntity?)tonormalize(input, parent, key, delegate, parentEntity?), then readdelegate.argsand calldelegate.visit()for recursive normalization.Before:
After:
#3887
84078d7- Add Scalar schema for lens-dependent entity fields.Scalarmodels entity fields whose values vary by a runtime "lens" (such as theselected portfolio, currency, or locale). Multiple components can render the
same entity through different lenses simultaneously — each sees the correct
values without the entity itself ever being mutated. Lens-dependent values are
stored in a separate cell table and joined at denormalize time from endpoint
args.
New exports:
Scalar,schema.Scalar.A single
Scalarinstance can serve both as anEntity.schemafield (parententity inferred from the visit) and standalone — inside
Values(Scalar),[Scalar], orCollection([Scalar])— for cheap column-only refreshes(entity bound explicitly via
entity). Cell pks are derived from the map keyor via
Scalar.entityPk(), which defaults toEntity.pk()so custom andcomposite primary keys work with no override:
useSuspense(getCompanies, { portfolio: 'A' })anduseSuspense(getCompanies, { portfolio: 'B' })resolve to differentpct_equity/shareswhile sharing the sameCompanyrow.Scalar.queryKeyenumerates cells in its table for the current lens, soendpoints that use
Scalardirectly as their top-level schema reconstructfrom cache without a network round-trip once the cells are present.
Patch Changes
#3925
6e8e499- Fix cached journey being mutated on repeated result-cache hits.GlobalCache.getResultscalledpaths.shift()on a cache hit, mutatingthe
journeyarray stored by reference on theWeakDependencyMapLinknode. After the first hit stripped the placeholder input slot, every
subsequent hit on the same cached entry would shift off a real
EntityPath, progressively losing subscription entries. This could causemissed
countReftracking (premature GC of still-referenced entities)and incorrect
entityExpiresAtcalculations. The hit path now returns anon-mutating copy.
@data-client/graphql@0.18.0
Minor Changes
#3931
959465a- Allow oneCollectionschema to be used both top-level and nested.Before:
After:
#3887
84078d7- BREAKING:Schema.denormalize()is now(input, delegate)insteadof the previous
(input, args, unvisit)3-parameter signature.The new
IDenormalizeDelegateexposes
unvisit,args, and a newargsKey(fn)helper that registersa memoization dimension when output varies with endpoint args. Reading
delegate.argsdirectly does not contribute to cache invalidation —schemas that branch on args must call
argsKey. Thefnreferencedoubles as the cache path key, so it must be referentially stable
— define it on the instance or at module scope, not inline per call:
All built-in schemas (
Array,Object,Values,Union,Query,Invalidate,Lazy,Collection) have been updated. Custom schemasimplementing
SchemaSimplemust update theirdenormalizesignature.Schema.normalize()and thevisit()callback also gain an optionaltrailing
parentEntityargument tracking the nearest enclosingentity-like schema. This is additive — existing schemas don't need
changes unless they want to use it.
#3887
84078d7- Add Scalar schema for lens-dependent entity fields.Scalarmodels entity fields whose values vary by a runtime "lens" (such as theselected portfolio, currency, or locale). Multiple components can render the
same entity through different lenses simultaneously — each sees the correct
values without the entity itself ever being mutated. Lens-dependent values are
stored in a separate cell table and joined at denormalize time from endpoint
args.
New exports:
Scalar,schema.Scalar.A single
Scalarinstance can serve both as anEntity.schemafield (parententity inferred from the visit) and standalone — inside
Values(Scalar),[Scalar], orCollection([Scalar])— for cheap column-only refreshes(entity bound explicitly via
entity). Cell pks are derived from the map keyor via
Scalar.entityPk(), which defaults toEntity.pk()so custom andcomposite primary keys work with no override:
useSuspense(getCompanies, { portfolio: 'A' })anduseSuspense(getCompanies, { portfolio: 'B' })resolve to differentpct_equity/shareswhile sharing the sameCompanyrow.Scalar.queryKeyenumerates cells in its table for the current lens, soendpoints that use
Scalardirectly as their top-level schema reconstructfrom cache without a network round-trip once the cells are present.
Patch Changes
#3925
6e8e499- Fix cached journey being mutated on repeated result-cache hits.GlobalCache.getResultscalledpaths.shift()on a cache hit, mutatingthe
journeyarray stored by reference on theWeakDependencyMapLinknode. After the first hit stripped the placeholder input slot, every
subsequent hit on the same cached entry would shift off a real
EntityPath, progressively losing subscription entries. This could causemissed
countReftracking (premature GC of still-referenced entities)and incorrect
entityExpiresAtcalculations. The hit path now returns anon-mutating copy.
Updated dependencies [
959465a,84078d7,6e8e499,396d163,84078d7]:@data-client/normalizr@0.18.0
Minor Changes
#3931
959465a- Allow oneCollectionschema to be used both top-level and nested.Before:
After:
#3887
84078d7- BREAKING:Schema.denormalize()is now(input, delegate)insteadof the previous
(input, args, unvisit)3-parameter signature.The new
IDenormalizeDelegateexposes
unvisit,args, and a newargsKey(fn)helper that registersa memoization dimension when output varies with endpoint args. Reading
delegate.argsdirectly does not contribute to cache invalidation —schemas that branch on args must call
argsKey. Thefnreferencedoubles as the cache path key, so it must be referentially stable
— define it on the instance or at module scope, not inline per call:
All built-in schemas (
Array,Object,Values,Union,Query,Invalidate,Lazy,Collection) have been updated. Custom schemasimplementing
SchemaSimplemust update theirdenormalizesignature.Schema.normalize()and thevisit()callback also gain an optionaltrailing
parentEntityargument tracking the nearest enclosingentity-like schema. This is additive — existing schemas don't need
changes unless they want to use it.
#3934
396d163- Move normalizeargsand recursivevisitinto the existing normalize delegate passed to schemas.Custom
Schema.normalize()implementations should migrate fromnormalize(input, parent, key, args, visit, delegate, parentEntity?)tonormalize(input, parent, key, delegate, parentEntity?), then readdelegate.argsand calldelegate.visit()for recursive normalization.Before:
After:
#3887
84078d7- Add Scalar schema for lens-dependent entity fields.Scalarmodels entity fields whose values vary by a runtime "lens" (such as theselected portfolio, currency, or locale). Multiple components can render the
same entity through different lenses simultaneously — each sees the correct
values without the entity itself ever being mutated. Lens-dependent values are
stored in a separate cell table and joined at denormalize time from endpoint
args.
New exports:
Scalar,schema.Scalar.A single
Scalarinstance can serve both as anEntity.schemafield (parententity inferred from the visit) and standalone — inside
Values(Scalar),[Scalar], orCollection([Scalar])— for cheap column-only refreshes(entity bound explicitly via
entity). Cell pks are derived from the map keyor via
Scalar.entityPk(), which defaults toEntity.pk()so custom andcomposite primary keys work with no override:
useSuspense(getCompanies, { portfolio: 'A' })anduseSuspense(getCompanies, { portfolio: 'B' })resolve to differentpct_equity/shareswhile sharing the sameCompanyrow.Scalar.queryKeyenumerates cells in its table for the current lens, soendpoints that use
Scalardirectly as their top-level schema reconstructfrom cache without a network round-trip once the cells are present.
Patch Changes
#3925
6e8e499- Fix cached journey being mutated on repeated result-cache hits.GlobalCache.getResultscalledpaths.shift()on a cache hit, mutatingthe
journeyarray stored by reference on theWeakDependencyMapLinknode. After the first hit stripped the placeholder input slot, every
subsequent hit on the same cached entry would shift off a real
EntityPath, progressively losing subscription entries. This could causemissed
countReftracking (premature GC of still-referenced entities)and incorrect
entityExpiresAtcalculations. The hit path now returns anon-mutating copy.
@data-client/react@0.18.0
Minor Changes
#3931
959465a- Allow oneCollectionschema to be used both top-level and nested.Before:
After:
#3887
84078d7- BREAKING:Schema.denormalize()is now(input, delegate)insteadof the previous
(input, args, unvisit)3-parameter signature.The new
IDenormalizeDelegateexposes
unvisit,args, and a newargsKey(fn)helper that registersa memoization dimension when output varies with endpoint args. Reading
delegate.argsdirectly does not contribute to cache invalidation —schemas that branch on args must call
argsKey. Thefnreferencedoubles as the cache path key, so it must be referentially stable
— define it on the instance or at module scope, not inline per call:
All built-in schemas (
Array,Object,Values,Union,Query,Invalidate,Lazy,Collection) have been updated. Custom schemasimplementing
SchemaSimplemust update theirdenormalizesignature.Schema.normalize()and thevisit()callback also gain an optionaltrailing
parentEntityargument tracking the nearest enclosingentity-like schema. This is additive — existing schemas don't need
changes unless they want to use it.
#3887
84078d7- Add Scalar schema for lens-dependent entity fields.Scalarmodels entity fields whose values vary by a runtime "lens" (such as theselected portfolio, currency, or locale). Multiple components can render the
same entity through different lenses simultaneously — each sees the correct
values without the entity itself ever being mutated. Lens-dependent values are
stored in a separate cell table and joined at denormalize time from endpoint
args.
New exports:
Scalar,schema.Scalar.A single
Scalarinstance can serve both as anEntity.schemafield (parententity inferred from the visit) and standalone — inside
Values(Scalar),[Scalar], orCollection([Scalar])— for cheap column-only refreshes(entity bound explicitly via
entity). Cell pks are derived from the map keyor via
Scalar.entityPk(), which defaults toEntity.pk()so custom andcomposite primary keys work with no override:
useSuspense(getCompanies, { portfolio: 'A' })anduseSuspense(getCompanies, { portfolio: 'B' })resolve to differentpct_equity/shareswhile sharing the sameCompanyrow.Scalar.queryKeyenumerates cells in its table for the current lens, soendpoints that use
Scalardirectly as their top-level schema reconstructfrom cache without a network round-trip once the cells are present.
Patch Changes
#3925
6e8e499- Fix cached journey being mutated on repeated result-cache hits.GlobalCache.getResultscalledpaths.shift()on a cache hit, mutatingthe
journeyarray stored by reference on theWeakDependencyMapLinknode. After the first hit stripped the placeholder input slot, every
subsequent hit on the same cached entry would shift off a real
EntityPath, progressively losing subscription entries. This could causemissed
countReftracking (premature GC of still-referenced entities)and incorrect
entityExpiresAtcalculations. The hit path now returns anon-mutating copy.
Updated dependencies [
959465a,84078d7,6e8e499,84078d7]:@data-client/rest@0.18.0
Minor Changes
#3931
959465a- Allow oneCollectionschema to be used both top-level and nested.Before:
After:
#3887
84078d7- BREAKING:Schema.denormalize()is now(input, delegate)insteadof the previous
(input, args, unvisit)3-parameter signature.The new
IDenormalizeDelegateexposes
unvisit,args, and a newargsKey(fn)helper that registersa memoization dimension when output varies with endpoint args. Reading
delegate.argsdirectly does not contribute to cache invalidation —schemas that branch on args must call
argsKey. Thefnreferencedoubles as the cache path key, so it must be referentially stable
— define it on the instance or at module scope, not inline per call:
All built-in schemas (
Array,Object,Values,Union,Query,Invalidate,Lazy,Collection) have been updated. Custom schemasimplementing
SchemaSimplemust update theirdenormalizesignature.Schema.normalize()and thevisit()callback also gain an optionaltrailing
parentEntityargument tracking the nearest enclosingentity-like schema. This is additive — existing schemas don't need
changes unless they want to use it.
#3887
84078d7- Add Scalar schema for lens-dependent entity fields.Scalarmodels entity fields whose values vary by a runtime "lens" (such as theselected portfolio, currency, or locale). Multiple components can render the
same entity through different lenses simultaneously — each sees the correct
values without the entity itself ever being mutated. Lens-dependent values are
stored in a separate cell table and joined at denormalize time from endpoint
args.
New exports:
Scalar,schema.Scalar.A single
Scalarinstance can serve both as anEntity.schemafield (parententity inferred from the visit) and standalone — inside
Values(Scalar),[Scalar], orCollection([Scalar])— for cheap column-only refreshes(entity bound explicitly via
entity). Cell pks are derived from the map keyor via
Scalar.entityPk(), which defaults toEntity.pk()so custom andcomposite primary keys work with no override:
useSuspense(getCompanies, { portfolio: 'A' })anduseSuspense(getCompanies, { portfolio: 'B' })resolve to differentpct_equity/shareswhile sharing the sameCompanyrow.Scalar.queryKeyenumerates cells in its table for the current lens, soendpoints that use
Scalardirectly as their top-level schema reconstructfrom cache without a network round-trip once the cells are present.
Patch Changes
#3925
6e8e499- Fix cached journey being mutated on repeated result-cache hits.GlobalCache.getResultscalledpaths.shift()on a cache hit, mutatingthe
journeyarray stored by reference on theWeakDependencyMapLinknode. After the first hit stripped the placeholder input slot, every
subsequent hit on the same cached entry would shift off a real
EntityPath, progressively losing subscription entries. This could causemissed
countReftracking (premature GC of still-referenced entities)and incorrect
entityExpiresAtcalculations. The hit path now returns anon-mutating copy.
Updated dependencies [
959465a,84078d7,6e8e499,396d163,84078d7]:@data-client/vue@0.18.0
Minor Changes
#3931
959465a- Allow oneCollectionschema to be used both top-level and nested.Before:
After:
#3887
84078d7- BREAKING:Schema.denormalize()is now(input, delegate)insteadof the previous
(input, args, unvisit)3-parameter signature.The new
IDenormalizeDelegateexposes
unvisit,args, and a newargsKey(fn)helper that registersa memoization dimension when output varies with endpoint args. Reading
delegate.argsdirectly does not contribute to cache invalidation —schemas that branch on args must call
argsKey. Thefnreferencedoubles as the cache path key, so it must be referentially stable
— define it on the instance or at module scope, not inline per call:
All built-in schemas (
Array,Object,Values,Union,Query,Invalidate,Lazy,Collection) have been updated. Custom schemasimplementing
SchemaSimplemust update theirdenormalizesignature.Schema.normalize()and thevisit()callback also gain an optionaltrailing
parentEntityargument tracking the nearest enclosingentity-like schema. This is additive — existing schemas don't need
changes unless they want to use it.
#3887
84078d7- Add Scalar schema for lens-dependent entity fields.Scalarmodels entity fields whose values vary by a runtime "lens" (such as theselected portfolio, currency, or locale). Multiple components can render the
same entity through different lenses simultaneously — each sees the correct
values without the entity itself ever being mutated. Lens-dependent values are
stored in a separate cell table and joined at denormalize time from endpoint
args.
New exports:
Scalar,schema.Scalar.A single
Scalarinstance can serve both as anEntity.schemafield (parententity inferred from the visit) and standalone — inside
Values(Scalar),[Scalar], orCollection([Scalar])— for cheap column-only refreshes(entity bound explicitly via
entity). Cell pks are derived from the map keyor via
Scalar.entityPk(), which defaults toEntity.pk()so custom andcomposite primary keys work with no override:
useSuspense(getCompanies, { portfolio: 'A' })anduseSuspense(getCompanies, { portfolio: 'B' })resolve to differentpct_equity/shareswhile sharing the sameCompanyrow.Scalar.queryKeyenumerates cells in its table for the current lens, soendpoints that use
Scalardirectly as their top-level schema reconstructfrom cache without a network round-trip once the cells are present.
Patch Changes
959465a,84078d7,6e8e499,84078d7]:@data-client/img@0.18.0
Patch Changes
89e06d3- Bump@data-client/reactpeer dependency range to include^0.18.0.Updated dependencies [
959465a,84078d7,6e8e499,396d163,84078d7]:@data-client/test@0.18.0
Patch Changes
89e06d3- Bump@data-client/reactpeer dependency range to include^0.18.0.example-benchmark@0.4.85
Patch Changes
959465a,84078d7,6e8e499,396d163,84078d7]:example-benchmark-react@0.1.10
Patch Changes
959465a,84078d7,6e8e499,396d163,84078d7]:coinbase-lite@0.0.25
Patch Changes
959465a,84078d7,6e8e499,89e06d3,84078d7]:normalizr-github-example@0.1.59
Patch Changes
959465a,84078d7,6e8e499,396d163,84078d7]:normalizr-redux-example@0.1.57
Patch Changes
959465a,84078d7,6e8e499,396d163,84078d7]:normalizr-relationships@0.1.59
Patch Changes
959465a,84078d7,6e8e499,396d163,84078d7]:test-bundlesize@0.1.17
Patch Changes
959465a,84078d7,6e8e499,89e06d3,84078d7]: