0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
Commit graph

161 commits

Author SHA1 Message Date
Flo
a6337fb98e
bench(memory): stabilize CodSpeed memory benchmarks (#7730)
* bench(memory): stabilize CodSpeed memory benchmarks

Memory flags on PRs were ~85% noise, from two causes:

1. Stale baselines (dominant): the Benchmarks workflow only ran on main
   pushes touching packages/** or benchmarks/**. Main commits outside
   those paths had no CodSpeed run, so PRs were compared against an old
   base run ([^unexpected-base] on every recent codspeed-hq comment; six
   late-June PRs all compared to the same June-23 run). One outlier base
   measurement then replays into every PR until the next eligible push.
   Fix: drop the paths filter for the push trigger + weekly cron backstop.

2. Wall-clock timers racing the single measured run: aborted-requests
   (solid/vue) resolved deferred loader data on 500/750ms timeouts raced
   against abort, and drained cancellation with at most one setTimeout(0);
   streaming-peak staggered deferred sections by milliseconds. Under
   variable runner load and instrumentation slowdown the interleaving —
   and therefore the allocation sequence — differed run to run. Fix:
   count 0ms timers-phase hops (event-loop turns) instead of milliseconds
   everywhere async ordering must be staged, and drain aborts with a
   fixed 8-turn settlement barrier.

Local before/after evidence (8 fresh-process runs per config, CodSpeed V8
determinism flags, idle + CPU-stressed; kernel peak RSS spread):

  aborted-requests/solid idle    11.2MB -> 1.8MB (GC counts bit-identical)
  aborted-requests/solid stress   7.7MB -> 2.5MB
  streaming-peak/solid   idle     6.2MB -> 2.5MB
  request-churn/solid (untouched control): unchanged, confirming harness

streaming-peak/vue keeps ~2% proxy-level variance at any tick count; its
PR flags were the identical -3.2% in all three occurrences, i.e. the
stale-base artifact rather than per-run jitter.

Bench names and workload shapes are unchanged; absolute values will step
once on the CodSpeed dashboard from the removed cross-iteration overlap
(e.g. aborted-requests/solid retained 15.6MB -> 2.5MB per invocation).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* bench(memory): exclude docs/examples/e2e from main benchmark runs, drop cron

paths-ignore instead of no filter: docs/examples/e2e-only pushes cannot
affect benchmark results, and falling back across such a commit is safe
because the previous run's benchmark-relevant code is identical. The
weekly cron backstop is unnecessary for the same reason.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* bench(memory): pin GC between iterations in peak-shape scenarios

A/A runs of the real memory instrument showed the two big-payload peak
scenarios were still unstable with no timers involved: whether V8
collects iteration i's garbage before iteration i+1 allocates its
payload is not reproducible run to run, so the measured peak flipped by
a whole payload (serialization-payload solid: 6.8-9.2 MB across
identical runs; peak-large-page: 3.5-3.7 MB).

Peak scenarios measure the footprint of a single request, not
accumulation, so pin the collection points: settle two event-loop turns
(so trailing renderer/stream teardown is included) and force a GC after
each iteration. Peak then deterministically measures
max(single-request footprint). Churn scenarios are unchanged — their
signal is accumulation, which a forced GC would mask; the README rule
now spells out both sides.

A/A validation (3 identical instrumented runs, solid suite):

  serialization-payload  6.8-9.2 MB  -> 3.5-3.6 MB
  peak-large-page        3.5-3.7 MB  -> 754-757 KB (0.45% spread)
  streaming-peak         38.5-39.5   -> 30.3/30.3/30.3 MB
  churn scenarios        unchanged (aborted-requests 1.4 MB x3)

Absolute values step because cross-iteration garbage no longer inflates
the peak; the new values are the per-request footprint the scenarios
were designed to track.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 21:44:55 +02:00
Flo
8bdb21e062
fix(ci): release workflow OOM increase node max-old-space (#7723) 2026-07-01 22:55:47 +02:00
Flo
7538668f21
ci: bundle-size workdlow outputs its report to stdout (#7677) 2026-06-23 01:19:54 +02:00
Flo
854ac95b0d
benchmark: memory (codspeed) (#7623) 2026-06-14 12:51:10 +02:00
Flo
b80781ede4
fix(benchmarks): run SSR setup imports natively (#7579)
* fix(benchmarks): run SSR setup imports natively

* fix(benchmarks): update codspeed vitest plugin

* fix(benchmarks): avoid SSR CodSpeed setup hooks

* ci: apply automated fixes

* fix(benchmarks): preload SSR handlers before bench

* ci: apply automated fixes

* ensure benchmarks build are NODE_ENV=production

* fail codspeed on error, to avoid future skips like this one

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-07 18:46:47 +02:00
Flo
86b8f9ff47
ci: update all actions (#7506)
* ci: update all actions

* disable package manager cache
2026-05-30 01:11:04 +02:00
Manuel Schiller
31f5684aa2
chore: only run autofix on PRs (#7469) 2026-05-22 00:26:07 +02:00
Birk Skyum
14520e5eb5
ci: align release workflow to query (#7404) 2026-05-15 21:12:35 +02:00
Corbin Crutchley
1f7b3188e2
chore: add CODEOWNERS file (#7394)
* chore: add CODEOWNERS file

* chore: add Nx and NPMRC

* Update .github/CODEOWNERS

---------

Co-authored-by: Nicolas Beaussart <nic.beaussart@gmail.com>
2026-05-14 07:40:56 +02:00
Flo
e16bb6b2c5
ci: zizmor (#7389) 2026-05-14 00:01:57 +02:00
renovate[bot]
bb5f3cc93c
chore(deps): pin dependencies (#7388)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 23:32:33 +10:00
Lachlan Collins
68d5f318e4
ci: add pinGitHubActionDigests (#7387) 2026-05-12 22:51:36 +10:00
Tanner Linsley
5d92d5aea3
Update bundle-size.yml 2026-05-11 16:03:38 -06:00
Tanner Linsley
861870ffb1
Update labeler.yml 2026-05-11 16:02:40 -06:00
Tanner Linsley
3ee179f0d9
Update bundle-size.yml 2026-05-11 16:02:10 -06:00
github-actions[bot]
1de2537bc1 ci: changeset release 2026-05-02 11:56:01 +00:00
Manuel Schiller
5eb6911a20
Revise bug report template for clarity and requirements
Updated the bug report template to clarify the requirements for a reproducer project and modified some labels and descriptions for better clarity.
2026-05-02 13:54:40 +02:00
Sarah Gerrard
f3cd5653ad
fix actions again? (#7252) 2026-04-24 23:58:00 +02:00
Sarah Gerrard
bd01585d3f
update intent workflow (#7244) 2026-04-24 22:28:51 +02:00
Sarah Gerrard
ea78f99646
update intent workflow (#7243) 2026-04-24 01:44:46 +02:00
Birk Skyum
3a32ad6cfb
ci: pnpm changeset pre enter pre (#6964) 2026-03-18 01:38:02 +01:00
Birk Skyum
cd7116b53b
ci: only main branch should have latest tag (#6962) 2026-03-18 01:17:06 +01:00
Lachlan Collins
d296252f73
ci: update github workflows (#6952) 2026-03-17 23:52:11 +11:00
Lachlan Collins
13ef4c2e7c
ci: move changeset-version to shared config (#6944)
* ci: move changeset-version to shared config

* Always comment versions
2026-03-17 14:14:30 +11:00
Tanner Linsley
940151cbed
feat: add @tanstack/intent AI agent skills for Router and Start (#6866)
* feat: add @tanstack/intent AI agent skills for Router and Start

Add SKILL.md files across 11 packages to help AI coding agents generate
correct TanStack Router and Start code. Skills cover common patterns,
API usage, and failure modes that agents frequently get wrong.

Packages with skills:
- router-core (10 skills): core concepts, search/path params, navigation,
  data loading, auth/guards, code splitting, not-found/errors, type safety, SSR
- react-router (3): React bindings, Router+Query composition, migration from React Router
- start-client-core (6): Start setup, server functions, middleware,
  execution model, server routes, deployment
- react-start (2): React Start bindings, migration from Next.js
- virtual-file-routes (1): programmatic route tree building
- router-plugin (1): bundler plugin configuration
- start-server-core (1): server-side runtime
- solid-router (1): Solid bindings
- vue-router (1): Vue bindings
- solid-start (1): Solid Start bindings
- vue-start (1): Vue Start bindings

Each package includes bin/intent.js shim, _artifacts/ metadata, and
@tanstack/intent devDependency.

* fix: address PR review comments on skill files

- Fix incorrect createTanstackRouter → createRouter in router-query examples
- Fix missing React type imports (ComponentPropsWithoutRef, FormEvent)
- Fix hardcoded localhost:3000 in SSR example, use req headers instead
- Fix session.update/clear to use await with data payload
- Fix start-setup → start-core slug mismatch in domain_map + skill_spec
- Make start-client-core skill_tree self-contained (remove react-start refs)
- Add framework-agnostic comments to execution-model and middleware skills
- Make virtual-file-routes vite example framework-agnostic
- Fix solid-router domain_map: Link is primary, createLink for wrappers
- Fix vue-router domain_map: scope Ref unwrapping to script, not templates
- Fix vue-router SKILL.md: tsx → vue fence language for template snippets
- Fix virtual-file-routes domain_map failure mode wording
- Fix MD028 blockquote blank lines across 11 files
- Fix MD040 missing fence languages across 4 files
- Update pnpm-lock.yaml

* fix: address review feedback and audit all 28 skills against source

- Address all 9 Sheraff review comments (ensureQueryData, auth patterns,
  open redirect, useLocation migration, reusable components, zodValidator)
- Address all 11 actionable CodeRabbit comments (naming collisions,
  framework-agnostic comments, missing imports, bin/intent.js error handling)
- Full source-verified audit of all 28 skills across 7 re-audited packages
- Fix solid-start: add HydrationScript, move HeadContent to body, use
  shellComponent pattern
- Fix solid-router: useLoaderDeps returns Accessor<T>, ScrollRestoration
  deprecated, add missing hooks/components
- Fix vue-router: useLinkProps returns LinkHTMLAttributes, useLoaderDeps
  returns Ref<T>, fix split-file convention
- Fix start-server-core: correct file path, server fn prefix, getValidatedQuery
  API, add createServerFn imports to all examples
- Fix router-core skills: preloadStaleTime wording, loader route param,
  error retry pattern, search-params adapter scoping
- All 28 skills pass @tanstack/intent validate

* chore: add changeset for intent skills feature
2026-03-16 16:54:37 -06:00
Birk Skyum
b520b37715
ci: changeset preview workflow (#6937) 2026-03-16 13:02:43 +01:00
Birk Skyum
6d093505fb
ci: skip tests in release workflow when no changesets are present or src file changed (#6930) 2026-03-15 23:33:57 +01:00
Birk Skyum
576b5acd87
chore: tweak prerelease flow (#6906) 2026-03-12 17:37:35 +01:00
Birk Skyum
ab46b5ec42
automatic github releases creation from changeset (#6894) 2026-03-11 20:14:43 +01:00
Birk Skyum
97cee95647
Migrate repo to changesets (#6837) 2026-03-11 00:00:51 +01:00
Flo
b46b2eef67
test: faster benchmark ci (#6834) 2026-03-06 18:10:09 +01:00
Nicolas Beaussart
9f35318c41
chore: ensure no nx cloud is used for benchmark (#6817)
skip nx cache on sub workflows
2026-03-04 01:01:34 +01:00
Flo
33188782e1
test: add cross-framework SSR request-loop benchmarks (#6803) 2026-03-03 10:45:15 +01:00
Flo
1acc8eaf3a
test: add cross-framework client navigation benchmarks (#6800) 2026-03-02 21:23:53 +01:00
Flo
d958ef18d8
fix(ci): harden bundle-size PR workflow trust boundaries (#6773) 2026-02-27 20:12:13 +01:00
Flo
41528ea196
ci: remove fork guard from bundle-size PR comment step (#6728)
ci: allow fork PR bundle-size comments
2026-02-21 22:56:29 +01:00
Flo
b8f166506d
fix(ci): use benchmark-action name input (#6725)
fix(ci): use benchmark action input name
2026-02-21 19:36:23 +01:00
Flo
d8171c3994
feat(benchmarks): add file-based bundle-size suite + PR trend reporting (#6723) 2026-02-21 19:28:30 +01:00
Lachlan Collins
b1b8c9ed99
ci: move pnpm settings to pnpm-workspace.yaml (#6076) 2025-12-12 15:25:17 +11:00
Lachlan Collins
496c9320a2
ci: prepare for trusted publishing (#6032) 2025-12-07 02:02:49 +11:00
Lachlan Collins
a89408affd
chore: sync TanStack repo changes (#4784)
## 🎯 Changes

- Update Prettier and use experimental CLI
- Update Nx to v21
- Fix bug in test exposed by new prettier version
- Sync issues template

## ✅ Checklist

- [x] I have followed the steps listed in the [Contributing
guide](https://github.com/TanStack/config/blob/main/CONTRIBUTING.md).
- [x] I have tested and linted this code locally.
2025-07-26 21:55:38 +10:00
Manuel Schiller
a1d54c40df
chore: don't run autofix on draft PRs (#4722) 2025-07-20 11:55:33 +02:00
Manuel Schiller
4aeaf1cba4
Update bug_report.yml 2025-06-25 21:54:33 +02:00
SeanCassiere
3e2e78dda8
ci: labeler to use pull_request_target 2025-06-21 20:51:18 +12:00
SeanCassiere
96b9ae14ce
ci: go back to the old workflow 2025-06-17 10:04:45 +12:00
SeanCassiere
ac7e4aefa5
ci: use NX Cloud cache instead of github artifacts 2025-06-17 09:55:08 +12:00
SeanCassiere
204344575c
ci: include the llms directory 2025-06-17 09:28:51 +12:00
SeanCassiere
c0607fdfcd
ci: use the correct build workflow output 2025-06-17 09:14:18 +12:00
SeanCassiere
6eb4b2b337
ci: restore CI workflow to last known working state 2025-06-17 08:56:30 +12:00
SeanCassiere
cf6391aeaa
ci: store and restore build artifacts between jobs 2025-06-17 08:42:21 +12:00