Skip to content

fix(core): Resolve mock fixture types without @data-client/endpoint - #4420

Merged
ntucker merged 2 commits into
masterfrom
claude/project-thread-r5cdz6
Oct 19, 2026
Merged

ntucker merged 2 commits into
masterfrom
claude/project-thread-r5cdz6

Conversation

@ntucker

@ntucker ntucker commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Nathaniel · project thread

Follow-up to #4414, from Codex's review findings there.

Motivation

Before: Fixture and the other fixture types in @data-client/core/mock (re-exported by @data-client/react/mock and @data-client/test) imported EndpointInterface/ResolveType from @data-client/endpoint, which core, react and test don't depend on. A project with only @data-client/react and @data-client/test installed (e.g. pnpm strict) gets Cannot find module '@data-client/endpoint' when type-checking. Separately, #4414 set @data-client/test's react peer floor to ^0.15.0, but @data-client/react 0.15.0–0.15.2 export ./mock without a require condition, so Jest/CommonJS tests fail to load it.

After: core's fixture types import those types from core itself, and the peer floor is ^0.15.3. The v0.19 changeset and migration guide now say 0.15.3.

Solution

  • packages/core/src/mock/fixtureTypes.ts imports from '../index.js', the same types the deleted @data-client/test copy got via @data-client/react.
  • @data-client/test peer @data-client/react: ^0.15.3 || ^0.16.0 || ^0.17.0 || ^0.18.0 (checked on npm: require: ./dist/mock.js first appears in 0.15.3).
  • Regenerated website editor types.

Changeset:

Fix fixture types needing `@data-client/endpoint` installed

`Fixture` and the other fixture types from `@data-client/react/mock`, `@data-client/core/mock` and `@data-client/test` no
longer resolve `@data-client/endpoint`, which those packages don't depend on.

Verified: yarn ci:build:types (no @data-client/endpoint import left in core/lib/mock), core-mock and react tests (460 passed), yarn check:doc-examples react (277 pass), yarn copy:websitetypes.


Generated by Claude Code


Note

Low Risk
Type-only import path change plus a narrower test peer range; runtime behavior is unchanged, but projects on @data-client/react 0.15.0–0.15.2 must upgrade when bumping @data-client/test.

Overview
Fixture types (Fixture, Interceptor, etc.) in @data-client/core/mock (and re-exports from @data-client/react/mock and @data-client/test) now import EndpointInterface and ResolveType from @data-client/normalizr instead of @data-client/endpoint, so type-checking no longer requires a package those libraries do not depend on (e.g. pnpm strict installs of only react + test).

@data-client/test tightens its @data-client/react peer to ^0.15.3, dropping 0.15.0–0.15.2 because ./mock only gets a working require entry in 0.15.3 for Jest/CommonJS. Changesets, the v0.19 migration blog, and agent metadata reflect 0.15.3 instead of 0.15.

The website Playground @data-client/core/mock.d.ts stub is regenerated (duplicate type blocks removed; naming aligned with core).

Reviewed by Cursor Bugbot for commit 6d12492. Bugbot is set up for automated code reviews on this repo. Configure here.

core/mock fixture types imported EndpointInterface and ResolveType from
@data-client/endpoint, which core doesn't depend on; import them from
core itself. Also raise @data-client/test's @data-client/react peer floor
to ^0.15.3, the first release whose /mock subpath loads under CommonJS.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DWrXQsPLEpjGyPxXxv8Yhc
@ntucker ntucker self-assigned this Oct 19, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-19T17:28:59.633040Z 5fa5d5f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@changeset-bot

changeset-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6d12492

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

This PR includes changesets to release 9 packages
Name Type
@data-client/core Minor
@data-client/react Minor
@data-client/test Minor
example-benchmark Patch
example-benchmark-react Patch
@data-client/img Minor
test-bundlesize Patch
coinbase-lite Patch
@data-client/vue Minor

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

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.37%. Comparing base (38acf12) to head (6d12492).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4420   +/-   ##
=======================================
  Coverage   98.37%   98.37%           
=======================================
  Files         161      161           
  Lines        3072     3072           
  Branches      604      604           
=======================================
  Hits         3022     3022           
  Misses         10       10           
  Partials       40       40           

☔ View full report in Codecov by Harness.
📢 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.

… core

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DWrXQsPLEpjGyPxXxv8Yhc
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Docs preview: https://docs-site-pr-4420-data-client.vercel.app

Built from 6d12492 merged into master (this build). English only: this PR doesn't touch translations.

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Benchmark React

Details
Benchmark suite Current: 6d12492 Previous: dc61f24 Ratio
data-client: getlist-100 198.04 ops/s (± 7.8%) 194.19 ops/s (± 7.6%) 0.98
data-client: getlist-500 63.09 ops/s (± 5.0%) 76.92 ops/s (± 4.4%) 1.22
data-client: update-entity 363.76 ops/s (± 8.0%) 555.56 ops/s (± 9.4%) 1.53
data-client: update-user 400 ops/s (± 5.0%) 666.67 ops/s (± 10.7%) 1.67
data-client: getlist-500-sorted 56.67 ops/s (± 7.1%) 74.36 ops/s (± 8.9%) 1.31
data-client: update-entity-sorted 363.76 ops/s (± 9.2%) 513.16 ops/s (± 9.3%) 1.41
data-client: update-entity-multi-view 384.62 ops/s (± 5.6%) 555.56 ops/s (± 8.6%) 1.44
data-client: list-detail-switch-10 16.23 ops/s (± 10.1%) 20.86 ops/s (± 10.3%) 1.29
data-client: update-user-10000 83.68 ops/s (± 8.3%) 111.12 ops/s (± 17.4%) 1.33
data-client: invalidate-and-resolve 50.63 ops/s (± 4.7%) 59.53 ops/s (± 6.0%) 1.18
data-client: unshift-item 285.71 ops/s (± 1.6%) 339.08 ops/s (± 5.4%) 1.19
data-client: delete-item 370.37 ops/s (± 8.9%) 540.94 ops/s (± 12.5%) 1.46
data-client: move-item 212.77 ops/s (± 5.7%) 270.27 ops/s (± 6.1%) 1.27

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Benchmark

Details
Benchmark suite Current: 6d12492 Previous: dc61f24 Ratio
normalizeLong 429 ops/sec (±4.19%) 435 ops/sec (±3.14%) 1.01
normalizeLong Values 389 ops/sec (±1.18%) 399 ops/sec (±0.37%) 1.03
normalizeLong Scalar 371 ops/sec (±3.12%) 360 ops/sec (±3.60%) 0.97
normalizeLong Scalar update 933 ops/sec (±0.25%) 917 ops/sec (±0.51%) 0.98
denormalizeLong 246 ops/sec (±6.21%) 240 ops/sec (±6.45%) 0.98
denormalizeLong Values 230 ops/sec (±4.76%) 229 ops/sec (±3.92%) 1.00
denormalizeLong donotcache 985 ops/sec (±0.97%) 1001 ops/sec (±1.05%) 1.02
denormalizeLong Values donotcache 742 ops/sec (±0.15%) 759 ops/sec (±0.19%) 1.02
denormalizeLong Scalar donotcache 1071 ops/sec (±0.25%) 1032 ops/sec (±0.42%) 0.96
denormalizeShort donotcache 500x 1424 ops/sec (±1.17%) 1425 ops/sec (±0.09%) 1.00
denormalizeShort 500x 659 ops/sec (±6.89%) 652 ops/sec (±7.40%) 0.99
denormalizeShort 500x withCache 6708 ops/sec (±0.32%) 6956 ops/sec (±0.19%) 1.04
queryShort 500x withCache 3259 ops/sec (±3.51%) 3197 ops/sec (±0.20%) 0.98
buildQueryKey All 60489 ops/sec (±1.12%) 60550 ops/sec (±0.52%) 1.00
query All withCache 6384 ops/sec (±2.56%) 6317 ops/sec (±2.28%) 0.99
denormalizeLong with mixin Entity 222 ops/sec (±7.50%) 212 ops/sec (±7.25%) 0.95
denormalizeLong withCache 6748 ops/sec (±0.20%) 6234 ops/sec (±0.26%) 0.92
denormalizeLong withCache (Scalar churn) 6714 ops/sec (±0.88%) 6166 ops/sec (±0.97%) 0.92
denormalizeLong Values withCache 5313 ops/sec (±2.04%) 5263 ops/sec (±1.23%) 0.99
denormalizeLong Scalar withCache 7867 ops/sec (±0.22%) 7781 ops/sec (±0.99%) 0.99
denormalizeLong Scalar update withCache 4108 ops/sec (±0.23%) 4086 ops/sec (±0.31%) 0.99
denormalizeLong All withCache 6537 ops/sec (±0.31%) 6476 ops/sec (±0.31%) 0.99
denormalizeLong Query-sorted withCache 6687 ops/sec (±1.71%) 6562 ops/sec (±1.90%) 0.98
denormalizeLongAndShort withEntityCacheOnly 1699 ops/sec (±0.16%) 1694 ops/sec (±0.25%) 1.00
denormalize bidirectional 50 4648 ops/sec (±10.15%) 4657 ops/sec (±9.10%) 1.00
denormalize bidirectional 50 donotcache 43228 ops/sec (±0.22%) 43131 ops/sec (±0.26%) 1.00
getResponse 4434 ops/sec (±4.41%) 4576 ops/sec (±3.99%) 1.03
getResponse (null) 10182786 ops/sec (±0.81%) 10377281 ops/sec (±0.42%) 1.02
getResponse (clear cache) 209 ops/sec (±6.67%) 207 ops/sec (±7.99%) 0.99
getSmallResponse 3540 ops/sec (±0.24%) 3574 ops/sec (±1.08%) 1.01
getSmallInferredResponse 2865 ops/sec (±0.21%) 2886 ops/sec (±0.19%) 1.01
getResponse Collection 4219 ops/sec (±4.24%) 4408 ops/sec (±4.11%) 1.04
get Collection 2707 ops/sec (±0.21%) 2687 ops/sec (±0.21%) 0.99
get Query-sorted 5034 ops/sec (±1.43%) 5045 ops/sec (±1.71%) 1.00
setLong 424 ops/sec (±0.24%) 442 ops/sec (±0.17%) 1.04
setLongWithMerge 245 ops/sec (±0.99%) 249 ops/sec (±0.64%) 1.02
setLongWithSimpleMerge 264 ops/sec (±0.20%) 269 ops/sec (±0.64%) 1.02
setSmallResponse 500x 921 ops/sec (±1.75%) 905 ops/sec (±1.63%) 0.98
setMany 50x one-per-row 156 ops/sec (±0.33%) 150 ops/sec (±0.83%) 0.96
setMany 50 batch 3631 ops/sec (±2.72%) 3553 ops/sec (±0.54%) 0.98
setMany 500x one-per-row 16.1 ops/sec (±0.41%) 15.13 ops/sec (±0.39%) 0.94
setMany 500 batch 1407 ops/sec (±1.75%) 1429 ops/sec (±0.26%) 1.02

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

@ntucker
ntucker added this pull request to the merge queue Oct 19, 2026
Merged via the queue into master with commit c3b8c54 Oct 19, 2026
38 checks passed
@ntucker
ntucker deleted the claude/project-thread-r5cdz6 branch October 19, 2026 17:52

This branch was successfully deployed

1 active deployment
docs-preview — 6d124921 Deployed Oct 19, 2026 by ntucker via docs deploy #3486
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.

2 participants