Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: solidjs/solid
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.8.15
Choose a base ref
...
head repository: solidjs/solid
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.8.16
Choose a head ref
  • 5 commits
  • 17 files changed
  • 3 contributors

Commits on Feb 14, 2024

  1. Copy the full SHA
    8de75a4 View commit details

Commits on Feb 22, 2024

  1. Adjust some JSDocs (#2081)

    * docs: adjust jsdocs
    
    * Create real-deers-end.md
    
    ---------
    
    Co-authored-by: Ryan Carniato <ryansolid@gmail.com>
    marvin-j97 and ryansolid authored Feb 22, 2024
    Copy the full SHA
    3212f74 View commit details

Commits on Mar 11, 2024

  1. fix jsdoc code block (#2093)

    ryoid authored Mar 11, 2024
    Copy the full SHA
    24abc82 View commit details

Commits on Mar 19, 2024

  1. fix #2100, fix #2102 - hydration errors due to over optimization

    ryansolid committed Mar 19, 2024
    Copy the full SHA
    071cd42 View commit details
  2. v1.8.16

    ryansolid committed Mar 19, 2024
    Copy the full SHA
    2c27aae View commit details
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -34,21 +34,21 @@
"@rollup/plugin-replace": "^5.0.2",
"@types/node": "^18.11.19",
"@vitest/coverage-c8": "^0.29.7",
"babel-plugin-jsx-dom-expressions": "^0.37.17",
"babel-plugin-jsx-dom-expressions": "^0.37.19",
"coveralls": "^3.1.1",
"csstype": "^3.1.0",
"dom-expressions": "0.37.17",
"hyper-dom-expressions": "0.37.17",
"dom-expressions": "0.37.19",
"hyper-dom-expressions": "0.37.19",
"jsdom": "^21.1.1",
"lit-dom-expressions": "0.37.17",
"lit-dom-expressions": "0.37.19",
"ncp": "^2.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"rimraf": "^3.0.2",
"rollup": "^3.7.5",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-copy": "^3.4.0",
"seroval": "^1.0.3",
"seroval": "^1.0.4",
"simple-git-hooks": "^2.8.1",
"symlink-dir": "^5.0.1",
"tsconfig-replace-paths": "^0.0.11",
6 changes: 6 additions & 0 deletions packages/babel-preset-solid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# babel-preset-solid

## 1.8.16

### Patch Changes

- 071cd42f: fix #2100, fix #2102 - hydration errors due to over optimization

## 1.8.15

### Patch Changes
4 changes: 2 additions & 2 deletions packages/babel-preset-solid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-solid",
"version": "1.8.15",
"version": "1.8.16",
"description": "Babel preset to transform JSX for Solid.js",
"author": "Ryan Carniato <ryansolid@gmail.com>",
"homepage": "https://github.com/solidjs/solid/blob/main/packages/babel-preset-solid#readme",
@@ -14,7 +14,7 @@
"test": "node test.js"
},
"dependencies": {
"babel-plugin-jsx-dom-expressions": "^0.37.17"
"babel-plugin-jsx-dom-expressions": "^0.37.19"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
2 changes: 1 addition & 1 deletion packages/solid-element/package.json
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
"component-register": "~0.8.2"
},
"peerDependencies": {
"solid-js": "^1.8.15"
"solid-js": "^1.8.16"
},
"devDependencies": {
"solid-js": "workspace:*"
8 changes: 8 additions & 0 deletions packages/solid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# solid-js

## 1.8.16

### Patch Changes

- 8de75a47: fix #2065 forward initial value to `on`
- 071cd42f: fix #2100, fix #2102 - hydration errors due to over optimization
- 3212f74d: Adjust some JSDocs

## 1.8.15

### Patch Changes
4 changes: 2 additions & 2 deletions packages/solid/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "solid-js",
"description": "A declarative JavaScript library for building user interfaces.",
"version": "1.8.15",
"version": "1.8.16",
"author": "Ryan Carniato",
"license": "MIT",
"homepage": "https://solidjs.com",
@@ -241,7 +241,7 @@
],
"dependencies": {
"csstype": "^3.1.0",
"seroval": "^1.0.3",
"seroval": "^1.0.4",
"seroval-plugins": "^1.0.3"
}
}
5 changes: 3 additions & 2 deletions packages/solid/src/reactive/array.ts
Original file line number Diff line number Diff line change
@@ -37,8 +37,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/**
* reactively transforms an array with a callback function - underlying helper for the `<For>` control flow
* Reactively transforms an array with a callback function - underlying helper for the `<For>` control flow
*
* similar to `Array.prototype.map`, but gets the index as accessor, transforms only values that changed and returns an accessor and reactively tracks changes to the list.
*
@@ -175,7 +176,7 @@ export function mapArray<T, U>(
}

/**
* reactively maps arrays by index instead of value - underlying helper for the `<Index>` control flow
* Reactively maps arrays by index instead of value - underlying helper for the `<Index>` control flow
*
* similar to `Array.prototype.map`, but gets the value as an accessor, transforms only changed items of the original arrays anew and returns an accessor.
*
2 changes: 1 addition & 1 deletion packages/solid/src/reactive/observable.ts
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ export type ObservableObserver<T> =
complete?: (v: boolean) => void;
};
/**
* creates a simple observable from a signal's accessor to be used with the `from` operator of observable libraries like e.g. rxjs
* Creates a simple observable from a signal's accessor to be used with the `from` operator of observable libraries like e.g. rxjs
* ```typescript
* import { from } from "rxjs";
* const [s, set] = createSignal(0);
13 changes: 7 additions & 6 deletions packages/solid/src/reactive/signal.ts
Original file line number Diff line number Diff line change
@@ -902,7 +902,7 @@ export interface OnOptions {
}

/**
* on - make dependencies of a computation explicit
* Makes dependencies of a computation explicit
* ```typescript
* export function on<S, U>(
* deps: Accessor<S> | AccessorArray<S>,
@@ -953,7 +953,7 @@ export function on<S, Next extends Prev, Prev = Next>(
} else input = deps();
if (defer) {
defer = false;
return undefined;
return prevValue;
}
const result = untrack(() => fn(input, prevInput, prevValue));
prevInput = input;
@@ -962,7 +962,7 @@ export function on<S, Next extends Prev, Prev = Next>(
}

/**
* onMount - run an effect only after initial render on mount
* Runs an effect only after initial render on mount
* @param fn an effect that should run only once on mount
*
* @description https://www.solidjs.com/docs/latest/api#onmount
@@ -972,7 +972,7 @@ export function onMount(fn: () => void) {
}

/**
* onCleanup - run an effect once before the reactive scope is disposed
* Runs an effect once before the reactive scope is disposed
* @param fn an effect that should run only once on cleanup
*
* @returns the same {@link fn} function that was passed in
@@ -989,7 +989,7 @@ export function onCleanup<T extends () => any>(fn: T): T {
}

/**
* catchError - run an effect whenever an error is thrown within the context of the child scopes
* Runs an effect whenever an error is thrown within the context of the child scopes
* @param fn boundary for the error
* @param handler an error handler that receives the error
*
@@ -1042,6 +1042,7 @@ export function enableScheduling(scheduler = requestCallback) {
/**
* ```typescript
* export function startTransition(fn: () => void) => Promise<void>
* ```
*
* @description https://www.solidjs.com/docs/latest/api#usetransition
*/
@@ -1176,7 +1177,7 @@ export function createContext<T>(
}

/**
* use a context to receive a scoped state from a parent's Context.Provider
* Uses a context to receive a scoped state from a parent's Context.Provider
*
* @param context Context object made by `createContext`
* @returns the current or `defaultValue`, if present
4 changes: 2 additions & 2 deletions packages/solid/src/render/Suspense.ts
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ const suspenseListEquals = (a: SuspenseListRegisteredState, b: SuspenseListRegis
const SuspenseListContext = createContext<SuspenseListContextType>();

/**
* **[experimental]** controls the order in which suspended content is rendered
* **[experimental]** Controls the order in which suspended content is rendered
*
* @description https://www.solidjs.com/docs/latest/api#suspenselist-experimental
*/
@@ -110,7 +110,7 @@ export function SuspenseList(props: {
}

/**
* tracks all resources inside a component and renders a fallback until they are all resolved
* Tracks all resources inside a component and renders a fallback until they are all resolved
* ```typescript
* const AsyncComponent = lazy(() => import('./component'));
*
8 changes: 4 additions & 4 deletions packages/solid/src/render/flow.ts
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ const narrowedError = (name: string) =>
: `Stale read from <${name}>.`;

/**
* creates a list elements from a list
* Creates a list elements from a list
*
* it receives a map function as its child that receives a list element and an accessor with the index and returns a JSX-Element; if the list is empty, an optional fallback is returned:
* ```typescript
@@ -144,7 +144,7 @@ export function Show<T>(props: {
type EvalConditions = readonly [number, unknown?, MatchProps<unknown>?];

/**
* switches between content based on mutually exclusive conditions
* Switches between content based on mutually exclusive conditions
* ```typescript
* <Switch fallback={<FourOhFour />}>
* <Match when={state.route === 'home'}>
@@ -208,7 +208,7 @@ export type MatchProps<T> = {
children: JSX.Element | ((item: NonNullable<T> | Accessor<NonNullable<T>>) => JSX.Element);
};
/**
* selects a content based on condition when inside a `<Switch>` control flow
* Selects a content based on condition when inside a `<Switch>` control flow
* ```typescript
* <Match when={condition()}>
* <Content/>
@@ -238,7 +238,7 @@ export function resetErrorBoundaries() {
Errors && [...Errors].forEach(fn => fn());
}
/**
* catches uncaught errors inside components and renders a fallback content
* Catches uncaught errors inside components and renders a fallback content
*
* Also supports a callback form that passes the error and a reset function:
* ```typescript
2 changes: 1 addition & 1 deletion packages/solid/store/src/store.ts
Original file line number Diff line number Diff line change
@@ -491,7 +491,7 @@ export interface SetStoreFunction<T> {
}

/**
* creates a reactive store that can be read through a proxy object and written with a setter function
* Creates a reactive store that can be read through a proxy object and written with a setter function
*
* @description https://www.solidjs.com/docs/latest/api#createstore
*/
11 changes: 11 additions & 0 deletions packages/solid/test/signals.spec.ts
Original file line number Diff line number Diff line change
@@ -81,6 +81,17 @@ describe("Create signals", () => {
set("minds");
expect(temp!).toBe("impure minds");
});
test("Create a Effect with explicit deps, lazy evaluation, and initial value", () => {
let temp: string;
const [sign, set] = createSignal("thoughts");
createRoot(() => {
const fn = on(sign, (v, _, p) => (temp = `impure ${p} ${v}`), { defer: true });
createEffect(fn, "numbers");
});
expect(temp!).toBeUndefined();
set("minds");
expect(temp!).toBe("impure numbers minds");
});
});

describe("Update signals", () => {
5 changes: 3 additions & 2 deletions packages/solid/web/src/index.ts
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ export const hydrate: typeof hydrateCore = (...args) => {
};

/**
* renders components somewhere else in the DOM
* Renders components somewhere else in the DOM
*
* Useful for inserting modals and tooltips outside of an cropping layout. If no mount point is given, the portal is inserted in document.body; it is wrapped in a `<div>` unless the target is document.head or `isSVG` is true. setting `useShadow` to true places the element in a shadow root to isolate styles.
*
@@ -113,8 +113,9 @@ export type DynamicProps<T extends ValidComponent, P = ComponentProps<T>> = {
} & {
component: T | undefined;
};

/**
* renders an arbitrary custom or native component and passes the other props
* Renders an arbitrary custom or native component and passes the other props
* ```typescript
* <Dynamic component={multiline() ? 'textarea' : 'input'} value={value()} />
* ```
10 changes: 10 additions & 0 deletions packages/test-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# test-integration

## 1.8.16

### Patch Changes

- Updated dependencies [8de75a47]
- Updated dependencies [071cd42f]
- Updated dependencies [3212f74d]
- solid-js@1.8.16
- babel-preset-solid@1.8.16

## 1.8.15

### Patch Changes
2 changes: 1 addition & 1 deletion packages/test-integration/package.json
Original file line number Diff line number Diff line change
@@ -14,5 +14,5 @@
"gitly": "^2.2.1",
"shelljs": "^0.8.5"
},
"version": "1.8.15"
"version": "1.8.16"
}
62 changes: 31 additions & 31 deletions pnpm-lock.yaml