v0.11.0 - Classified!
Switch from @lume/variable
(deprecated) to classy-solid
for decorator implementation details. This gets onto the latest version of Solid.js while at it. It also removes a layer of concepts in @lume/variable
that were not aligned with Solid.js idioms (f.e. using autorun
instead of createEffect
, naming of the @reactive
class field decorator compared to the better-named @signal
, etc), allowing us to move forward in a way that will showcase Solid's features in ways more idiomatic and familiar to to users coming from Solid.js.
BREAKING:
With the update to classy-solid
we dropped legacy decorators, and now use the stage 3 decorator format. Stage 3 "standard decorators" are slated to be implemented in browsers, but this has not happened yet.
Migration:
- If you're using
@lume/element
's decorators, you'll need to update your tooling to support the latest spec: either use TypeScript v5 or higher which now supports standard decorators out of the box without a flag (using theexperimentalDecorators
option for legacy decoraators will no longer work), or use the latest version of the Babel compiler's decorators plugin. - If you were using
useDefineForClassFields
in TypeScript, orloose
mode with Babel's class properties, these are no longer supported because they do not align with native behavior of JavaScript, and using these modes may introduce unexpected runtime errors that may be very difficult to debug. You will most likely need to get your code working withuseDefineForClassFields
orloose
modes disabled. - Additionally, some uses of decorators may introduce (valid) type errors now (f.e. it does not make sense (to TypeScript) to use a class decorator that returns a subclass if the decorated class has a
private
constructor, etc). - If you're using plain JavaScript without decorators, the plain JS usage has changed a little bit. See the plain JS example in the tests, specifically the comments labeled "When not using decorators".
Full Changelog: v0.10.1...v0.11.0