Skip to content

Releases: makeswift/makeswift

@makeswift/[email protected]

18 Dec 02:57
Compare
Choose a tag to compare

Patch Changes

  • 3a32698: fix(runtime): more efficient element lookup, fixes a performance regression introduced in 0.22.0

@makeswift/[email protected]

18 Dec 00:21
Compare
Choose a tag to compare

Patch Changes

@makeswift/[email protected]

18 Dec 00:14
Compare
Choose a tag to compare

Patch Changes

  • 11ae3c2: refactor: rewrite element tree rendering using "unified" controls interface

@makeswift/[email protected]

18 Dec 00:26
Compare
Choose a tag to compare
Pre-release

Minor Changes

  • 11ae3c2: refactor: rewrite element tree rendering using "unified" controls interface

    Breaking Changes

    ReactNode[] props

    Previously, registered components that accepted a list of ReactNodes, like the Slots component below, could render the list by simply interpolating its value in JSX:

    export const Slots = forwardRef(function Slots(
      { slots }: { slots: ReactNode[] },
      ref: Ref<HTMLDivElement>,
    ) {
      return (
        <div ref={ref}>{slots}</div>
        //             ^^^^^^^
      )
    })
    
    runtime.registerComponent(Slots, {
      type: '@acme/list-of-slots',
      label: 'Slots',
      props: {
        slots: List({ label: 'Slots', type: Slot() }),
      },
    })

    This worked because the slots value was never actually passed as a list of ReactNodes. Instead, it was passed as a single ReactNode representing an internal component rendering the list as a recursive cons-like structure.

    If you have registered components that expect a list of ReactNodes and rely on this undocumented behavior, you must update your code to wrap each node in a React.Fragment with a corresponding key:

    export const Slots = forwardRef(function Slots(
      { slots }: { slots: ReactNode[] },
      ref: Ref<HTMLDivElement>,
    ) {
      return (
    -    <div ref={ref}>{slots}</div>
         <div ref={ref}>{slots.map((slot, i) => (<Fragment key={i}>{slot}</Fragment>))}</div>
      )
    })
  • Updated dependencies [11ae3c2]

@makeswift/[email protected]

15 Nov 22:13
Compare
Choose a tag to compare

Patch Changes

  • bdfdfcf: fix: "attempted import" errors on registering component in server-side code

@makeswift/[email protected]

09 Nov 23:23
Compare
Choose a tag to compare

Patch Changes

@makeswift/[email protected]

09 Nov 23:23
Compare
Choose a tag to compare

Patch Changes

@makeswift/[email protected]

09 Nov 23:23
Compare
Choose a tag to compare

Patch Changes

  • 6f88345: fix: stalled calls/memory leaks on repeated function deserialization

@makeswift/[email protected]

05 Nov 06:35
Compare
Choose a tag to compare

Patch Changes

  • 4726279: fix: registerComponent fails to correctly deduce resolved value type in some cases

@makeswift/[email protected]

30 Oct 03:17
Compare
Choose a tag to compare

Minor Changes

  • 92cb216: Next.js 15 / React 19 RC support

    Breaking Changes

    Pages Router's custom Document

    The Makeswift custom Document export has been moved from @makeswift/runtime/next to @makeswift/runtime/next/document. To migrate, adjust the custom Document import in src/pages/_document.ts as follows:

    - export { Document as default } from '@makeswift/runtime/next'
      export { Document as default } from '@makeswift/runtime/next/document'

Patch Changes

  • 4203ec3: Validate registered component types at runtime
  • 9e4298a: fix(pages router): links from a localized page to base pages don't work