Commit Graph
77 Commits
Author SHA1 Message Date
BFlat e047eda07d Merge pull request #2095 from Plastic-time/bugfix/r3.12-js-await-sequence-import
Follow-up to #2083, which stopped an unawaited `import("x")` being taken for the module itself. Bundled code often writes the awaited form as `await (0, import("x"))`, and that shape was no longer recognised, so calls on the module it loads weren't recorded. An awaited comma sequence that ends in a dynamic import is the module again; the same sequence without `await` still isn't.
2026-11-18 15:27:48 +07:00
BFlat a955c188fb Merge pull request #2094 from Plastic-time/bugfix/r3.12-js-recover-trailing-dots-and-ext-case
Windows drops a dot at the end of a file or folder name, so `pkg./a.js` and `pkg/a.js`, or a host written `ex.test.` and `ex.test`, were planned as two files and written as one, and the second was refused. Dots at the end of each part of a path are now removed before names are compared, as dots at the start already were. A module id ending in an upper-case extension (`src/App.TSX`) also keeps it, where `.js` used to be added after it.
2026-11-18 14:58:22 +07:00
RRFZ 3238242472 Add await-sequence 23/24 depth-cap boundary regression tests 2026-11-18 02:52:30 -05:00
RRFZ d2078af0e2 Align sequence-await depth cap and expand regression cases 2026-11-18 02:40:25 -05:00
RRFZ 2d856f34a8 Preserve module identity for awaited sequence dynamic imports 2026-11-18 02:23:20 -05:00
BFlat f6c6543713 Merge pull request #2089 from Plastic-time/bugfix/r3.12-js-fallback-caps-and-truncation
When a script can't be parsed, a simpler reader lists what it can from the script's words. It listed the address of a `fetch("https://…")` call twice and repeated an address for every time it was written; it stopped noticing addresses at all after 4,000 other strings; and when its lists of strings, IPC uses or exposed names were full it dropped the rest without saying so. Each address is now listed once, addresses are found however many strings came first, and a list that was cut is named as cut.
2026-11-18 13:53:12 +07:00
RRFZ 5dc919fd74 Strip trailing dots from recovered module and web-script segments and match known module extensions case-insensitively (R3.12) 2026-11-18 01:46:44 -05:00
RRFZ 6ac0c21454 Align JavaScript lexer-fallback list caps, URL deduplication, and truncation reporting with syntax-tree pass (R3.12) 2026-11-18 01:14:09 -05:00
BFlat 4a66500304 Merge pull request #2083 from Plastic-time/bugfix/r3.12-js-cooked-template-literals
A backtick string with no `${}` in it is a plain string, but several readers took its text as written in the source, escapes and all, or ignored it: ``require(`node\x3afs`)`` was recorded as that spelling, not `node:fs`, and a route, a preload setting or a bundle's module id written with backticks was missed. One helper now reads a quoted string or such a template by its value everywhere a string is expected. A template with an invalid escape, which is a syntax error unless tagged, is no longer reported as text.
2026-11-18 12:57:03 +07:00
RRFZ fcab76652f Reject unawaited dynamic import promises in expr_ref 2026-11-18 00:21:31 -05:00
RRFZ 2fe195c2c5 Exclude unawaited import promises from module aliases and skip tagged webpackChunk markers 2026-11-17 23:54:55 -05:00
RRFZ 2dbed823bc Normalize ancestor directory segments and cover closed Hangul syllables 2026-11-17 23:53:02 -05:00
RRFZ 1904af648c Share full case-folded path and parent-directory collision keys across JS recovery and web script layout (R3.13) 2026-11-17 23:18:44 -05:00
RRFZ ee4219a80d Read cooked template-literal values across JavaScript fact and bundle extraction (R3.12) 2026-11-17 22:37:16 -05:00
RRFZ b866bf95ec Fold single-codepoint lowercase before uppercase in module_path_key for Kelvin and Angstrom signs 2026-11-17 22:09:55 -05:00
RRFZ 9afff41393 Fold single-codepoint uppercase in module_path_key so final sigma collides with sigma 2026-11-17 21:42:28 -05:00
RRFZ d84ec9e412 Deduplicate recovered JS module paths case-insensitively (R3.12) 2026-11-17 21:19:20 -05:00
BFlat f63ff7b304 Merge pull request #2065 from Plastic-time/bugfix/r3.12-js-recover-module-paths
When two modules recovered from a bundle had the same path, the second was renamed with a `.js` ending whatever it was, so a duplicate `.ts`, `.css` or `.json` module came out as `.js`; the copy now keeps its own extension. A module id is also stripped of at most one `webpack://`, `webpack:` or `file://` prefix instead of every repeated one.
2026-11-18 08:46:22 +07:00
RRFZ a59bb0211b Keep chained scheme segments while skipping Windows drive prefixes 2026-11-17 20:18:05 -05:00
RRFZ f07d131102 Merge remote-tracking branch 'origin/main' into bugfix/r3.12-js-reassigned-const-aliases
# Conflicts:
#	docs/STATUS.md
2026-11-17 20:07:36 -05:00
RRFZ 202b523b4a Strip single scheme prefix and preserve extensions in recovered JS module paths 2026-11-17 19:38:43 -05:00
RRFZ cd9972da18 Address CodeRabbit review comments on FactVisitor alias and conditional write invalidation 2026-11-17 19:13:00 -05:00
RRFZ 4b8a89959e Update or invalidate tracked JavaScript constants and module aliases on reassignment (R3.12) 2026-11-17 18:48:23 -05:00
RRFZ 490835d445 Skip GraphQL trivia after @ before directive names 2026-11-17 18:12:14 -05:00
RRFZ d1cee511e3 Keep GraphQL operations after braceless SDL definitions and descriptions (R3.12) 2026-11-17 16:40:34 -05:00
RRFZ b259436c53 Honor legacy HTML script language when type is absent (R3.12) 2026-11-16 23:35:26 -05:00
BFlat 6f07bad8c4 Merge pull request #2003 from Plastic-time/bugfix/r3.12-html-exact-module-keyword
A script whose type was the module keyword with spaces around it was listed as a classic script, and a whitespace-only type was listed too, although browsers run neither. The keyword and the empty attribute are now matched exactly, before the whitespace trimming that classic script types get. Checked in a Chromium 156 page: padded and tab-prefixed module types and a whitespace-only type did not run.
2026-11-17 11:16:02 +07:00
RRFZ ecb83e9350 Honor the exact HTML module script keyword (R3.12) 2026-11-16 22:49:33 -05:00
RRFZ 8b6a701b16 Keep all declared HTML meta security policies (R3.13) 2026-11-16 22:49:32 -05:00
BFlat a3fc0056d3 Merge pull request #1992 from Plastic-time/bugfix/r3.12-dynamic-import-options
On the lexer fallback, `import("./data.json", { with: { type: "json" } })` lost its dependency, because only a closing parenthesis was accepted after the path. A comma after a dynamic import's literal path is now accepted, and a method called `import` on an object is no longer taken for one.
2026-11-17 10:32:27 +07:00
RRFZ 358b15abc6 Keep dynamic import specifiers with options in lexer fallback (R3.12) 2026-11-16 22:07:01 -05:00
RRFZ 4d132b7b0a Ignore incomplete start tags in HTML page inventories (R3.13) 2026-11-16 22:07:00 -05:00
BFlat cd4ecad585 Merge pull request #1982 from Plastic-time/bugfix/r3.12-graphql-string-line-breaks
The operation reader accepted a raw CR inside a regular quoted GraphQL string, and a raw line break after a backslash, both invalid GraphQL. Both line terminators are now checked before an escape is processed; block strings keep their multi-line grammar.
2026-11-17 08:23:59 +07:00
RRFZ 5d83a84b26 Refuse raw line breaks in quoted GraphQL strings (R3.12) 2026-11-16 19:59:04 -05:00
RRFZ 6f0a6f4677 Keep bogus HTML comments out of script inventories (R3.13) 2026-11-16 19:59:02 -05:00
BFlat 9437e05641 Merge pull request #1977 from Plastic-time/bugfix/r3.13-html-comment-endings
Browsers also close a comment at `--!>`, `<!-->` and `<!--->`. The scanner looked only for `-->`, so it missed scripts and preloads after such a comment. It now resumes at the first ending a browser recognises, and still hides what is inside ordinary and unfinished comments.
2026-11-17 07:38:10 +07:00
RRFZ 30172fd238 Keep scripts after an HTML comment closed by the browser (R3.13) 2026-11-16 19:00:03 -05:00
RRFZ 4d39d020f7 Keep escaped triple quotes inside GraphQL block strings (R3.12) 2026-11-16 19:00:01 -05:00
BFlat e70b577550 Merge pull request #1956 from Plastic-time/bugfix/r3.12-with-void-1116
Recovering `with ({undefined: 42}) { result = void 0; }` rewrote `void 0` to `undefined`, which the `with` object can supply, changing the result. Files containing a `with` statement keep their `void` expressions; other rewrites stay on.
2026-11-16 21:28:55 +07:00
BFlat 62f120294c Merge pull request #1955 from Plastic-time/bugfix/r3.12-trpc-calls-1116
The lexer fallback reported `const hook = trpc.users.list.useQuery` as a client call although it only reads a property. An opening call parenthesis (or an optional call) is now required.
2026-11-16 21:28:49 +07:00
BFlat 36c3325e4b Merge pull request #1954 from Plastic-time/bugfix/r3.12-string-escapes-1116
The lexer fallback read `require("./\141pp.js")` as a different module path and mis-decoded zero-padded braced Unicode escapes. Legacy octal escapes, every escaped line terminator and braced escapes of any length are now decoded, with checked arithmetic.
2026-11-16 21:28:42 +07:00
BFlat 99fd4a56c3 Merge pull request #1953 from Plastic-time/bugfix/r3.12-graphql-comments-1116
A comment between an operation keyword and its name hid the name, and a parenthesis inside a header comment could hide the whole operation. Comments and ignored separators are now skipped before header tokens are read.
2026-11-16 21:28:36 +07:00
RRFZ d9ebf8adb8 Preserve void expressions around dynamic with scopes (R3.12) 2026-11-16 09:03:52 -05:00
RRFZ b849f1fbc7 Require a call before reporting a fallback tRPC operation (R3.12) 2026-11-16 09:03:07 -05:00
RRFZ d0c2b514d6 Decode JavaScript legacy escapes and line continuations (R3.12) 2026-11-16 09:02:23 -05:00
RRFZ 03f022e398 Skip comments in GraphQL operation headers (R3.12) 2026-11-16 09:01:38 -05:00
RRFZ a2cb128815 Reject unsupported HTML script type suffixes (R3.12) 2026-11-16 09:00:47 -05:00
RRFZ 72af4d7676 Correct JavaScript lines facts (R3.12) 2026-11-15 14:28:05 -05:00
RRFZ ad9b1c74d1 Keep side-effect imports in JavaScript lexer fallback (R3.12) (#1915)
The lexer fallback, used for sources too large or too deep to parse, dropped side-effect imports such as import "./polyfill.js", which the syntax-tree path records. A string straight after the import keyword is now recorded as a static dependency with its location. Every fallback import goes through one helper that marks the list truncated past its cap and records a .node specifier as a native module, as the syntax-tree pass does.
2026-11-16 00:34:26 +07:00
RRFZ fd9832c7a6 Preserve scoped package names in JavaScript banners (R3.12) (#1916)
A banner such as /*! @scope/pkg@1.2.3 */ was recorded as package pkg, losing its scope. A word that starts with @ now keeps its slash, so @scope/pkg@1.2.3 and @scope/pkg v1.2.3 keep the full name; every other word is still split on slashes, so a banner that names a package by its URL reads as before.
2026-11-16 00:27:48 +07:00