Skip to content

Conversation

ntucker
Copy link
Collaborator

@ntucker ntucker commented Feb 24, 2025

BREAKING CHANGE:

  • MemoCache.query() return value changed to {data, paths} like memo.denormalize()
  • data could be INVALID

Motivation

Consistent function signatures; Simpler controller.getQueryMeta() implementation.

Solution

MemoCache.query returns { data, paths } just like denormalize. data could be INVALID

Before

return this.memo.query(schema, args, state);

After

const { data } = this.memo.query(schema, args, state);
return typeof data === 'symbol' ? undefined : (data as any);

Copy link

changeset-bot bot commented Feb 24, 2025

🦋 Changeset detected

Latest commit: d0cf69f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@data-client/normalizr Major
@data-client/core Major
example-benchmark Patch
normalizr-github-example Patch
normalizr-redux-example Patch
normalizr-relationships Patch
@data-client/react Major
@data-client/img Major
@data-client/test Major
test-bundlesize Patch
coinbase-lite Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: d0cf69f Previous: 66e1906 Ratio
normalizeLong 511 ops/sec (±1.30%) 521 ops/sec (±0.20%) 1.02
infer All 9369 ops/sec (±1.58%) 9493 ops/sec (±0.83%) 1.01
denormalizeLong 274 ops/sec (±3.23%) 279 ops/sec (±2.90%) 1.02
denormalizeLong donotcache 992 ops/sec (±0.46%) 1020 ops/sec (±0.32%) 1.03
denormalizeShort donotcache 500x 1405 ops/sec (±0.57%) 1418 ops/sec (±0.29%) 1.01
denormalizeShort 500x 797 ops/sec (±1.95%) 781 ops/sec (±1.90%) 0.98
denormalizeShort 500x withCache 5239 ops/sec (±0.27%) 5444 ops/sec (±0.32%) 1.04
queryShort 500x withCache 2457 ops/sec (±0.59%) 2421 ops/sec (±0.42%) 0.99
denormalizeLong with mixin Entity 267 ops/sec (±2.01%) 259 ops/sec (±2.51%) 0.97
denormalizeLong withCache 6699 ops/sec (±1.63%) 6592 ops/sec (±0.28%) 0.98
denormalizeLong All withCache 8216 ops/sec (±0.30%) 8029 ops/sec (±0.22%) 0.98
denormalizeLong Query-sorted withCache 7599 ops/sec (±1.02%) 7691 ops/sec (±0.62%) 1.01
denormalizeLongAndShort withEntityCacheOnly 1705 ops/sec (±0.61%) 1713 ops/sec (±0.28%) 1.00
getResponse 6140 ops/sec (±1.48%) 6228 ops/sec (±1.14%) 1.01
getResponse (null) 5726147 ops/sec (±0.67%) 5809261 ops/sec (±0.59%) 1.01
getResponse (clear cache) 269 ops/sec (±1.79%) 269 ops/sec (±1.80%) 1
getSmallResponse 2682 ops/sec (±0.16%) 2653 ops/sec (±0.32%) 0.99
getSmallInferredResponse 2049 ops/sec (±1.20%) 2098 ops/sec (±0.16%) 1.02
getResponse Collection 6410 ops/sec (±1.09%) 6769 ops/sec (±0.94%) 1.06
get Collection 6102 ops/sec (±0.46%) 6152 ops/sec (±0.47%) 1.01
get Query-sorted 6592 ops/sec (±2.28%) 6686 ops/sec (±0.28%) 1.01
setLong 518 ops/sec (±0.26%) 524 ops/sec (±0.31%) 1.01
setLongWithMerge 231 ops/sec (±0.27%) 229 ops/sec (±0.38%) 0.99
setLongWithSimpleMerge 245 ops/sec (±0.55%) 243 ops/sec (±0.40%) 0.99
setSmallResponse 500x 919 ops/sec (±0.33%) 918 ops/sec (±0.18%) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@ntucker ntucker force-pushed the master branch 3 times, most recently from 5184d51 to af372b4 Compare February 27, 2025 11:36
@ntucker ntucker force-pushed the master branch 2 times, most recently from 3cb6174 to d085b5e Compare March 10, 2025 10:27
@ntucker ntucker marked this pull request as ready for review April 7, 2025 21:48
Copy link
Contributor

github-actions bot commented Apr 7, 2025

Size Change: 0 B

Total Size: 77.8 kB

ℹ️ View Unchanged
Filename Size
examples/test-bundlesize/dist/App.js 3.42 kB
examples/test-bundlesize/dist/polyfill.js 311 B
examples/test-bundlesize/dist/rdcClient.js 10.2 kB
examples/test-bundlesize/dist/rdcEndpoint.js 5.65 kB
examples/test-bundlesize/dist/react.js 57.5 kB
examples/test-bundlesize/dist/webpack-runtime.js 726 B

compressed-size-action

Copy link

codecov bot commented Apr 7, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.74%. Comparing base (7d8eef9) to head (c47bda2).

Files with missing lines Patch % Lines
packages/core/src/controller/Controller.ts 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3372      +/-   ##
==========================================
- Coverage   98.79%   98.74%   -0.05%     
==========================================
  Files         125      125              
  Lines        2241     2238       -3     
  Branches      459      458       -1     
==========================================
- Hits         2214     2210       -4     
  Misses         13       13              
- Partials       14       15       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ntucker ntucker merged commit 25b153a into master Apr 7, 2025
4 of 5 checks passed
@ntucker ntucker deleted the meta-memo-query branch April 7, 2025 22:12
@github-actions github-actions bot mentioned this pull request Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant