diff --git a/.changeset/fix-jsx-clean-teardown-race.md b/.changeset/fix-jsx-clean-teardown-race.md deleted file mode 100644 index 750af01a4..000000000 --- a/.changeset/fix-jsx-clean-teardown-race.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@tko/utils.jsx": minor ---- - -Add `options.jsxCleanBatchSize` (default `1000`) controlling JSX node cleanup -batching. Setting it to `0` runs cleanup synchronously on detach. Registered -via `defineOption` — the hardcoded `MAX_CLEAN_AT_ONCE` constant is gone, but -the new default matches it so production behavior is unchanged. - -Fixes a `ReferenceError: Element is not defined` in the `cli-happy-dom` test -project where the 25ms batch timer could fire after happy-dom had torn down -DOM globals. diff --git a/.changeset/fix-proxy-delete-property.md b/.changeset/fix-proxy-delete-property.md deleted file mode 100644 index 5a56bcccd..000000000 --- a/.changeset/fix-proxy-delete-property.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -"@tko/computed": patch ---- - -Fix `ko.proxy` `deleteProperty` trap silently doing nothing - -The `deleteProperty` handler on proxies built by `ko.proxy` declared only one -parameter, named `property`. Per the Proxy spec, the trap is invoked with -`(target, property)` — so the handler was receiving `target` (the internal -`function(){}`) in place of the property key, stringifying it, and attempting -to delete that bogus key. The actual property remained on both the mirror -observable store and the underlying object, and its tracked observable stayed -alive. - -`delete proxied.foo` now correctly removes `foo` from both the proxy and the -underlying object and returns `true`. Added a regression test to -`proxyBehavior.ts` — the bug had been present since `ko.proxy` was introduced -in 2017 and was untested. diff --git a/.changeset/modernize-trigger-event.md b/.changeset/modernize-trigger-event.md deleted file mode 100644 index 594fb790a..000000000 --- a/.changeset/modernize-trigger-event.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -"@tko/utils": patch -"@tko/binding.core": patch -"@tko/provider.component": patch ---- - -Modernize synthetic event construction - -`triggerEvent` (exported from `@tko/utils`) now builds synthetic events using -`new MouseEvent`/`KeyboardEvent`/`Event` constructors instead of the -deprecated `document.createEvent('HTMLEvents')` + `initEvent(...)` path. This -restores native side-effects in modern DOM implementations (e.g. synthetic -clicks toggle checkbox `.checked` in happy-dom) without changing behavior in -real browsers. `relatedTarget` is still set to the target element for mouse -events to match the previous init-event argument list. - -`@tko/binding.core` event handler no longer assigns the legacy -`event.cancelBubble = true` before calling `event.stopPropagation()` — the -assignment is redundant on modern events and readonly on some implementations. - -`@tko/provider.component` now uses `Object.prototype.toString.call(node)` to -detect `HTMLUnknownElement` rather than `'' + node`, which is immune to -user-land `toString` overrides on custom elements. diff --git a/.changeset/modernize-utils-dead-polyfills.md b/.changeset/modernize-utils-dead-polyfills.md deleted file mode 100644 index 99e1026cf..000000000 --- a/.changeset/modernize-utils-dead-polyfills.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -"@tko/utils": patch -"@tko/utils.parser": patch -"@tko/observable": patch -"@tko/binding.core": patch -"@tko/binding.foreach": patch -"@tko/computed": patch -"@tko/lifecycle": patch -"@tko/builder": patch ---- - -Drop dead polyfill probes from `@tko/utils` - -Removes runtime feature detection for capabilities that all supported runtimes -(modern browsers, Node, Bun, happy-dom) already expose unconditionally. The -public API surface is preserved as one-line passthroughs in -`packages/utils/src/compat.ts` so existing consumers continue to work; these -shims are slated for removal in the next major. - -- `functionSupportsLengthOverwrite` + `overwriteLengthPropertyIfSupported` — - `Object.defineProperty(fn, 'length', …)` has worked since IE9. Call sites - in `@tko/observable` now invoke `Object.defineProperty` directly. The - internal probe is gone; `overwriteLengthPropertyIfSupported` is preserved - on `@tko/utils` exports as an inline `Object.defineProperty` call. -- `useSymbols` + `createSymbolOrString` — `Symbol` is always defined; call - sites now use `Symbol(identifier)` directly. `createSymbolOrString` is - preserved as `s => Symbol(s)` on both `@tko/utils` exports and - `ko.utils.createSymbolOrString`. -- `stringTrim` + `stringStartsWith` — call sites use `String(value ?? '') - .trim()` / `value.startsWith(prefix)` inline. Both names remain exported - from `@tko/utils` as inline passthroughs. -- `toggleDomNodeCssClass` SVGAnimatedString fallback — `classList` is - available on every supported `Element` (including SVG since SVG2). -- `parseJson` no longer routes through `stringTrim`; it trims inline when the - input is a string. - -`packages/utils.parser/src/preparse.ts` also guards `str.match(bindingToken)` -against the `null` return case using `?? []` — previously relied on the match -never returning `null` for the transformed input. - -Patch-level for all packages: zero observable surface change for consumers -not reaching into internal probes (`useSymbols`, `functionSupportsLengthOverwrite`), -which had no monorepo callers. diff --git a/builds/knockout/CHANGELOG.md b/builds/knockout/CHANGELOG.md index ec144acf5..e1e9d1ffe 100644 --- a/builds/knockout/CHANGELOG.md +++ b/builds/knockout/CHANGELOG.md @@ -1,5 +1,27 @@ # @tko/build.knockout +## 4.1.0 + +### Patch Changes + +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/utils@4.1.0 + - @tko/binding.core@4.1.0 + - @tko/provider.component@4.1.0 + - @tko/binding.foreach@4.1.0 + - @tko/builder@4.1.0 + - @tko/binding.component@4.1.0 + - @tko/binding.if@4.1.0 + - @tko/binding.template@4.1.0 + - @tko/filter.punches@4.1.0 + - @tko/provider.attr@4.1.0 + - @tko/provider.databind@4.1.0 + - @tko/provider.multi@4.1.0 + - @tko/provider.virtual@4.1.0 + - @tko/utils.component@4.1.0 + - @tko/utils.functionrewrite@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/builds/knockout/package.json b/builds/knockout/package.json index f473f1931..eaaff8984 100644 --- a/builds/knockout/package.json +++ b/builds/knockout/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/build.knockout", "description": "Knockout makes it easier to create rich, responsive UIs with JavaScript", "homepage": "https://tko.io", @@ -35,21 +35,21 @@ } ], "dependencies": { - "@tko/binding.component": "^4.0.1", - "@tko/binding.core": "^4.0.1", - "@tko/binding.foreach": "^4.0.1", - "@tko/binding.if": "^4.0.1", - "@tko/binding.template": "^4.0.1", - "@tko/builder": "^4.0.1", - "@tko/filter.punches": "^4.0.1", - "@tko/provider.attr": "^4.0.1", - "@tko/provider.component": "^4.0.1", - "@tko/provider.databind": "^4.0.1", - "@tko/provider.multi": "^4.0.1", - "@tko/provider.virtual": "^4.0.1", - "@tko/utils.component": "^4.0.1", - "@tko/utils.functionrewrite": "^4.0.1", - "@tko/utils": "^4.0.1" + "@tko/binding.component": "^4.1.0", + "@tko/binding.core": "^4.1.0", + "@tko/binding.foreach": "^4.1.0", + "@tko/binding.if": "^4.1.0", + "@tko/binding.template": "^4.1.0", + "@tko/builder": "^4.1.0", + "@tko/filter.punches": "^4.1.0", + "@tko/provider.attr": "^4.1.0", + "@tko/provider.component": "^4.1.0", + "@tko/provider.databind": "^4.1.0", + "@tko/provider.multi": "^4.1.0", + "@tko/provider.virtual": "^4.1.0", + "@tko/utils.component": "^4.1.0", + "@tko/utils.functionrewrite": "^4.1.0", + "@tko/utils": "^4.1.0" }, "exports": { ".": { diff --git a/builds/reference/CHANGELOG.md b/builds/reference/CHANGELOG.md index 6c4cdc916..a5929971f 100644 --- a/builds/reference/CHANGELOG.md +++ b/builds/reference/CHANGELOG.md @@ -1,5 +1,30 @@ # @tko/build.reference +## 4.1.0 + +### Patch Changes + +- Updated dependencies [7938c43] +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/utils.jsx@4.1.0 + - @tko/utils@4.1.0 + - @tko/binding.core@4.1.0 + - @tko/provider.component@4.1.0 + - @tko/binding.foreach@4.1.0 + - @tko/builder@4.1.0 + - @tko/binding.component@4.1.0 + - @tko/binding.if@4.1.0 + - @tko/binding.template@4.1.0 + - @tko/filter.punches@4.1.0 + - @tko/provider.attr@4.1.0 + - @tko/provider.databind@4.1.0 + - @tko/provider.multi@4.1.0 + - @tko/provider.mustache@4.1.0 + - @tko/provider.native@4.1.0 + - @tko/provider.virtual@4.1.0 + - @tko/utils.component@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/builds/reference/package.json b/builds/reference/package.json index 472d9b979..a696d4083 100644 --- a/builds/reference/package.json +++ b/builds/reference/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/build.reference", "description": "The TKO Reference Build", "repository": { @@ -9,23 +9,23 @@ "author": "The Knockout Team", "license": "MIT", "dependencies": { - "@tko/binding.component": "^4.0.1", - "@tko/binding.core": "^4.0.1", - "@tko/binding.foreach": "^4.0.1", - "@tko/binding.if": "^4.0.1", - "@tko/binding.template": "^4.0.1", - "@tko/builder": "^4.0.1", - "@tko/filter.punches": "^4.0.1", - "@tko/provider.attr": "^4.0.1", - "@tko/provider.component": "^4.0.1", - "@tko/provider.databind": "^4.0.1", - "@tko/provider.multi": "^4.0.1", - "@tko/provider.mustache": "^4.0.1", - "@tko/provider.native": "^4.0.1", - "@tko/provider.virtual": "^4.0.1", - "@tko/utils.component": "^4.0.1", - "@tko/utils.jsx": "^4.0.1", - "@tko/utils": "^4.0.1" + "@tko/binding.component": "^4.1.0", + "@tko/binding.core": "^4.1.0", + "@tko/binding.foreach": "^4.1.0", + "@tko/binding.if": "^4.1.0", + "@tko/binding.template": "^4.1.0", + "@tko/builder": "^4.1.0", + "@tko/filter.punches": "^4.1.0", + "@tko/provider.attr": "^4.1.0", + "@tko/provider.component": "^4.1.0", + "@tko/provider.databind": "^4.1.0", + "@tko/provider.multi": "^4.1.0", + "@tko/provider.mustache": "^4.1.0", + "@tko/provider.native": "^4.1.0", + "@tko/provider.virtual": "^4.1.0", + "@tko/utils.component": "^4.1.0", + "@tko/utils.jsx": "^4.1.0", + "@tko/utils": "^4.1.0" }, "files": [ "dist/" diff --git a/packages/bind/CHANGELOG.md b/packages/bind/CHANGELOG.md index 7b1daa9da..01b3e0e2c 100644 --- a/packages/bind/CHANGELOG.md +++ b/packages/bind/CHANGELOG.md @@ -1,5 +1,19 @@ # @tko/bind +## 4.1.0 + +### Patch Changes + +- Updated dependencies [bdac39c] +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/computed@4.1.0 + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + - @tko/lifecycle@4.1.0 + - @tko/builder@4.1.0 + - @tko/provider@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/bind/package.json b/packages/bind/package.json index 57760e669..435decacb 100644 --- a/packages/bind/package.json +++ b/packages/bind/package.json @@ -1,15 +1,15 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/bind", "description": "TKO DOM-Observable Binding", "module": "dist/index.js", "dependencies": { - "@tko/computed": "^4.0.1", - "@tko/lifecycle": "^4.0.1", - "@tko/observable": "^4.0.1", - "@tko/provider": "^4.0.1", - "@tko/utils": "^4.0.1", - "@tko/builder": "^4.0.1" + "@tko/computed": "^4.1.0", + "@tko/lifecycle": "^4.1.0", + "@tko/observable": "^4.1.0", + "@tko/provider": "^4.1.0", + "@tko/utils": "^4.1.0", + "@tko/builder": "^4.1.0" }, "files": [ "dist/" diff --git a/packages/binding.component/CHANGELOG.md b/packages/binding.component/CHANGELOG.md index d0c522156..c75b654ea 100644 --- a/packages/binding.component/CHANGELOG.md +++ b/packages/binding.component/CHANGELOG.md @@ -1,5 +1,20 @@ # @tko/binding.component +## 4.1.0 + +### Patch Changes + +- Updated dependencies [7938c43] +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/utils.jsx@4.1.0 + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + - @tko/lifecycle@4.1.0 + - @tko/bind@4.1.0 + - @tko/provider.native@4.1.0 + - @tko/utils.component@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/binding.component/package.json b/packages/binding.component/package.json index 1c38636dd..f94c23c30 100644 --- a/packages/binding.component/package.json +++ b/packages/binding.component/package.json @@ -1,17 +1,17 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/binding.component", "description": "component: binding for web components", "module": "dist/index.js", "license": "MIT", "dependencies": { - "@tko/bind": "^4.0.1", - "@tko/lifecycle": "^4.0.1", - "@tko/observable": "^4.0.1", - "@tko/provider.native": "^4.0.1", - "@tko/utils": "^4.0.1", - "@tko/utils.component": "^4.0.1", - "@tko/utils.jsx": "^4.0.1" + "@tko/bind": "^4.1.0", + "@tko/lifecycle": "^4.1.0", + "@tko/observable": "^4.1.0", + "@tko/provider.native": "^4.1.0", + "@tko/utils": "^4.1.0", + "@tko/utils.component": "^4.1.0", + "@tko/utils.jsx": "^4.1.0" }, "files": [ "dist/" diff --git a/packages/binding.core/CHANGELOG.md b/packages/binding.core/CHANGELOG.md index b8e3d8f68..cf0e87e79 100644 --- a/packages/binding.core/CHANGELOG.md +++ b/packages/binding.core/CHANGELOG.md @@ -1,5 +1,68 @@ # @tko/binding.core +## 4.1.0 + +### Patch Changes + +- 3aea21c: Modernize synthetic event construction + + `triggerEvent` (exported from `@tko/utils`) now builds synthetic events using + `new MouseEvent`/`KeyboardEvent`/`Event` constructors instead of the + deprecated `document.createEvent('HTMLEvents')` + `initEvent(...)` path. This + restores native side-effects in modern DOM implementations (e.g. synthetic + clicks toggle checkbox `.checked` in happy-dom) without changing behavior in + real browsers. `relatedTarget` is still set to the target element for mouse + events to match the previous init-event argument list. + + `@tko/binding.core` event handler no longer assigns the legacy + `event.cancelBubble = true` before calling `event.stopPropagation()` — the + assignment is redundant on modern events and readonly on some implementations. + + `@tko/provider.component` now uses `Object.prototype.toString.call(node)` to + detect `HTMLUnknownElement` rather than `'' + node`, which is immune to + user-land `toString` overrides on custom elements. + +- 49576cb: Drop dead polyfill probes from `@tko/utils` + + Removes runtime feature detection for capabilities that all supported runtimes + (modern browsers, Node, Bun, happy-dom) already expose unconditionally. The + public API surface is preserved as one-line passthroughs in + `packages/utils/src/compat.ts` so existing consumers continue to work; these + shims are slated for removal in the next major. + + - `functionSupportsLengthOverwrite` + `overwriteLengthPropertyIfSupported` — + `Object.defineProperty(fn, 'length', …)` has worked since IE9. Call sites + in `@tko/observable` now invoke `Object.defineProperty` directly. The + internal probe is gone; `overwriteLengthPropertyIfSupported` is preserved + on `@tko/utils` exports as an inline `Object.defineProperty` call. + - `useSymbols` + `createSymbolOrString` — `Symbol` is always defined; call + sites now use `Symbol(identifier)` directly. `createSymbolOrString` is + preserved as `s => Symbol(s)` on both `@tko/utils` exports and + `ko.utils.createSymbolOrString`. + - `stringTrim` + `stringStartsWith` — call sites use `String(value ?? '') +.trim()` / `value.startsWith(prefix)` inline. Both names remain exported + from `@tko/utils` as inline passthroughs. + - `toggleDomNodeCssClass` SVGAnimatedString fallback — `classList` is + available on every supported `Element` (including SVG since SVG2). + - `parseJson` no longer routes through `stringTrim`; it trims inline when the + input is a string. + + `packages/utils.parser/src/preparse.ts` also guards `str.match(bindingToken)` + against the `null` return case using `?? []` — previously relied on the match + never returning `null` for the transformed input. + + Patch-level for all packages: zero observable surface change for consumers + not reaching into internal probes (`useSymbols`, `functionSupportsLengthOverwrite`), + which had no monorepo callers. + +- Updated dependencies [bdac39c] +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/computed@4.1.0 + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + - @tko/bind@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/binding.core/package.json b/packages/binding.core/package.json index a5b473395..fef66bb15 100644 --- a/packages/binding.core/package.json +++ b/packages/binding.core/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/binding.core", "description": "TKO Core bindings", "module": "dist/index.js", @@ -24,10 +24,10 @@ }, "homepage": "https://tko.io", "dependencies": { - "@tko/bind": "^4.0.1", - "@tko/computed": "^4.0.1", - "@tko/observable": "^4.0.1", - "@tko/utils": "^4.0.1" + "@tko/bind": "^4.1.0", + "@tko/computed": "^4.1.0", + "@tko/observable": "^4.1.0", + "@tko/utils": "^4.1.0" }, "licenses": [ { diff --git a/packages/binding.foreach/CHANGELOG.md b/packages/binding.foreach/CHANGELOG.md index c25ef8296..908329933 100644 --- a/packages/binding.foreach/CHANGELOG.md +++ b/packages/binding.foreach/CHANGELOG.md @@ -1,5 +1,48 @@ # @tko/binding.foreach +## 4.1.0 + +### Patch Changes + +- 49576cb: Drop dead polyfill probes from `@tko/utils` + + Removes runtime feature detection for capabilities that all supported runtimes + (modern browsers, Node, Bun, happy-dom) already expose unconditionally. The + public API surface is preserved as one-line passthroughs in + `packages/utils/src/compat.ts` so existing consumers continue to work; these + shims are slated for removal in the next major. + + - `functionSupportsLengthOverwrite` + `overwriteLengthPropertyIfSupported` — + `Object.defineProperty(fn, 'length', …)` has worked since IE9. Call sites + in `@tko/observable` now invoke `Object.defineProperty` directly. The + internal probe is gone; `overwriteLengthPropertyIfSupported` is preserved + on `@tko/utils` exports as an inline `Object.defineProperty` call. + - `useSymbols` + `createSymbolOrString` — `Symbol` is always defined; call + sites now use `Symbol(identifier)` directly. `createSymbolOrString` is + preserved as `s => Symbol(s)` on both `@tko/utils` exports and + `ko.utils.createSymbolOrString`. + - `stringTrim` + `stringStartsWith` — call sites use `String(value ?? '') +.trim()` / `value.startsWith(prefix)` inline. Both names remain exported + from `@tko/utils` as inline passthroughs. + - `toggleDomNodeCssClass` SVGAnimatedString fallback — `classList` is + available on every supported `Element` (including SVG since SVG2). + - `parseJson` no longer routes through `stringTrim`; it trims inline when the + input is a string. + + `packages/utils.parser/src/preparse.ts` also guards `str.match(bindingToken)` + against the `null` return case using `?? []` — previously relied on the match + never returning `null` for the transformed input. + + Patch-level for all packages: zero observable surface change for consumers + not reaching into internal probes (`useSymbols`, `functionSupportsLengthOverwrite`), + which had no monorepo callers. + +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + - @tko/bind@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/binding.foreach/package.json b/packages/binding.foreach/package.json index 3a7724f31..ee50c181a 100644 --- a/packages/binding.foreach/package.json +++ b/packages/binding.foreach/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/binding.foreach", "description": "Knockout Foreach Binding", "module": "dist/index.js", @@ -24,9 +24,9 @@ }, "homepage": "https://tko.io", "dependencies": { - "@tko/bind": "^4.0.1", - "@tko/observable": "^4.0.1", - "@tko/utils": "^4.0.1" + "@tko/bind": "^4.1.0", + "@tko/observable": "^4.1.0", + "@tko/utils": "^4.1.0" }, "licenses": [ { diff --git a/packages/binding.if/CHANGELOG.md b/packages/binding.if/CHANGELOG.md index 1f746be50..a4d953ef5 100644 --- a/packages/binding.if/CHANGELOG.md +++ b/packages/binding.if/CHANGELOG.md @@ -1,5 +1,15 @@ # @tko/binding.if +## 4.1.0 + +### Patch Changes + +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + - @tko/bind@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/binding.if/package.json b/packages/binding.if/package.json index 15f9bb7de..c40bb1d0d 100644 --- a/packages/binding.if/package.json +++ b/packages/binding.if/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/binding.if", "description": "TKO conditional (if/ifnot/unless/with/else) bindings", "module": "dist/index.js", @@ -24,9 +24,9 @@ }, "homepage": "https://tko.io", "dependencies": { - "@tko/bind": "^4.0.1", - "@tko/observable": "^4.0.1", - "@tko/utils": "^4.0.1" + "@tko/bind": "^4.1.0", + "@tko/observable": "^4.1.0", + "@tko/utils": "^4.1.0" }, "licenses": [ { diff --git a/packages/binding.template/CHANGELOG.md b/packages/binding.template/CHANGELOG.md index e80fa9a04..86295ae07 100644 --- a/packages/binding.template/CHANGELOG.md +++ b/packages/binding.template/CHANGELOG.md @@ -1,5 +1,17 @@ # @tko/binding.template +## 4.1.0 + +### Patch Changes + +- Updated dependencies [bdac39c] +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/computed@4.1.0 + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + - @tko/bind@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/binding.template/package.json b/packages/binding.template/package.json index 62c735911..36e247054 100644 --- a/packages/binding.template/package.json +++ b/packages/binding.template/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/binding.template", "description": "TKO Template bindings", "module": "dist/index.js", @@ -24,10 +24,10 @@ }, "homepage": "https://tko.io", "dependencies": { - "@tko/bind": "^4.0.1", - "@tko/computed": "^4.0.1", - "@tko/observable": "^4.0.1", - "@tko/utils": "^4.0.1" + "@tko/bind": "^4.1.0", + "@tko/computed": "^4.1.0", + "@tko/observable": "^4.1.0", + "@tko/utils": "^4.1.0" }, "licenses": [ { diff --git a/packages/builder/CHANGELOG.md b/packages/builder/CHANGELOG.md index edc17f3ad..17aabe1c1 100644 --- a/packages/builder/CHANGELOG.md +++ b/packages/builder/CHANGELOG.md @@ -1,5 +1,54 @@ # @tko/builder +## 4.1.0 + +### Patch Changes + +- 49576cb: Drop dead polyfill probes from `@tko/utils` + + Removes runtime feature detection for capabilities that all supported runtimes + (modern browsers, Node, Bun, happy-dom) already expose unconditionally. The + public API surface is preserved as one-line passthroughs in + `packages/utils/src/compat.ts` so existing consumers continue to work; these + shims are slated for removal in the next major. + + - `functionSupportsLengthOverwrite` + `overwriteLengthPropertyIfSupported` — + `Object.defineProperty(fn, 'length', …)` has worked since IE9. Call sites + in `@tko/observable` now invoke `Object.defineProperty` directly. The + internal probe is gone; `overwriteLengthPropertyIfSupported` is preserved + on `@tko/utils` exports as an inline `Object.defineProperty` call. + - `useSymbols` + `createSymbolOrString` — `Symbol` is always defined; call + sites now use `Symbol(identifier)` directly. `createSymbolOrString` is + preserved as `s => Symbol(s)` on both `@tko/utils` exports and + `ko.utils.createSymbolOrString`. + - `stringTrim` + `stringStartsWith` — call sites use `String(value ?? '') +.trim()` / `value.startsWith(prefix)` inline. Both names remain exported + from `@tko/utils` as inline passthroughs. + - `toggleDomNodeCssClass` SVGAnimatedString fallback — `classList` is + available on every supported `Element` (including SVG since SVG2). + - `parseJson` no longer routes through `stringTrim`; it trims inline when the + input is a string. + + `packages/utils.parser/src/preparse.ts` also guards `str.match(bindingToken)` + against the `null` return case using `?? []` — previously relied on the match + never returning `null` for the transformed input. + + Patch-level for all packages: zero observable surface change for consumers + not reaching into internal probes (`useSymbols`, `functionSupportsLengthOverwrite`), + which had no monorepo callers. + +- Updated dependencies [bdac39c] +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/computed@4.1.0 + - @tko/utils@4.1.0 + - @tko/utils.parser@4.1.0 + - @tko/observable@4.1.0 + - @tko/lifecycle@4.1.0 + - @tko/bind@4.1.0 + - @tko/binding.template@4.1.0 + - @tko/provider@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/builder/package.json b/packages/builder/package.json index bf335d9ae..105de0015 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/builder", "description": "Compile a customized instance of Knockout.", "repository": { @@ -9,14 +9,14 @@ "author": "The Knockout Team", "license": "MIT", "dependencies": { - "@tko/bind": "^4.0.1", - "@tko/binding.template": "^4.0.1", - "@tko/computed": "^4.0.1", - "@tko/lifecycle": "^4.0.1", - "@tko/observable": "^4.0.1", - "@tko/provider": "^4.0.1", - "@tko/utils": "^4.0.1", - "@tko/utils.parser": "^4.0.1" + "@tko/bind": "^4.1.0", + "@tko/binding.template": "^4.1.0", + "@tko/computed": "^4.1.0", + "@tko/lifecycle": "^4.1.0", + "@tko/observable": "^4.1.0", + "@tko/provider": "^4.1.0", + "@tko/utils": "^4.1.0", + "@tko/utils.parser": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/computed/CHANGELOG.md b/packages/computed/CHANGELOG.md index 9b00ee851..2a46c1640 100644 --- a/packages/computed/CHANGELOG.md +++ b/packages/computed/CHANGELOG.md @@ -1,5 +1,62 @@ # @tko/computed +## 4.1.0 + +### Patch Changes + +- bdac39c: Fix `ko.proxy` `deleteProperty` trap silently doing nothing + + The `deleteProperty` handler on proxies built by `ko.proxy` declared only one + parameter, named `property`. Per the Proxy spec, the trap is invoked with + `(target, property)` — so the handler was receiving `target` (the internal + `function(){}`) in place of the property key, stringifying it, and attempting + to delete that bogus key. The actual property remained on both the mirror + observable store and the underlying object, and its tracked observable stayed + alive. + + `delete proxied.foo` now correctly removes `foo` from both the proxy and the + underlying object and returns `true`. Added a regression test to + `proxyBehavior.ts` — the bug had been present since `ko.proxy` was introduced + in 2017 and was untested. + +- 49576cb: Drop dead polyfill probes from `@tko/utils` + + Removes runtime feature detection for capabilities that all supported runtimes + (modern browsers, Node, Bun, happy-dom) already expose unconditionally. The + public API surface is preserved as one-line passthroughs in + `packages/utils/src/compat.ts` so existing consumers continue to work; these + shims are slated for removal in the next major. + + - `functionSupportsLengthOverwrite` + `overwriteLengthPropertyIfSupported` — + `Object.defineProperty(fn, 'length', …)` has worked since IE9. Call sites + in `@tko/observable` now invoke `Object.defineProperty` directly. The + internal probe is gone; `overwriteLengthPropertyIfSupported` is preserved + on `@tko/utils` exports as an inline `Object.defineProperty` call. + - `useSymbols` + `createSymbolOrString` — `Symbol` is always defined; call + sites now use `Symbol(identifier)` directly. `createSymbolOrString` is + preserved as `s => Symbol(s)` on both `@tko/utils` exports and + `ko.utils.createSymbolOrString`. + - `stringTrim` + `stringStartsWith` — call sites use `String(value ?? '') +.trim()` / `value.startsWith(prefix)` inline. Both names remain exported + from `@tko/utils` as inline passthroughs. + - `toggleDomNodeCssClass` SVGAnimatedString fallback — `classList` is + available on every supported `Element` (including SVG since SVG2). + - `parseJson` no longer routes through `stringTrim`; it trims inline when the + input is a string. + + `packages/utils.parser/src/preparse.ts` also guards `str.match(bindingToken)` + against the `null` return case using `?? []` — previously relied on the match + never returning `null` for the transformed input. + + Patch-level for all packages: zero observable surface change for consumers + not reaching into internal probes (`useSymbols`, `functionSupportsLengthOverwrite`), + which had no monorepo callers. + +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/computed/package.json b/packages/computed/package.json index f2793d545..8043196be 100644 --- a/packages/computed/package.json +++ b/packages/computed/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/computed", "description": "TKO Computed Observables", "module": "dist/index.js", @@ -7,8 +7,8 @@ "dist/" ], "dependencies": { - "@tko/observable": "^4.0.1", - "@tko/utils": "^4.0.1" + "@tko/observable": "^4.1.0", + "@tko/utils": "^4.1.0" }, "repository": { "type": "git", diff --git a/packages/filter.punches/CHANGELOG.md b/packages/filter.punches/CHANGELOG.md index 336ba1522..644950a2e 100644 --- a/packages/filter.punches/CHANGELOG.md +++ b/packages/filter.punches/CHANGELOG.md @@ -1,5 +1,12 @@ # @tko/filter.punches +## 4.1.0 + +### Patch Changes + +- Updated dependencies [49576cb] + - @tko/observable@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/filter.punches/package.json b/packages/filter.punches/package.json index b8a4ee226..1247b1224 100644 --- a/packages/filter.punches/package.json +++ b/packages/filter.punches/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/filter.punches", "description": "TKO filters from knockout punches", "module": "dist/index.js", @@ -24,7 +24,7 @@ }, "homepage": "https://tko.io", "dependencies": { - "@tko/observable": "^4.0.1" + "@tko/observable": "^4.1.0" }, "licenses": [ { diff --git a/packages/lifecycle/CHANGELOG.md b/packages/lifecycle/CHANGELOG.md index 91cd820be..8e17aa107 100644 --- a/packages/lifecycle/CHANGELOG.md +++ b/packages/lifecycle/CHANGELOG.md @@ -1,5 +1,49 @@ # @tko/lifecycle +## 4.1.0 + +### Patch Changes + +- 49576cb: Drop dead polyfill probes from `@tko/utils` + + Removes runtime feature detection for capabilities that all supported runtimes + (modern browsers, Node, Bun, happy-dom) already expose unconditionally. The + public API surface is preserved as one-line passthroughs in + `packages/utils/src/compat.ts` so existing consumers continue to work; these + shims are slated for removal in the next major. + + - `functionSupportsLengthOverwrite` + `overwriteLengthPropertyIfSupported` — + `Object.defineProperty(fn, 'length', …)` has worked since IE9. Call sites + in `@tko/observable` now invoke `Object.defineProperty` directly. The + internal probe is gone; `overwriteLengthPropertyIfSupported` is preserved + on `@tko/utils` exports as an inline `Object.defineProperty` call. + - `useSymbols` + `createSymbolOrString` — `Symbol` is always defined; call + sites now use `Symbol(identifier)` directly. `createSymbolOrString` is + preserved as `s => Symbol(s)` on both `@tko/utils` exports and + `ko.utils.createSymbolOrString`. + - `stringTrim` + `stringStartsWith` — call sites use `String(value ?? '') +.trim()` / `value.startsWith(prefix)` inline. Both names remain exported + from `@tko/utils` as inline passthroughs. + - `toggleDomNodeCssClass` SVGAnimatedString fallback — `classList` is + available on every supported `Element` (including SVG since SVG2). + - `parseJson` no longer routes through `stringTrim`; it trims inline when the + input is a string. + + `packages/utils.parser/src/preparse.ts` also guards `str.match(bindingToken)` + against the `null` return case using `?? []` — previously relied on the match + never returning `null` for the transformed input. + + Patch-level for all packages: zero observable surface change for consumers + not reaching into internal probes (`useSymbols`, `functionSupportsLengthOverwrite`), + which had no monorepo callers. + +- Updated dependencies [bdac39c] +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/computed@4.1.0 + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/lifecycle/package.json b/packages/lifecycle/package.json index 8afc1b335..2c7a583ee 100644 --- a/packages/lifecycle/package.json +++ b/packages/lifecycle/package.json @@ -1,10 +1,10 @@ { - "version": "4.0.1", + "version": "4.1.0", "module": "dist/index.js", "dependencies": { - "@tko/computed": "^4.0.1", - "@tko/observable": "^4.0.1", - "@tko/utils": "^4.0.1" + "@tko/computed": "^4.1.0", + "@tko/observable": "^4.1.0", + "@tko/utils": "^4.1.0" }, "files": [ "dist/" diff --git a/packages/observable/CHANGELOG.md b/packages/observable/CHANGELOG.md index 42bca0dbe..4bd6be414 100644 --- a/packages/observable/CHANGELOG.md +++ b/packages/observable/CHANGELOG.md @@ -1,5 +1,46 @@ # @tko/observable +## 4.1.0 + +### Patch Changes + +- 49576cb: Drop dead polyfill probes from `@tko/utils` + + Removes runtime feature detection for capabilities that all supported runtimes + (modern browsers, Node, Bun, happy-dom) already expose unconditionally. The + public API surface is preserved as one-line passthroughs in + `packages/utils/src/compat.ts` so existing consumers continue to work; these + shims are slated for removal in the next major. + + - `functionSupportsLengthOverwrite` + `overwriteLengthPropertyIfSupported` — + `Object.defineProperty(fn, 'length', …)` has worked since IE9. Call sites + in `@tko/observable` now invoke `Object.defineProperty` directly. The + internal probe is gone; `overwriteLengthPropertyIfSupported` is preserved + on `@tko/utils` exports as an inline `Object.defineProperty` call. + - `useSymbols` + `createSymbolOrString` — `Symbol` is always defined; call + sites now use `Symbol(identifier)` directly. `createSymbolOrString` is + preserved as `s => Symbol(s)` on both `@tko/utils` exports and + `ko.utils.createSymbolOrString`. + - `stringTrim` + `stringStartsWith` — call sites use `String(value ?? '') +.trim()` / `value.startsWith(prefix)` inline. Both names remain exported + from `@tko/utils` as inline passthroughs. + - `toggleDomNodeCssClass` SVGAnimatedString fallback — `classList` is + available on every supported `Element` (including SVG since SVG2). + - `parseJson` no longer routes through `stringTrim`; it trims inline when the + input is a string. + + `packages/utils.parser/src/preparse.ts` also guards `str.match(bindingToken)` + against the `null` return case using `?? []` — previously relied on the match + never returning `null` for the transformed input. + + Patch-level for all packages: zero observable surface change for consumers + not reaching into internal probes (`useSymbols`, `functionSupportsLengthOverwrite`), + which had no monorepo callers. + +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/utils@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/observable/package.json b/packages/observable/package.json index c8ad7cf0b..6926ade7d 100644 --- a/packages/observable/package.json +++ b/packages/observable/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/observable", "description": "TKO subscribables and observables", "repository": { @@ -29,7 +29,7 @@ }, "homepage": "https://tko.io", "dependencies": { - "@tko/utils": "^4.0.1" + "@tko/utils": "^4.1.0" }, "licenses": [ { diff --git a/packages/provider.attr/CHANGELOG.md b/packages/provider.attr/CHANGELOG.md index d3337f8a2..47d7fd356 100644 --- a/packages/provider.attr/CHANGELOG.md +++ b/packages/provider.attr/CHANGELOG.md @@ -1,5 +1,11 @@ # @tko/provider.attr +## 4.1.0 + +### Patch Changes + +- @tko/provider@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/provider.attr/package.json b/packages/provider.attr/package.json index 9b01d39fd..afc7a813b 100644 --- a/packages/provider.attr/package.json +++ b/packages/provider.attr/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/provider.attr", "description": "Link HTML attributes (e.g. ko-handler-name) to binding handlers", "module": "dist/index.js", @@ -8,7 +8,7 @@ ], "license": "MIT", "dependencies": { - "@tko/provider": "^4.0.1" + "@tko/provider": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/provider.bindingstring/CHANGELOG.md b/packages/provider.bindingstring/CHANGELOG.md index 635550d09..bd388f6e1 100644 --- a/packages/provider.bindingstring/CHANGELOG.md +++ b/packages/provider.bindingstring/CHANGELOG.md @@ -1,5 +1,13 @@ # @tko/provider.bindingstring +## 4.1.0 + +### Patch Changes + +- Updated dependencies [49576cb] + - @tko/utils.parser@4.1.0 + - @tko/provider@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/provider.bindingstring/package.json b/packages/provider.bindingstring/package.json index 0b11619f9..24aa53651 100644 --- a/packages/provider.bindingstring/package.json +++ b/packages/provider.bindingstring/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/provider.bindingstring", "description": "Abstract Base Class for providers that parse a binding string", "module": "dist/index.js", @@ -8,8 +8,8 @@ ], "license": "MIT", "dependencies": { - "@tko/provider": "^4.0.1", - "@tko/utils.parser": "^4.0.1" + "@tko/provider": "^4.1.0", + "@tko/utils.parser": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/provider.component/CHANGELOG.md b/packages/provider.component/CHANGELOG.md index 8d6fb6113..f5af0dd18 100644 --- a/packages/provider.component/CHANGELOG.md +++ b/packages/provider.component/CHANGELOG.md @@ -1,5 +1,37 @@ # @tko/provider.component +## 4.1.0 + +### Patch Changes + +- 3aea21c: Modernize synthetic event construction + + `triggerEvent` (exported from `@tko/utils`) now builds synthetic events using + `new MouseEvent`/`KeyboardEvent`/`Event` constructors instead of the + deprecated `document.createEvent('HTMLEvents')` + `initEvent(...)` path. This + restores native side-effects in modern DOM implementations (e.g. synthetic + clicks toggle checkbox `.checked` in happy-dom) without changing behavior in + real browsers. `relatedTarget` is still set to the target element for mouse + events to match the previous init-event argument list. + + `@tko/binding.core` event handler no longer assigns the legacy + `event.cancelBubble = true` before calling `event.stopPropagation()` — the + assignment is redundant on modern events and readonly on some implementations. + + `@tko/provider.component` now uses `Object.prototype.toString.call(node)` to + detect `HTMLUnknownElement` rather than `'' + node`, which is immune to + user-land `toString` overrides on custom elements. + +- Updated dependencies [bdac39c] +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/computed@4.1.0 + - @tko/utils@4.1.0 + - @tko/utils.parser@4.1.0 + - @tko/observable@4.1.0 + - @tko/provider@4.1.0 + - @tko/utils.component@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/provider.component/package.json b/packages/provider.component/package.json index 27e071fa9..fe5ca559b 100644 --- a/packages/provider.component/package.json +++ b/packages/provider.component/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/provider.component", "description": "Bind custom web components e.g. ", "module": "dist/index.js", @@ -8,12 +8,12 @@ ], "license": "MIT", "dependencies": { - "@tko/computed": "^4.0.1", - "@tko/observable": "^4.0.1", - "@tko/provider": "^4.0.1", - "@tko/utils": "^4.0.1", - "@tko/utils.component": "^4.0.1", - "@tko/utils.parser": "^4.0.1" + "@tko/computed": "^4.1.0", + "@tko/observable": "^4.1.0", + "@tko/provider": "^4.1.0", + "@tko/utils": "^4.1.0", + "@tko/utils.component": "^4.1.0", + "@tko/utils.parser": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/provider.databind/CHANGELOG.md b/packages/provider.databind/CHANGELOG.md index 81c0b3225..015daca26 100644 --- a/packages/provider.databind/CHANGELOG.md +++ b/packages/provider.databind/CHANGELOG.md @@ -1,5 +1,12 @@ # @tko/provider.databind +## 4.1.0 + +### Patch Changes + +- @tko/bind@4.1.0 +- @tko/provider.bindingstring@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/provider.databind/package.json b/packages/provider.databind/package.json index 2a5f5f5d8..52b3b5377 100644 --- a/packages/provider.databind/package.json +++ b/packages/provider.databind/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/provider.databind", "description": "Link HTML attributes based on a `data-bind` HTML attribute", "module": "dist/index.js", @@ -8,8 +8,8 @@ ], "license": "MIT", "dependencies": { - "@tko/provider.bindingstring": "^4.0.1", - "@tko/bind": "^4.0.1" + "@tko/provider.bindingstring": "^4.1.0", + "@tko/bind": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/provider.multi/CHANGELOG.md b/packages/provider.multi/CHANGELOG.md index 8f0431fe6..92ffdf496 100644 --- a/packages/provider.multi/CHANGELOG.md +++ b/packages/provider.multi/CHANGELOG.md @@ -1,5 +1,12 @@ # @tko/provider.multi +## 4.1.0 + +### Patch Changes + +- @tko/bind@4.1.0 +- @tko/provider@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/provider.multi/package.json b/packages/provider.multi/package.json index ab2881bcf..9f1066d3e 100644 --- a/packages/provider.multi/package.json +++ b/packages/provider.multi/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/provider.multi", "description": "Combine multiple other providers into one", "module": "dist/index.js", @@ -8,8 +8,8 @@ ], "license": "MIT", "dependencies": { - "@tko/provider": "^4.0.1", - "@tko/bind": "^4.0.1" + "@tko/provider": "^4.1.0", + "@tko/bind": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/provider.mustache/CHANGELOG.md b/packages/provider.mustache/CHANGELOG.md index a4fc8d9bc..c6334dc9b 100644 --- a/packages/provider.mustache/CHANGELOG.md +++ b/packages/provider.mustache/CHANGELOG.md @@ -1,5 +1,14 @@ # @tko/provider.mustache +## 4.1.0 + +### Patch Changes + +- Updated dependencies [49576cb] + - @tko/utils.parser@4.1.0 + - @tko/observable@4.1.0 + - @tko/provider@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/provider.mustache/package.json b/packages/provider.mustache/package.json index 899c2a630..c2198e39a 100644 --- a/packages/provider.mustache/package.json +++ b/packages/provider.mustache/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/provider.mustache", "description": "Interpolate text/node attributes {{ }}", "module": "dist/index.js", @@ -24,9 +24,9 @@ }, "homepage": "https://tko.io", "dependencies": { - "@tko/observable": "^4.0.1", - "@tko/provider": "^4.0.1", - "@tko/utils.parser": "^4.0.1" + "@tko/observable": "^4.1.0", + "@tko/provider": "^4.1.0", + "@tko/utils.parser": "^4.1.0" }, "licenses": [ { diff --git a/packages/provider.native/CHANGELOG.md b/packages/provider.native/CHANGELOG.md index dfe81f284..9cce11fcb 100644 --- a/packages/provider.native/CHANGELOG.md +++ b/packages/provider.native/CHANGELOG.md @@ -1,5 +1,14 @@ # @tko/provider.native +## 4.1.0 + +### Patch Changes + +- Updated dependencies [49576cb] + - @tko/observable@4.1.0 + - @tko/bind@4.1.0 + - @tko/provider@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/provider.native/package.json b/packages/provider.native/package.json index f6189cb76..d204b0154 100644 --- a/packages/provider.native/package.json +++ b/packages/provider.native/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/provider.native", "description": "Link binding handlers whose value is already attached to the node", "module": "dist/index.js", @@ -8,9 +8,9 @@ ], "license": "MIT", "dependencies": { - "@tko/observable": "^4.0.1", - "@tko/provider": "^4.0.1", - "@tko/bind": "^4.0.1" + "@tko/observable": "^4.1.0", + "@tko/provider": "^4.1.0", + "@tko/bind": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/provider.virtual/CHANGELOG.md b/packages/provider.virtual/CHANGELOG.md index 961dd74db..1039565bd 100644 --- a/packages/provider.virtual/CHANGELOG.md +++ b/packages/provider.virtual/CHANGELOG.md @@ -1,5 +1,15 @@ # @tko/provider.virtual +## 4.1.0 + +### Patch Changes + +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/utils@4.1.0 + - @tko/bind@4.1.0 + - @tko/provider.bindingstring@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/provider.virtual/package.json b/packages/provider.virtual/package.json index 6f72026c1..8e1feef6a 100644 --- a/packages/provider.virtual/package.json +++ b/packages/provider.virtual/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/provider.virtual", "description": "Binding provider for virtual elements", "module": "dist/index.js", @@ -9,9 +9,9 @@ "author": "The Knockout Team", "license": "MIT", "dependencies": { - "@tko/provider.bindingstring": "^4.0.1", - "@tko/utils": "^4.0.1", - "@tko/bind": "^4.0.1" + "@tko/provider.bindingstring": "^4.1.0", + "@tko/utils": "^4.1.0", + "@tko/bind": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/provider/CHANGELOG.md b/packages/provider/CHANGELOG.md index 342dc0060..f3c170071 100644 --- a/packages/provider/CHANGELOG.md +++ b/packages/provider/CHANGELOG.md @@ -1,5 +1,15 @@ # @tko/provider +## 4.1.0 + +### Patch Changes + +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + - @tko/bind@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/provider/package.json b/packages/provider/package.json index 6776afcb8..a02244c5a 100644 --- a/packages/provider/package.json +++ b/packages/provider/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/provider", "description": "Abstract base class of tko Provider (HTML <-> Data Binding linker)", "module": "dist/index.js", @@ -9,9 +9,9 @@ "author": "The Knockout Team", "license": "MIT", "dependencies": { - "@tko/observable": "^4.0.1", - "@tko/utils": "^4.0.1", - "@tko/bind": "^4.0.1" + "@tko/observable": "^4.1.0", + "@tko/utils": "^4.1.0", + "@tko/bind": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/utils.component/CHANGELOG.md b/packages/utils.component/CHANGELOG.md index d2a3ee29b..06a119cc2 100644 --- a/packages/utils.component/CHANGELOG.md +++ b/packages/utils.component/CHANGELOG.md @@ -1,5 +1,15 @@ # @tko/utils.component +## 4.1.0 + +### Patch Changes + +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + - @tko/lifecycle@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/utils.component/package.json b/packages/utils.component/package.json index 3479aba02..ede1e5b55 100644 --- a/packages/utils.component/package.json +++ b/packages/utils.component/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/utils.component", "description": "Registry and loading utilities for web components", "module": "dist/index.js", @@ -8,9 +8,9 @@ ], "license": "MIT", "dependencies": { - "@tko/lifecycle": "^4.0.1", - "@tko/observable": "^4.0.1", - "@tko/utils": "^4.0.1" + "@tko/lifecycle": "^4.1.0", + "@tko/observable": "^4.1.0", + "@tko/utils": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/utils.functionrewrite/CHANGELOG.md b/packages/utils.functionrewrite/CHANGELOG.md index 430d25de6..e8bb27e47 100644 --- a/packages/utils.functionrewrite/CHANGELOG.md +++ b/packages/utils.functionrewrite/CHANGELOG.md @@ -1,5 +1,7 @@ # @tko/utils.functionrewrite +## 4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/utils.functionrewrite/package.json b/packages/utils.functionrewrite/package.json index 85ce01ff2..98c08cf92 100644 --- a/packages/utils.functionrewrite/package.json +++ b/packages/utils.functionrewrite/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/utils.functionrewrite", "description": "Rewrite `function {}` as lambdas (=>)", "module": "dist/index.js", diff --git a/packages/utils.jsx/CHANGELOG.md b/packages/utils.jsx/CHANGELOG.md index cae574b5d..b3c02a9b4 100644 --- a/packages/utils.jsx/CHANGELOG.md +++ b/packages/utils.jsx/CHANGELOG.md @@ -1,5 +1,30 @@ # @tko/utils.jsx +## 4.1.0 + +### Minor Changes + +- 7938c43: Add `options.jsxCleanBatchSize` (default `1000`) controlling JSX node cleanup + batching. Setting it to `0` runs cleanup synchronously on detach. Registered + via `defineOption` — the hardcoded `MAX_CLEAN_AT_ONCE` constant is gone, but + the new default matches it so production behavior is unchanged. + + Fixes a `ReferenceError: Element is not defined` in the `cli-happy-dom` test + project where the 25ms batch timer could fire after happy-dom had torn down + DOM globals. + +### Patch Changes + +- Updated dependencies [bdac39c] +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/computed@4.1.0 + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + - @tko/lifecycle@4.1.0 + - @tko/bind@4.1.0 + - @tko/provider.native@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/utils.jsx/package.json b/packages/utils.jsx/package.json index 7a6b6568c..16cf3898d 100644 --- a/packages/utils.jsx/package.json +++ b/packages/utils.jsx/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/utils.jsx", "description": "TKO JSX Rendering", "module": "dist/index.js", @@ -20,12 +20,12 @@ "author": "The Knockout Team", "license": "MIT", "dependencies": { - "@tko/bind": "^4.0.1", - "@tko/computed": "^4.0.1", - "@tko/lifecycle": "^4.0.1", - "@tko/observable": "^4.0.1", - "@tko/provider.native": "^4.0.1", - "@tko/utils": "^4.0.1" + "@tko/bind": "^4.1.0", + "@tko/computed": "^4.1.0", + "@tko/lifecycle": "^4.1.0", + "@tko/observable": "^4.1.0", + "@tko/provider.native": "^4.1.0", + "@tko/utils": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/utils.parser/CHANGELOG.md b/packages/utils.parser/CHANGELOG.md index d8accf751..f694f3133 100644 --- a/packages/utils.parser/CHANGELOG.md +++ b/packages/utils.parser/CHANGELOG.md @@ -1,5 +1,47 @@ # @tko/utils.parser +## 4.1.0 + +### Patch Changes + +- 49576cb: Drop dead polyfill probes from `@tko/utils` + + Removes runtime feature detection for capabilities that all supported runtimes + (modern browsers, Node, Bun, happy-dom) already expose unconditionally. The + public API surface is preserved as one-line passthroughs in + `packages/utils/src/compat.ts` so existing consumers continue to work; these + shims are slated for removal in the next major. + + - `functionSupportsLengthOverwrite` + `overwriteLengthPropertyIfSupported` — + `Object.defineProperty(fn, 'length', …)` has worked since IE9. Call sites + in `@tko/observable` now invoke `Object.defineProperty` directly. The + internal probe is gone; `overwriteLengthPropertyIfSupported` is preserved + on `@tko/utils` exports as an inline `Object.defineProperty` call. + - `useSymbols` + `createSymbolOrString` — `Symbol` is always defined; call + sites now use `Symbol(identifier)` directly. `createSymbolOrString` is + preserved as `s => Symbol(s)` on both `@tko/utils` exports and + `ko.utils.createSymbolOrString`. + - `stringTrim` + `stringStartsWith` — call sites use `String(value ?? '') +.trim()` / `value.startsWith(prefix)` inline. Both names remain exported + from `@tko/utils` as inline passthroughs. + - `toggleDomNodeCssClass` SVGAnimatedString fallback — `classList` is + available on every supported `Element` (including SVG since SVG2). + - `parseJson` no longer routes through `stringTrim`; it trims inline when the + input is a string. + + `packages/utils.parser/src/preparse.ts` also guards `str.match(bindingToken)` + against the `null` return case using `?? []` — previously relied on the match + never returning `null` for the transformed input. + + Patch-level for all packages: zero observable surface change for consumers + not reaching into internal probes (`useSymbols`, `functionSupportsLengthOverwrite`), + which had no monorepo callers. + +- Updated dependencies [3aea21c] +- Updated dependencies [49576cb] + - @tko/utils@4.1.0 + - @tko/observable@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/utils.parser/package.json b/packages/utils.parser/package.json index 9f9f73cb1..8e25f0275 100644 --- a/packages/utils.parser/package.json +++ b/packages/utils.parser/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/utils.parser", "description": "Parse the Javascript-like language used in data-bind and other HTML attributes (CSP-safe)", "module": "dist/index.js", @@ -8,8 +8,8 @@ ], "license": "MIT", "dependencies": { - "@tko/observable": "^4.0.1", - "@tko/utils": "^4.0.1" + "@tko/observable": "^4.1.0", + "@tko/utils": "^4.1.0" }, "homepage": "https://tko.io", "licenses": [ diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index fc95d7093..8f5900fab 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,64 @@ # @tko/utils +## 4.1.0 + +### Patch Changes + +- 3aea21c: Modernize synthetic event construction + + `triggerEvent` (exported from `@tko/utils`) now builds synthetic events using + `new MouseEvent`/`KeyboardEvent`/`Event` constructors instead of the + deprecated `document.createEvent('HTMLEvents')` + `initEvent(...)` path. This + restores native side-effects in modern DOM implementations (e.g. synthetic + clicks toggle checkbox `.checked` in happy-dom) without changing behavior in + real browsers. `relatedTarget` is still set to the target element for mouse + events to match the previous init-event argument list. + + `@tko/binding.core` event handler no longer assigns the legacy + `event.cancelBubble = true` before calling `event.stopPropagation()` — the + assignment is redundant on modern events and readonly on some implementations. + + `@tko/provider.component` now uses `Object.prototype.toString.call(node)` to + detect `HTMLUnknownElement` rather than `'' + node`, which is immune to + user-land `toString` overrides on custom elements. + +- 49576cb: Drop dead polyfill probes from `@tko/utils` + + Removes runtime feature detection for capabilities that all supported runtimes + (modern browsers, Node, Bun, happy-dom) already expose unconditionally. The + public API surface is preserved as one-line passthroughs in + `packages/utils/src/compat.ts` so existing consumers continue to work; these + shims are slated for removal in the next major. + + - `functionSupportsLengthOverwrite` + `overwriteLengthPropertyIfSupported` — + `Object.defineProperty(fn, 'length', …)` has worked since IE9. Call sites + in `@tko/observable` now invoke `Object.defineProperty` directly. The + internal probe is gone; `overwriteLengthPropertyIfSupported` is preserved + on `@tko/utils` exports as an inline `Object.defineProperty` call. + - `useSymbols` + `createSymbolOrString` — `Symbol` is always defined; call + sites now use `Symbol(identifier)` directly. `createSymbolOrString` is + preserved as `s => Symbol(s)` on both `@tko/utils` exports and + `ko.utils.createSymbolOrString`. + - `stringTrim` + `stringStartsWith` — call sites use `String(value ?? '') +.trim()` / `value.startsWith(prefix)` inline. Both names remain exported + from `@tko/utils` as inline passthroughs. + - `toggleDomNodeCssClass` SVGAnimatedString fallback — `classList` is + available on every supported `Element` (including SVG since SVG2). + - `parseJson` no longer routes through `stringTrim`; it trims inline when the + input is a string. + + `packages/utils.parser/src/preparse.ts` also guards `str.match(bindingToken)` + against the `null` return case using `?? []` — previously relied on the match + never returning `null` for the transformed input. + + Patch-level for all packages: zero observable surface change for consumers + not reaching into internal probes (`useSymbols`, `functionSupportsLengthOverwrite`), + which had no monorepo callers. + +- Updated dependencies [49576cb] + - @tko/builder@4.1.0 + - @tko/provider@4.1.0 + ## 4.0.1 ### Patch Changes diff --git a/packages/utils/package.json b/packages/utils/package.json index 68377f6c2..b026750d9 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.1.0", "name": "@tko/utils", "description": "TKO Utilities", "type": "module", @@ -24,8 +24,8 @@ }, "homepage": "https://tko.io", "dependencies": { - "@tko/provider": "^4.0.1", - "@tko/builder": "^4.0.1" + "@tko/provider": "^4.1.0", + "@tko/builder": "^4.1.0" }, "licenses": [ {