Skip to content

fix: sweep 5 - #87

Merged
finom merged 11 commits into
mainfrom
fix/sweep-5
Oct 20, 2026
Merged

finom merged 11 commits into
mainfrom
fix/sweep-5

Conversation

@finom

@finom finom commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Five audits (ES5 build, router and form parser, events, Matreshka.Array, docs and skill); every fix has a spec that fails on fec0a1c (test/spec/regressions/sweep5_*_spec.js, docs/test/code-parity.test.js).

Events

  • DOM listeners (click::x) follow listener owners: a second path or the object's own on keeps them
  • off('click::x') no longer leaves _unbind:x entries behind
  • undelegating from one object no longer cancels a debounced call pending from another
  • off cancels a pending DOM onDebounce call
  • once fires once when an earlier handler triggers the same event again

Router

  • history mode adds no entry when the path doesn't change; another spelling of the same route is rewritten in place
  • a property set to null nulls the following ones even when the URL doesn't change
  • emptying a hash route leaves no bare #
  • Router.hash and Router.history work on first use, without a subscriber
  • Router methods aren't enumerable in dist/

ES5 build

  • <col> renders without <template>
  • text, html, output binders and {{x}} show String(value) in dist/ as in src/
  • Array.from fallback keeps holes (Matreshka.Array.from({length: 3}, fn))
  • a __proto__ data key no longer sets the prototype (fromEntries)
  • a Class chain over an ES class works in src/ and .min.mjs, as in dist/
  • assign and forOwn fallbacks take primitives

Matreshka.Array

  • splice that adds items works after the container is rebound
  • restore() with a Matreshka.Array Model gives empty collections
  • a method that throws on render (push of a rendered item, fill, copyWithin) leaves the array unchanged
  • flat and flatMap spread nested Matreshka.Array instances, as concat does

Docs and skill

  • broken samples fixed (faq, restore, instantiate, onItemRender, trackBy, progress, style, types/matreshka, toJSON)
  • ua and ru code blocks are the same code as en; a test checks it (it also found 'change: a' with a space in ua)
  • SKILL.md: matreshka.min.mjs is a little smaller than the script-tag file

Also: the legacy scenario waits through timers, so it doesn't flake on a busy machine.

Not changed: a route without * ('/x/') still drops deeper URL parts on write; the documented pattern for classes sharing a URL pads with *.

Gates: lint, typecheck, 1050 tests with 100% coverage, build, check:dist (1002 tests on dist, 16 legacy cases), build:docs. Checked in Chrome on the built bundle against the 3.0.1 bundle.

Comment thread docs/test/code-parity.test.js Fixed
@finom
finom merged commit 26431f4 into main Oct 20, 2026
3 checks passed
@finom
finom deleted the fix/sweep-5 branch October 20, 2026 11:47
@finom finom mentioned this pull request Oct 20, 2026
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.

2 participants