Socket
Socket
Sign inDemoInstall

solid-js

Package Overview
Dependencies
Maintainers
0
Versions
458
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solid-js - npm Package Compare versions

Comparing version 1.8.17 to 1.8.18

2

dist/dev.js

@@ -383,3 +383,3 @@ let taskIdCounter = 1,

if (p.status === "success") loadEnd(pr, p.value, undefined, lookup);
else loadEnd(pr, undefined, undefined, lookup);
else loadEnd(pr, undefined, castError(p.value), lookup);
return p;

@@ -386,0 +386,0 @@ }

@@ -476,3 +476,2 @@ const equalFn = (a, b) => a === b;

const SuspenseContext = createContext();
let resourceContext = null;
function createResource(source, fetcher, options = {}) {

@@ -505,3 +504,2 @@ if (arguments.length === 2) {

if (error) throw error;
if (resourceContext && p) resourceContext.push(p);
const resolved =

@@ -535,12 +533,3 @@ options.ssrLoadFrom !== "initial" &&

}
resourceContext = [];
const lookup = typeof source === "function" ? source() : source;
if (resourceContext.length) {
p = Promise.all(resourceContext).then(() =>
fetcher(source(), {
value
})
);
}
resourceContext = null;
if (!p) {

@@ -547,0 +536,0 @@ if (lookup == null || lookup === false) return;

@@ -361,3 +361,3 @@ let taskIdCounter = 1,

if (p.status === "success") loadEnd(pr, p.value, undefined, lookup);
else loadEnd(pr, undefined, undefined, lookup);
else loadEnd(pr, undefined, castError(p.value), lookup);
return p;

@@ -364,0 +364,0 @@ }

@@ -15,2 +15,3 @@ import {

e,
classes = [],
multiExpression = false;

@@ -22,2 +23,3 @@ while (Array.isArray(args[0])) args = args[0];

while (args.length) item(args.shift());
if (e instanceof Element && classes.length) e.classList.add(...classes);
return e;

@@ -48,2 +50,14 @@ };

for (const k in d) {
if (k === "class" && classes.length !== 0) {
const fixedClasses = classes.join(" "),
value =
typeof d["class"].value === "function"
? () => fixedClasses + " " + d["class"].value()
: fixedClasses + " " + l["class"];
Object.defineProperty(l, "class", {
...d[k],
value
});
classes = [];
}
if (k !== "ref" && k.slice(0, 2) !== "on" && typeof d[k].value === "function") {

@@ -103,3 +117,3 @@ r.dynamicProperty(l, k);

: document.createElement(v);
else if (v[0] === ".") e.classList.add(s);
else if (v[0] === ".") classes.push(s);
else if (v[0] === "#") e.setAttribute("id", s);

@@ -106,0 +120,0 @@ }

{
"name": "solid-js",
"description": "A declarative JavaScript library for building user interfaces.",
"version": "1.8.17",
"version": "1.8.18",
"author": "Ryan Carniato",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -13,3 +13,3 @@ <p>

**[Website](https://www.solidjs.com/) • [API Docs](https://www.solidjs.com/docs/latest/api) • [Features Tutorial](https://www.solidjs.com/tutorial/introduction_basics) • [Playground](https://playground.solidjs.com/?version=1.3.13#NobwRAdghgtgpmAXGGUCWEwBowBcCeADgsrgM4Ae2YZA9gK4BOAxiWGjIbY7gAQi9GcCABM4jXgF9eAM0a0YvADo1aAGzQiAtACsyAegDucAEYqA3EogcuPfr2ZCouOAGU0Ac2hqps+YpU6DW09CysrGXoIZlw0WgheAGEGCBdGAAoASn4rXgd4sj5gZhTcLF4yOFxkqNwAXV4AXgcnF3cvKDV0gAZMywT8iELeDEc4eFSm3iymgD4KqprU9JLamYBqXgBGPvCBoVwmBPTcvN4AHhN6XFx43gJiRpUrm-iVXnjEjWYAa0aQUZCCa4SSzU5nfirZaZSTgi76F63CBgga7CCwiBWISicTpGaNebnJZpXj6WblES0Zj0YEAOg8VQAompxsJcAAhfAASREJzAUEIhBUmTRYEkdSAA) • [Discord](https://discord.com/invite/solidjs)**
**[Website](https://www.solidjs.com/) • [API Docs](https://docs.solidjs.com/) • [Features Tutorial](https://www.solidjs.com/tutorial/introduction_basics) • [Playground](https://playground.solidjs.com/?version=1.3.13#NobwRAdghgtgpmAXGGUCWEwBowBcCeADgsrgM4Ae2YZA9gK4BOAxiWGjIbY7gAQi9GcCABM4jXgF9eAM0a0YvADo1aAGzQiAtACsyAegDucAEYqA3EogcuPfr2ZCouOAGU0Ac2hqps+YpU6DW09CysrGXoIZlw0WgheAGEGCBdGAAoASn4rXgd4sj5gZhTcLF4yOFxkqNwAXV4AXgcnF3cvKDV0gAZMywT8iELeDEc4eFSm3iymgD4KqprU9JLamYBqXgBGPvCBoVwmBPTcvN4AHhN6XFx43gJiRpUrm-iVXnjEjWYAa0aQUZCCa4SSzU5nfirZaZSTgi76F63CBgga7CCwiBWISicTpGaNebnJZpXj6WblES0Zj0YEAOg8VQAompxsJcAAhfAASREJzAUEIhBUmTRYEkdSAA) • [Discord](https://discord.com/invite/solidjs)**

@@ -16,0 +16,0 @@ Solid is a declarative JavaScript library for creating user interfaces. Instead of using a Virtual DOM, it compiles its templates to real DOM nodes and updates them with fine-grained reactions. Declare your state and use it throughout your app, and when a piece of state changes, only the code that depends on it will rerun. Check out our [intro video](https://www.youtube.com/watch?v=J70HXl1KhWE&ab_channel=SolidJS) or read on!

@@ -246,3 +246,3 @@ export declare const $RAW: unique symbol,

*
* @description https://www.solidjs.com/docs/latest/api#createstore
* @description https://docs.solidjs.com/reference/store-utilities/create-store
*/

@@ -249,0 +249,0 @@ export declare function createStore<T extends object = {}>(

@@ -30,3 +30,3 @@ import { Accessor } from "./signal.js";

*
* @description https://www.solidjs.com/docs/latest/api#maparray
* @description https://docs.solidjs.com/reference/reactive-utilities/map-array
*/

@@ -45,3 +45,3 @@ export declare function mapArray<T, U>(

*
* @description https://www.solidjs.com/docs/latest/api#indexarray
* @description https://docs.solidjs.com/reference/reactive-utilities/index-array
*/

@@ -48,0 +48,0 @@ export declare function indexArray<T, U>(

@@ -28,3 +28,3 @@ import { Accessor, Setter } from "./signal.js";

* ```
* description https://www.solidjs.com/docs/latest/api#observable
* description https://docs.solidjs.com/reference/reactive-utilities/observable
*/

@@ -31,0 +31,0 @@ export declare function observable<T>(input: Accessor<T>): Observable<T>;

@@ -99,3 +99,3 @@ /**

*
* @description https://www.solidjs.com/docs/latest/api#createroot
* @description https://docs.solidjs.com/reference/reactive-utilities/create-root
*/

@@ -137,3 +137,3 @@ export declare function createRoot<T>(fn: RootFunction<T>, detachedOwner?: typeof Owner): T;

*
* @description https://www.solidjs.com/docs/latest/api#createsignal
* @description https://docs.solidjs.com/reference/basic-reactivity/create-signal
*/

@@ -161,3 +161,3 @@ export declare function createSignal<T>(): Signal<T | undefined>;

*
* @description https://www.solidjs.com/docs/latest/api#createcomputed
* @description https://docs.solidjs.com/reference/secondary-primitives/create-computed
*/

@@ -185,3 +185,3 @@ export declare function createComputed<Next>(

*
* @description https://www.solidjs.com/docs/latest/api#createrendereffect
* @description https://docs.solidjs.com/reference/secondary-primitives/create-render-effect
*/

@@ -209,3 +209,3 @@ export declare function createRenderEffect<Next>(

*
* @description https://www.solidjs.com/docs/latest/api#createeffect
* @description https://docs.solidjs.com/reference/basic-reactivity/create-effect
*/

@@ -233,3 +233,3 @@ export declare function createEffect<Next>(

*
* @description https://www.solidjs.com/docs/latest/api#createreaction
* @description https://docs.solidjs.com/reference/secondary-primitives/create-reaction
*/

@@ -260,3 +260,3 @@ export declare function createReaction(

*
* @description https://www.solidjs.com/docs/latest/api#creatememo
* @description https://docs.solidjs.com/reference/basic-reactivity/create-memo
*/

@@ -368,3 +368,3 @@ export declare function createMemo<Next extends Prev, Prev = Next>(

*
* @description https://www.solidjs.com/docs/latest/api#createresource
* @description https://docs.solidjs.com/reference/basic-reactivity/create-resource
*/

@@ -405,3 +405,3 @@ export declare function createResource<T, R = unknown>(

*
* @description https://www.solidjs.com/docs/latest/api#createdeferred
* @description https://docs.solidjs.com/reference/secondary-primitives/create-deferred
*/

@@ -435,3 +435,3 @@ export declare function createDeferred<T>(

*
* @description https://www.solidjs.com/docs/latest/api#createselector
* @description https://docs.solidjs.com/reference/secondary-primitives/create-selector
*/

@@ -448,3 +448,3 @@ export declare function createSelector<T, U = T>(

*
* @description https://www.solidjs.com/docs/latest/api#batch
* @description https://docs.solidjs.com/reference/reactive-utilities/batch
*/

@@ -457,3 +457,3 @@ export declare function batch<T>(fn: Accessor<T>): T;

*
* @description https://www.solidjs.com/docs/latest/api#untrack
* @description https://docs.solidjs.com/reference/reactive-utilities/untrack
*/

@@ -509,3 +509,3 @@ export declare function untrack<T>(fn: Accessor<T>): T;

*
* @description https://www.solidjs.com/docs/latest/api#on
* @description https://docs.solidjs.com/reference/jsx-attributes/on_
*/

@@ -532,3 +532,3 @@ export declare function on<S, Next extends Prev, Prev = Next>(

*
* @description https://www.solidjs.com/docs/latest/api#onmount
* @description https://docs.solidjs.com/reference/lifecycle/on-mount
*/

@@ -542,3 +542,3 @@ export declare function onMount(fn: () => void): void;

*
* @description https://www.solidjs.com/docs/latest/api#oncleanup
* @description https://docs.solidjs.com/reference/lifecycle/on-cleanup
*/

@@ -553,3 +553,3 @@ export declare function onCleanup<T extends () => any>(fn: T): T;

*
* @description https://www.solidjs.com/docs/latest/api#catcherror
* @description https://docs.solidjs.com/reference/reactive-utilities/catch-error
*/

@@ -566,3 +566,3 @@ export declare function catchError<T>(fn: () => T, handler: (err: Error) => void): T | undefined;

*
* @description https://www.solidjs.com/docs/latest/api#usetransition
* @description https://docs.solidjs.com/reference/reactive-utilities/start-transition
*/

@@ -579,3 +579,3 @@ export declare function startTransition(fn: () => unknown): Promise<void>;

*
* @description https://www.solidjs.com/docs/latest/api#usetransition
* @description https://docs.solidjs.com/reference/reactive-utilities/use-transition
*/

@@ -616,3 +616,3 @@ export declare function useTransition(): Transition;

*
* @description https://www.solidjs.com/docs/latest/api#createcontext
* @description https://docs.solidjs.com/reference/component-apis/create-context
*/

@@ -630,3 +630,3 @@ export declare function createContext<T>(

*
* @description https://www.solidjs.com/docs/latest/api#usecontext
* @description https://docs.solidjs.com/reference/component-apis/use-context
*/

@@ -645,3 +645,3 @@ export declare function useContext<T>(context: Context<T>): T;

*
* @description https://www.solidjs.com/docs/latest/api#children
* @description https://docs.solidjs.com/reference/component-apis/children
*/

@@ -680,5 +680,5 @@ export declare function children(fn: Accessor<JSX.Element>): ChildrenReturn;

*
* @description https://www.solidjs.com/docs/latest/api#onerror
* @description https://www.solidjs.com/docs/latest/api#onerror | https://docs.solidjs.com/reference/reactive-utilities/catch-error
*/
export declare function onError(fn: (err: Error) => void): void;
export {};

@@ -14,3 +14,3 @@ import { Accessor } from "../reactive/signal.js";

*
* @description https://www.solidjs.com/docs/latest/api#for
* @description https://docs.solidjs.com/reference/components/for
*/

@@ -33,3 +33,3 @@ export declare function For<T extends readonly any[], U extends JSX.Element>(props: {

*
* @description https://www.solidjs.com/docs/latest/api#index
* @description https://docs.solidjs.com/reference/components/index
*/

@@ -44,3 +44,3 @@ export declare function Index<T extends readonly any[], U extends JSX.Element>(props: {

* Conditionally render its children or an optional fallback component
* @description https://www.solidjs.com/docs/latest/api#show
* @description https://docs.solidjs.com/reference/components/show
*/

@@ -77,3 +77,3 @@ export declare function Show<

* ```
* @description https://www.solidjs.com/docs/latest/api#switchmatch
* @description https://docs.solidjs.com/reference/components/switch-and-match
*/

@@ -96,3 +96,3 @@ export declare function Switch(props: {

* ```
* @description https://www.solidjs.com/docs/latest/api#switchmatch
* @description https://docs.solidjs.com/reference/components/switch-and-match
*/

@@ -129,3 +129,3 @@ export declare function Match<

*
* @description https://www.solidjs.com/docs/latest/api#errorboundary
* @description https://docs.solidjs.com/reference/components/error-boundary
*/

@@ -132,0 +132,0 @@ export declare function ErrorBoundary(props: {

@@ -5,3 +5,3 @@ import type { JSX } from "../jsx.js";

*
* @description https://www.solidjs.com/docs/latest/api#suspenselist-experimental
* @description https://docs.solidjs.com/reference/components/suspense-list
*/

@@ -22,3 +22,3 @@ export declare function SuspenseList(props: {

* ```
* @description https://www.solidjs.com/docs/latest/api#suspense
* @description https://docs.solidjs.com/reference/components/suspense
*/

@@ -25,0 +25,0 @@ export declare function Suspense(props: {

@@ -94,3 +94,3 @@ import { Accessor, Setter, Signal } from "./reactive.js";

* Conditionally render its children or an optional fallback component
* @description https://www.solidjs.com/docs/latest/api#show
* @description https://docs.solidjs.com/reference/components/show
*/

@@ -97,0 +97,0 @@ export declare function Show<T>(props: {

@@ -893,3 +893,6 @@ import {

if (hydrating) return current;
if (t === "number") value = value.toString();
if (t === "number") {
value = value.toString();
if (value === current) return current;
}
if (multi) {

@@ -896,0 +899,0 @@ let node = current[0];

@@ -450,3 +450,3 @@ import { sharedConfig, createRoot, splitProps } from "solid-js";

} else {
result += `${Aliases[prop] || prop}="${escape(value, true)}"`;
result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
}

@@ -673,3 +673,3 @@ if (i !== keys.length - 1) result += " ";

classResolved = true;
} else if (BooleanAttributes.has(prop)) {
} else if (prop !== "value" && Properties.has(prop)) {
if (value) result += prop;

@@ -686,3 +686,3 @@ else continue;

if (prop.slice(0, 5) === "attr:") prop = prop.slice(5);
result += `${Aliases[prop] || prop}="${escape(value, true)}"`;
result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
}

@@ -689,0 +689,0 @@ if (i !== keys.length - 1) result += " ";

@@ -881,3 +881,6 @@ import {

if (hydrating) return current;
if (t === "number") value = value.toString();
if (t === "number") {
value = value.toString();
if (value === current) return current;
}
if (multi) {

@@ -884,0 +887,0 @@ let node = current[0];

@@ -24,3 +24,3 @@ import { hydrate as hydrateCore } from "./client.js";

*
* @description https://www.solidjs.com/docs/latest/api#portal
* @description https://docs.solidjs.com/reference/components/portal
*/

@@ -53,4 +53,4 @@ export declare function Portal<T extends boolean = false, S extends boolean = false>(props: {

* ```
* @description https://www.solidjs.com/docs/latest/api#dynamic
* @description https://docs.solidjs.com/reference/components/dynamic
*/
export declare function Dynamic<T extends ValidComponent>(props: DynamicProps<T>): JSX.Element;

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

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 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc