Skip to content

feat(runtime): finish the move to the new JavaScript evaluation API for 0.21 - #660

Open
route wants to merge 1 commit into
feat/js-api-compatfrom
feat/js-api-finish
Open

route wants to merge 1 commit into
feat/js-api-compatfrom
feat/js-api-finish

Conversation

@route

@route route commented Oct 19, 2026

Copy link
Copy Markdown
Member

Second step after #659, for 0.21. It's based on #659's branch, so this diff shows only the removal.

Removed

  • Frame::Runtime::Legacy: the old evaluation path, its change detection, and evaluate_async, evaluate_func and evaluate_on.
  • Utils::Deprecate and FERRUM_DEPRECATION_WARNINGS.
  • Frame::Script helpers that only the old path used.

Behavior in 0.21

Each of these was warned about in 0.20:

  • A returned promise or thenable is awaited, and a rejection raises.
  • Keywords are always named parameters, and mixing them with positional arguments raises ArgumentError.
  • A script of several statements raises SyntaxError. A script after a leading line break runs.
  • A thrown value that isn't an Error raises JavaScriptError.
  • Node#evaluate resolves nodes and dates instead of returning {}.

Positional arguments keep working through arguments[n].

…or 0.21

Removes `Runtime::Legacy`, which kept old-style scripts running as before and warned about what changes here, along with
`#evaluate_async`, `#evaluate_func`, `#evaluate_on` and `Utils::Deprecate`. Every call now takes the new path:

- a returned promise or thenable is awaited, and a rejection raises
- keywords are always named parameters, and mixing them with positional arguments raises `ArgumentError`
- a script of several statements raises `SyntaxError`, and one after a leading line break runs
- a thrown value that isn't an `Error` raises `JavaScriptError`
- `Node#evaluate` resolves nodes and dates instead of returning `{}`

Positional arguments keep working through `arguments[n]`.
@route
route force-pushed the feat/js-api-finish branch from 817cef6 to 4d305bf Compare October 21, 2026 19:20
@route
route force-pushed the feat/js-api-compat branch from 438925a to 087049a Compare October 21, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant