Download patches/solid-js@1.9.10.patch from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 7.44 kB
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/patches/solid-js%401.9.10.patch
- Command line
-
hf download hf://SaylorTwift/opencode/patches/solid-js@1.9.10.patch
-
curl -L -o solid-js@1.9.10.patch https://huggingface.co/SaylorTwift/opencode/resolve/main/patches/solid-js%401.9.10.patch
7.44 kB
| diff --git a/dist/dev.cjs b/dist/dev.cjs | |
| index 7104749..dc3eac9 100644 | |
| --- a/dist/dev.cjs | |
| +++ b/dist/dev.cjs | |
| function runComputation(node, value, time) { | |
| if (node.updatedAt != null && "observers" in node) { | |
| writeSignal(node, nextValue, true); | |
| } else if (Transition && Transition.running && node.pure) { | |
| + // On first computation during transition, also set committed value #2046 | |
| + if (!Transition.sources.has(node)) node.value = nextValue; | |
| Transition.sources.add(node); | |
| node.tValue = nextValue; | |
| } else node.value = nextValue; | |
| function cleanNode(node) { | |
| } | |
| } | |
| if (node.tOwned) { | |
| - for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]); | |
| + const tOwned = node.tOwned; | |
| delete node.tOwned; | |
| + for (i = tOwned.length - 1; i >= 0; i--) cleanNode(tOwned[i]); | |
| } | |
| if (Transition && Transition.running && node.pure) { | |
| reset(node, true); | |
| } else if (node.owned) { | |
| - for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]); | |
| + const owned = node.owned; | |
| node.owned = null; | |
| + for (i = owned.length - 1; i >= 0; i--) cleanNode(owned[i]); | |
| } | |
| if (node.cleanups) { | |
| - for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i](); | |
| + const cleanups = node.cleanups; | |
| node.cleanups = null; | |
| + for (i = cleanups.length - 1; i >= 0; i--) cleanups[i](); | |
| } | |
| if (Transition && Transition.running) node.tState = 0;else node.state = 0; | |
| delete node.sourceMap; | |
| diff --git a/dist/dev.js b/dist/dev.js | |
| index ea5e4bc..a2e2d59 100644 | |
| --- a/dist/dev.js | |
| +++ b/dist/dev.js | |
| function runComputation(node, value, time) { | |
| if (node.updatedAt != null && "observers" in node) { | |
| writeSignal(node, nextValue, true); | |
| } else if (Transition && Transition.running && node.pure) { | |
| + // On first computation during transition, also set committed value #2046 | |
| + if (!Transition.sources.has(node)) node.value = nextValue; | |
| Transition.sources.add(node); | |
| node.tValue = nextValue; | |
| } else node.value = nextValue; | |
| function cleanNode(node) { | |
| } | |
| } | |
| if (node.tOwned) { | |
| - for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]); | |
| + const tOwned = node.tOwned; | |
| delete node.tOwned; | |
| + for (i = tOwned.length - 1; i >= 0; i--) cleanNode(tOwned[i]); | |
| } | |
| if (Transition && Transition.running && node.pure) { | |
| reset(node, true); | |
| } else if (node.owned) { | |
| - for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]); | |
| + const owned = node.owned; | |
| node.owned = null; | |
| + for (i = owned.length - 1; i >= 0; i--) cleanNode(owned[i]); | |
| } | |
| if (node.cleanups) { | |
| - for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i](); | |
| + const cleanups = node.cleanups; | |
| node.cleanups = null; | |
| + for (i = cleanups.length - 1; i >= 0; i--) cleanups[i](); | |
| } | |
| if (Transition && Transition.running) node.tState = 0;else node.state = 0; | |
| delete node.sourceMap; | |
| diff --git a/dist/server.cjs b/dist/server.cjs | |
| index e715309..188ba81 100644 | |
| --- a/dist/server.cjs | |
| +++ b/dist/server.cjs | |
| function onCleanup(fn) { | |
| } | |
| function cleanNode(node) { | |
| if (node.owned) { | |
| - for (let i = 0; i < node.owned.length; i++) cleanNode(node.owned[i]); | |
| + const owned = node.owned; | |
| node.owned = null; | |
| + for (let i = 0; i < owned.length; i++) cleanNode(owned[i]); | |
| } | |
| if (node.cleanups) { | |
| - for (let i = 0; i < node.cleanups.length; i++) node.cleanups[i](); | |
| + const cleanups = node.cleanups; | |
| node.cleanups = null; | |
| + for (let i = 0; i < cleanups.length; i++) cleanups[i](); | |
| } | |
| } | |
| function catchError(fn, handler) { | |
| diff --git a/dist/server.js b/dist/server.js | |
| index d5f8803..320d9af 100644 | |
| --- a/dist/server.js | |
| +++ b/dist/server.js | |
| function onCleanup(fn) { | |
| } | |
| function cleanNode(node) { | |
| if (node.owned) { | |
| - for (let i = 0; i < node.owned.length; i++) cleanNode(node.owned[i]); | |
| + const owned = node.owned; | |
| node.owned = null; | |
| + for (let i = 0; i < owned.length; i++) cleanNode(owned[i]); | |
| } | |
| if (node.cleanups) { | |
| - for (let i = 0; i < node.cleanups.length; i++) node.cleanups[i](); | |
| + const cleanups = node.cleanups; | |
| node.cleanups = null; | |
| + for (let i = 0; i < cleanups.length; i++) cleanups[i](); | |
| } | |
| } | |
| function catchError(fn, handler) { | |
| diff --git a/dist/solid.cjs b/dist/solid.cjs | |
| index 7c133a2..5ef1501 100644 | |
| --- a/dist/solid.cjs | |
| +++ b/dist/solid.cjs | |
| function runComputation(node, value, time) { | |
| if (node.updatedAt != null && "observers" in node) { | |
| writeSignal(node, nextValue, true); | |
| } else if (Transition && Transition.running && node.pure) { | |
| + // On first computation during transition, also set committed value #2046 | |
| + if (!Transition.sources.has(node)) node.value = nextValue; | |
| Transition.sources.add(node); | |
| node.tValue = nextValue; | |
| } else node.value = nextValue; | |
| function cleanNode(node) { | |
| } | |
| } | |
| if (node.tOwned) { | |
| - for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]); | |
| + const tOwned = node.tOwned; | |
| delete node.tOwned; | |
| + for (i = tOwned.length - 1; i >= 0; i--) cleanNode(tOwned[i]); | |
| } | |
| if (Transition && Transition.running && node.pure) { | |
| reset(node, true); | |
| } else if (node.owned) { | |
| - for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]); | |
| + const owned = node.owned; | |
| node.owned = null; | |
| + for (i = owned.length - 1; i >= 0; i--) cleanNode(owned[i]); | |
| } | |
| if (node.cleanups) { | |
| - for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i](); | |
| + const cleanups = node.cleanups; | |
| node.cleanups = null; | |
| + for (i = cleanups.length - 1; i >= 0; i--) cleanups[i](); | |
| } | |
| if (Transition && Transition.running) node.tState = 0;else node.state = 0; | |
| } | |
| diff --git a/dist/solid.js b/dist/solid.js | |
| index 656fd26..6e0038c 100644 | |
| --- a/dist/solid.js | |
| +++ b/dist/solid.js | |
| function runComputation(node, value, time) { | |
| if (node.updatedAt != null && "observers" in node) { | |
| writeSignal(node, nextValue, true); | |
| } else if (Transition && Transition.running && node.pure) { | |
| + // On first computation during transition, also set committed value #2046 | |
| + if (!Transition.sources.has(node)) node.value = nextValue; | |
| Transition.sources.add(node); | |
| node.tValue = nextValue; | |
| } else node.value = nextValue; | |
| function cleanNode(node) { | |
| } | |
| } | |
| if (node.tOwned) { | |
| - for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]); | |
| + const tOwned = node.tOwned; | |
| delete node.tOwned; | |
| + for (i = tOwned.length - 1; i >= 0; i--) cleanNode(tOwned[i]); | |
| } | |
| if (Transition && Transition.running && node.pure) { | |
| reset(node, true); | |
| } else if (node.owned) { | |
| - for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]); | |
| + const owned = node.owned; | |
| node.owned = null; | |
| + for (i = owned.length - 1; i >= 0; i--) cleanNode(owned[i]); | |
| } | |
| if (node.cleanups) { | |
| - for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i](); | |
| + const cleanups = node.cleanups; | |
| node.cleanups = null; | |
| + for (i = cleanups.length - 1; i >= 0; i--) cleanups[i](); | |
| } | |
| if (Transition && Transition.running) node.tState = 0;else node.state = 0; | |
| } | |