Comparing version 1.6.15 to 1.6.16
@@ -587,3 +587,3 @@ const equalFn = (a, b) => a === b; | ||
}); | ||
o && cleanNode(o); | ||
cleanNode(o); | ||
return runWithOwner(o, () => { | ||
@@ -600,8 +600,10 @@ return createComponent(SuspenseContext.Provider, { | ||
if (suspenseComplete(value)) return res; | ||
onError(err => { | ||
if (!done || !done(undefined, err)) { | ||
if (o) runWithOwner(o.owner, () => { | ||
throw err; | ||
});else throw err; | ||
} | ||
runWithOwner(o, () => { | ||
onError(err => { | ||
if (!done || !done(undefined, err)) { | ||
runWithOwner(o.owner, () => { | ||
throw err; | ||
}); | ||
} | ||
}); | ||
}); | ||
@@ -608,0 +610,0 @@ done = ctx.async ? ctx.registerFragment(id) : undefined; |
{ | ||
"name": "solid-js", | ||
"description": "A declarative JavaScript library for building user interfaces.", | ||
"version": "1.6.15", | ||
"version": "1.6.16", | ||
"author": "Ryan Carniato", | ||
@@ -281,6 +281,6 @@ "license": "MIT", | ||
"link": "symlink-dir . node_modules/solid-js", | ||
"test": "jest", | ||
"coverage": "jest --coverage", | ||
"test": "vitest run", | ||
"coverage": "vitest run --coverage", | ||
"test-types": "tsc --project tsconfig.test.json" | ||
} | ||
} |
@@ -26,2 +26,3 @@ export interface RendererOptions<NodeType> { | ||
mergeProps(...sources: unknown[]): unknown; | ||
use<A, T>(fn: (element: NodeType, arg: A) => T, element: NodeType, arg: A): T; | ||
} | ||
@@ -28,0 +29,0 @@ |
@@ -366,3 +366,11 @@ import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, createMemo, createSignal, onMount, onCleanup, splitProps, $DEVCOMP } from 'solid-js'; | ||
function insertExpression(parent, value, current, marker, unwrapArray) { | ||
if (sharedConfig.context && !current) current = [...parent.childNodes]; | ||
if (sharedConfig.context) { | ||
!current && (current = [...parent.childNodes]); | ||
let cleaned = []; | ||
for (let i = 0; i < current.length; i++) { | ||
const node = current[i]; | ||
if (node.nodeType === 8 && node.data === "!") node.remove();else cleaned.push(node); | ||
} | ||
current = cleaned; | ||
} | ||
while (typeof current === "function") current = current(); | ||
@@ -453,5 +461,4 @@ if (value === current) return current; | ||
const value = String(item); | ||
if (value === "<!>") { | ||
if (prev && prev.nodeType === 8) normalized.push(prev); | ||
} else if (prev && prev.nodeType === 3 && prev.data === value) { | ||
if (prev && prev.nodeType === 3) { | ||
prev.data = value; | ||
normalized.push(prev); | ||
@@ -458,0 +465,0 @@ } else normalized.push(document.createTextNode(value)); |
@@ -579,9 +579,6 @@ import { sharedConfig, createRoot, splitProps } from 'solid-js'; | ||
if (t !== "string") { | ||
if (!attr && t === "function") return escape(s(), attr); | ||
if (!attr && t === "function") return escape(s()); | ||
if (!attr && Array.isArray(s)) { | ||
let r = ""; | ||
for (let i = 0; i < s.length; i++) r += resolveSSRNode(escape(s[i], attr)); | ||
return { | ||
t: r | ||
}; | ||
for (let i = 0; i < s.length; i++) s[i] = escape(s[i]); | ||
return s; | ||
} | ||
@@ -631,4 +628,8 @@ if (attr && t === "boolean") return String(s); | ||
if (Array.isArray(node)) { | ||
let prev = {}; | ||
let mapped = ""; | ||
for (let i = 0, len = node.length; i < len; i++) mapped += resolveSSRNode(node[i]); | ||
for (let i = 0, len = node.length; i < len; i++) { | ||
if (typeof prev !== "object" && typeof node[i] !== "object") mapped += `<!--!-->`; | ||
mapped += resolveSSRNode(prev = node[i]); | ||
} | ||
return mapped; | ||
@@ -635,0 +636,0 @@ } |
@@ -366,3 +366,11 @@ import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, createMemo, createSignal, onMount, onCleanup, splitProps, $DEVCOMP } from 'solid-js'; | ||
function insertExpression(parent, value, current, marker, unwrapArray) { | ||
if (sharedConfig.context && !current) current = [...parent.childNodes]; | ||
if (sharedConfig.context) { | ||
!current && (current = [...parent.childNodes]); | ||
let cleaned = []; | ||
for (let i = 0; i < current.length; i++) { | ||
const node = current[i]; | ||
if (node.nodeType === 8 && node.data === "!") node.remove();else cleaned.push(node); | ||
} | ||
current = cleaned; | ||
} | ||
while (typeof current === "function") current = current(); | ||
@@ -453,5 +461,4 @@ if (value === current) return current; | ||
const value = String(item); | ||
if (value === "<!>") { | ||
if (prev && prev.nodeType === 8) normalized.push(prev); | ||
} else if (prev && prev.nodeType === 3 && prev.data === value) { | ||
if (prev && prev.nodeType === 3) { | ||
prev.data = value; | ||
normalized.push(prev); | ||
@@ -458,0 +465,0 @@ } else normalized.push(document.createTextNode(value)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
798339
22224