11586 Commits

Author SHA1 Message Date
.CooCoo d0d73ff553 Merge pull request #9131 from dotCooCoo/feat/js-es2017-async-await
JavaScript: .js scripts run async functions and await
2026-12-02 11:37:17 -08:00
.CooCoo e25243aeb4 Merge pull request #9135 from dotCooCoo/feat/js-es2015-proxy-reflect
JavaScript: ES2015 realms have Proxy and Reflect
2026-12-02 11:15:55 -08:00
.CooCoo 5cfc4cf100 Merge pull request #9041 from dotCooCoo/feat/scripts-api-d2-paths-colors
Scripts: documents give scripts their paths, path points and colors
2026-12-02 11:15:31 -08:00
.CooCoo dcb7085b2a Merge pull request #9139 from dotCooCoo/feat/plugin-api-events
Plug-ins: react to selection, layer, open and save events
2026-12-02 11:15:23 -08:00
.CooCoo 5d22b25bb7 Merge pull request #10333 from dotCooCoo/fix/script-new-document-overprint-links
Scripts: file.new takes Overprint Preview and reads the profile's linked files
2026-12-02 11:15:14 -08:00
.CooCoo 0a14ee1d23 Merge pull request #10363 from dotCooCoo/fix/close-native-range
Scripts: close with SaveOptions.SAVECHANGES saves a native file whose last save named a range
2026-12-02 11:15:06 -08:00
.CooCoo 942cfbdfd9 Merge pull request #10582 from dotCooCoo/fix/for-in-fresh-prototype-proxy
Scripts: for-in visits a name when a getPrototypeOf trap returns a new proxy each time
2026-12-02 11:14:59 -08:00
.CooCoo 9fe1d7ecfb Merge pull request #10586 from dotCooCoo/fix/script-back-document-bounds
Scripts: geometry read from a document in the back matches what the setters measure
2026-12-02 11:14:48 -08:00
.CooCoo d22a7330e1 Merge pull request #10589 from dotCooCoo/fix/pg9087-2
Scripts: a script chosen after the startup scripts may print to a printer
2026-12-02 11:09:18 -08:00
.CooCoo 491d1324cf Merge pull request #10572 from dotCooCoo/fix/pg9087-3
Print: maxPages turns a job away before raster effects are flattened
2026-12-02 11:09:01 -08:00
.CooCoo 1d829ef718 Merge pull request #10569 from dotCooCoo/fix/pg9087-4
Print: Document.print throws for CUSTOMPROFILE without a profile name
2026-12-02 11:08:31 -08:00
dotCooCoo c0b4413a5a JS: fix async function review points
- AsyncFunction.prototype has Symbol.toStringTag "AsyncFunction",
  configurable only.
- await checks the room for the awaited promise's reaction or job and
  the suspended frame's bytes before it attaches the reaction, so a
  suspension stays within the heap limit.
- An async function's return pops its frame before resolving its
  promise, so a then getter on the returned value runs without it.
  Returning the function's own promise rejects it at the return.
- Block functions whose variable was not declared are kept in a hash
  set, so each block function's lookup takes constant time.
- A shorthand await in an object pattern of an async arrow function's
  head is a syntax error, and the head accepts patterns with defaults
  such as async ({a = 1}) => a. async({a = 1}) without an arrow is
  still a syntax error.
- docs: .jsx files and source strings run with module: true have
  Promise and the async syntax; await is an identifier only in script
  code.
2026-12-02 08:30:09 -08:00
dotCooCoo b727487d80 Docs: pathItems.removeAll() reports hidden or locked paths first
pathItems.removeAll() throws "cannot delete hidden or locked paths" when
any path is hidden or locked or is inside a hidden or locked object, and
only otherwise "cannot delete objects on a locked artboard". Both
messages end with a colon and up to 20 path ids. docs/mcp.md now says
so in both places that describe removeAll().
2026-12-02 08:00:53 -08:00
dotCooCoo 12355cb529 xtask: test-lint fails on a hit of any rule in the changed lines
all-unguarded, only-weak, exit-status-only, no-assertion, early-return,
env-gate-unset, census, mirror, constant-echo, fixture-only and
exact-pixel only listed their hits before. Their hits on changed lines
and tests now fail the check like the other rules. A
`// test-lint: allow <rule> <reason>` comment still exempts a hit, and
hits on unchanged lines still do not fail.

A never-run test that builds on macOS or Windows is still listed
without failing, since it runs locally on that platform.

Docs: docs/development.md.
2026-12-02 07:42:17 -08:00
dotCooCoo 31d02e4821 Scripts: startup scripts at launch list no printers, and spool failures stay shown
The startup scripts run at launch no longer list the print service's
printers, so the first window does not wait on it; a script.startup.run
with any other reason still lists them. A script's print jobs that the
desktop's worker fails to send are shown in the status bar even when a
later line, a later batch that was sent or a startup script's failure
took it, and the startup script's notes stay in the hover.
script.startup.run's params text describes the print wait and the
launch rule.
2026-12-02 07:39:44 -08:00
dotCooCoo f8eb542e04 Scripts: geometry read from a document in the back matches what the setters measure
The bounds getters (position, left, top, width, height and the bounds
arrays) read an item in a document in the back without measuring its type,
while the setters measure it after the switch to that document since
#10538. A script that read t.width and assigned it back could resize the
item, and every geometry assignment switched to the document and back even
when nothing changed.

The getters now measure type not measured yet in a document in the back
for an item that holds type, a symbol instance or a placed document, the
way the switch measures it, and the check is skipped while the document is
unchanged. An assignment equal to the current value of an object without
such content in a document in the back returns without switching
documents, and no undo step is made.
2026-12-02 07:21:25 -08:00
dotCooCoo 444c46c515 Scripts: for-in visits a name when a getPrototypeOf trap returns a new proxy each time
A for-in loop asks only the proxies whose ownKeys trap listed a name for
its descriptor. When a getPrototypeOf trap returned a new proxy of the
same target on each call, the proxy met before each name was not the one
that listed it, so the name was skipped. The loop now records, for each
proxy, the proxy its prototype lookup returned, and a new proxy of that
same target in its place answers for it. Proxies that list nothing are
recorded too, so another proxy of their target does not answer for them,
and the listing proxies stay rooted until the iterator holds them.

Follows #10185.
2026-12-02 07:12:47 -08:00
dotCooCoo 096b3b0e24 Scripts: a script chosen after the startup scripts may print to a printer
With Run Startup Scripts on, File › Scripts runs the chosen script
through script.startup.run, and only script.run listed the print
service's printers, so app.printerList and Document.print to a printer
threw "not available here" in the chosen script. script.startup.run now
lists the printers, each queued run takes them as it starts, and a
startup script's print jobs are asked about before the next run starts.

Follows up on #9087.
2026-12-02 06:26:17 -08:00
dotCooCoo 337b47a309 JavaScript: with scopes honor Symbol.unscopables; concat reads isConcatSpreadable
- A `with` scope reads `Symbol.unscopables` after it finds a name, through
  a proxy's `get` trap, and skips the binding when that object's property
  for the name is truthy.
- `concat` reads `Symbol.isConcatSpreadable`, through proxy traps; a
  defined value decides whether the object is spread.
- `Object.keys` and `Object.getOwnPropertyNames` keep the target's order
  through empty-handler proxies.
- `%TypedArray%.from` and `of` construct through a proxy constructor and
  check that the result is a typed array long enough.
2026-12-02 06:23:12 -08:00
dotCooCoo ffa83d3a7f Merge main into fix/plugins-tree-audit-in-checks 2026-12-02 06:09:48 -08:00
dotCooCoo 080f3c4a84 JavaScript: legacy reflect find skips proxy traps; replacer lists charge kept names
- `reflect.find` reads the reflection object and its lists with ordinary
  [[GetOwnProperty]], so a proxy receiver throws a TypeError without its
  getOwnPropertyDescriptor trap running.
- `JSON.stringify` charges each distinct name a replacer array keeps for
  the length of the call, instead of reserving bytes for the whole length,
  so a long sparse replacer list no longer hits the heap limit.
- A test checks that an outer proxy reads an inner proxy target's
  descriptors in its trap's combined order of names and Symbols.
2026-12-02 06:01:07 -08:00
dotCooCoo 5886c70c8d Print: maxPages turns a job away before raster effects are flattened
file.print with maxPages flattened every raster effect in the document
before it counted the pages, so a job it then turned away still paid
for rendering each effect. The page count from the artboards now runs
first, on the artboards alone, and raster effects are flattened only
for a job that fits.

Follows up on #9087.
2026-12-02 05:55:33 -08:00
dotCooCoo 549a383942 Merge main into feat/scripts-api-d2-paths-colors 2026-12-02 05:32:57 -08:00
dotCooCoo c2a2f38a4e Merge main into feat/js-es2017-async-await 2026-12-02 05:32:01 -08:00
dotCooCoo d359bb7e1a Print: Document.print throws for CUSTOMPROFILE without a profile name
A script that set PrintColorManagementOptions.colorProfileMode to
CUSTOMPROFILE and assigned no name printed with the base settings'
profile, as though no custom profile had been asked for. The job now
throws before anything is written, as it does for an empty name.

Follows up on #9087.
2026-12-02 05:13:50 -08:00
FredApps fa5c9e9674 Merge pull request #9847 from storytold/rfc52-headless-column
docs: RFC-0052 Headless section and marking rules in UI parity
2026-12-02 13:19:19 +01:00
.CooCoo 2498ef4682 Merge pull request #10185 from dotCooCoo/feat/js-object-set-prototype-of
Scripts: ES2015 realms have Object.setPrototypeOf
2026-12-02 02:36:46 -08:00
.CooCoo d100d66a06 Merge pull request #10250 from dotCooCoo/fix/retype-period-font-order
Retype: glyphs drawn alike in several fonts count as one outline in near matching
2026-12-02 02:22:02 -08:00
dotCooCoo 3ea259e6b9 Merge main into feat/scripts-api-d2-paths-colors 2026-12-02 02:20:34 -08:00
dotCooCoo 70e69a1750 Merge main into fix/plugins-tree-audit-in-checks 2026-12-02 02:13:53 -08:00
.CooCoo fc0b5321f4 Merge pull request #10425 from dotCooCoo/chore/never-run-test-allows
xtask: test-lint catches tests a removed module route compiles out, and narrows two false alarms
2026-12-02 02:12:33 -08:00
.CooCoo d753c48d2e Merge pull request #10483 from dotCooCoo/fix/windows-evalfile-uri
Scripts: $.evalFile reads the URI paths File.parent gives, on Windows too
2026-12-02 02:02:31 -08:00
.CooCoo 907db2002f Merge pull request #10487 from dotCooCoo/fix/mark-bounds-tiny-objects
Arrange Tools: Mark Bounds of Each draws no empty group for an object too small for corner legs
2026-12-02 02:02:23 -08:00
dotCooCoo b65de1d729 Merge main into chore/never-run-test-allows 2026-12-02 01:21:47 -08:00
.CooCoo 0c6aaa074d Merge pull request #10448 from dotCooCoo/fix/make-numbers-sequence
Type Tools: Make Numbers Sequence numbers the selected type objects
2026-12-02 01:10:32 -08:00
dotCooCoo 9b40798f6a Merge main into fix/retype-period-font-order 2026-12-02 00:40:20 -08:00
FredApps 27fd569655 Merge main into rfc52-headless-column
Resolve the docs/ui-parity.md conflict by taking main's tables and adding the Headless column to every Summary and behaviour table again (365 rows, all unknown); counts in the Headless section updated.
2026-12-02 08:46:21 +01:00
dotCooCoo 8b8e246713 xtask: test-lint keeps the route, suffix and census refinements main lacks
- never-run: in changed mode, a file that a crate target loaded at the
  base and no target loads now counts as compiled out, so removing the
  last `mod` or `#[path]` declaration on the way to it, or deleting the
  only target root that loads it, fails the check for its tests.
- reads-source: an `ends_with(".rs")` check counts only when it picks
  entries from a file listing (an iterator filter or a `for` loop over
  one), or when the function around it reads a file or calls a function
  in the file that does. A suffix check on a generated name in a test
  that reads nothing is not reported.
- census: a helper on the left of an `||` hides the whole-table check on
  the right only when it always runs: not behind an `&&`, and not inside
  one arm of an `if` or `match`.
- docs: unchanged-line `never-run` hits fail the command when the change
  takes away a test's last CI route.
2026-12-01 22:45:04 -08:00
.CooCoo 2f68b49692 Merge pull request #10534 from dotCooCoo/fix/test-lint-platform-only-tests
xtask: test-lint never-run lists tests that build on macOS or Windows without failing
2026-12-01 22:31:34 -08:00
.CooCoo 7387c46666 Merge pull request #10520 from dotCooCoo/fix/ui-egui-outside-panels-tests
Tests: ui-egui tests outside the panels check counts and waits
2026-12-01 22:30:43 -08:00
.CooCoo 95dd368c2c Merge pull request #10188 from dotCooCoo/fix/craft-fonts-pin-main
CI: move the craft-fonts pin to craft-fonts main in every workflow, so builds embed the tab-title face
2026-12-01 22:27:41 -08:00
dotCooCoo 906aa83b6c Merge main into fix/test-lint-platform-only-tests
main replaced Hit's `also` lines with `gates`; the merge keeps `gates`
and adds `report_only` beside it.
2026-12-01 21:41:39 -08:00
dotCooCoo ac5ee6f3aa Merge main into feat/js-object-set-prototype-of 2026-12-01 21:07:58 -08:00
dotCooCoo 8c78d72c9f Scripts: for-in asks only the proxies that listed a name
- A for-in loop now records, for each proxy whose ownKeys trap it called,
  the positions of the names that proxy returned, and asks a proxy for a
  name's descriptor only when that proxy listed the name. A proxy that did
  not list a name no longer hides an inherited one, and the proxy that did
  is still asked after a prototype change moves it on the chain. The
  records keep their proxies reachable and count against the heap limit.
- The check before each name walks own properties object by object, so a
  typed array without the element a name gives no longer hides that name
  on its prototypes.
- Function.prototype.apply reads the list's length with ToLength in a run
  with the ES2015 option, so a negative length gives no arguments; other
  runs keep ToUint32.
- Docs: typeof on a revoked proxy does not throw, and a setPrototypeOf
  trap that returns true may leave the prototype unchanged.
2026-12-01 21:07:58 -08:00
BFlat f2f7727305 Merge pull request #10479 from ruchirguitar/feat/color-themes-row-menu
Color Themes: add a context menu to saved theme rows
2026-12-02 11:47:30 +07:00
BFlat 1e8e27fa16 Merge pull request #10481 from ruchirguitar/glyphs-cell-menus
Glyphs: right-click a cell to insert or apply it
2026-12-02 11:47:24 +07:00
BFlat 5ed86c0c45 Merge pull request #10482 from ruchirguitar/feat/resource-library-item-menus
Add item context menus to resource library panels
2026-12-02 11:47:18 +07:00
dotCooCoo b354c29de0 Type: Make Numbers Sequence keeps a seeded order and its doc line names skipped objects
A new test runs the same eight objects with seed 11, an end and
removeUnused in two fresh sessions and checks that each object gets the
same number and the same objects are removed. The progress doc line says
that in numbers and placeholder modes objects without a match are
skipped before ordering, so they take no number and are never deleted,
and that only a run that changes the document makes an undo step.
2026-12-01 20:31:43 -08:00
dotCooCoo 02077bb5a3 Merge main into feat/js-object-set-prototype-of 2026-12-01 20:25:00 -08:00
dotCooCoo 18b8e71086 Docs: the ownKeys invariant check charges code units only for names it looks up
For an extensible target whose own properties are all configurable, the
check reads each property's descriptor for one unit of fuel and returns
before it looks any name up, so it does not charge for code units. The
paragraph in docs/mcp.md now says which part of the check charges per key
and which part charges per code unit.
2026-12-01 20:25:00 -08:00