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

341 commits

Author SHA1 Message Date
Sheraff
a8daacb76f
Merge branch 't3/compiler-rewrite-options-referenced' (route options whose object is used outside the route call are opaque and reported, never silently split) into t3/yuku-compiler-rewrite
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:16:03 +01:00
Sheraff
b2ce6783c4
Merge branch 'main' (pnpm 12, RSC bundler deps security floor, Rsbuild virtual modules build fix, HMR e2e waits for SSR) into t3/yuku-compiler-rewrite
react-start-rsc: main's dependency bumps (@vitejs/plugin-rsc ^0.5.39, react-server-dom-rspack ^0.1.1, peer floors
>=0.5.38 / >=0.1.1) with the PR's @rspack/core peer floor (>=2.2.9) and its compiler-test-utils dev dependency.
pnpm-lock.yaml regenerated with pnpm 12.18.0. virtual-modules.ts: the PR already had main's pathsOf().manifest fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:15:40 +01:00
Sheraff
9dd1aeb0cc
fix(router-plugin): route options whose object other code also names are not read, and reported
When the route options object, or a const of the chain naming it, is
referenced anywhere besides the route call and the chain, the options are
opaque (`options-opaque`): not split, the `deleteNodes` options not
removed, reported. A reference count, no alias analysis (user ruling,
2026-11-12). Before, a write through another name (`const z = a;
z.server = …`) was not seen: the literal's `server` was removed and the
write's server code shipped to the client silently.

Unpins the KNOWN-BUGS row; SPEC J2.8 and the import-protection guide name
the case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 14:36:51 +01:00
Sheraff
d857191f56
fix(start-plugin-core): a Vite build reports two exempt importers whichever way it served the file (design 4 follow-up)
A denied file with real demand (an exempt plain importer, an allowed
import) and an importer the compiler does not read (an exempt pattern
import, a plugin-added import) is served as the build compiled it first.
The shape is now reported under behavior whatever was served, when
something of the file was kept (its surviving mock, or its rendered
code), so the outcome does not depend on the order. Rsbuild builds it
again and serves it real, unreported. The stale watch report (served real,
no demand) stays. The allowed-import row now warns too. Guide, SPEC
J6.11, KNOWN-BUGS, changeset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 01:29:22 +01:00
Sheraff
fabd2addfe
docs(start): importers that disagree, held importers, the Vite dev limit (design 4 closing)
Guide: Pattern Imports says a checked pattern or plugin-added importer
and one needing the file as it is fail the build (R147), with both fixes;
the Vite build race keeps to exempt importers; held importers in watch
builds. Limitations: the Vite dev server keeps a denied file real after
its exempt importer is orphaned or an allowed import removed, until a
restart. KNOWN-BUGS and SPEC J6.11 follow. Changeset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 00:13:45 +01:00
Sheraff
8f027d6bce
fix(start-plugin-core): Vite serves a denied file as its importers ask, or says why not (design 4 step 3)
Dev: after each compile (and the edge index change it made), the denied
files the ledger served otherwise than their importers now ask for go into
the environment's stale set and reloadStaleModules builds them again,
before the compiled module is served. Only when the ledger holds anything.
Build: surviving() takes the build's module ids from a host that cannot
build a module again; a denied file it holds whose served verdict differs
from mismatches() is reported under behavior (R142 (2)), replacing its
other reports (R89's warning, its pattern importers' violations). The
report names the file, the unchecked importers that need it (demanders(),
the one rule selfAllowed reads) and the pattern importer's fix; a watch
rebuild's kept-real file names its importers and the save that fixes it.
Docs: pattern imports aren't covered (R142); the order-dependence and
'fails either way' paragraphs replaced; the Vite build order case listed
with the accepted rejections (KNOWN-BUGS). Pins unpinned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 23:01:06 +01:00
Sheraff
fbdf27daae
docs(start): a second argument to .handler() is outside what the compiler follows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 16:06:29 +01:00
Sheraff
94bb3b3090
docs(start): an import that disables the configured loaders is a deliberate bypass of the compiler
Ruling of review round 3 (F1, R3-G6-5 remainder): a webpack inline-loader
prefix (`!!`, `-!`) on a server-fn module loads it uncompiled, like
`?raw` (M9). Server-functions guide and SPEC say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 08:18:16 +01:00
Sheraff
31bb419225
fix(start-plugin-core): a worker's denied import fails the Rsbuild build with its violation report
A child compiler (a worker or service-worker plugin's) takes the
environment compiler's hook taps but not its virtual files, so a request
of an import-protection module there could not resolve: the build failed
and Rsbuild printed nothing (child compilation errors are not in its
stats). Its normalModuleFactory now turns such a request into the
violations it stands for: reported to onViolation and as errors of the
environment's compilation, at the import, and the request resolves to
nothing. Removes the KNOWN-BUGS row; SPEC J6.3 and the guide say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 08:16:36 +01:00
Sheraff
65ca02fcb4
Merge branch 't3/review3-lane1-security-fixes' (review round 3, lane 1) into t3/yuku-compiler-rewrite
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 01:02:59 +01:00
Sheraff
aec5e4c414
docs(start): the import-protection guide's split example names the client-imported file without .server
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 23:39:41 +01:00
Sheraff
5504665661
fix(start-plugin-core): compile a script imported under a query its bundler ignores
`x.ts?inline` (Vite and Rsbuild) and, on Rsbuild, `x.ts?url` and
`x.ts?sharedworker` are the file's code, but one asset-query set made them
assets: never compiled, so server fn handlers and denied imports shipped.
A script's asset queries are now Vite's (`raw`, `url`, `worker`,
`sharedworker`; `isAssetId` for 'not code'), the Rsbuild host folds the
script queries Rspack ignores out of its ids, and its graph view and witness
look modules up by those ids.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 23:10:49 +01:00
Sheraff
d9f1c3ab75
docs(start): list every Hydrate pattern that fails the build; changesets for lane review3-4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 23:10:36 +01:00
Sheraff
63c1eb97c6
fix(start-plugin-core): fail a Vite build on a wait for a virtual module that never ends
In a Vite build the compiler reads a virtual module's raw text through
this.load, which settles once the module's transforms (Start's compile among
them) are done: a virtual module marked server-only (its own compile reads
its text) or virtual modules importing each other hung the build. Every wait
of a compile on a virtual module's raw facts now goes through an optional
HostServices.awaitVirtual; the Vite build host keeps the waits of compiles of
virtual modules per environment and fails the wait that closes a cycle,
naming the modules (a wait answered from the cache, as in build --watch,
settles before the check). Docs and KNOWN-BUGS updated; changeset for the
lane's fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 16:04:13 +01:00
Manuel Schiller
113b1a1f08
chore(pnpm): upgrade to pnpm 12 (#8912)
* chore(pnpm): upgrade to pnpm 12

* ci: use native pnpm 12 bootstrap for compiler jobs

* fix(benchmarks): invoke the Nx CLI directly

* refactor(benchmarks): run Nx through pnpm exec
2026-11-09 13:24:08 +01:00
Sheraff
53b52cbf20
docs(start): a second .handler() on a finished server fn isn't followed either
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:31:37 +01:00
Sheraff
99fd95c6f4
docs(start): with an exempt importer, a pattern import of a denied file is not guaranteed the mock
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 20:56:09 +01:00
Sheraff
197f51d0b7
Merge import-protection review fixes I2/I3 (I1 dropped, R102.1) 2026-11-08 20:55:39 +01:00
Sheraff
599789d2a1
Merge branch 't3/fix-solid-start-plugin-order' into t3/yuku-compiler-rewrite 2026-11-08 20:44:43 +01:00
Sheraff
694fd2a966
Merge branch 't3/fix-server-fn-barrel-build-break' into t3/yuku-compiler-rewrite 2026-11-08 20:27:37 +01:00
Sheraff
8dbc2152cd
docs(start): a refused server-only call answers HTTP 500 "Server function info not found"
The changeset said 404; the server entry answers 500 with
`Server function info not found for <id>`. Say plainly which apps this
breaks, and that manifest entries now also list their export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:48:15 +01:00
Sheraff
60ad2645d2
fix(start-plugin-core): the Vite plugin order no longer matters for Start
Start's compiler transform is ordered `pre` at the hook level, so it reads
every module before the framework plugins' own `pre` transforms wherever
the app lists `tanstackStart()`. With Start after `vite-plugin-solid`,
Solid's dev hot-update wrapper turned each route component into a call
before the compiler saw it: the dev client kept components in the route
module while SSR split them (hydration mismatch, route edits reloading,
server fn calls failing). main refused that order through router-plugin's
code-splitter check, which Start no longer installs.

Tests: Start listed after the framework plugin, Vite dev (Solid, React,
Vue), Vite build (Solid, React) and Rsbuild dev (Solid): the route splits
in the client, the page hydrates, a route edit applies in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:36:50 +01:00
Sheraff
b0d69d95d1
fix(start-plugin-core): an import another plugin added is reported as such, not as a pattern import
A denied file reached through an import a later plugin's transform added
(an auto-import) was reported as matched by a pattern import, with a
negative-pattern fix that does not apply. When the importer's source has no
pattern import, the report says another plugin added the import and to
configure it; the dev report without an importer and the mock runtime name
that cause too. Docs: imports other plugins add are not judged by import
protection (R92, R102.2); a .server file they reach is still mocked, which a
new Vite/Rsbuild build control checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:18:08 +01:00
Sheraff
bbfc8936dd
docs(start): state the actual Vite, Rsbuild and Rspack floors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 18:54:13 +01:00
Sheraff
a3b22b1801
Merge branch 't3/import-protection-message-fixes' into t3/yuku-compiler-rewrite 2026-11-08 15:48:31 +01:00
Sheraff
766769b4fc
Merge origin/main into compiler-rewrite/yuku
main c156097786: #8858, #8863, #8805, #8269, #8866, #8867, #8868, #8869,
#8870, #8871, #8876, #8888, #8889, #8890, #8892, Version Packages
(#8854, #8891) and docs.

- #8817's side and deletions throughout (Babel compilers, start-compiler,
  add-hmr, start-app.ts, server-fn-id-check.ts, router-utils ast.ts).
  The lines main changed for #8863, #8866, #8868, #8269 and #8889/#8892
  stay #8817's here: their fixes follow as separate commits after the
  tests that reproduce them.
- @rsbuild/core 2.3.1 (#8890) in the catalog, the examples and
  benchmarks/compiler-perf; Start's peers keep #8817's ^2.2.13 floor.
  Lockfile and e2e/react-start/basic's route tree regenerated.
- Tests: main's start-vite-root, start-rsbuild-root, rsbuild
  server-compress and router-plugin production-warnings tests are
  replaced by their ports in the harness (start-build-roots,
  dev-server-config, production-bundle); main's start-dev-restart test
  is ported to the dev-server harness and replaces resolve-entries.test.ts
  (internals). #8817's Rsbuild SPA dev case gives way to main's
  spa-shell e2e. The route HMR `hot` binding test gains main's unsplit
  case (#8870).
- KNOWN-BUGS: main fixed decorators after `export` (#8867) and the
  Rsbuild sibling-route manifest (#8780, #8876).
- Changesets: drop what main ships now (custom server-fn ids, the Rsbuild
  manifest and SPA/compress items, exsolve, Vue store pre-bundling,
  falsy `use` entries, `.ts` route HMR).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:12:53 +01:00
Flo
2ebc0f3586
fix(start-plugin-core): refuse custom server-fn ids that never worked over HTTP, deprecate the rest outside the unreserved set (#8858)
* refactor(start-plugin-core): derive server-fn ids from the stable key, with 22-character defaults

`serverFns.generateFunctionId` now receives the server function's
stable name (`greetUser`) as `functionName` instead of the generated
handler name (`greetUser_createServerFn_handler`). Repeats of the same
variable name in one file get `#1`, `#2`, ...

Default production ids are the first 22 base64url characters of the
SHA256 of `<file>#<stable key>` instead of the full 64-character hex
digest.

Split out of #8817, which derives ids the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(start-plugin-core): keep generateFunctionId's handler-name input, reject custom ids that aren't one URL path segment

Follows #8817's current id contract:

- `generateFunctionId` receives the generated handler name again
  (`greetUser_createServerFn_handler`, `_1`, `_2`… for repeats), with
  characters outside `[A-Za-z0-9_$]` as `_`. The handler export keeps its
  name.
- The default id stays 22 base64url characters of
  `sha256("<root-relative file>#<variable name>")`, `#n` for repeats.
- A custom id outside RFC 3986's unreserved characters and `$` (or `.`,
  `..`, empty) fails the build, naming the file, the function and the id.
- The e2e id maps return to main's keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(start-plugin-core): a repeated server function name loses leading and doubled underscores

The generator's `functionName` for a repeated name goes through the old
increment rule, which strips leading underscores and collapses runs of
underscores (a second `_x` gets `x_createServerFn_handler_1`). Say so,
and pin it with `_x` twice and `café` then `caf_`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(start-plugin-core): names that become equal after the `_` replacement get suffixes too

`café` and `caf_` both give `caf__createServerFn_handler`, so the later
one gets `caf_createServerFn_handler_1`, like a repeated variable name.
Describe the replacement first, then the suffix rule for any resulting
duplicate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(start-plugin-core): keep main's server-fn ids; refuse custom ids that never worked over HTTP

#8817 now prints main's default ids and passes main's functionName to
generateFunctionId, so this reverts the shorter default ids, the
generator-name split and the empty-id failure. What stays is #8817's
custom-id check: an id the URL never carries whole fails the build, one
with other characters outside the unreserved set and $ builds with a
deprecation warning, and the resolver manifest escapes a `'` in an id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 11:42:06 +01:00
Sheraff
80184c3af4
docs(start): import protection guide samples are the printed reports
The samples are a real build's output: the trace starts at the app's router,
the server-side suggestion is <ClientOnly> from how the import is used, the
fourth client suggestion splits the file. Adds the negative-pattern fix of a
pattern import and the Vue SFC form of a client-only component.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 10:10:25 +01:00
Sheraff
a5e5d1bec3
Merge branch 't3/server-fn-main-format-compat' into t3/yuku-compiler-rewrite 2026-11-07 23:06:08 +01:00
Sheraff
bb5ce0279e
docs(start): collision rank, numbered names and percent-encodings; ServerFnMeta.name
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:53:24 +01:00
Sheraff
271ce8c744
docs(start): a builder method the types forbid, such as a second .server(), isn't followed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 19:52:03 +01:00
Sheraff
2a7e42f6f0
docs(start): server-fn ids and metadata keep main's formats; id characters split into error and deprecation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 18:47:04 +01:00
Tanner Linsley
19037cc8c6
docs(start): troubleshoot server and client execution boundaries (#8394) 2026-11-05 21:26:23 -07:00
Tanner Linsley
78001ec0ef
docs(start): troubleshoot Cloudflare deployment config (#8396) 2026-11-05 21:26:13 -07:00
Tanner Linsley
ee7dab26e2
docs(start): record verified Query recipe versions (#8387)
* docs(start): record verified Query recipe versions

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-11-05 21:26:02 -07:00
Sheraff
593fff01c4
fix(start-plugin-core): bundle kits that list Start under dependencies on the Vite server
Start's Vite plugin crawls the app's dependencies with vitefu to bundle
the packages that use Start on the server (ssr.noExternal). Its predicate
only read peerDependencies, so an installed kit listing Start under
dependencies stayed external: Node loaded it uncompiled, its server fns
threw on the server and client calls answered 500. The predicate reads
dependencies too, Start's own packages aside (the resolve.noExternal
patterns bundle them already). Docs: server fns in packages, with
peerDependencies recommended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 01:58:24 +01:00
Sheraff
6c93548141
fix(start-plugin-core): split a Hydrate imported through the app's re-exports
A <Hydrate> imported from an app module re-exporting it (a named
re-export, an imported binding exported again, export *, a namespace
import, chains) deferred hydration but never split: the children's code
loaded with the page. The recognizer now lists Hydrate as a kind of the
React and Solid Start packages (as ClientOnly is), so summaries and the
re-export walk recognise it; start-env ignores the kind. The hydrate
planner's prefetch reads its candidates through Start's value reader,
shared with start-env's prefetch, restricted to app modules (a Vite
server resolves no package it externalises). Boundary ids count every
element imported as Hydrate, so no per-environment resolution shifts
another boundary's id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 01:58:24 +01:00
Sheraff
35aedf618c
fix(start-plugin-core): a custom server function id must be one URL path segment
The client puts a server function's id after the server function base
unencoded and the server reads the path segment back, so an id from a
custom `generateFunctionId` with `/`, `#`, `?`, whitespace, a control or
non-ASCII character silently called another function of the file or
none. The build now fails for an id outside RFC 3986's unreserved
characters and `$` (or `.`/`..`), naming the file, the function and the
id; the docs say what an id may contain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 18:34:17 +01:00
Sheraff
ad5ee67c44
fix(start-plugin-core): generateFunctionId receives the generated handler name again
A custom generator received the compiler's internal key as `functionName`
(`twice#1` for a name a module repeats, `fn@outer/inner` for a nested
server function). An id that embeds it reached the URL unencoded: the
browser dropped `#1` as a fragment and the server cut the id at `/`, so a
call silently ran another server function of the module.

`functionName` is again the handler name earlier versions generated
(`<name>_createServerFn_handler`, `_1`, `_2`… in source order, with the
same increment rules), so custom ids survive the upgrade; characters
outside `[A-Za-z0-9_$]` become `_`. The e2e id maps return to the old keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 18:24:46 +01:00
Sheraff
7503dc8484
feat(start-plugin-core): allowImport decides before the mock, onViolation only reports
allowImport(info) runs during the build, before an import is swapped for its
mock, in dev and build, once per import; true gives the real module, from the
only pass, and the import is no violation. The session owns the decision: the
edge module's state holds the answer, so plans and caches hold none. Hosts ask
at the edge's request (Vite resolveId, Rsbuild edge loader) and after a compile
(dev without an edge module, a module that is its own violation). An allowed
target counts in every environment of its type (RSC: ssr's unchecked importer
of a 'use client' file rsc allowed).

onViolation runs after the build for what survives tree-shaking and returns
nothing; returning false prints what to use instead.

Removed with the second pass: the builder.build patch (closeBundle releases the
environment), needAdditionalPass and its done guard, runToFixedPoint,
discardBundle, onStateChange and verdict.ts. Rsbuild's persistent cache rebuilds
restored edge modules with allowImport set, so a changed answer takes effect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 22:03:47 +01:00
Sheraff
470c3b41cb
fix(router-plugin): route calls the planner doesn't own, followed through a name and warned about
`const f = createFileRoute` is judged like the factory. A call other than the route's own with
options the compiler can't read warns, naming what ships. Options written to after their
declaration are options it can't read. Start's server environments leave the warning to the
client's compile, so a file warns once. Docs, SPEC J2.8, J2.11 and J4.12 and the changeset say
what holds now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:26:24 +01:00
Sheraff
60df64cfd4
docs: SPEC J2.8 and J2.14, the changeset and the guide for route options the compiler can't read
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:02:49 +01:00
Sheraff
4d66cbfa3c
docs: changeset, SPEC J4.5 and J2.11 and the guide for R92
What the compiler follows, what it refuses and what it leaves alone: `import()`,
`require()` and globs of Start values and other plugins' modules aren't followed; a
`.server` file behind a neutral module outside the scope isn't caught.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:19:15 +01:00
Sheraff
804cbfd8f5
docs: changeset, SPEC J4.5 and the import protection guide for the Start compiler's builder escapes
The changeset lists what Start now compiles and what fails the client build;
SPEC J4.5 gains the recognised forms and the failure rule (at the use, and at
the end of a client build for importers of a module exporting a builder).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:37:30 +01:00
Sheraff
8aff746a9e
fix(start-plugin-core): what the coverage review of the denied-file scope found
One file-or-marker verdict for edges, a module's own violation and asset queries
(excludeFiles skips both). A denied file exclude matches is judged too. A virtual
asset is never read back through the host. On Rsbuild only an asset that can be
denied meets the loader, on clients. Docs say what is covered; the asset-query
tests split at the file budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 23:26:57 +01:00
Sheraff
cc69fa8187
fix(start-plugin-core): a denied file is judged wherever it lives, whatever its file type
The scope is about importers: a pattern reaching a file outside it, a plain glob of
a denied data file and Rsbuild's new URL of a text file are mocked and reported, as
main reports them. An app file outside the scope is indexed like an exempt
importer: it keeps the real module of a denied file outside the scope too (J6.7),
and the mock of one inside it (R89).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 23:14:46 +01:00
Sheraff
e66a6706b0
fix(start-plugin-core): what the coverage review of asset queries found
A pitch-only loader on Rsbuild (an asset's bytes are never decoded), a virtual
id keeps its own marker, a rebuilt asset drops its stale verdict, excludeFiles
and marker conflicts as on a compile, a server keeps text and URLs, pure static
asset imports. A hash after an asset query is code (no bundler honours it there).
Pins for the forms still unreported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 22:44:20 +01:00
Sheraff
edc270b7b8
docs(start): a build warns about the accepted import-protection rejections
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:29:42 +01:00
Sheraff
a9d5385edf
docs(start): import protection limitations for unchecked importers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:17:04 +01:00
Sheraff
7728f677c8
fix(start-plugin-core): a denied file a pattern import reaches is mocked and reported
A denied file reached only through an import the compiler does not read
(`import.meta.glob`, a template literal `import()`, Rsbuild's
`import.meta.webpackContext`) ran in the client unreported on every host,
also with the `error` behaviour: the plan judges the imports it reads, and
the bundler expands these after the compile.

Judged from the target's side now: a module that a file rule or its own
marker denies in the environment it is compiled in is its own violation
(each import of it the plan reads is substituted, so an unread import
brought it there). The host serves its mock unless the module is allowed:
an import of it was vetoed, or an exempt importer (`exclude`,
`ignoreImporters`) imports it, whose imports the planner now indexes (it is
compiled before the module it imports). A dev compile reports it then,
naming the module itself; a build decides it on survival like every build
violation (mock first) and names each importer from the bundle's graph.
Rspack's graph view looks through context modules for that.

Main mocked these silently except in Vite builds, and mocked them for
exempt importers too, which keep the real module here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 12:35:56 +01:00