Merge main into feat/js-es2017-async-await

This commit is contained in:
dotCooCoo committed 2026-11-28 21:52:55 -08:00
commit 31bb1ae297
95 files changed
+5524 -326

No files matched your search

+67 -12
View File
@@ -2773,12 +2773,12 @@ the included files too.
vectorcraft-cli run --cmd script.check --params '{"path": "Tidy Layers.jsx"}'
```
`script.run {path? | source?, name?, args?, answers?, maxFuel?}` runs a JavaScript file against the open documents.
`script.run {path? | source?, module?, name?, args?, answers?, maxFuel?}` runs a JavaScript file against the open documents.
In an ES2015 realm, `Symbol.for` lookups and insertions take fuel for the key's code units. A registered description
shares the key's existing string buffer.
Block-scoped declaration checks retain one copy of each `var` declaration name through nested blocks.
File › Scripts › Other Script… (Cmd+F12) picks a `.js` or `.jsx` file and runs it the same way; the help page
File › Scripts › Other Script… (Cmd+F12) picks a `.js`, `.mjs` or `.jsx` file and runs it the same way; the help page
https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/install-and-run-scripts.html
describes that menu item. Its warning before the run lists what `script.check` finds the script reaches outside
the document, read without running it: each `outside` category of the report (files it writes, moves or deletes,
@@ -2789,7 +2789,7 @@ says when the script is too large to check, compiled or not a script, when the c
short at its limit. The listing does not stop the run. Run checks the script again, and when the report has changed
since the warning opened, nothing runs and the warning opens again with the new report. A script from the Scripts
folder runs without the warning.
Pass exactly one of `path` and `source`. A `path` must end in `.js` or `.jsx`, in any
Pass exactly one of `path` and `source`. A `path` must end in `.js`, `.mjs` or `.jsx`, in any
case. A `.jsxbin` file or text that starts with `@JSXBIN@` is compiled and ends with an error, as does text that is
not UTF-8. The language is ES5.1, except that identifiers take the characters Unicode's `ID_Start` and
`ID_Continue` properties allow, as later editions define them, and may use `\u{...}` escapes. A `path` that ends in
@@ -2835,6 +2835,8 @@ throws a `TypeError`, since that engine was made without the ECMAScript 2015 bui
an engine that `#targetengine` keeps reads each run the way that run's script does. A
`.jsx` file and a `source` string read ES5.1 only, and the ECMAScript 2015 forms are syntax errors there; there
`yield` is a name like any other. A `.js` file
`.jsx` file and a `source` string read ES5.1 when run as scripts. With `module: true`, they run as modules and
accept the ECMAScript 2015 forms listed here. A
`.js` file also has `Promise` (described below); a `.jsx` file and a script given as `source` do not, except that a
named engine (`#targetengine`) has `Promise` from the first `.js` run that names it and keeps it for every later
run, as it keeps its globals. A `.js` file
@@ -2842,19 +2844,65 @@ also reads two ECMAScript 2020 forms (https://262.ecma-international.org/11.0/):
`f?.(args)`), which give `undefined` and skip the rest of the chain when the value before `?.` is `undefined` or
`null`, and `??`, which evaluates its right side only when its left side is `undefined` or `null`. Mixing `??` with `&&`
or `||` without parentheses, and assigning to an optional chain, are syntax errors. In a `.jsx` file and a `source`
string, `?.` and `??` are syntax errors. Which files read these forms is VectorCraft's own rule. Every script, `.js`,
`.jsx` or `source`, also reads ECMAScript for XML (E4X, ECMA-357, 2nd edition,
string that runs as a script, `?.` and `??` are syntax errors. Which files read these forms is VectorCraft's own rule.
Every script, `.js`, `.jsx` or `source`, also reads ECMAScript for XML (E4X, ECMA-357, 2nd edition,
https://ecma-international.org/publications-and-standards/standards/ecma-357/): XML and XMLList literals, the `..`,
`.@`, `.*`, `.()` and `::` selectors, `for each`, `default xml namespace`, and the global `XML`, `XMLList`,
`Namespace`, `QName`, `isXMLName` and `setDefaultXMLNamespace`, as the XML object pages describe them
(https://extendscript.docsforadobe.dev/integrating-xml/the-xml-object/). A script run from a `.js` file also has
`Promise` (described below); a `.jsx` file and a script given as `source` do not, except that a named engine
(`#targetengine`) has `Promise` from the first `.js` run that names it and keeps it for every later run, as it keeps
(https://extendscript.docsforadobe.dev/integrating-xml/the-xml-object/). A script run from a `.js` file or a module also has
`Promise` (described below); a `.jsx` file and a script given as `source` that runs as a script do not, except that a named engine
(`#targetengine`) has `Promise` from the first `.js` or module run that names it and keeps it for every later run, as it keeps
its globals. An ES5.1 script does not have `Map`, `Set`, `WeakMap`, `WeakSet`, `ArrayBuffer`, `DataView` or the
typed arrays; the JavaScript engine's ECMAScript 2015 mode (`Options::es2015` in `vectorcraft-js`) adds them, as
`docs/target-app-parity.md` describes. The collector retains tagged-template cache entries only while the site's code
is reachable. The script reaches the app through the global object `vc`, and writes to the Script Console and runs
other files through `$`:
`Promise` (described below); a `.jsx` file and a `source` string that runs as a script do not, except that a named engine
(`#targetengine`) has `Promise` from its first `.js` or module run and keeps it for every later run, as it keeps its globals.
A `path` that ends in `.mjs` (in any case) runs as an ECMAScript 2015 module
(https://262.ecma-international.org/6.0/#sec-modules): strict mode code with the forms above (optional chains and `??`
included), and `import` and
`export` declarations at its top level. Module source reserves `await` as an identifier. A module namespace has an
own `Symbol.toStringTag` property with value `"Module"` that is nonwritable, nonenumerable and nonconfigurable.
`import` and `export` are syntax errors in a `.js` or `.jsx` script.
`module` (true or false) chooses this for any `path` or `source`; it defaults to true for a `path` that ends in
`.mjs` and false otherwise. The app passes `module: true` for a `.mjs` file picked on the web, where the script
arrives as `source`. A `source` that runs as a module imports no files: each import ends the run with an error that
names the specifier.
- A specifier is a path relative to the file that imports it. It starts with `./` or `../`, separates names with
`/` and names a `.mjs` or `.js` file, which is read as a module. A bare name such as `'lib'`, a URL, an absolute
path, and a specifier with `\`, `:` or a control character end the run with a `SyntaxError` that names the
specifier.
- Modules are read through the script's own file scope: only from the script's folder and the folders below it.
A specifier whose `..` names lead above the script's folder, and a link that leads out of it, end the run with an
error that names the specifier. A missing file ends the run with an error that names the specifier.
- Every module is read, parsed and linked before any of them runs. A syntax error, a missing or refused file, an
import of a name the module does not export, and an import of a name that two `export *` declarations give from
different modules end the run with no code run, at the file, line and column of the module they are in.
- Each module runs once in a run, after the modules it imports, in the order it imports them. In a cycle of imports
a module does not wait for a module that is still waiting for its own imports, so it can run before that module
has initialized its bindings. Two paths to one file
(a link, `sub/../x.mjs`, or names that differ only in letter case in a Windows folder that ignores case) are one
module, and a module's relative imports are read from the folder the file is in, whichever path reached it first. An import reads
the exporting module's binding each time, so it sees later assignments, and reading it before that module has
initialized it (in a cycle of imports) throws a `ReferenceError`. Assigning to an import throws a `TypeError`.
- `import * as ns` gives a namespace object: not extensible, with no prototype, its export names in code unit order
as properties that cannot be written or deleted, and `[object Module]` from `Object.prototype.toString`.
Export redefinitions use the ECMAScript 2020 rule, which accepts a descriptor only when it leaves the current
export unchanged (https://262.ecma-international.org/11.0/#sec-module-namespace-exotic-objects-defineownproperty-p-desc).
`export *` passes on every name but `default`, and `export * as ns from` passes on a namespace.
- A module's top-level names stay in the module, `this` is `undefined` at its top, it has no preprocessor lines,
and `import()` is a syntax error. `vc`, `$` and the other globals are there as in a script.
- In the host API, `Realm::run_module` drains queued Promise jobs before returning, as sliced module execution does.
`Realm::start_module` and `Realm::run_module` end a paused or waiting run before loading replacement source,
including when that source fails to compile. Existing globals remain available.
- Module files count against the limits of `#include` files: 8 MiB a file, 32 MiB of source in all, 64 files
besides the script, imports 16 deep and 1,024 paths looked up. These limits are VectorCraft's own.
The script reaches the app through the global object `vc`, and writes to the Script Console and runs other files
through `$`:
- `vc.run(id, params)` runs a command and returns its result. A command that fails throws an error the script can
catch. The documents and the session state the command changed, preferences included, go back, and any file it
@@ -2867,8 +2915,12 @@ other files through `$`:
- `app` is the application object the help page https://ai-scripting.docsforadobe.dev/jsobjref/Application/
describes: `app.documents`, `app.activeDocument` (assigning an open document makes it the active one),
`app.selection` (assigning it sets the active document's selection), `app.coordinateSystem`,
`app.redraw()`,
`app.getIsFileOpen(path)` and `app.executeMenuCommand(name)`. `executeMenuCommand` runs the command of a menu item
`app.redraw()`, `app.undo()`, `app.redo()`,
`app.getIsFileOpen(path)` and `app.executeMenuCommand(name)`. `app.redraw()` returns without changing
anything. `app.undo()` and `app.redo()` run `edit.undo` and `edit.redo` in the active document and reach
only the steps the run made; with no such step they change nothing, and with no document open they throw
`No active document` (VectorCraft's own rules). After a run that succeeds, each document that was open
before it, is still open and whose content changed has one new undo step. `executeMenuCommand` runs the command of a menu item
on the active document, as the type definitions at https://www.indesignjs.de/indesignapi/illustrator/illustrator.d.ts
describe the method, and takes these names from the list at
https://community.adobe.com/questions-652/a-list-of-illustrator-menu-commands-we-can-call-from-javascript-769510:
@@ -2904,8 +2956,8 @@ other files through `$`:
`addDocument` checks the ranges of the values. `documentBleedLink`, `documentBleedOffsetRect` and
`transparencyGrid` also take `null` and can be assigned, but `addDocument` throws an error that says they are not available yet when
the preset it is given holds one of them with a value other than `null`, and makes no document. A
`presetSettings` that is not a `DocumentPreset` (a plain object such as `{width: 500}` included) throws a
`TypeError`. A script's `file.new` reads the profile's file in the profiles folder as the person's does, under the
`presetSettings` that is omitted, `undefined` or `null` gives the preset's settings unchanged; any other value
that is not a `DocumentPreset` (a plain object such as `{width: 500}` included) throws a `TypeError`. A script's `file.new` reads the profile's file in the profiles folder as the person's does, under the
automation roots in force; when `file.new` reports a `profileError`, `addDocument` throws an error that names the
profile and the reason, and makes no document. Each warning from reading the profile's file (a color profile in it
that cannot be used, for example) goes to the Script Console as a line `addDocument: <warning>`. A `previewMode` of
@@ -15108,6 +15160,9 @@ The preference `pluginInstructionBudget` (`normal`, the default, or `large`; `pr
sets the instructions every object filter run gets: Large gives a light filter 250 M instructions instead of 50 M,
plus 4,000 per input byte either way, with its 60 s time budget unchanged; a heavy filter keeps its own budget with
either value. The next `plugin.run` or plug-in command uses the value set ([plug-ins](plugins.md#instruction-budget-preference)).
A manifest's `translations` ([plug-ins](plugins.md#translations)) change only the text the app shows: `plugin.list`,
`plugin.info` and plug-in command entries keep the manifest's own names and labels, and `plugin.inspect` and
`plugin.info`'s `manifest` give `translations` as declared.
A plug-in whose manifest lists permissions (`permissions` in its `plugin.inspect` entry, with `needsApproval: true`)
needs a person's approval too, and `plugin.install` refuses `grant: [permission]` from a request. With a desktop
app connected, `ui.installPlugin` opens the approval dialog and returns `{pending: "pluginInstall"}`; `answer_dialog`,
+50 -2
View File
@@ -375,8 +375,8 @@ an importer an import's). Each of its runs gets 1 G instructions (20 times a lig
and 300 s (`vectorcraft_plugins::{HEAVY_FUEL, HEAVY_WALL_TIME_MS}`). Its output can't add to the budget: the host learns
how much there is only once the run has ended.
- **Installing asks first.** Install Plug-in… and File › Open show what the filter asks for, and install it once the
user clicks OK (see [Permissions](#permissions) for who can). `plugin.install` refuses it without `allowHeavy: true`,
- **Installing asks first.** Install Plug-in… and File › Open show what the filter asks for, with its ID and file
SHA-256, and install it once the user clicks OK (see [Permissions](#permissions) for who can). `plugin.install` refuses it without `allowHeavy: true`,
and refuses `allowHeavy` from a request except in a session started with `vectorcraft-cli --allow-plugin-grants`
(`plugin.inspect` shows the budget beforehand). A filter kept in the `Plug-ins` folder was agreed to and is installed
again at startup. The Additional Plug-ins Folder skips heavy filters with a note in its report, since loading a folder
@@ -929,6 +929,7 @@ the module's start function, in a run that isn't a filter's run on a document, o
it): the ids of the commands the filter may [call](#command-calls), at most 256, each once (`"commandAllowlist":
["select.all", "object.move"]`). An id is 1–128 characters from `A-Z a-z 0-9 . _ -` that starts with a letter, with
no empty part between dots. A malformed list is refused when the module is installed, and the error names the id.
- `translations`: the plug-in's text in other languages ([Translations](#translations)).
- `params`: in dialog order. Names are `[A-Za-z0-9_]`, not starting with `_`, and not `id`, `ids`, `params` or
`preview`. The host validates the user's values before calling: missing values take the default, numbers are
clamped to `min..max` (ints rounded), a wrong type or an unknown choice is an error. Numeric defaults are also clamped
@@ -961,6 +962,53 @@ A hidden parameter still goes to the plug-in with its value: what the dialog sho
filter, live-effect and exporter dialogs use all of these keys. The Appearance panel's editor of a plug-in effect's
parameters uses `label`, `unit`, `help`, `visibleWhen` and `widget`, and lists the parameters without sections or
help buttons.
Dialogs and menus show plug-in text with control and bidirectional characters escaped (`\u{202E}`).
#### Translations
`translations` gives the plug-in's text in other languages, keyed by language code. The app shows the text for its
interface language (Preferences › User Interface). Text a language leaves out comes from the same code without its
last part (`pt-BR`, then `pt`; `zh-Hant-TW`, then `zh-Hant`, then `zh`) and then from the manifest's own text. Codes
match without regard to case.
```json
"translations": {
"de": {
"name": "Pfade aufräumen",
"params": {"mode": {"label": "Modus", "help": "Weich rundet die Ecken.", "options": {"soft": "Weich", "hard": "Hart"}}},
"groups": {"Shape": "Form"},
"commands": {"grow": {"label": "Vergrößern", "params": {"by": {"label": "Um"}}}}
},
"pt": {"name": "Arrumar caminhos"},
"pt-BR": {"name": "Organizar caminhos"}
}
```
| Key | What it translates |
|---|---|
| `name` | The plug-in's name in Object › Plug-ins, Effect › Plug-ins, File › Open With, Edit › Keyboard Shortcuts, the command palette, the Appearance panel and dialog headings (1–64 characters). |
| `params` | By parameter name: its `label` (also for a parameter that gives none), `help` (only where the parameter gives one; line breaks allowed) and `options`, the label of each choice by the value it passes (1–64 characters each). |
| `groups` | By the `group` the parameters give: the section's heading. The section stays the same section in every language. |
| `commands` | By command id: its `label` and its parameters' text, as `params` gives it. |
The text is only shown. Command ids, parameter names and choice values are the same in every language, the plug-in
is given the values it declared, and `plugin.list`, `plugin.info` and errors use the manifest's own `name` and labels;
`plugin.inspect` and `plugin.info` give `translations` as declared. The install approval names the plug-in in the UI
language and, when that name is a translation, also shows the manifest's own name under its ID; what the approval
grants is still bound to the ID and file hash it shows.
A manifest gives at most 16 languages, inside its 64 KiB limit. Installing refuses the following, with an error that
names the key (such as `translations.de.params.mode.label`):
- a code that is not a language of 2 or 3 letters followed by parts of 2–8 letters and digits after a `-` (at most 35
characters), or a language given twice;
- text longer than the field it translates allows, empty text, or text with a control character (a line break
outside `help`), a character that changes the direction text runs in (`U+202A`–`U+202E`, `U+2066`–`U+2069`,
`U+200E`, `U+200F`, `U+061C`) or a line or paragraph separator;
- a parameter, choice value, group or command the manifest doesn't declare, `options` on a parameter that isn't a
choice, two options of a choice with the same label, or a key not listed above.
Hosts from before `translations` ignore it and show the manifest's own text.
### Input
+7 -2
View File
@@ -55,6 +55,8 @@ Block-scoped declaration checks keep each `var` declaration name in the current
- Fold Preview orders overlapping coplanar panels by their fold tree, draws distinct planes and crossing panels by depth, and calculates poses relative to the blank's center. Each plane uses one comparison depth, and every member of a plane group must match every other member. A hinge uses its longest line across all split pieces. Tests cover flat, near-flat, nested and offset folds in `crates/three-d/src/fold/tests.rs` and `crates/three-d/src/fold/raster/tests.rs`.
- `addon.packaging.setFoldAngle` stores or resets individual fold angles for editable Crease, Partial Cut, and Perforation lines. The fold commands read those angles, and role queries report their shared value and stored-angle counts. Engine tests cover validation, locked compound members, one-step undo, native save, and SVG exports.
Synchronous module execution through `Realm::run_module` drains queued Promise jobs before returning. Both module entry points end a paused or waiting run before loading new source and preserve existing globals. Module namespaces expose an immutable own `Symbol.toStringTag` property with value `"Module"`, and module source rejects `await` identifiers before dependencies execute. `crates/js/src/module_tests.rs` compares resolution and rejection callbacks with sliced execution and covers paused-script replacement with valid and invalid module source, namespace properties and reserved identifiers.
`vectorcraft-js` ends a paused or waiting run before `Realm::run` or `Realm::start` compiles new source. Its globals remain available. The earlier run's remaining code and queued jobs do not run. Regressions in `crates/js/src/host_tests.rs` cover paused scripts, Promise reactions, waiting host calls, invalid replacement source, and deferred language settings.
Scripts: `Promise.prototype[Symbol.toStringTag]` is `"Promise"` when Symbols are available, with a configurable, non-enumerable, non-writable descriptor. Promise instances report `[object Promise]` in engines without Symbols. Test: `promise_prototype_has_a_configurable_string_tag` in `crates/js/src/promise_tests.rs`.
@@ -1116,6 +1118,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- Synthetic input validates complete gestures before queue mutation: at most 256 drag steps, 16 clicks and 1,024 pending events; up to 64 control requests per frame, with later requests retained for the next frame (#1709).
- The control server writes each reply through a 64 KiB buffer. On Windows 11 it sends the 17 MB `document.inspect` reply of a document with 50,000 objects on one layer to a client over loopback in 0.09 s instead of 34 s.
- Scripts: File › Scripts › Other Script… and `script.run` run a JavaScript file against the open documents as one transaction with one undo step for each changed document. A failed or stopped run puts every document back. `crates/engine/src/tests/script_run.rs`.
- Scripts: `app.undo()` and `app.redo()` undo and redo the edits the run made, and each document open before and after the run that it changed gets one undo step. `crates/engine/src/tests/script_dom.rs`.
- Scripts: `document.textFrames` makes point type, area type and type on a path, and each text frame gives its kind, its contents, its text as text ranges with their characters, words and paragraphs (which can add text), their character attributes (size, leading, tracking, baseline shift, scales, rotation, underline, strikethrough, font) and paragraph attributes (alignment, indents, space before and after), outlines and point and area conversion; `app.textFonts` lists the fonts, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/TextFrameItems/, https://ai-scripting.docsforadobe.dev/jsobjref/TextFrameItem/, https://ai-scripting.docsforadobe.dev/jsobjref/TextRange/ and https://ai-scripting.docsforadobe.dev/jsobjref/TextFonts/ describe them (`docs/mcp.md`). Offsets count UTF-16 units, VectorCraft's own rule. Lines, tab stops and colors are not there yet. `crates/engine/src/tests/script_text.rs`.
- Scripts: `document.characterStyles` and `document.paragraphStyles` add, find, rename, redefine, apply and remove character and paragraph styles, with the Normal styles listed first and kept, and a text range lists the styles its text is in, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/CharacterStyles/, https://ai-scripting.docsforadobe.dev/jsobjref/CharacterStyle/, https://ai-scripting.docsforadobe.dev/jsobjref/ParagraphStyles/, https://ai-scripting.docsforadobe.dev/jsobjref/ParagraphStyle/ and https://ai-scripting.docsforadobe.dev/jsobjref/TextRange/ describe them (`docs/mcp.md`). Style names of 1 to 256 characters without control characters, and at most 4,096 styles named in one run, are VectorCraft's own rules. Load Character Styles, Load Paragraph Styles and Load All Styles refuse a file larger than 64 MB. A paragraph style's character attributes are not there yet. `crates/engine/src/tests/script_styles.rs`.
- Scripts: a text frame's `nextFrame` and `previousFrame` read and set its links to the frames before and after it, `areaText` and `pathText` thread a new frame to a base frame, and `document.stories` lists the stories, each with its frames in thread order and its text across them as one text range with its characters, words and paragraphs, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/TextFrameItem/, https://ai-scripting.docsforadobe.dev/jsobjref/Story/ and https://ai-scripting.docsforadobe.dev/jsobjref/Stories/ describe them; `text.thread.setNeighbor` links or unlinks two frames by id (`docs/mcp.md`). Which links are refused, and how a story is listed and found, are VectorCraft's own rules. `crates/engine/src/tests/script_threads.rs`.
@@ -1186,10 +1189,11 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- `vectorcraft-js` parses JavaScript as ECMAScript 5.1 defines it, with the legacy octal forms, block functions and lenient regular expressions of Annex B, into a syntax tree with source spans. A comma may follow the last argument of a call or `new` expression and the last parameter of a function other than a setter, as ECMAScript 2017 allows (https://tc39.es/ecma262/2017/#sec-left-hand-side-expressions, https://tc39.es/ecma262/2017/#sec-function-definitions); `f(,)` and `f(1,,)` give a `SyntaxError`. It reads the `#target`, `#include` and other preprocessor lines as directives without running them, and a script that breaks the grammar or an early-error rule gives a `SyntaxError` with its line and column. Nesting past the parser's depth limit (`Options::max_depth`, 200 by default) gives a `SyntaxError` instead of exhausting the stack. `cargo xtask test262` fetches the conformance suite at a pinned commit and parses its ES5 tests: 5,411 of 5,418 runs pass (the 7 others use `let` and `const`). This entry covers parsing; the next entry covers running scripts. Tests: `crates/js/src/tests.rs`, `crates/engine/tests/it/js_lexer_vs_scriptcheck.rs`.
- `vectorcraft-js` identifiers, written out or as `\uXXXX` and `\u{...}` escapes, take the characters Unicode's `ID_Start` and `ID_Continue` properties allow (https://www.unicode.org/reports/tr31/), plus `$` and, at the start, `_`, as later ECMAScript editions define them (https://tc39.es/ecma262/#sec-names-and-keywords). `Other_ID_Start` characters such as U+2118 and `Other_ID_Continue` characters such as U+00B7 and the zero width non-joiner and joiner are accepted, and no `Pattern_Syntax` or `Pattern_White_Space` character is. Letter categories come from Unicode 17.0, so U+088F starts an identifier and U+1ACF may follow its first character; characters assigned after Unicode 17.0 are not yet identifier characters. Tests: `crates/js/src/tests.rs` (`identifier_characters_are_unicode_17_id_start_and_id_continue`, which checks every code point, `identifiers_take_the_characters_unicode_17_assigned`, `identifiers_take_the_other_id_start_and_continue_characters`, `identifiers_refuse_pattern_syntax_surrogates_and_bad_escapes`, `no_pattern_syntax_or_white_space_character_is_an_identifier_character`).
- `vectorcraft-js`'s `Realm` runs ECMAScript 5.1 scripts: the parsed script compiles to verified bytecode that a non-recursive interpreter runs, with closures, `this`, `arguments`, `with`, direct and indirect `eval`, `new Function`, `try`/`catch`/`finally`, labeled `break` and `continue`, and `for`-`in` in insertion order, over a mark-and-sweep heap, with the built-ins the next two entries list. Every run is bounded by fuel, heap bytes, frames, nested host calls and an interrupt flag (smaller defaults in the wasm build), and a run that reaches a limit stops with a limit error that `try` cannot catch. `cargo xtask test262` also runs the suite's ES5 language tests that need only the built-ins present: 4,676 of 4,682 runs pass (4 of the others expect the completion values of later editions, and 2 expect a configurable function `length`). The app does not call it yet. Tests: `crates/js/src/interp_tests.rs`, `crates/js/tests/test262.rs`.
- With `Options::es2015`, `vectorcraft-js` also reads and runs these ECMAScript 2015 forms (https://262.ecma-international.org/6.0/): `let` and `const` with block scope and their temporal dead zone (a read or write before the declaration runs throws a `ReferenceError`, and a write to a `const` throws a `TypeError` in any code), a new `let` binding for each iteration of a `for` or `for`-`in` loop, function declarations scoped to their block, arrow functions with the `this` and `arguments` of the code around them and no `prototype`, template literals and tagged templates with one frozen strings object for each site, default and rest parameters with an `arguments` object that does not follow the parameters, and spread in array literals, calls and `new`. Spread uses the iterator protocol (see the `for`-`of` line below). Spread and template objects take fuel for each element and count against the heap limit, and nested arrows and templates count against `Options::max_depth`. `script.run` sets the option for a `.js` file, and `eval`, `Function`, `#include` files and `$.evalFile` read code the way the script does; a `.jsx` file and a `source` string stay ES5.1. Modules are still syntax errors. `cargo xtask test262` reads the suite's tests of these forms without and with the option: when these forms were added, 390 of 390 negative parse runs and 565 of 589 other runs passed with it (373 and 27 without it), and the 24 failing runs expected function `name` properties, a configurable function `length` and the `caller` and `arguments` restrictions. The object-literal line below adds function names and configurable lengths; the `caller` and `arguments` restrictions are still not implemented. Tests: `crates/js/src/es2015_tests.rs`, `crates/js/tests/test262.rs`, `crates/engine/src/tests/script_run.rs`.
- With `Options::es2015`, `vectorcraft-js` also reads and runs these ECMAScript 2015 forms (https://262.ecma-international.org/6.0/): `let` and `const` with block scope and their temporal dead zone (a read or write before the declaration runs throws a `ReferenceError`, and a write to a `const` throws a `TypeError` in any code), a new `let` binding for each iteration of a `for` or `for`-`in` loop, function declarations scoped to their block, arrow functions with the `this` and `arguments` of the code around them and no `prototype`, template literals and tagged templates with one frozen strings object for each site, default and rest parameters with an `arguments` object that does not follow the parameters, and spread in array literals, calls and `new`. Spread uses the iterator protocol (see the `for`-`of` line below). Spread and template objects take fuel for each element and count against the heap limit, and nested arrows and templates count against `Options::max_depth`. `script.run` sets the option for a `.js` file, and `eval`, `Function`, `#include` files and `$.evalFile` read code the way the script does; a `.jsx` file and a `source` string stay ES5.1 when run as scripts. With `module: true`, they run as modules and accept these ECMAScript 2015 forms. `import` and `export` outside a module are syntax errors (the modules entry below). `cargo xtask test262` reads the suite's tests of these forms without and with the option: when these forms were added, 390 of 390 negative parse runs and 565 of 589 other runs passed with it (373 and 27 without it), and the 24 failing runs expected function `name` properties, a configurable function `length` and the `caller` and `arguments` restrictions. The object-literal line below adds function names and configurable lengths; the `caller` and `arguments` restrictions are still not implemented. Tests: `crates/js/src/es2015_tests.rs`, `crates/js/tests/test262.rs`, `crates/engine/src/tests/script_run.rs`.
The collector retains tagged-template cache entries only while the site's code is reachable.
- With `Options::es2015`, `vectorcraft-js` also reads and runs classes (https://262.ecma-international.org/6.0/#sec-class-definitions): declarations, scoped to their block like `let`, and expressions, with `extends`, `static` members, getters and setters, generator methods, and computed method names, Symbols included; class code is strict mode code, methods are not enumerable and cannot be constructed, and calling a class without `new` throws a `TypeError`. A derived constructor's `this` is unusable until `super(…)` returns (a `ReferenceError`), and its own default constructor passes its arguments on. `super.name` and `super[key]` read, call and write through the prototype of the method's home object with `this` as the receiver, in class methods and in methods and accessors written in object literals, which are enumerable, computed names included. A class takes its own name, or the name it is assigned to, and each method takes the name of its key (`get ` or `set ` before an accessor's, a Symbol's description in brackets). `new.target` names the constructor `new` was applied to, in functions and the arrow functions inside them. A class can extend `null`, a function, a class, or the built-in constructors `Object`, `Function`, `Array`, `String`, `Number`, `Boolean`, `RegExp`, `Date` and the error types; a class can name another built-in constructor in `extends`, but `new` on that class throws a `TypeError` when it reaches the built-in constructor, a rule that is VectorCraft's own. Each class and method takes fuel, and deep chains of constructors stop at the frame limit. `new.target` in code given to direct `eval` inside a function, or inside an arrow function within one, reads that function's `new.target`, and outside a function it is a `SyntaxError`; `super` in code given to direct `eval` is not supported yet. `cargo xtask test262` runs the `class`, `super` and `new.target` tests with the other ES2015 forms. Tests: `crates/js/src/es2015_tests.rs`, `crates/js/tests/test262.rs`.
- `Options::es2015` also reads and runs two ECMAScript 2020 forms (https://262.ecma-international.org/11.0/): optional chains (`a?.b`, `a?.[key]`, `f?.(args)` and the accesses and calls after them), which evaluate their base once and give `undefined` without evaluating the rest of the chain when a value before `?.` is `undefined` or `null`, keep the object as `this` for `a?.b()` and `a.b?.()`, make `eval?.(code)` an indirect eval and make `delete a?.b` true when `a` is `undefined` or `null`; and `??`, which keeps any left side other than `undefined` and `null`. `?.` before a digit reads as `?` and a number (`a?.5:1`). Mixing `??` with `&&` or `||` without parentheses, assigning to or updating an optional chain, a tagged template after one and `new a?.b()` are syntax errors. A skipped part of a chain takes no fuel, and a chain of any length compiles without recursion. Using the ECMAScript 2015 option for them, so `.js` files read them and `.jsx` files and `source` strings do not, is VectorCraft's own rule. With the suite's `expressions/optional-chaining` and `expressions/coalesce` tests that need only the forms above, `cargo xtask test262` reads 426 of 426 negative parse runs and 591 of 782 other runs as passing with the option (409 and 27 without it). Of the 191 failing runs, 175 are those the entry above names, and 16 do not parse because the tests also use method definitions, classes, `for`-`of` or `new.target`. Tests: `crates/js/src/es2020_tests.rs`, `crates/js/tests/test262.rs`.
- `vectorcraft-js` runs ECMAScript 2015 modules (https://262.ecma-international.org/6.0/#sec-modules): `parse_module` reads `import` and `export` declarations, with their early errors, and `Realm::start_module` and `Realm::run_module` load a module and the modules it imports through the host, link every import before any module runs, and run each module once, after the modules it imports; in a cycle of imports a module does not wait for a module that is still waiting for its own imports, so it can run before that module has initialized its bindings. An import reads the exporting module's binding each time, and a read before that binding is initialized throws a `ReferenceError`; `import * as ns` gives a namespace object that is not extensible and takes no writes. `export * as ns from` (ECMAScript 2020) is read too; `import()` is a syntax error. Parsing takes fuel for each code unit, and the host bounds how many modules a run loads and how deep its imports go. `script.run` runs a `.mjs` file as a module by default; `module: false` runs it as a script. Any script run with `module: true` runs as a module: specifiers are `./` and `../` paths to `.mjs` and `.js` files, read only in the script's folder and the folders below it through the script's file scope; a bare name or a URL is a `SyntaxError` that names it, and module files count against the limits of `#include` files. File › Scripts lists `.mjs` files and Other Script… opens them, on the web too. `cargo xtask test262` runs the suite's module tests under `test/language/module-code`, `import` and `export` whose feature tags it reads: 232 of 263 pass as modules (154 as scripts). Tests: `crates/js/src/module_tests.rs`, `crates/js/tests/test262.rs`, `crates/engine/src/tests/script_modules.rs`.
- `vectorcraft-js` provides the ECMAScript 5.1 built-ins `Object` with its property-descriptor functions, `create`, `keys`, `seal` and `freeze` (section 15.2), `Function.prototype.bind` (15.3.4.5), `Array` with every ES5 method (15.4), `Boolean`, which converts a value when called and makes a Boolean object with `new` (15.6), the error types (15.11), `Math` (15.8), `JSON` with revivers, replacers and indentation (15.12), and the global functions with Annex B's `escape` and `unescape` (15.1, B.2). The array methods work on array-like objects. A method visits only the indices that exist when its range is longer than 4,096 indices and more than 8 times the properties on the object and its prototypes, so `new Array(4294967295).join("")` ends at once; a shorter range is visited index by index, holes included, and each index takes fuel. `join` writes a cycle back to an array as an empty string, `JSON.stringify` throws a `TypeError` on a cycle, and deep `JSON` nesting uses no native stack. Every loop takes fuel and every result is checked against the heap limit. `cargo xtask test262` runs the suite's ES5 built-in tests that need only these built-ins: 7,000 of 7,070 runs pass (the 35 failing tests expect rules of later editions). It also fetches the `json2.js` polyfill at a pinned commit and checks that its `stringify` and `parse` agree with the built-in `JSON`. Tests: `crates/js/src/builtins_tests.rs`, `crates/js/tests/test262.rs`, `crates/js/tests/json2.rs`.
- `vectorcraft-js` has `String`, `Number`, `RegExp` and `Date` as ECMAScript 5.1 defines them (sections 15.5, 15.7, 15.9 and 15.10, https://262.ecma-international.org/5.1/), with Annex B's `substr`, `getYear`, `setYear` and `toGMTString`. `toFixed`, `toExponential` and `toPrecision` format a number from its exact decimal value, and `toString(radix)` writes any base from 2 to 36. Regular expressions (flags `g`, `i` and `m`) run on a backtracking matcher whose choice points and capture state count against the heap limit and which takes fuel for every step, so a catastrophic pattern stops at the fuel limit and 50,000 nested groups give a `SyntaxError` at the default depth limit. A string method that would build a string past the heap limit stops before it allocates. `Date` reads the clock and time zone the host sets (`Realm::set_clock`, `Realm::set_time_zone`; local time is UTC by default). `cargo xtask test262` runs the suite's `built-ins` tests for the four (https://github.com/tc39/test262): of the runs of the ES5 tests that need only the built-ins present, 1,421 of 1,453 pass for `String`, 304 of 304 for `Number`, 962 of 996 for `RegExp` and 8 of 8 for `Date`. The others expect later editions' rules (built-in functions whose `length` can be deleted, flags given with a RegExp object, a negative `lastIndex`, `RegExp.prototype` as a plain object, and `RegExp.prototype`'s `global`, `ignoreCase` and `multiline` properties that can be deleted). Tests: `crates/js/src/text_tests.rs`, `crates/js/tests/test262.rs`.
- `cargo xtask test262` also reads the suite's Annex B tests (https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), whichever edition they name. It parses the 819 tests under `test/annexB/language` without a feature tag in the modes their flags give, so a `for`-`in` variable with an initializer must parse in sloppy code and give a `SyntaxError` in strict code (682 of 843 runs pass), and it runs those tests and the `test/annexB/built-ins` tests for `String`, `Date`, `RegExp` and `Function` that need only the built-ins present (263 of 667 runs pass for the language tests and 56 of 252 for the built-ins). Failures go to `annexb-parse-failures.txt`, `annexb-language-failures.txt` and `annexb-builtins-failures.txt` beside the suite. A conformance failure does not fail the tests, but an interpreter panic fails `annex_b_runs`, so `cargo xtask test262` exits non-zero. A folder or file the runner cannot read also fails the test that reads it. The runner reads only regular files inside the suite, up to 8 MiB each, and does not follow symbolic links. Tests: `crates/js/tests/test262.rs`.
@@ -1284,7 +1288,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- The status bar translates the plug-in host's other errors (manifest, module and run checks, the output an importer, exporter or effect returns, and the approval a plug-in's permissions need) in every language that translates every message. A JSON object or array inside a message stays as written, and a message that wraps another one, such as `plug-in manifest: {0}`, is matched by its own row before a row that starts with a placeholder. The reasons inside these errors (what is wrong with a parameter's spec or dialog keys, the value a parameter needs, what is wrong with an object, stroke, paint or effect in a plug-in's output) are translated with them, and the untranslated-strings report lists the reasons the plug-in host's error helpers take (`plugin_messages_are_translated_in_every_complete_catalog`, `plugin_errors_translate_with_their_values`, `plugin_error_reasons_are_translated_with_the_error`, `message_scan_reads_plugin_helpers`, `templates_that_start_with_text_match_first`).
- The status bar translates the errors of Object › Plug-ins › Cutting Tools › Banner Hems and Grommets… and the line for a recovery copy that fails in a store with no folder to name (`{saving} failed: {e}`) in every language that translates every message. The untranslated-strings report also lists the messages a status takes from a local variable, such as the recovery folder errors (`banner_and_recovery_messages_are_translated_in_every_complete_catalog`, `message_scan_reads_locals_given_to_a_status`).
- The status bar translates `script.run`'s refusals of `answers` in every language that translates every message: a value that is not a list, more than 10,000 answers, more than 1 MiB, an answer at an index that is not an object, does not have exactly `kind` and `value`, has a `value` its kind of dialog does not take, holds a prompt's text longer than 16 KiB or has an unknown `kind`, and `answers` given to a run in the app. The index, the counts and the code names are shown as they are, and the command's error stays in English. The untranslated-strings report also lists the refusals of `script.run`'s parameters (`script_answers_errors_are_translated`, `message_scan_reads_script_run_param_refusals`).
- The status bar also translates `script.run`'s other refusals of its parameters in every language that translates every message: a `maxFuel` outside 1 to 100,000,000,000, `args` nested more than 64 levels deep (with the place in `args`), `args` that is not an object or is larger than 1 MiB, an empty `path`, a `source` given with `installed`, a `path` that does not name a .js or .jsx file, and neither or both of `path` and `source`. The code names, the place in `args`, the file suffixes and the limits are shown as they are, and the command's error stays in English (`script_run_param_errors_are_translated`).
- The status bar also translates `script.run`'s other refusals of its parameters in every language that translates every message: a `maxFuel` outside 1 to 100,000,000,000, `args` nested more than 64 levels deep (with the place in `args`), `args` that is not an object or is larger than 1 MiB, an empty `path`, a `source` given with `installed`, a `path` that does not name a .js, .mjs or .jsx file, and neither or both of `path` and `source`. The code names, the place in `args`, the file suffixes and the limits are shown as they are, and the command's error stays in English (`script_run_param_errors_are_translated`).
- The Japanese catalog (`crates/ui-egui/src/i18n/ja.tsv`) has 3,562 `@msg` rows and 49 `@msgplural` rows (counted 2026-11-14). The untranslated report (`untranslated_report`) lists 98 status and error messages in the sources that have no Japanese row: 77 that every complete-message language lacks, and 21 more. Open #7211 translates 34 of them, among them the composite font errors, and open #7116 translates the justification order error. The status bar does not use the rows for ``unknown parameter `{within}{key}`; {why}`` and `{name} must be {lo}–{hi}{unit} (got {v})`, because a message with two placeholders in a row cannot be matched (`Template::parse` in `crates/ui-egui/src/i18n/catalog.rs`). A native speaker has not reviewed the wording.
- A status or error message whose braces are literal, such as a plug-in's `expected {"objects": [...]}` or a command's `quotes must be {double?, single?}`, is translated only when the whole message matches its row: the row writes those braces doubled and has no placeholder, so it no longer replaces a different message that starts with the same words, such as a JSON reason `expected value at line 1 column 1`, which stays in English. A row without placeholders is found at any message length (`plain_message_keys_double_their_braces`, `literal_brace_rows_match_only_their_message`).
- Every complete-message catalog translates five more messages with literal braces through such a row: the composite font errors `each font must be {name, parts}` and `give fonts: [{name, parts}…]`, `select.font`'s `` `scope` must be "document", {artboards: [index, …]} or {layers: [id, …]} ``, the script regular expression error `numbers out of order in {} quantifier` and `the paint is not a freeform gradient (apply one with paint.editGradient {kind: "freeform"})`. Each translation keeps the braced example as written, and no catalog keeps the older rows with a placeholder in place of the braces, which also translated other text with the same start and end (`literal_brace_messages_have_exact_rows_in_complete_languages`).
@@ -2822,6 +2826,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- **Plug-in parameters as their manifest presents them (G17):** each parameter may have a `label`, a `unit` shown after its value, `help` on its label and a `helpUrl` page opened from a button, a `group` (sections that fold, after the parameters outside any group) and a `visibleWhen` that shows it only while the checkboxes and choices it names have one of the listed values (a hidden parameter still goes to the plug-in). `string` and `numberList` parameters join number, int, bool and choice, and a plug-in declares up to 256 parameters, at most 64 outside groups. The filter, live-effect and exporter dialogs use these keys, and the Appearance panel's effect editor the labels, units, help and conditions; hosts from before them ignore them. Regressions: `crates/plugins/src/dialog.rs`, `crates/plugins/src/manifest.rs`, `crates/ui-egui/src/dialogs/tests_plugin_fields.rs`, `crates/ui-egui/src/panels/appearance.rs`. Scores and hours unchanged.
- **Plug-in int parameters as sliders (G17):** an `int` parameter with `"widget": "slider"` shows a slider over its range with its number field, in the filter, live-effect and exporter dialogs and in the Appearance panel's effect editor; the manifest is refused at install when the parameter cannot have one. Regressions: `crates/plugins/src/dialog.rs`, `crates/ui-egui/src/dialogs/tests_plugin_fields.rs`. Scores and hours unchanged.
- **Plug-in text in the UI language:** a manifest's `translations` give the plug-in's name, its commands' labels, its parameters' labels, help and choice labels, and its group headings in up to 16 languages, by language code (`de`, `pt-BR`). Object › Plug-ins, Effect › Plug-ins, File › Open With, Edit › Keyboard Shortcuts, the command palette, the plug-in dialogs and the Appearance panel show the text for the UI language, then for the language without its region (`pt-br`, then `pt`), then the manifest's own; command ids, parameter names, choice values and `plugin.list` keep the manifest's own text, and the install approval shows the manifest's own name under the ID when the name it asks with is a translation. An unknown code, a repeated language, text a source field couldn't hold, a control, direction or line-separator character, or a key the manifest doesn't declare is refused at install with an error naming the key, inside the 64 KiB manifest limit. Filter and importer menu items and plug-in dialog labels, help, groups and choices now escape bidirectional characters as command labels already did, and so does the refusal of a heavy filter. Regressions: `crates/plugins/src/translations.rs`, `crates/ui-egui/src/tests/plugins.rs`, `crates/ui-egui/src/dialogs/tests.rs`, `crates/engine/src/tests/plugins.rs`. Scores and hours unchanged.
- **Live-effect plug-ins read their object's paints (G17):** a live effect is given the object's `fills` and `strokes` as a filter gets them, read only, and `_context.item` (`"object"`, or the fill or stroke whose own effects hold it); the result is cached by paint too, so a change of paint runs it again. Regressions: `crates/engine/src/tests/plugins.rs`, `crates/plugins/src/effect.rs`. Scores and hours unchanged.
- **Live-effect plug-ins before a fill's or stroke's own 3D effect:** a live effect listed before a fill's or stroke's own Extrude & Bevel, Inflate or Rotate effect is given `_context.item` for that fill or stroke (`{"fill": i}` or `{"stroke": i}`), not `"object"`, in the drawn art, in the 3D meshes and in Expand as Wireframes; a deferred stage there is listed at that fill's or stroke's place. Regressions: `crates/effects/src/tests/solidcontext.rs`. Scores and hours unchanged.
- **Filter plug-ins set effects and stroke styles (G17):** a filter is given each object's effect records and its strokes' `join`, `cap` and `miterLimit`, and may return them; the records are admitted as `effect.apply` admits them (a known effect or installed live-effect plug-in, parameters it takes, one 3D effect that fits, no texture read from a file), and one refused refuses the output. Regressions: `crates/engine/src/tests/plugins.rs`, `crates/plugins/src/objects/tests.rs`. Scores and hours unchanged.