Skip to content

Commit 92291a4

Browse files
Bump @preact/signals-core from 1.12.2 to 1.13.0 (#561)
Bumps [@preact/signals-core](https://github.com/preactjs/signals) from 1.12.2 to 1.13.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/preactjs/signals/releases"><code>@​preact/signals-core</code>'s releases</a>.</em></p> <blockquote> <h2><code>@​preact/signals-core</code><a href="https://github.com/1"><code>@​1</code></a>.13.0</h2> <h3>Minor Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/preactjs/signals/pull/812">#812</a> <a href="https://github.com/preactjs/signals/commit/19ac39bb4a7a3273090753a50a58efb717f5553d"><code>19ac39b</code></a> Thanks <a href="https://github.com/andrewiggins"><code>@​andrewiggins</code></a>! - Add <code>createModel</code> and <code>action</code> to signals core package</p> <p><strong><code>createModel</code></strong> provides a structured way to create reactive model classes that encapsulate signals, computed values, and actions:</p> <pre lang="js"><code>const CounterModel = createModel((initialCount = 0) =&gt; { const count = signal(initialCount); const doubled = computed(() =&gt; count.value * 2); <pre><code>effect(() =&amp;gt; { console.log(&amp;quot;Count changed:&amp;quot;, count.value); }); return { count, doubled, increment() { count.value++; }, }; </code></pre> <p>});</p> <p>const counter = new CounterModel(5); counter.increment(); // Updates are automatically batched counter<a href="">Symbol.dispose</a>; // Cleans up all effects </code></pre></p> <p>Key features:</p> <ul> <li>Factory functions can accept arguments for initialization</li> <li>All methods are automatically wrapped as actions (batched &amp; untracked)</li> <li>Effects created during model construction are captured and disposed when the model is disposed via <code>Symbol.dispose</code></li> <li>TypeScript validates that models only contain signals, actions, or nested objects with signals/actions</li> </ul> <p><strong><code>action</code></strong> is a helper that wraps a function to run batched and untracked:</p> <pre lang="js"><code>const updateAll = action(items =&gt; { items.forEach(item =&gt; item.value++); }); // All updates batched into single notification </code></pre> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/preactjs/signals/commits/@preact/[email protected]">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@preact/signals-core&package-manager=npm_and_yarn&previous-version=1.12.2&new-version=1.13.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 539e05d commit 92291a4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230
"typescript": "^5.9.3"
231231
},
232232
"dependencies": {
233-
"@preact/signals-core": "^1.12.2",
233+
"@preact/signals-core": "^1.13.0",
234234
"semver": "^7.7.3",
235235
"vscode-languageclient": "^9.0.1",
236236
"which": "^6.0.0"

0 commit comments

Comments
 (0)