Skip to content

Releases: vanjs-org/van

1.2.5: Enable auto-completion for the `props` parameter of tag functions

27 Oct 04:14
Compare
Choose a tag to compare

Improved the type definition in van.d.ts to enable auto-completion for the props parameter of tag functions.

See the release announcement: #114 (comment)

1.2.4: Fix the incompatibility issue between `van.debug.js` and VanX

23 Oct 17:12
Compare
Choose a tag to compare

1.2.3: `van.d.ts` type simplification

19 Oct 16:53
Compare
Choose a tag to compare

Simplify van.d.ts for the type definition of tag functions with the help of HTMLElementTagNameMap. Thanks @yahia-berashish for the idea!

1.2.2 was skipped due to faulty release.

See the release announcement: #114 (comment)

1.2.1: Improved type system in `van.d.ts`

18 Sep 07:06
Compare
Choose a tag to compare

A minor release with changes to van.d.ts to improve VanJS's type system:

  • The binding function for state-derived child nodes is now taking the type ((dom?: Node) => ValidChildDomValue) | ((dom?: Element) => Element).
  • Specialize the return types of tag functions for more known tag names. Specifically, 1.2.1 added specialized return types for tags of HTMLElement type.

See the release announcement: #120

1.2.0: Hydration support added (with only 12 more bytes)

07 Sep 23:03
Compare
Choose a tag to compare
  • New API van.hydrate that allows us to hydrate a SSR component into a CSR component with added reactivity while preserving all the server-side states. Sample usage:
van.hydrate(document.getElementById("basic-counter")!, dom => Counter({
  van,
  id: dom.id,
  init: Number(dom.getAttribute("data-counter")),
}))
  • Change van-{VERSION}.debug.js to allow string values in on... properties of tag functions, if the properties are used to set HTML attributes (via setAttribute) of the DOM element. This is crucial for cross-platform UI components to specify event handlers, as for SSR, only string-valued on... event handlers can be visible in the rendered HTML strings. You can refer to https://vanjs.org/ssr#on-properties for a detailed explanation.
  • Fix some type definitions in van.d.ts:
    • For state-valued child nodes, restrict the types of val property to Primitive | null | undefined (DOM-node-valued states are not allowed anymore). This is because DOM-node-valued states have problematic behavior and should be generally avoided, see https://vanjs.org/advanced#why-not-dom-valued-states for more information.
    • For state-derived child nodes, the binding function should be of type (dom: Node | undefined) => ValidChildDomValue (changed from (dom: Node) => ValidChildDomValue), as it needs to handle to case where the dom parameter is undefined (when the binding function is invoked for the first time).
    • Simplify the type definition of Props with built-in type Record.

See the release announcement: #114

1.1.3: small adjustments to van.d.ts and van.debug.js

29 Aug 07:26
Compare
Choose a tag to compare

1.1.3 is a minor release. Here are the changes:

  • Simplify van.d.ts by using TypeScript built-in types
  • Unify the style in van.debug.js

There is no change in the implementation of van.js file.

Version 1.1.1 and 1.1.2 are skipped as the published NPM packages have some minor issues in van.d.ts file.

See the release announcement: #81 (comment)

1.1.0: A big improvement on GC

18 Aug 23:41
Compare
Choose a tag to compare

The garbage collection mechanism in VanJS was revamped in 1.1.0. In this overhaul, we improved the GC handling for derived states and side effects registered inside DOM binding functions to avoid some unnecessary constraints while defining derived states and side effects.

See the release announcement: #81

1.0.2: avoid the duplicate execution of Object.getPrototypeOf in tag functions

14 Aug 08:06
Compare
Choose a tag to compare

1.0.2 is a minor release. This release contains an optimization to avoid the duplicate execution of Object.getPrototypeOf in tag functions.

This optimization increases the bundle size slightly: the size of .min.js is 1630 bytes (4 more bytes compared to 1.0.1); and the size of .min.js.gz is 928 bytes (2 more bytes compared to 1.0.1).

See the release announcement: #72 (comment)

1.0.1: Rename a parameter to keep the style consistent

06 Aug 21:57
Compare
Choose a tag to compare

This is a minor release. In this release, we renamed a parameter to keep the style consistent in source file van.js. There was no change in the actual implementation.

Thanks @tolluset for the contribution!

See the release announcement: #72 (comment)

1.0.0: Milestone for API stability

31 Jul 15:52
Compare
Choose a tag to compare

A major milestone with the commitment of API stability and forward compatibility for future releases.

What's new?

See the release announcement: #72