Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Oct 10, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
rollup (source) 2.78.1 -> 2.79.1 age adoption passing confidence
solid-js (source) 1.4.8 -> 1.5.7 age adoption passing confidence
typescript (source) 4.7.4 -> 4.8.4 age adoption passing confidence
vite-plugin-solid 2.3.0 -> 2.3.9 age adoption passing confidence
vite-plugin-solid 2.2.6 -> 2.3.9 age adoption passing confidence

Release Notes

rollup/rollup

v2.79.1

Compare Source

2022-09-22

Bug Fixes
  • Avoid massive performance degradation when creating thousands of chunks (#​4643)
Pull Requests

v2.79.0

Compare Source

2022-08-31

Features
  • Add amd.forceJsExtensionForImports to enforce using .js extensions for relative AMD imports (#​4607)
Pull Requests
solidjs/solid

v1.5.6

Compare Source

v1.5.5

Compare Source

v1.5.4

Compare Source

v1.5.3

Compare Source

v1.5.2

Compare Source

v1.5.1

Compare Source

v1.5.0

Compare Source

Key Highlights
New Batching Behavior

Solid 1.4 patched a long time hole in Solid's behavior. Until that point Stores did not obey batching. However, it shone a light on something that should maybe have been obvious before. Batching behavior which stays in the past is basically broken for mutable data, No Solid only has createMutable and produce but with these sort of primitives the sole purpose is that you perform a sequence of actions, and batching not making this properly was basically broken. Adding an element to an array then removing another item shouldn't just skip the first operation.

const store = createMutable(["a", "b", "c"]);

const move = store.splice(1, 1);
store.splice(0, 0, ...move);

// solid 1.4
// ["b", "a", "b", "c"];

// solid 1.5
// ["b", "a", "c"];

After a bunch of careful thought and auditting we decided that Solid's batch function should behave the same as how reactivity propagates in the system once a signal is set. As in we just add observers to a queue to run, but if we read from a derived value that is stale it will evaluate eagerly. In so signals will update immediately in a batch now and any derived value will be on read. The only purpose of it is to group writes that begin outside of the reactive system, like in event handlers.

More Powerful Resources

Resources continue to get improvements. A common pattern in Islands frameworks like Astro is to fetch the data from the out side and pass it in. In this case you wouldn't want Solid to do the fetching on initial render or the serialization, but you still may want to pass it to a resource so it updates on any change. For that to work reactivity needs to run in the browser. The whole thing has been awkward to wire up but no longer.

ssrLoadFrom field lets you specify where the value comes from during ssr. The default is server which fetches on the server and serializes it for client hydration. But initial will use the initialValue instead and not do any fetching or addtional serialization.

const [user] = createResource(fetchUser, {
  initialValue: globalThis.DATA.user,
  ssrLoadFrom: "initial"
});

We've improved TypeScript by adding a new state field which covers a more detailed view of the Resource state beyond loading and error. You can now check whether a Resource is "unresolved", "pending", "ready", "refreshing", or "error".

state value resolved loading has error
unresolved No No No
pending No Yes No
ready Yes No No
refreshing Yes Yes No
errored No No Yes

A widely requested feature has been allowing them to be stores. While higher level APIs are still being determined we now have a way to plugin the internal storage by passing something with the signature of a signal to the new Experimental storage option.

function createDeepSignal<T>(value: T): Signal<T> {
  const [store, setStore] = createStore({
    value
  });
  return [
    () => store.value,
    (v: T) => {
      const unwrapped = unwrap(store.value);
      typeof v === "function" && (v = v(unwrapped));
      setStore("value", reconcile(v));
      return store.value;
    }
  ] as Signal<T>;
}

const [resource] = createResource(fetcher, {
  storage: createDeepSignal
});
Consolidated SSR

This release marks the end of years long effort to merge async and streaming mechanism. Since pre 1.0 these were seperate. Solid's original SSR efforts used reactivity on the server with different compilation. It was easiest to migrate synchronous and streaming rendering and for a time async had a different compilation. We got them on the same compilation 2 years ago but runtimes were different. Piece by piece things have progressed until finally async is now just streaming if flushed at the end.

This means some things have improved across the board. Async triggered Error Boundaries previously were only ever client rendered (throwing an error across the network), but now if they happen any time before sending to the browser they are server rendered. onCleanup now runs on the server if a branch changes. Keep in mind this is for rendering effects (like setting a status code) and not true side effects as not all rendering cleans up.

Finally we've had a chance to do a bunch of SSR rendering performance improvements. Including replacing our data serializer with an early copy of Dylan Piercey from Marko's upcoming serializer for Marko 6. Which boasts performance improvements of up to 6x devalue which we used previously.

Keyed Control Flow

Solid's <Show> and <Match> control flow originally re-rendered based on value change rather than truthy-ness changing. This allowed the children to be "keyed" to the value but lead to over rendering in common cases. Pre 1.0 it was decided to make these only re-render when statement changed from true to false or vice versa, except for the callback form that was still keyed.

This worked pretty well except it was not obvious that a callback was keyed. So in 1.5 we are making this behavior explicit. If you want keyed you should specify it via attribute:

// re-render whenever user changes

// normal
<Show when={user()} keyed>
  <div>{user().name}</div>
</Show>

// callback
<Show when={user()} keyed>
  {user => <div>{user.name}</div>}
</Show>

However, to not be breaking if a callback is present we will assume it's keyed. We still recommend you start adding these attributes (and TS will fail without them).

In the future we will introduce a non-keyed callback form as well so users can benefit from type narrowing in that case as well.

Other Improvements
children.toArray

Children helper now has the ability to be coerced to an array:

const resolved = children(() => props.children);
resolved.toArray(); // definitely an array
Better SSR Spreads

Finally fixed spread merging with non-spread properties during SSR, including the ability to merge children.

Better Error Handling

We weren't handling falsey errors previously. Now when Solid receives an error that isn't an Error object or a string it will coerce it into an Unknown Error.

Microsoft/TypeScript

v4.8.4

Compare Source

For release notes, check out the release announcement.

For the complete list of fixed issues, check out the

Downloads are available on:

v4.8.3

Compare Source

For release notes, check out the release announcement.

For the complete list of fixed issues, check out the

Downloads are available on:

v4.8.2

Compare Source

For release notes, check out the release announcement.

For the complete list of fixed issues, check out the

Downloads are available on:

solidjs/vite-plugin-solid

v2.3.0

Compare Source

Changed
  • ⬆️ Update playground dependencies [0438ab4]
  • ⬆️ Update dependencies (vite 3) [17d5aef]
  • ⬆️ Update dependencies [ac130ae]
  • ⬆️ Update example folder dependencies [093f738]
  • ⬆️ Update dependencies [0259ba6]
Removed
  • 🔥 Remove legacy option `alias` [4a432e8]
Miscellaneous
  • Merge pull request #​44 from vjoao/patch-1 [88fd588]
  • Add 'universal' to compiler output [75d66bb]
  • Merge pull request #​39 from btakita/issues/38 [dce3536]
  • Merge pull request #​37 from JoviDeCroock/patch-1 [6c9c566]
  • upgrade babel-preset-solid to 1.4.2 [91e9511]
  • add types discoverability [820c115]
  • move "vite" and "solid-js" to peer dependencies [dfd81c2]
  • Merge pull request #​36 from g-plane/peer-deps [f896d4d]
  • remove ?. and bump version [b310f93]
  • 📝 Update changelog [b57f3e9]
  • 📝 Update changelog [55ed4f3]

Configuration

📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

renovate bot and others added 14 commits October 10, 2022 19:14
chore(deps): update dependency vite to v3
Bumps [solid-js](https://github.com/solidjs/solid) from 1.4.8 to 1.5.7.
- [Release notes](https://github.com/solidjs/solid/releases)
- [Changelog](https://github.com/solidjs/solid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/solidjs/solid/commits)

---
updated-dependencies:
- dependency-name: solid-js
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.0.9 to 3.1.7.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v3.1.7/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.1.7/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
chore(deps-dev): bump vite from 3.0.9 to 3.1.7
…s-1.5.7

chore(deps): bump solid-js from 1.4.8 to 1.5.7
@vercel
Copy link

vercel bot commented Oct 10, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
solid-qr-code ❌ Failed (Inspect) Oct 10, 2022 at 7:57PM (UTC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants