Skip to content

Release 0.7.2 🚀 - #29

Merged
NetWin merged 7 commits into
masterfrom
increment
Nov 25, 2026
Merged

NetWin merged 7 commits into
masterfrom
increment

Conversation

@NetWin

@NetWin NetWin commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Summary

Releases everything merged into increment since 0.7.1:

Highlights

  • JSON callbacks can no longer reach a host function. A reviver or replacer that deleted a key
    of its holder before that key was visited used to receive the host's own function of that name,
    such as Object.prototype.hasOwnProperty — a reference the script could hold but not call. Both
    JSON statics now read the holder's own data only, so such a key reads as undefined. A reviver
    that freezes, seals or locks its holder mid-walk no longer ends the run with an uncatchable error:
    the refused write is skipped and the value kept, as in JavaScript.

Behaviour changes for hosts

  • New divergence from JavaScript: a reviver and a replacer read their holder's own data only. For a
    key a callback deletes before its visit, native JavaScript reads the prototype; Maple gives
    undefined. Scripts that do not delete holder keys during the walk are unaffected. Documented in
    packages/maple/docs/divergences.md.

Tooling

  • Dependency update (Weekly Dependency Update #27): Angular 22.2.6 / @angular/build 22.2.7, Tailwind 4.3.5, oxfmt 0.79,
    oxlint 1.94, tsdown 0.23.7, vitest 5.1, and pnpm 12.22.0. No runtime dependencies change and the
    acorn peer range stays at ^8.19.0.

claude and others added 7 commits November 24, 2026 21:01
…t of the sandbox

The reviver snapshots a holder's own keys, then reads each queued value with
Reflect.get. A callback runs with the holder as `this` between the snapshot and
the read, so deleting a still-queued key let the read fall through to the host
Object.prototype and handed the callback a live host reference, bypassing the
member guard. Resolve the own data descriptor per visit instead; a missing or
inherited key reads as undefined.
…throwing

A reviver callback can freeze its holder, after which the walk's plain
assignment and defineProperty write-back threw a host TypeError that escaped the
run as an uncatchable error. Write back through Reflect, whose define and delete
return false rather than throwing, so a refused write is left as it is. This
matches the host, which ignores the failed write and keeps the original value.
…out of the sandbox

stringify reads a plain object's queued values and an array's elements with a
plain member access. A replacer runs with the holder as `this` between the key
snapshot and that read, so deleting a still-queued key let the read fall through
to the host prototype and handed the replacer a live host reference. Read the
own data descriptor per key instead, matching the reviver.
…'t fake a value

ownDataValue used `'value' in descriptor`, but a descriptor's own prototype is the host
Object.prototype, so a `value` the embedding page added there would misread an accessor
as a data property. Use Object.hasOwn, which reads the descriptor's own fields only.
Keep host prototype functions away from JSON revivers and replacers
@NetWin NetWin self-assigned this Nov 25, 2026
@github-actions

Copy link
Copy Markdown

📋 Release Preview

Changelog

0.7.2 (2026-11-25)

🩹 Bug Fixes

  • json: ignore a reviver write-back to a frozen holder instead of throwing (a4798c1)
  • json: read own data with hasOwn so a polluted host prototype can't fake a value (90be665)
  • json: read reviver values as own data to keep host prototypes out of the sandbox (8960577)
  • json: read stringify values as own data to keep host prototypes out of the sandbox (5552ed3)

🏗 Dependency Updates

  • deps: update dependencies (7810563)

@NetWin
NetWin marked this pull request as ready for review November 25, 2026 11:28
@NetWin
NetWin merged commit 8ccdf60 into master Nov 25, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.7.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants