New:Socket for Asana Is Now Available.Learn more
Sign In

solid-js

Package Overview
Dependencies
Maintainers
1
Versions
532
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
2.0.0-beta.18
to
2.0.0-beta.19
+40
-31
dist/dev.cjs

@@ -60,10 +60,10 @@ 'use strict';

registry: undefined,
done: false,
getNextContextId() {
const o = signals.getOwner();
if (!o) throw new Error(`getNextContextId cannot be used under non-hydrating context`);
if (signals.getContext(NoHydrateContext)) return undefined;
return signals.getNextChildId(o);
}
done: false
};
function hydrationGetNextContextId() {
const o = signals.getOwner();
if (!o) throw new Error(`getNextContextId cannot be used under non-hydrating context`);
if (signals.getContext(NoHydrateContext)) return undefined;
return signals.getNextChildId(o);
}
let _hydrationEndCallbacks = null;

@@ -111,18 +111,22 @@ let _pendingBoundaries = 0;

let _createEffect;
class MockPromise {
static {
for (const k of ["all", "allSettled", "any", "race", "reject", "resolve"]) {
MockPromise[k] = () => new MockPromise();
let _createLoadingBoundary;
let _lazyHydrationLookup;
// it in EVERY client bundle even with zero references; the PURE-annotated
const MockPromise = /* @__PURE__ */(() => {
class MockPromise {
catch() {
return new MockPromise();
}
then() {
return new MockPromise();
}
finally() {
return new MockPromise();
}
}
catch() {
return new MockPromise();
for (const k of ["all", "allSettled", "any", "race", "reject", "resolve"]) {
MockPromise[k] = () => new MockPromise();
}
then() {
return new MockPromise();
}
finally() {
return new MockPromise();
}
}
return MockPromise;
})();
function subFetch(fn, prev) {

@@ -555,2 +559,12 @@ const ogFetch = fetch;

}
function lazyHydrationLookup(comp, moduleUrl) {
const o = signals.getOwner();
const key = o && o.id != null ? signals.peekNextChildId(o) : undefined;
const cached = key != null ? globalThis._$HY?.modules?.[key] : undefined;
if (cached) return () => cached.default;
if (!comp && moduleUrl) {
throw new Error(`lazy() module "${moduleUrl}" (hydration id "${key}") was not preloaded before ` + "hydration. Ensure it is inside a Loading boundary.");
}
return comp;
}
function enableHydration() {

@@ -566,2 +580,5 @@ _createMemo = hydratedCreateMemo;

_createEffect = hydratedCreateEffect;
_createLoadingBoundary = hydratedCreateLoadingBoundary;
_lazyHydrationLookup = lazyHydrationLookup;
sharedConfig.getNextContextId = hydrationGetNextContextId;
_hydratingValue = sharedConfig.hydrating;

@@ -693,3 +710,4 @@ _doneValue = sharedConfig.done;

}
function createLoadingBoundary(fn, fallback, options) {
const createLoadingBoundary = (fn, fallback, options) => (_createLoadingBoundary || signals.createLoadingBoundary)(fn, fallback, options);
function hydratedCreateLoadingBoundary(fn, fallback, options) {
if (!sharedConfig.hydrating) return signals.createLoadingBoundary(fn, fallback, options);

@@ -792,12 +810,3 @@ let settledSerializationResumeQueued = false;

const wrap = props => {
if (sharedConfig.hydrating) {
const o = signals.getOwner();
const key = o && o.id != null ? signals.peekNextChildId(o) : undefined;
const cached = key != null ? globalThis._$HY?.modules?.[key] : undefined;
if (cached) {
comp = () => cached.default;
} else if (!comp && moduleUrl) {
throw new Error(`lazy() module "${moduleUrl}" (hydration id "${key}") was not preloaded before ` + "hydration. Ensure it is inside a Loading boundary.");
}
}
if (sharedConfig.hydrating) comp = _lazyHydrationLookup(comp, moduleUrl);
if (!comp) {

@@ -804,0 +813,0 @@ p || (p = fn());

@@ -1,2 +0,2 @@

import { getContext, createMemo as createMemo$1, flatten, createRoot, setContext, getOwner, untrack, createOwner, runWithOwner, createEffect as createEffect$1, createErrorBoundary as createErrorBoundary$1, createLoadingBoundary as createLoadingBoundary$1, createOptimistic as createOptimistic$1, createOptimisticStore as createOptimisticStore$1, createProjection as createProjection$1, createRenderEffect as createRenderEffect$1, createRevealOrder as createRevealOrder$1, createSignal as createSignal$1, createStore as createStore$1, setSnapshotCapture, releaseSnapshotScope, getNextChildId, onCleanup, isDisposed, peekNextChildId, clearSnapshots, flush, markSnapshotScope, mapArray, repeat, DEV as DEV$1 } from '@solidjs/signals';
import { getContext, createMemo as createMemo$1, flatten, createRoot, setContext, getOwner, untrack, createOwner, runWithOwner, createEffect as createEffect$1, createErrorBoundary as createErrorBoundary$1, createLoadingBoundary as createLoadingBoundary$1, createOptimistic as createOptimistic$1, createOptimisticStore as createOptimisticStore$1, createProjection as createProjection$1, createRenderEffect as createRenderEffect$1, createRevealOrder as createRevealOrder$1, createSignal as createSignal$1, createStore as createStore$1, setSnapshotCapture, releaseSnapshotScope, peekNextChildId, getNextChildId, clearSnapshots, flush, markSnapshotScope, onCleanup, isDisposed, mapArray, repeat, DEV as DEV$1 } from '@solidjs/signals';
export { $PROXY, $REFRESH, $TRACK, NotReadyError, action, affects, createOwner, createReaction, createRoot, createTrackedEffect, deep, enableExternalSource, enforceLoadingBoundary, flatten, flush, getNextChildId, getObserver, getOwner, isDisposed, isEqual, isPending, isWrappable, latest, mapArray, merge, omit, onCleanup, onSettled, reconcile, refresh, repeat, resolve, runWithOwner, snapshot, storePath, untrack } from '@solidjs/signals';

@@ -59,10 +59,10 @@

registry: undefined,
done: false,
getNextContextId() {
const o = getOwner();
if (!o) throw new Error(`getNextContextId cannot be used under non-hydrating context`);
if (getContext(NoHydrateContext)) return undefined;
return getNextChildId(o);
}
done: false
};
function hydrationGetNextContextId() {
const o = getOwner();
if (!o) throw new Error(`getNextContextId cannot be used under non-hydrating context`);
if (getContext(NoHydrateContext)) return undefined;
return getNextChildId(o);
}
let _hydrationEndCallbacks = null;

@@ -110,18 +110,22 @@ let _pendingBoundaries = 0;

let _createEffect;
class MockPromise {
static {
for (const k of ["all", "allSettled", "any", "race", "reject", "resolve"]) {
MockPromise[k] = () => new MockPromise();
let _createLoadingBoundary;
let _lazyHydrationLookup;
// it in EVERY client bundle even with zero references; the PURE-annotated
const MockPromise = /* @__PURE__ */(() => {
class MockPromise {
catch() {
return new MockPromise();
}
then() {
return new MockPromise();
}
finally() {
return new MockPromise();
}
}
catch() {
return new MockPromise();
for (const k of ["all", "allSettled", "any", "race", "reject", "resolve"]) {
MockPromise[k] = () => new MockPromise();
}
then() {
return new MockPromise();
}
finally() {
return new MockPromise();
}
}
return MockPromise;
})();
function subFetch(fn, prev) {

@@ -554,2 +558,12 @@ const ogFetch = fetch;

}
function lazyHydrationLookup(comp, moduleUrl) {
const o = getOwner();
const key = o && o.id != null ? peekNextChildId(o) : undefined;
const cached = key != null ? globalThis._$HY?.modules?.[key] : undefined;
if (cached) return () => cached.default;
if (!comp && moduleUrl) {
throw new Error(`lazy() module "${moduleUrl}" (hydration id "${key}") was not preloaded before ` + "hydration. Ensure it is inside a Loading boundary.");
}
return comp;
}
function enableHydration() {

@@ -565,2 +579,5 @@ _createMemo = hydratedCreateMemo;

_createEffect = hydratedCreateEffect;
_createLoadingBoundary = hydratedCreateLoadingBoundary;
_lazyHydrationLookup = lazyHydrationLookup;
sharedConfig.getNextContextId = hydrationGetNextContextId;
_hydratingValue = sharedConfig.hydrating;

@@ -692,3 +709,4 @@ _doneValue = sharedConfig.done;

}
function createLoadingBoundary(fn, fallback, options) {
const createLoadingBoundary = (fn, fallback, options) => (_createLoadingBoundary || createLoadingBoundary$1)(fn, fallback, options);
function hydratedCreateLoadingBoundary(fn, fallback, options) {
if (!sharedConfig.hydrating) return createLoadingBoundary$1(fn, fallback, options);

@@ -791,12 +809,3 @@ let settledSerializationResumeQueued = false;

const wrap = props => {
if (sharedConfig.hydrating) {
const o = getOwner();
const key = o && o.id != null ? peekNextChildId(o) : undefined;
const cached = key != null ? globalThis._$HY?.modules?.[key] : undefined;
if (cached) {
comp = () => cached.default;
} else if (!comp && moduleUrl) {
throw new Error(`lazy() module "${moduleUrl}" (hydration id "${key}") was not preloaded before ` + "hydration. Ensure it is inside a Loading boundary.");
}
}
if (sharedConfig.hydrating) comp = _lazyHydrationLookup(comp, moduleUrl);
if (!comp) {

@@ -803,0 +812,0 @@ p || (p = fn());

@@ -44,10 +44,10 @@ 'use strict';

registry: undefined,
done: false,
getNextContextId() {
const o = signals.getOwner();
if (!o) throw new Error(`getNextContextId cannot be used under non-hydrating context`);
if (signals.getContext(NoHydrateContext)) return undefined;
return signals.getNextChildId(o);
}
done: false
};
function hydrationGetNextContextId() {
const o = signals.getOwner();
if (!o) throw new Error(`getNextContextId cannot be used under non-hydrating context`);
if (signals.getContext(NoHydrateContext)) return undefined;
return signals.getNextChildId(o);
}
let _hydrationEndCallbacks = null;

@@ -94,18 +94,22 @@ let _pendingBoundaries = 0;

let _createEffect;
class MockPromise {
static {
for (const k of ["all", "allSettled", "any", "race", "reject", "resolve"]) {
MockPromise[k] = () => new MockPromise();
let _createLoadingBoundary;
let _lazyHydrationLookup;
// it in EVERY client bundle even with zero references; the PURE-annotated
const MockPromise = /* @__PURE__ */(() => {
class MockPromise {
catch() {
return new MockPromise();
}
then() {
return new MockPromise();
}
finally() {
return new MockPromise();
}
}
catch() {
return new MockPromise();
for (const k of ["all", "allSettled", "any", "race", "reject", "resolve"]) {
MockPromise[k] = () => new MockPromise();
}
then() {
return new MockPromise();
}
finally() {
return new MockPromise();
}
}
return MockPromise;
})();
function subFetch(fn, prev) {

@@ -538,2 +542,12 @@ const ogFetch = fetch;

}
function lazyHydrationLookup(comp, moduleUrl) {
const o = signals.getOwner();
const key = o && o.id != null ? signals.peekNextChildId(o) : undefined;
const cached = key != null ? globalThis._$HY?.modules?.[key] : undefined;
if (cached) return () => cached.default;
if (!comp && moduleUrl) {
throw new Error(`lazy() module "${moduleUrl}" (hydration id "${key}") was not preloaded before ` + "hydration. Ensure it is inside a Loading boundary.");
}
return comp;
}
function enableHydration() {

@@ -549,2 +563,5 @@ _createMemo = hydratedCreateMemo;

_createEffect = hydratedCreateEffect;
_createLoadingBoundary = hydratedCreateLoadingBoundary;
_lazyHydrationLookup = lazyHydrationLookup;
sharedConfig.getNextContextId = hydrationGetNextContextId;
_hydratingValue = sharedConfig.hydrating;

@@ -676,3 +693,4 @@ _doneValue = sharedConfig.done;

}
function createLoadingBoundary(fn, fallback, options) {
const createLoadingBoundary = (fn, fallback, options) => (_createLoadingBoundary || signals.createLoadingBoundary)(fn, fallback, options);
function hydratedCreateLoadingBoundary(fn, fallback, options) {
if (!sharedConfig.hydrating) return signals.createLoadingBoundary(fn, fallback, options);

@@ -775,12 +793,3 @@ let settledSerializationResumeQueued = false;

const wrap = props => {
if (sharedConfig.hydrating) {
const o = signals.getOwner();
const key = o && o.id != null ? signals.peekNextChildId(o) : undefined;
const cached = key != null ? globalThis._$HY?.modules?.[key] : undefined;
if (cached) {
comp = () => cached.default;
} else if (!comp && moduleUrl) {
throw new Error(`lazy() module "${moduleUrl}" (hydration id "${key}") was not preloaded before ` + "hydration. Ensure it is inside a Loading boundary.");
}
}
if (sharedConfig.hydrating) comp = _lazyHydrationLookup(comp, moduleUrl);
if (!comp) {

@@ -787,0 +796,0 @@ p || (p = fn());

@@ -1,2 +0,2 @@

import { getContext, createMemo as createMemo$1, flatten, createRoot, setContext, createOwner, runWithOwner, createEffect as createEffect$1, createErrorBoundary as createErrorBoundary$1, createLoadingBoundary as createLoadingBoundary$1, getOwner, createOptimistic as createOptimistic$1, createOptimisticStore as createOptimisticStore$1, createProjection as createProjection$1, createRenderEffect as createRenderEffect$1, createRevealOrder as createRevealOrder$1, createSignal as createSignal$1, createStore as createStore$1, setSnapshotCapture, releaseSnapshotScope, getNextChildId, onCleanup, isDisposed, peekNextChildId, clearSnapshots, flush, markSnapshotScope, untrack, mapArray, repeat } from '@solidjs/signals';
import { getContext, createMemo as createMemo$1, flatten, createRoot, setContext, createOwner, runWithOwner, createEffect as createEffect$1, createErrorBoundary as createErrorBoundary$1, createLoadingBoundary as createLoadingBoundary$1, createOptimistic as createOptimistic$1, createOptimisticStore as createOptimisticStore$1, createProjection as createProjection$1, createRenderEffect as createRenderEffect$1, createRevealOrder as createRevealOrder$1, createSignal as createSignal$1, createStore as createStore$1, setSnapshotCapture, releaseSnapshotScope, getOwner, peekNextChildId, getNextChildId, clearSnapshots, flush, markSnapshotScope, onCleanup, isDisposed, untrack, mapArray, repeat } from '@solidjs/signals';
export { $PROXY, $REFRESH, $TRACK, NotReadyError, action, affects, createOwner, createReaction, createRoot, createTrackedEffect, deep, enableExternalSource, enforceLoadingBoundary, flatten, flush, getNextChildId, getObserver, getOwner, isDisposed, isEqual, isPending, isWrappable, latest, mapArray, merge, omit, onCleanup, onSettled, reconcile, refresh, repeat, resolve, runWithOwner, snapshot, storePath, untrack } from '@solidjs/signals';

@@ -43,10 +43,10 @@

registry: undefined,
done: false,
getNextContextId() {
const o = getOwner();
if (!o) throw new Error(`getNextContextId cannot be used under non-hydrating context`);
if (getContext(NoHydrateContext)) return undefined;
return getNextChildId(o);
}
done: false
};
function hydrationGetNextContextId() {
const o = getOwner();
if (!o) throw new Error(`getNextContextId cannot be used under non-hydrating context`);
if (getContext(NoHydrateContext)) return undefined;
return getNextChildId(o);
}
let _hydrationEndCallbacks = null;

@@ -93,18 +93,22 @@ let _pendingBoundaries = 0;

let _createEffect;
class MockPromise {
static {
for (const k of ["all", "allSettled", "any", "race", "reject", "resolve"]) {
MockPromise[k] = () => new MockPromise();
let _createLoadingBoundary;
let _lazyHydrationLookup;
// it in EVERY client bundle even with zero references; the PURE-annotated
const MockPromise = /* @__PURE__ */(() => {
class MockPromise {
catch() {
return new MockPromise();
}
then() {
return new MockPromise();
}
finally() {
return new MockPromise();
}
}
catch() {
return new MockPromise();
for (const k of ["all", "allSettled", "any", "race", "reject", "resolve"]) {
MockPromise[k] = () => new MockPromise();
}
then() {
return new MockPromise();
}
finally() {
return new MockPromise();
}
}
return MockPromise;
})();
function subFetch(fn, prev) {

@@ -537,2 +541,12 @@ const ogFetch = fetch;

}
function lazyHydrationLookup(comp, moduleUrl) {
const o = getOwner();
const key = o && o.id != null ? peekNextChildId(o) : undefined;
const cached = key != null ? globalThis._$HY?.modules?.[key] : undefined;
if (cached) return () => cached.default;
if (!comp && moduleUrl) {
throw new Error(`lazy() module "${moduleUrl}" (hydration id "${key}") was not preloaded before ` + "hydration. Ensure it is inside a Loading boundary.");
}
return comp;
}
function enableHydration() {

@@ -548,2 +562,5 @@ _createMemo = hydratedCreateMemo;

_createEffect = hydratedCreateEffect;
_createLoadingBoundary = hydratedCreateLoadingBoundary;
_lazyHydrationLookup = lazyHydrationLookup;
sharedConfig.getNextContextId = hydrationGetNextContextId;
_hydratingValue = sharedConfig.hydrating;

@@ -675,3 +692,4 @@ _doneValue = sharedConfig.done;

}
function createLoadingBoundary(fn, fallback, options) {
const createLoadingBoundary = (fn, fallback, options) => (_createLoadingBoundary || createLoadingBoundary$1)(fn, fallback, options);
function hydratedCreateLoadingBoundary(fn, fallback, options) {
if (!sharedConfig.hydrating) return createLoadingBoundary$1(fn, fallback, options);

@@ -774,12 +792,3 @@ let settledSerializationResumeQueued = false;

const wrap = props => {
if (sharedConfig.hydrating) {
const o = getOwner();
const key = o && o.id != null ? peekNextChildId(o) : undefined;
const cached = key != null ? globalThis._$HY?.modules?.[key] : undefined;
if (cached) {
comp = () => cached.default;
} else if (!comp && moduleUrl) {
throw new Error(`lazy() module "${moduleUrl}" (hydration id "${key}") was not preloaded before ` + "hydration. Ensure it is inside a Loading boundary.");
}
}
if (sharedConfig.hydrating) comp = _lazyHydrationLookup(comp, moduleUrl);
if (!comp) {

@@ -786,0 +795,0 @@ p || (p = fn());

{
"name": "solid-js",
"description": "Reactive JavaScript library for building user interfaces. Compiles JSX to real DOM with fine-grained signal-based updates — no virtual DOM.",
"version": "2.0.0-beta.18",
"version": "2.0.0-beta.19",
"author": "Ryan Carniato",

@@ -15,3 +15,4 @@ "license": "MIT",

"module": "./dist/server.js",
"unpkg": "./dist/solid.cjs",
"unpkg": "./dist/solid.js",
"jsdelivr": "./dist/solid.js",
"types": "types/index.d.ts",

@@ -111,3 +112,3 @@ "sideEffects": false,

"dependencies": {
"@solidjs/signals": "^2.0.0-beta.18",
"@solidjs/signals": "^2.0.0-beta.19",
"csstype": "^3.1.0",

@@ -114,0 +115,0 @@ "seroval": "~1.5.4",

@@ -91,3 +91,3 @@ import { createRenderEffect as coreRenderEffect, createEffect as coreEffect, type Accessor, type ComputeFunction, type MemoOptions, type NoInfer, type ProjectionOptions, type Refreshable, type Signal, type SignalOptions, type SourceAccessor, type Store, type StoreSetter, type RevealOrder, type Context } from "@solidjs/signals";

done: boolean;
getNextContextId(): string;
getNextContextId?: () => string;
};

@@ -108,9 +108,3 @@ /**

export declare function onHydrationEnd(callback: () => void): void;
/**
* Switches the primitive wrappers above (`createMemo`, `createSignal`,
* `createStore`, etc.) into hydration-aware mode. Called by `hydrate()`
* before mounting; cross-package wiring not part of the user-facing API.
*
* @internal
*/
export declare let _lazyHydrationLookup: (<T>(comp: (() => T | undefined) | undefined, moduleUrl?: string) => (() => T) | undefined) | undefined;
export declare function enableHydration(): void;

@@ -515,5 +509,5 @@ /**

*/
export declare function createLoadingBoundary<T, U>(fn: () => T, fallback: () => U, options?: {
export declare const createLoadingBoundary: <T, U>(fn: () => T, fallback: () => U, options?: {
on?: () => any;
}): Accessor<T | U>;
}) => Accessor<T | U>;
/**

@@ -520,0 +514,0 @@ * Disables hydration for its children on the client.

@@ -91,3 +91,3 @@ import { createRenderEffect as coreRenderEffect, createEffect as coreEffect, type Accessor, type ComputeFunction, type MemoOptions, type NoInfer, type ProjectionOptions, type Refreshable, type Signal, type SignalOptions, type SourceAccessor, type Store, type StoreSetter, type RevealOrder, type Context } from "@solidjs/signals";

done: boolean;
getNextContextId(): string;
getNextContextId?: () => string;
};

@@ -108,9 +108,3 @@ /**

export declare function onHydrationEnd(callback: () => void): void;
/**
* Switches the primitive wrappers above (`createMemo`, `createSignal`,
* `createStore`, etc.) into hydration-aware mode. Called by `hydrate()`
* before mounting; cross-package wiring not part of the user-facing API.
*
* @internal
*/
export declare let _lazyHydrationLookup: (<T>(comp: (() => T | undefined) | undefined, moduleUrl?: string) => (() => T) | undefined) | undefined;
export declare function enableHydration(): void;

@@ -515,5 +509,5 @@ /**

*/
export declare function createLoadingBoundary<T, U>(fn: () => T, fallback: () => U, options?: {
export declare const createLoadingBoundary: <T, U>(fn: () => T, fallback: () => U, options?: {
on?: () => any;
}): Accessor<T | U>;
}) => Accessor<T | U>;
/**

@@ -520,0 +514,0 @@ * Disables hydration for its children on the client.