Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b811e98
demo: Add cache GC measurement harnesses across Node, browser, and An…
ntucker Jul 19, 2026
194e02f
fix: Collect release Android GC reports without run-as
cursoragent Sep 13, 2026
aa4891e
fix: Ignore comment mentions of run-as in collect-script test
cursoragent Sep 13, 2026
58c04ca
fix: Refuse stale Android GC reports after collect clear
cursoragent Sep 13, 2026
21ac526
docs: Add a non-binding GC design handoff
ntucker Oct 3, 2026
94d1093
pkg: Align benchmark-native React Native to 0.86.2
cursoragent Oct 3, 2026
271e447
docs: Record that the GC handoff branch is rebased on master
cursoragent Oct 3, 2026
bf2217b
fix: Match GC matrix filters on slash-bounded segments
cursoragent Oct 3, 2026
634339e
test(core): Characterize GC deleting entities named by uncounted endp…
ntucker Oct 3, 2026
06108ae
test(react): Characterize GC sweep between consumer commit and countRef
ntucker Oct 3, 2026
648ec62
docs: Record GC characterization test results in handoff
ntucker Oct 3, 2026
db6e2a9
ci: Trim setup workspaces by name instead of index
ntucker Oct 3, 2026
4d3422d
test(react): Wait for refetch render in GC race test on legacy Suspense
ntucker Oct 3, 2026
560b710
test(react): Record the React 17 GC race text separately
cursoragent Oct 3, 2026
8e7c071
Revert "test(react): Record the React 17 GC race text separately"
cursoragent Oct 3, 2026
53ae098
docs: Document local React version testing and defer Android GC calib…
ntucker Oct 3, 2026
5875fd4
docs: Merge GC handoff into a single concise garbage-collection plan
ntucker Oct 3, 2026
079cd14
refactor: Simplify GC benchmark harnesses
ntucker Oct 3, 2026
1f29f85
pkg(benchmark-native): Use root Jest 30, ESLint, and TypeScript toolc…
ntucker Oct 3, 2026
1617e67
refactor(benchmark): Add examples/gc-shared GC fixture and protocol m…
ntucker Oct 3, 2026
9cbee1f
refactor(benchmark): Use examples/gc-shared in the Node GC harness
ntucker Oct 3, 2026
2eb0976
refactor(benchmark-react): Use examples/gc-shared in the browser GC h…
ntucker Oct 3, 2026
247bd39
refactor(benchmark-native): Use examples/gc-shared and one host filte…
ntucker Oct 3, 2026
7e884ab
refactor(benchmark-react): Split browser GC into a dedicated bench:gc…
ntucker Oct 3, 2026
7c3bef2
fix(benchmark): Cover every bundled package in GC build provenance di…
ntucker Oct 3, 2026
1b045d0
ci: Run benchmark workflows when examples/gc-shared changes
ntucker Oct 3, 2026
77f8118
fix: Read adb devices without mapfile on Bash 3.2
cursoragent Oct 5, 2026
162570e
fix(benchmark-native): Stop the app before clearing its report
cursoragent Oct 5, 2026
8e1ab6a
test(benchmark-react): Verify the existing GC manifest first
cursoragent Oct 5, 2026
46ff297
fix(benchmark): Hash the Babel config and Metro lib the builds use
cursoragent Oct 5, 2026
e733cc3
fix(benchmark-native): Count FrameMetrics drops separately from misse…
cursoragent Oct 5, 2026
5cd894c
fix(benchmark-native): Hash the dist files Metro actually bundles
cursoragent Oct 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,7 @@ jobs:
- run:
name: Add examples/* to yarn workspace
command: |
npm pkg delete workspaces[6]
npm pkg delete workspaces[5]
npm pkg delete workspaces[4]
npm pkg delete workspaces[3]
npm pkg delete workspaces[2]
npm pkg delete workspaces[1]
npm pkg set workspaces="$(node -p "JSON.stringify(require('./package.json').workspaces.filter(w => !w.startsWith('examples/') && w !== 'website'))")" --json
npm pkg set 'workspaces[]'='examples/todo-app'
npm pkg set 'workspaces[]'='examples/github-app'
npm pkg set 'workspaces[]'='examples/normalizr-relationships'
Expand Down
2 changes: 1 addition & 1 deletion .cursor/rules/ci-config.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ alwaysApply: false
- `esmodule-types` also runs `examples/todo-app/tsconfig.typetest-libcheck.json` (`skipLibCheck: false`, `types: []`) so errors inside the legacy outputs fail CI, and `esmodule-types-latest` runs it with `--moduleResolution bundler` (TS 7 removed `node`) to cover `lib/`; the other typetests use `skipLibCheck: true`.
- Any change to legacy types building must leave `ts*/` output byte-identical to master (diff it) unless it intentionally changes published types (then add a changeset).
- Never `git fetch --depth` the base branch in the relevance check: a shallow fetch severs the merge base and the three-dot diff fails.
- Changing root `package.json` `workspaces` requires updating the `setup` job's workspace trimming step.
- The `setup` job trims root `workspaces` by name (drops `examples/*` and `website`, keeps the rest). A new workspace outside those is kept in every CircleCI job; update the filter if it should not be.

## GitHub Actions (`.github/workflows/`)

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/benchmark-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'packages/endpoint/src/schemas/**'
- 'packages/normalizr/src/**'
- 'examples/benchmark-react/**'
- 'examples/gc-shared/**'
- '.github/workflows/benchmark-react.yml'
push:
branches:
Expand All @@ -20,6 +21,7 @@ on:
- 'packages/endpoint/src/schemas/**'
- 'packages/normalizr/src/**'
- 'examples/benchmark-react/**'
- 'examples/gc-shared/**'
- '.github/workflows/benchmark-react.yml'

concurrency:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'packages/endpoint/src/schemas/**'
- 'packages/core/src/**'
- 'examples/benchmark/**'
- 'examples/gc-shared/**'
- '.github/workflows/benchmark.yml'
push:
branches:
Expand All @@ -18,6 +19,7 @@ on:
- 'packages/endpoint/src/schemas/**'
- 'packages/core/src/**'
- 'examples/benchmark/**'
- 'examples/gc-shared/**'
- '.github/workflows/benchmark.yml'
permissions:
contents: write
Expand Down
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ Monorepo for `@data-client` high performance npm packages.

**Targeted tests**: `yarn test --selectProjects ReactDOM --testPathPatterns packages/react` (project names: `ReactDOM`, `Node`, `ReactNative`)

**Other React versions** (CI runs `^17`, `^18`, `19.3`): never swap versions in the main checkout. In a throwaway `git worktree`: `yarn install`, `yarn run ci:build:setup`, then the matching `npm pkg delete resolutions.*` + `yarn up ...` lines from the `unit_tests` job in `.circleci/config.yml`, then `yarn test --no-cache ...`. Without `--no-cache`, transforms cached before types were built leave `const enum` members (e.g. `ExpiryStatus.Valid`) undefined; that looks like a version failure but isn't. React 17's legacy Suspense keeps hidden content beside the fallback in `textContent`.

## CI

- **CircleCI** (`.circleci/config.yml`) — PR validation: lint, typecheck, unit tests (React 17/18/native/latest), Node matrix, ESM type checks (TS 4.0–5.3+), browser build.
- **GitHub Actions** (`.github/workflows/`) — release (`changesets`), bundle size PR comments, benchmark regression detection.

Changing root `package.json` `workspaces` requires updating `.circleci/config.yml` (`setup` job) and `.github/workflows/` install steps.
Adding a root `package.json` workspace outside `examples/` or `website` requires updating `.circleci/config.yml` (`setup` job trims by name) and `.github/workflows/` install steps.

## Changesets

Expand Down
18 changes: 18 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,24 @@ export default [
},
},
},
// Node CommonJS: configs, host scripts, and the GC harness shared modules
{
files: [
'**/*.cjs',
'examples/gc-shared/**/*.js',
'examples/benchmark-native/*.config.js',
'examples/benchmark-native/.prettierrc.js',
'examples/benchmark-native/scripts/**',
],
languageOptions: {
sourceType: 'commonjs',
globals: globals.node,
},
rules: {
// `const crypto = require('crypto')` shadows Node's global by design
'no-redeclare': ['error', { builtinGlobals: false }],
},
},
{
files: ['examples/**/*.?(m|c)ts?(x)'],
rules: {
Expand Down
8 changes: 6 additions & 2 deletions examples/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

### Monorepo workspace members

`benchmark`, `benchmark-react`, `test-bundlesize`, `normalizr-*`, `coin-app` — listed in root `package.json` workspaces, managed by yarn. Most use `workspace:*` for `@data-client/*` deps.
`benchmark`, `benchmark-react`, `benchmark-native`, `test-bundlesize`, `normalizr-*`, `coin-app` — listed in root `package.json` workspaces, managed by yarn. Most use `workspace:*` for `@data-client/*` deps. `benchmark-native` (React Native Android) uses the root Jest/ESLint/TypeScript toolchain and is not installed in CI.

### Shared (non-workspace) code

`gc-shared` — CommonJS `.js` + hand-written `.d.ts` shared by the GC harnesses in `benchmark`, `benchmark-react`, and `benchmark-native`. No `package.json` on purpose (see its README); include it in each harness's build-provenance inputs.

### Standalone (StackBlitz demos)

Expand All @@ -22,4 +26,4 @@

## Build Tooling

Most examples use Webpack via `@anansi/webpack-config`. Exceptions: `nextjs` (Next.js), `vue-todo-app` (Vite), `normalizr-*` (Node scripts via `babel-node`).
Most examples use Webpack via `@anansi/webpack-config`. Exceptions: `nextjs` (Next.js), `vue-todo-app` (Vite), `normalizr-*` (Node scripts via `babel-node`), `benchmark-native` (Metro).
85 changes: 85 additions & 0 deletions examples/benchmark-native/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
**/.xcode.env.local

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore
.kotlin/

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ruby / CocoaPods
**/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage

# Local measurement artifacts
/artifacts/
*.hprof

# Generated BuildManifest asset (prepare step); scripts remain tracked
android/app/src/main/assets/build-manifest.json

# Ephemeral local JDK used only for CI-less verification (never commit)
/.jdk/

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
5 changes: 5 additions & 0 deletions examples/benchmark-native/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
arrowParens: 'avoid',
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions examples/benchmark-native/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading
Loading