-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(deps): update dependencies #11
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/dependencies
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
renovate
bot
force-pushed
the
renovate/dependencies
branch
3 times, most recently
from
July 30, 2021 06:53
620d2b2
to
5dcc681
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
5 times, most recently
from
August 9, 2021 15:25
eff78a5
to
010950a
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
August 17, 2021 09:25
010950a
to
5d6db50
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
2 times, most recently
from
September 1, 2021 07:02
ac81e2a
to
f6faf8e
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
September 9, 2021 07:48
f6faf8e
to
8378fa9
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
September 16, 2021 08:47
8378fa9
to
613db40
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
October 18, 2021 23:27
613db40
to
c2a68a2
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
March 7, 2022 09:00
c2a68a2
to
89664ee
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
March 26, 2022 12:44
89664ee
to
e9813de
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
April 24, 2022 19:23
e9813de
to
4376641
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
May 16, 2022 02:50
4376641
to
994387a
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
June 18, 2022 23:26
994387a
to
af75870
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
September 25, 2022 16:57
af75870
to
499a57e
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
November 20, 2022 13:14
499a57e
to
f5ade33
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
March 17, 2023 14:09
f5ade33
to
5f5fc29
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
2 times, most recently
from
March 31, 2023 07:50
73150d5
to
1f2db02
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
2 times, most recently
from
June 1, 2023 16:20
11193ad
to
66611eb
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
June 27, 2023 05:25
66611eb
to
ccba849
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
2 times, most recently
from
July 17, 2023 23:53
9e4531d
to
f691c9a
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
July 19, 2023 17:51
f691c9a
to
feda8d0
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
2 times, most recently
from
August 11, 2023 02:51
03c6bb2
to
43cb79d
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
2 times, most recently
from
August 27, 2023 15:02
6dcce7c
to
57255fb
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
September 19, 2023 02:41
57255fb
to
a4ec194
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
September 26, 2023 12:03
a4ec194
to
9012fae
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
October 10, 2023 02:58
9012fae
to
8dc3100
Compare
renovate
bot
force-pushed
the
renovate/dependencies
branch
from
October 11, 2023 02:46
8dc3100
to
ca2ee5d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.23.4
->1.8.0
0.19.0
->1.8.0
2.0.0-beta.1
->2.10.0
0.23.4
->1.8.1
0.19.2
->1.8.1
0.23.4
->0.27.1
0.19.1
->0.27.1
3.3.2
->5.1.2
3.3.0
->5.1.2
Release Notes
solidjs/solid (babel-preset-solid)
v1.8.0
Compare Source
I admit this is not the most exciting release from a feature standpoint. We are in that holding pattern between the end of 1.x and the start of 2.0. We recently made our new reactive experiments public and continue to build those out in public with @solidjs/signals.
This version is more about addressing some of the fundamentals that will help us in other projects like SolidStart while we do the transition. A big part of this is applying what we have learned when doing performance benchmarks for the work that has been funded by Google Chrome Aurora.
Async and Resources need work and are too all in. It is great to have a solution but now that we have a better understanding we need to start breaking things apart into their fundamental pieces.
De-duping Streaming Serialization
This is the marquee feature of this release and is largely the work of @lxsmnsyc. Solid has been able to serialize promises and do streaming for a couple of years now, but it was very special-cased. Now it is a generic mechanism.
This matters because it means that we have decoupled the promise serialization from Resources, and in so decoupled the whole when the stream is done from them. This opens up things like nested promises.
More so we have a mechanism now that deeply de-dupes data serialized across flushes. This is important for features like Islands where you might pass the same props to multiple Islands across different Suspense boundaries and don't want to send the data more than once. And even examples where that data can be accessed at varying depths (recursive comments in say a Hackernews site).
Hydration Improvements
Fragments for Hydration have been a bit of a pain and we keep seeming to have different issues reported around element duplication. Most commonly this has been around where there are
lazy
component siblings or where the fragment is top-level. After looking into and fixing an issue for Astro I decided to look at some of the oldest bugs in Solid and found it was a similar bug.In many cases, the DOM can change throughout Hydration while doing things like streaming but we need to pause and resume hydration because code isn't available yet. While we don't create elements during hydration, getting an accurate snapshot of the DOM for the current state for future list reconciliation is a process we've had a few tries at but in 1.8 we update this in a way that makes sure it doesn't get out of date.
Also in 1.8, we have added some performance improvements to hydration in the form of not redundantly setting attributes or props as the page hydrates similar to how we don't update text. This is all migration towards a future where we don't need to do as much hydration, but it is important to note that values will be kept as they were on the server rather than how they may compute at runtime during hydration.
Smaller Templates
In 1.7 we removed unnecessary closing tags from template strings. It was a bit painful because we were a bit overzealous at first. While I believe in the end we got to a good place, ultimately all but the simplest reductions have been hidden behind a compiler flag(
omitNestedClosingTags
). Thanks to work from @intrnl we are implementing another template size reduction technique of removing unnecessary quotes. Quotes are actually not required by HTML in some cases and it can add up.Other
Fix NGINX Server Side Includes
Comments led with
#
are treated as special directives for a few different servers so we've needed to change our open hydration markers to$
. As usual, your version of Solid and the Babel Plugin should be the same to ensure this matches up.Better Guards on Global Scripts
Solid uses an inline HydrationScript as a way to do processing before the framework and code have loaded. To handle things like event capture and streaming. However, we didn't do a good job of guarding the right thing when multiple were added to the same page, a situation that can happen in Micro-frontends or 3rd party Islands solutions. Now the script guards against duplicate inclusion.
v1.7.12
Compare Source
v1.7.7
Compare Source
v1.7.4
Compare Source
v1.7.3
Compare Source
v1.7.2
Compare Source
v1.7.1
Compare Source
v1.7.0
Compare Source
Solid has experienced incredible growth in usage the last 6 months. Companies are using it to power production applications and SolidStart Beta has been a big part of that. As a natural part of this growth and increased use at scale we are continuing to learn what works well and what the rough edges in Solid are today.
This v1.7 release marks the beginning of the migration roadmap to v2.0. We are beginning to re-evaluate core APIs and will begin introducing new ones while reasonably deprecating older ones in a manner that eases breaking changes. Our intention is to ease the broader ecosystem into preparing for improvements that a major 2.0 will unlock for the whole community.
Improved TypeScript
Null-Asserted Control Flow
One of the pains of using Solid with TypeScript has been that JSX control flows can't really type narrow. This is true, but starting with the migration to explicit
keyed
in v1.5 we now complete this story by introducing callback forms for<Show>
and<Match>
that work when non-keyed.The main difference is the callback form instead of passing in the value as it does when
keyed
, passes in a function that is type narrowed.Keep in mind because we are non-null asserting the input signal so it won't expect null in closures that execute when the condition is no longer satisfied. For this reason the accessor from the callback is special and will throw when attempted to be accessed when the condition is no longer true. This may be unexpected but it is our best attempt to keep TypeScript strict and not present inconsistency in reactivity. Luckily this only applies to things like timers which you should be cleaning up anyway and not things like event handlers. We recommend using the original conditions source in those closures if you must.
Better Event Types for Input Elements
This has irked people for a while but we come by it honestly,
target
is gives you a type ofElement
rather than the specific element that is the target. That means no access to.value
or.checked
. The reason is there is no way to know at compile time what the target of an event will be. ThecurrentTarget
will be the element you attach the event to but the target can be anything.There is a way to work around this though, in that if we know the
currentTarget
is of type that generates the event and that thecurrentTarget
is the the type of this element we can assume it is thetarget
as well. Not perfect logic but it is what React does and we do too.Now
onInput
,onChange
,onBlur
,onFocus
,onFocusIn
, andonFocusOut
all support more detailedtarget
when applied toHTMLInputElement
,HTMLTextAreaElement
, andHTMLSelectElement
.Stricter JSX Elements
Strict JSX elements have been tricky because we have to acknowledge at a certain point that TypeScript is to serve our purposes rather than to represent all possible values that could work. For us the ambiguity lies in functions.
Solid's JSX needs to accept functions to handle dynamic insertion. However, in authoring it leads to awkward situations.
The first you hit the first time use Solid. You create that counter and don't call
count
as a function and it works.This example works in some places and not others which might lead to the wrong conclusions.
The second place you might hit this is when you get a little further on your journey and decide you need a component to re-render and decide that you can just wrap the whole thing in a function:
Again this seems fine, except the fact that every time
count
changes you are recreating all the DOM Elements even when it resolves to the same conditional.Eventually you might even not think twice about passing functions into children of arbitrary components:
But what does this do? When is the function called?
As it turns out removing functions from
JSX.Element
type makes all of these scenarios error. Components only expect the values dictated by their types.The tradeoff here is that authoring components you can no longer just return a Signal or Memo without casting. If using JSX you can always return a Fragment.
If not you will need to cast to
unknown as JSX.Element
.Better Errors and Cleanup
catchError
replacesonError
Error Handling is complicated enough without having to try to guess how they propagate.
onError
admittedly is a lower level primitive but fundamentally had this flaw. It worked by registering an error handler on the parent scope, but left it ambiguous how to handle siblings. Is it a queue? Are they independent?As a result we are introducing
catchError
in this release which introduces its own scope to catch any errors below it. The first argument in the primitive is similar to the try and the second argument is the catch.onError
will still be present until it can be removed in a future major version.Standardized Errors
Error Handling has had many weird edge cases introduced by applications throwing unusual values. In v1.7 we wrap all thrown values that aren't of type
Error
in anew Error
and attach the original thrown value as.cause
.More Performant Dev Tools
Now that Solid Dev Tools have been stabilizing, we have a much better idea what support we need for them. In so we were able to remove the very costly serialization we were doing for generating unique identifiers. Conventions around naming and exports were streamlined and standardized as well.
Others
prop:
andattr:
in Spreadsreadonly
) to custom elementssolid-ssr
to type"module"
v1.6.16
Compare Source
v1.6.13
Compare Source
v1.6.12
Compare Source
v1.6.10
Compare Source
v1.6.9
Compare Source
v1.6.7
Compare Source
v1.6.6
Compare Source
v1.6.3
Compare Source
v1.6.2
Compare Source
v1.6.1
Compare Source
v1.6.0
Solid v1.6 doesn't bring a ton of new features but brings some big improvements in existing ones.
Highlights
Official Partial Hydration Support
Solid has worked for quite some time in partial hydrated ("Islands") frameworks like Astro, Iles, Solitude, etc.. but now we have added core features to support this effort better. These features are mostly designed for metaframework authors rather than the end user they are exposed through a couple APIs.
<Hydration />
joins<NoHydration />
as being a way to resume hydration and hydration ids during server rendering. Now we can stop and start hydratable sections. This is important because it opens up a new optimization.createResource
calls under non-hydrating sections do not serialize. That means that resources that are server only stay on the server. The intention is that hydrating Islands can then serialize theirprops
coming in. Essentially only shipping the JSON for data actually used on the client.The power here is static markup can interview dynamic components.
Keep in mind Server rendered content like this can only be rendered on the server so to maintain a client navigation with this paradigm requires a special router that handles HTML partials.
Similarly we want the trees to talk to each other so
hydrate
calls now have been expanded to accept a parentOwner
this will allow Islands to communicate through Contex without shipping the whole tree to browser.These improvements make it easier to create Partial Hydration solutions on top of Solid, and serve to improve the capabilities of the ones we already have.
Native Spread Improvements
Native spreads are something we started at very naively. Simply just iterating an object that has some reactive properties and updating the DOM element. However, this didn't take into consideration two problems.
First properties on objects can change, they can be added or removed, and more so the object itself can be swapped. Since Solid doesn't re-render it needs to keep a fixed reference to the merged properties. Secondly, these are merged. Properties override others. What this means is we need to consider the element holistically to know that the right things are applied.
For Components this was a never a problem since they are just function calls. Unfortunately for native elements this means all those compiler optimizations we do for specific bindings now need to get pulled into this. Which is why we avoided it in the past. But the behavior was too unpredictable.
In 1.6 we have smartened spread to merge properly using similar approach to how process Components. We've also found new ways to optimize the experience. (See below).
Other Improvements
Deproxification
Working on new Spread behavior we realized that while we can't tell from compilation which spreads can change. We can tell at runtime which are proxies. And in so if we only need to merge things which don't swap, and aren't proxies we can avoid making a Proxy.
What is great about this is it has a cascading effect. If component props aren't a proxy, then
splitProps
andmergeProps
don't need to create them, and so on. While this requires a little extra code it is a real win.We get a lot request for low end IoT devices because of Solid's incredible performance. In tests Solid outperforms many of the Virtual DOM solutions in this space. However most of them don't support proxies.
So now if you don't use a
Store
or swap out the props object:We don't need to introduce any proxy the user didn't create. This makes Solid a viable option for these low-end devices.
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
andproduce
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.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 isserver
which fetches on the server and serializes it for client hydration. Butinitial
will use theinitialValue
instead and not do any fetching or addtional serialization.We've improved TypeScript by adding a new
state
field which covers a more detailed view of the Resource state beyondloading
anderror
. You can now check whether a Resource is"unresolved"
,"pending"
,"ready"
,"refreshing"
, or"error"
.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.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 fromtrue
tofalse
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:
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:
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 anUnknown Error
.v1.4.8
Compare Source
v1.4.6
Compare Source
v1.4.5
Compare Source
v1.4.4
Compare Source
v1.4.2
Compare Source
v1.4.0
Compare Source
New Features
Resource Deferred Streaming
Streaming brings a lot of performance benefits but it also comes with the tradeoff we need to respond with the headers before we can send any content. This means we must set the Response headers early if we want to benefit from streaming. While it's always possible to fetch first and delay rendering that slows down everything. Even our async server rendering doesn't block rendering but instead just waits to respond to the end.
But what if you want to stream but also want to wait on some key data loading so you still have an opportunity to handle the response on the server before sending it to the browser?
We now have the ability to tell Solid's stream renderer to wait for a resource before flushing the stream. That you can opt in by setting
deferStream
option.Top Level Arrays in Stores
Since Stores were first introduced it has always bugged me that the most common case, creating a list required nesting it under a property to track properly. Thanks to some exploration into proxy traps and iteration we now support top level arrays. In addition to its other modes, the Store setter will accept an array which allows for common operations.
Through this change we also stopped over execution when listening to specific properties. To support iteration Solid previously would notify the owning object of any array when an was index added/removed or object new property created or deleted on any object.
The one caveat is downstream optimized control flow that untrack index reads on arrays will now need to track the iterated object explicity. Solid exports a
$TRACK
symbol used to subscribe to the object and all its properties.Stale Resource Reads
Suspense and Transitions are amazingly powerful feature but occasionally you want to opt out of the consistency and show things out of date because it will show up faster and some of things you are waiting for are not as high priority. In so you want the Transition to end sooner, but not necessarily stop showing the stale data for part of the screen. It is still preferable to receding back to loading spinner state.
Solid's Resources now support being able to read the value without triggering Suspense. As long as it has loaded previously
latest
property won't cause fallback appear or Transitions to hold. This will always return thelatest
value regardless whether it is stale (ie.. a new value is being fetched) and will reactively update. This is super powerful in Transitions as you can use the Resources ownloading
state to know if it is stale. Since the Transition will hold while the critical data is loading, the loading state will not be applied to the in view screen until that Transition has ended. If the resource is still loading now you can show that it is stale.Example: https://codesandbox.io/s/solid-stale-resource-y3fy4l
Combining multiple Custom Renderers
The Babel plugin now allows configuring multiple custom renderers at the same time. The primary case it is so a developer can still lever Solid's optimized DOM compilation while using their custom renderer. To make this work specify the tags each renderer is reponsible for. It will try to resolve them in order.
Improvements/Fixes
Synchronous Top Level
createEffect
These were originally deferred to a microtask to resemble how effects are queued under a listener. However it is more correct to run immediate like everything else top level.
Better Types around Components
This one took the effort of many resident TypeScript experts, but we've now landed on some better types for components. The biggest change is
Component
no longer has an opinion on whether it should havechildren
or not. We've added supplementary typesParentComponent
andFlowComponent
to denote Components that may havechildren
or always havechildren
. And we've addedVoidComponent
for those which may never have children.Sources in
createResource
are now MemosA small change but it was unusual to have refetching trigger a reactive expression outside of a reactive context. Now on refetch it grabs the last source value rather than re-running it.
createMutable
batches array methods like push, pop, etc..Now these built-ins are batched and more performant. We've also add
modifyMutable
that applies modifiers batched to stores created withcreateMutable
.Stores and mutables now respect batch
Writing to a store or mutable within
batch
(including effects) no longer immediately updates the value, so reading within the same batch gives the old value. This guarantees consistency with memos and other computations, just like signals.Better Support for React JSX transform
We have added support to
solid-js/h
to support the new React JSX transform. You can use it directly in TypeScript by using:Keep in mind this has all the consequences of not using the custom transform. It means larger library code, slower performance, and worse ergonomics. Remember to wrap your reactive expressions in functions.
HyperScript now returns functions
This one is a potentially breaking change, but the current behavior was broken. It was possible(and common) for children to be created before the parents the way JSX worked. This was an oversight on my original design that needs to be fixed, as it breaks context, and disposal logic. So now when you get your results back from
h
you need to call it. Solid'srender
function will handle this automatically.Removals and Deprecations
className
,htmlFor
deprecatedWhile they still work for now, Solid will remove support for these React-isms in a future version. They leave us with multiple ways to set the same attribute. This is problematic for trying to merge them. Solid updates independently so it is too easy for these things to trample on each other. Also when optimizing for compilation since with things like Spreads you can't know if the property is present, Solid has to err on the side of caution. This means more code and less performance.
Experimental
refetchResources
removedThis primitive ended up being too general to be useful. There are enough cases we can't rely on the refetch everything by default mentality. For that reason we are dropping support of this experimental feature.
v1.3.17
Compare Source
v1.3.16
Compare Source
v1.3.13
Compare Source
v1.3.12
Compare Source
v1.3.11
Compare Source
v1.3.6
Compare Source
v1.3.5
Compare Source
v1.3.4
Compare Source
v1.3.2
Compare Source
v1.3.1
Compare Source
v1.3.0
Compare Source
New Features
HTML Streaming
This release adds support for HTML streaming. Now we not only stream data after the initial shell but the HTML as it finishes. The big benefit is that now for cached results, or times when the network are slow we no longer have to show the placeholder while waiting for JavaScript bundle to load. As soon as the HTML is available it will be streamed and inserted.
With it comes new streaming API
renderToStream
. This is a universal API designed to handle both Node and Web writable streams. It returns an object that mirrors a Readable stream on both platforms that has bothpipe
(node) andpipeTo
(web). The benefit of thispipe
API is the user can choose when to insert the content in the output stream whether soon as possible, oronCompleteShell
, oronCompleteAll
. This decouples Solid's rendering a from the stream a bit but leaves things open to performance improvements in the future.Error Boundaries on the Server
We've added support for Error Boundaries on the Server for all rendering methods(
renderToString
,renderToStringAsync
,renderToStream
). Errors can be caught both from synchronous rendering and from errors that happen in Resource resolution. However, Our approach doesn't guarentee all errors are handled on the server as with streaming it is possible that the Error Boundary has already made it to the browser while a nested Suspense component hasn't settled. If an Error is hit it will propagate up to the top most Suspense Boundary that hasn't been flushed yet. If it is not handled by an Error Boundary before that it will abort rendering, and send the Error to the browser to propagate up to the nearest Error Boundary.This works now but there is more to explore here in improving Error handling in general with SSR. So look forward to feedback on the feature.
Isolated Server Render/Hydration Contexts
Sometimes you want to server render and hydrate multiple Solid apps on the same page. Maybe you are using the Islands architecture with something like Astro. We now have the ability to pass a unique
renderId
on all our server rendering methods and to thehydrate
function. This will isolate all hydration and resource resolution. This means we can use things like server side Suspense in these solutions.Also now you only need to include the Hydration Script once on the page. Each Island will be responsible for initializing it's own resources.
createReaction
This new primitive is mostly for more advanced use cases and is very helpful for interopt with purely pull based systems (like integrating with React's render cycle). It registers an untracked side effect and returns a tracking function. The tracking function is used to track code block, and the side effect is not fired until the first time any of the dependencies in the tracking code is updated.
track
must be called to track again.This primitive is niche for certain use cases but where it is useful it is indispensible (like the next feature which uses a similar API).
External Sources (experimental)
Ever wanted to use a third party reactive library directly in Solid, like MobX, Vue Reactivity, or Kairo. We are experimenting with adding native support so reactive atoms from these libraries can be used directly in Solid's primitives and JSX without a wrapper. This feature is still experimental since supporting Transitions and Concurrent Rendering will take some more effort. But we have added
enableExternalSource
enable this feature. Thanks @3Shain for designing this solution.refetchResources
(experimental)In efforts to allow for scaling from simple resources up to cached solutions we are adding some experimental features to
createResource
to work with library writers to develop the best patterns. Caching is always a tricky problem and with SSR and streaming being part of the equation the core framework needs at minimum to provide some hooks into orchestrating them.Sometimes it's valuable to trigger
refetch
across many resources. Now you can.You can also pass a parameter to
refetchResources
to provide additional information to therefetching
info of the fetcher. This could be used for conditional cache invalidation. Like only refetch resources related tousers
. This mechanism requires a bit of wiring but the idea is you'd wrapcreateResource
in maybe acreateQuery
and implement your own conventions around resource cache management. Still working out how this should work best, but the goal is to provide the mechanisms to support resource caches without being responsible for their implementation.To opt-out being part of the global refetch createResource now takes a
globalRefetch
option that can be set to false. In addition to a new option to disablerefetchResources
there is no anonHydrated
callback that takes the same arguments as the fetcher. When a resource is restored from the server the fetcher is not called. However, this callback will be. This is useful for populating caches.Improvements
Better TypeScript Support
Thanks to the tireless efforts of several contributors we now have significantly better types in Solid. This was a huge effort and involved pulling in maintainers of TypeScript to help us work through it. Thank you @trusktr for spearheading the effort.
Better SourceMaps
Work has been done to improve sourcemaps by updating
babel-plugin-dom-expressions
to better preserve identifiers from the JSX. Thanks to @LXSMNSYC for exploring and implementing this.Breaking Changes/Deprecations
startTransition
no longer takes callback as a second argumentInstead it returns a promise you can await. This works better for chaining sequences of actions.
Resource fetcher info object replaces
getPrev
To streamline API for refetch we are slightly updating the
createResource
:For those using existing 2nd argument:
Deprecating Legacy Streaming APIs
pipeToNodeWritable
andpipeToWritable
are deprecated. They will still work for now with basic usage but some of the more advanced options didn't map over to the new APIs directly and have been removed. Move to usingrenderToStream
.Bug Fixes
<html>
on hydration from document.createSelector
.preload
on lazy components to always be a promise.v1.2.6
Compare Source
v1.2.5
Compare Source
v1.2.4
Compare Source
v1.2.3
Compare Source
v1.2.2
Compare Source
v1.2.1
Compare Source
v1.2.0
Compare Source
New Features
Custom Renderers
This release adds support custom renderers through a new "universal" transform. Solid now provides a sub module
solid-js/universal
that exports acreateRenderer
method that allows you to create your own runtimes. This will enable things like native mobile and desktop, canvas and webgl, or even rendering to the terminal. This is still new so very much looking for feedback.Spreads Added to Solid's
html
It's been a long time coming but Solid's Tagged Template Literals now support element and component spreads using htm inspired syntax.
Fixes
Dynamic Spreads now work on Components
Previously spreads on components would only track property changes on bound objects and not when the whole object changed. This now works:
ClassList properly merges multiple classnames in the key
It is common in libraries like Tailwind to apply multiple classes at the same time. There was an issue where true and false resolutions were cancelling each other out. This would only set
text-sm
.Consistent handling of HTMLEntities
Things like
used to render differently depending if in elements or components(or fragments). This has been made consistent across all three.Various improvements to Types and Transitions
A lot of bugs from the last minor release were around Transitions that have been addressed. And as always Types have been gradually improving.
v1.1.7
Compare Source
v1.1.5
Compare Source
v1.1.3
Compare Source
v1.1.2
Compare Source
v1.1.1
Compare Source
v1.1.0
Compare Source
Expanding Solid's concurrency to include scheduling. Bug fixes around Types and around reactive execution order guarantees.
New Features
createUniqueId
A universal id generator that works across server/browser.
from
A simple helper to make it easier to interopt with external producers like RxJS observables or with Svelte Stores. This basically turns any subscribable (object with a
subscribe
method) into a Signal and manages subscription and disposal.It can also take a custom producer function where the function is passed a setter function returns a unsubscribe function:
enableScheduling
(experimental)By default Solid's concurrent rendering/Transitions doesn't schedule work differently and just runs synchronously. Its purpose is to smooth out IO situations like Navigation. However now you can opt into interruptible scheduling similar to React's behavior by calling this once at your programs entry. I've yet to see a realworld scenario where this makes
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.
This PR has been generated by Mend Renovate. View repository job log here.