Skip to content

Releases: delph123/supplejs

v1.3.0 / v1.3.1 - Effectless Components

19 Jul 23:23
f16e345
Compare
Choose a tag to compare

What's New

  • Support effectless components in #31

A new API for components is supported

Old convention of returning an effect from a component, even when the effect does not consume any signal directly, will continue to work:

function CounterButton() {
  const [count, setCount] = createSignal(0);

  return () => (
    <button onClick={() => setCount(count() + 1)}>{count}</button>
  );
}

But effectless components are now also supported, providing a more easy coding path:

function CounterButton() {
  const [count, setCount] = createSignal(0);
  return <button onClick={() => setCount(count() + 1)}>{count}</button>
}

Bugfix

  • Cleanup elements when disposing iterators in #30

Miscellaneous

  • Use supplejs-testing-library in #28

Full Changelog: v1.2.2...v1.3.1

v1.2.2

07 Jul 22:06
Compare
Choose a tag to compare

Do not export jsx-runtime from root package (index.ts) to avoid messing with global namespace

v1.2.1

04 Jul 12:31
7266317
Compare
Choose a tag to compare

What's Changed

  • Fix extensions in released package in #27

Full Changelog: v1.2.0...v1.2.1

v1.2.0 - Compatibility with TSX & react-jsx transform

02 Jul 22:14
Compare
Choose a tag to compare

What's New

  • Add global typing for JSX namespace with TypeScript in #24
    • Typing for HTML tag (<div />)
    • Typing for custom components (<App />)
    • Typing for children (<Title>SuppleJS {version}</Title>)
    • Typescript no longer emits an error when noImplicitAny is true at each usage of JSX!
  • createDeferred: API to notify changes when browser is idle in #25
  • Support for react-jsx transform in TS (thanks to addition of ./jsx-runtime module and jsx, jsxs and jsxDEV transforms)

New API to support deferred changes notifications:

  • createDeferred(source: () => T, { equals?: false | ((prev: T, next: T) => boolean), timeoutMs?: number }): () => T

Bugfix

  • Prevent consumption of internal API by importing from "supplejs/lib/xxx" (exports declaration in package.json)

Miscellaneous

  • Merged SuppleNode, SuppleChild & SuppleChildren - SuppleJS Nodes can be anything from a simple element to a function or an array

Full Changelog: v1.1.0...v1.2.0

v1.1.1

29 Jun 23:43
Compare
Choose a tag to compare

Add package exports

Package exports allows to declare modules exported by this package, same as "main" but in a more modern way.
It also prevents library consumers from consuming exported elements from nested modules (lib/context.js)

Full Changelog: v1.1.0...v1.1.1

v1.1.0

29 Jun 18:06
e574ddd
Compare
Choose a tag to compare

Bugfix

  • Export only public API in index

Documentation

  • Generate documentation with TypeDoc in #23

Miscellaneous

  • Upgrade dependencies

Full Changelog: v1.0.5...v1.1.0

v1.0.5

29 Jun 10:08
Compare
Choose a tag to compare

What's Changed

  • Reorganize workflows & deploy to Github Pages in #21
  • Add steps to publish to npm repository in #22

Full Changelog: v1.0.0...v1.0.5

v1.0.0 - MVP

22 Jun 21:47
Compare
Choose a tag to compare

What's New

  • Error management in #20

New APIs to support error management:

  • catchError<T>(tryFn: () => T, onError: ErrorHandler): T | undefined
  • <ErrorBoundary fallback={(err: any, reset: (() => void)) => SuppleNode}>{children}</ErrorBoundary>

Bugfix

  • Fix unit tests on memo to avoid printing error in #17
  • Fix context provider to support signal in component body
  • Add return type to all API contract in #19

Documentation

  • render()
  • createRenderEffect()

Miscellaneous

Full Changelog: v0.9.0...v1.0.0

v0.9.0 - Context

15 Jun 15:04
Compare
Choose a tag to compare

What's New

  • [v0.9] Support context (create and use context from higher up the tree) in #10

New APIs to support context

function createContext<T>(defaultValue?: T): Context<T> {}
function useContext<T>(context: Context<T>): T {}

interface Context<T> {
    id: symbol;
    Provider: (props: { value: T; children?: SuppleChildren }) => SuppleNodeEffect;
    defaultValue: T;
}

Full Changelog: v0.8.1...v0.9.0

v0.8.1

13 Jun 11:21
Compare
Choose a tag to compare

What's Changed

  • Fix createMemo & indexArray to work with functors
  • Avoid useless rendering with component
  • Add more unitary tests
  • Create test workflow (github action) in #12
  • Upload code coverage info to Codecov in #16

Full Changelog: v0.8.0...v0.8.1