Skip to content

Latest commit

 

History

History
396 lines (265 loc) · 25.4 KB

CHANGELOG.md

File metadata and controls

396 lines (265 loc) · 25.4 KB

3.5.1 (2022-06-22)

Bug Fixes

3.5.0 (2022-04-26)

Features

  • notify hooks and modules about textContent changes (c230eb8)

3.4.0 (2022-03-20)

Bug Fixes

  • use array access instead of string.startsWith (515bc97)

Features

Bug Fixes

3.3.0 (2022-01-17)

Features

3.2.0 (2021-12-13)

Bug Fixes

  • assert that fragment functions are implemented (df0f031)

Features

  • allow DocumentFragment as a container (3505879)
  • support DocumentFragment (7e86386), closes #560

3.1.0 (2021-09-03)

Features

  • allow String and Number objects to be used as children (#979) (19d1d29), closes #977

3.0.3 (2021-06-04)

Bug Fixes

  • build and test code before release (b8707ad)

3.0.2 (2021-06-01)

Bug Fixes

  • avoid className check to handle SVG elements within shadow DOM (#966) (95fa8ad), closes #965

3.0.1 (2021-03-28)

Bug Fixes

  • reference type declarations in package.json (995b983)

3.0.0 (2021-03-28)

Bug Fixes

Features

  • add JSX namespace to jsx factory (5d5fc5a)
  • allow symbols as keys (#954) (ad80c6e), closes #124
  • export everything from 'snabbdom' (7af7e3f), closes #913 #748
  • mark the snabbdom package as side effect free (8524013)
  • offer esm and commonjs bundles (ebf6915)

BREAKING CHANGES

  • Snabbdom does not export the hero module any more. If you require this module, copy the code from examples/hero/hero.js and add it to your project
  • The imports of snabbdom functions have changed. Every file in the project had to be imported on its own, e.g.
import { h } from 'snabbdom/h'
import { VNode } from 'snabbdom/vnode'

Now, the main snabbdom package exports all of the public API like

import { h, VNode } from 'snabbdom'

This means consumers of the snabbdom package need to update their imports. The change makes the use of the exports field in package.json unnecessary, which caused issues for TypeScript users

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

2.1.0 (2020-09-14)

Features

  • eventlisteners: add types for VNode in listener (63b1b6c), closes #796
  • eventlisteners: relax custom event listener type (15ce059), closes #850

2.0.0 (2020-09-10)

⚠ BREAKING CHANGES

  • eventlisteners: loaded/carrying event listeners are no longer supported.

Features

  • eventlisteners: add missing mult. listeners type (5a89efe), closes #794
  • eventlisteners: remove loaded listeners feature (6e0ff8e), closes #802 #802

Bug Fixes

  • deps: add regenertor-runtime to devDeps (2a2964c), closes #813
  • docs: gitter badge url (7e19849)
  • examples: example import paths (8111f62), closes #761
  • examples: totalHeight 0 on remove last element reorder animation (afa77c0)
  • package: remove directories field (c7a2a93)
  • package: update urls paldepind -> snabbdom (f94185a), closes #775

1.0.1 (2020-06-18)

User facing changes

  • package: fix ./snabbdom related files and exports fields errors (89b917b)

1.0.0 (2020-06-18)

⚠ BREAKING CHANGES

  • exports: The main export path, 'snabbdom' was replaced with the export path 'snabbdom/init'. This new export path includes only the named export init.
  • exports: No default exports exist. All exports are named.
  • exports: the import path snabbdom/snabbdom.bundle is removed.
  • typescript: Types exported by this package have re-declared the global Element.setAttribute and Element.setAttributeNS to accept number and boolean for the value parameter. This change removes that re-declaration and thus the only valid value is string. If your code provides number and/or boolean, then it may now fail to compile.
  • props: props module does not attempt to delete node properties. This may affect you if you are using the props module to add non-native (custom) properties to DOM nodes. Instead, it is recommended to use data-* attributes. https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
  • CommonJS modules are no longer provided.
  • import paths in ES modules include file name extensions.
  • Compiled to ES2015 (was ES5).
  • UMD bundles are no longer provided.

Internal changes

  • commitlint: add type auto and scope deps for renovate (b56a0ac)
  • commitlint: fix and enable in CI (f8cf5cc), closes #662
  • deps: update dependency @typescript-eslint/eslint-plugin to v3.3.0 (9448e42)
  • deps: update dependency tsconfigs to v5 (eb1ec8c)
  • deps: update dependency typescript to v3.9.5 (5e24b20)
  • docs: lint code examples (41cb359)
  • eslint: lint cjs files (d581217)
  • format: sort file lists (e77615b), closes #673
  • git: ignore each test artifact specifically (b34e9a9)
  • package: consistent values in files field (6fe56f8), closes #672
  • relic: remove @types/assert (2846189)
  • typescript: package and tests are two projects (8a71211)
  • vscode: eslint.validate short forms (ba3e85b)
  • vscode: use workspace typescript (eabbd2f)

User facing changes

  • docs: enable eslint rule array-bracket-spacing (77e54e9)
  • docs: enable eslint rule import/first (17cf7ae)
  • docs: enable eslint rule import/newline-after-import (cd3a5cf)
  • docs: enable eslint rule indent (e2861bb)
  • docs: enable eslint rule key-spacing (349b686)
  • docs: enable eslint rule max-statements-per-line (a128a23)
  • docs: enable eslint rule no-multi-spaces (8179381), closes #692
  • docs: enable eslint rule object-curly-spacing (8b8fbd5)
  • docs: enable eslint rule quote-props (37512fe)
  • docs: enable eslint rule quotes (2d455b5)
  • docs: enable eslint rule semi (f4e7885)
  • docs: enable eslint rule space-before-blocks (9f2d2d7)
  • docs: enable eslint rule space-before-function-paren (23e7b87)
  • docs: enable eslint rules object-*-newline (9a45b5b)
  • docs: fix wrong module import paths (3b6baee), closes #691
  • docs: provide a release changelog (616df35), closes #670
  • exports: main export provided (3becd84), closes #682
  • exports: only named exports (fefd141), closes #522 #523
  • exports: relative values in exports field (187088e), closes #674
  • exports: remove package.json main field (3122eec), closes #680
  • exports: remove the /snabbdom.bundle path (c862993)
  • exports: replaced main export path with init (09f2d1c), closes #522
  • package: no module field (2b30e25), closes #681
  • props: do not attempt to delete node properties (6f316c1), closes #623 #283 #415 #307 #151 #416
  • typescript: do not redeclare Element.setAttribute(NS) (0620b5e), closes #615
  • do not provide UMD bundles (8e24bbf), closes #498 #514 #481
  • only esm and correct import paths (dad44f0), closes #516 #437 #263

v0.7.2 - 2018-09-02

Bugfixes

  • Improvements to TypeScript types #364. Thanks to @gfmio.
  • In some cases and browsers the style module would cause elements to not be removed correctly #367. Thanks to @jvanbruegge for fixing this tricky bug.

v0.7.0 - 2017-07-27

Breaking change

The way Snabbdom handles boolean attributes in the attributes module has been changed. Snabbdom no longer maintains a list of known boolean attributes. Not relying on such a list means that custom boolean attributes are supported, that performance is slightly better, and that the list doesn't have to be kept up to date.

Whether or not to set a boolean attribute is now determined by looking at the value specified for the attribute. If the value is a boolean (i.e. strictly equal to true or false) it will be handled as a boolean attribute. If you're currently setting boolean attributes with booleans then this change does not affect you.

h("div", {
  attrs: {
    foo: true // will be set a boolean attribute since `true` is a boolean
    bar: "baz" // will set a normal attribute
  }
});

The example above will result in the HTML: <div foo bar="baz" />. Even if bar is actually a boolean attribute. So for instance h("input", { attrs: { required: 12 } }) will no longer set a boolean attribute correctly.

Previously h("input", { attrs: { required: 0 } }) would result in the HTML <input> since required was a know boolean attribute and 0 is falsey. Per the new behavior the HTML will be <input required="0">. To accomidate for the change always give boolean values for boolean attributes.

Bugfixes

  • toVNode now handles DocumentFragment which makes it possible to patch into a fragment. #320. Thanks to @staltz.
  • Custom boolean attributes are handled correctly. #314. Thanks to @caridy.
  • Type improvement. VNode key property can be undefined #290. Thanks to @yarom82.
  • Data attributes are checked for existence before deleting. Old behavior caused error in Safari. #313. Thanks to @FeliciousX.

Performance improvements

  • New handling of boolean attributes. #314. Thanks to @caridy.

v0.6.9 - 2017-05-19

Bug fixes

  • Fix style delayed and remove to be optional in TypeScript, snabbdom#295

v0.6.8 - 2017-05-16

Bug fixes

  • Fix error when class is set by vdom selector in SVG, snabbdom#217. Thanks to @caesarsol
  • Fix hyperscript to support undefined or null children in TypeScript, snabbdom#226. Thanks to @ornicar
  • Fix thunk function so it is not called redundantly, snabbdom#273. Thanks to @caesarsol
  • Improve TypeScript types of VNode props, snabbdom#264 and snabbdom#264. Thanks to @mightyiam
  • Fix toVNode() for comment nodes, lacking some fields, snabbdom#266. Thanks to @staltz

Performance improvements

  • Improvement for attribute patching, snabbdom#257. Thanks to @diervo

v0.6.6 - 2017-03-07

Bug fixes

  • The attributes module sets boolean attributes correctly according to the specificaiton. snabbdom#254. Thanks to @PerWiklander for reporting the bug.

v0.6.5 - 2017-02-25

This is a patch version with a few bug fixes.

Bug fixes

  • Fix toVNode() to handle text nodes correctly, snabbdom#252. Thanks to @Steelfish
  • Fix dataset module to support old browsers, such as IE10. Thanks @staltz
  • Fix "create element" workflow to align with "update element" workflow, snabbdom#234. Thanks @caridy

v0.6.4 - 2017-02-09

This version adds some features such as support for comment nodes and better server-side/client-side rendering collaboration, besides some bug fixes.

New features

Add ability to create comment nodes. snabbdom#142 Thanks to @pedrosland

Example:

h("!", "Will show as a comment");

will be rendered on the DOM as

<!-- Will show as a comment -->

Introduce toVNode() to reconstruct root element as vnode. snabbdom#167 Thanks to @staltz

Useful for client-side rendering over existing HTML that was rendered server-side with snabbdom.

Example:

import { toVNode } from "snabbdom/tovnode";
// ...
patch(toVNode(element), vnode);

Will deep-convert the element to a VNode, this way allowing existing HTML to not be ignored by the patch process.

Bug fixes

  • Fix compatibility issue of String.prototype.startsWith in the Style Module. snabbdom#228 Thanks to @zhulongzheng
  • Support for null/undefined children without crashing. snabbdom#226 Thanks to @nunocastromartins

v0.6.3 - 2017-01-16

Bugfixes

  • Fix the export of the Module interface for TypeScript projects depending on snabbdom.

v0.6.2 - 2017-01-16

Bugfixes

  • Fix the export of the Hooks interface for TypeScript projects depending on snabbdom.

v0.6.1 - 2017-01-05

The biggest change in this release is that the Snabbdom source code has been ported to TypeScript. The work has been primarily done by @staltz. This brings much improved support for using Snabbdom in TypeScript projects.

Note: This release contains breaking changes. See below.

New features

  • Complete TypeScript support. Thanks to @staltz.
  • Support for CSS variables. #195. Thanks to @jlesquembre.
  • Allow h(sel, data, node) and h(sel, node) shortcut notations in the h function. #196. That is, instead of h('div', [child]) one can now do h('div', child). Thanks to @AlexGalays.

Bugfixes

  • Fix custom element creation when tag name begins with 'svg'. #213. Thanks to @tdumitrescu.
  • Fix bug related to updating one child with same key but different selector. #188. Thanks to @zhulongzheng.
  • Strings can be used as children inside SVG elements. #208. Thanks to @jbucaran and @jbucaran.
  • Use parentNode fixing bug in IE 11. #210. Thanks to @aronallen.

Breaking changes

The TypeScript rewrite uses the import and export features introduced in ECMAScript 2015. Unfortunately the ES imports have no analogy to the CommonJS pattern of setting module.exports. This means that the Snabbdom modules that previously used this feature now have to be imported in a slightly different way.

var h = require("snabbdom/h"); // The old way
var h = require("snabbdom/h").h; // The new way
var h = require("snabbdom/h").default; // Alternative new way
var { h } = require("snabbdom/h"); // Using destructuring

v0.6.0 - 2017-01-05

Deprecated. Use version 0.6.1 instead.

v0.5.0 - 2016-05-16

Breaking change

This release contains a new thunk implementation that solves many issues with the old thunk implementation. The thunk API has changed slightly. Please see the thunks section in the readme.