Commit Graph

24 Commits (master)

Author SHA1 Message Date
Jan van Brügge 0a4fb34ffa
chore(test): move from deprecated karma to web-test-runner for browser tests (#1052) 1 year ago
Jan van Brügge 3f428cf808
chore(tools): remove custom compiler plugin 4 years ago
patomation 8213be658a chore(karma): decouple webpack from karma
Co-authored-by: Shahar Dawn Or <mightyiampresence@gmail.com>
5 years ago
Shahar Or (mightyiam) 09f2d1ca5a ux(exports): replaced main export path with init
BREAKING CHANGE: The main export path, 'snabbdom' was replaced with
the export path 'snabbdom/init'. This new export path includes only
the named export `init`.

Reference: #522.
5 years ago
Shahar Or (mightyiam) e77615b16b dx(format): sort file lists
Fixes #673.
5 years ago
Shahar Or (mightyiam) 8a71211b4a dx(typescript): package and tests are two projects 5 years ago
Shahar Or (mightyiam) b34e9a9d3a dx(git): ignore each test artifact specifically 5 years ago
Shahar Or (mightyiam) c862993359 ux(exports): remove the /snabbdom.bundle path
BREAKING CHANGE: the import path `snabbdom/snabbdom.bundle` is removed.
5 years ago
Shahar Or (mightyiam) dad44f0d63 feat: only esm and correct import paths
BREAKING CHANGE: CommonJS module are no longer provided.
BREAKING CHANGE: import paths in ES modules include file name
extensions.
BREAKING CHANGE: Compiled to ES2015 (was ES5).

Fixes #516.
Fixes #437.
Fixes #263. Kind of. Because there is no build step.

Thanks to @mreinstein on starting this work.
5 years ago
Shahar Or (mightyiam) 215d420950 test: benchmark core 5 years ago
Shahar Dawn Or 431f95018e
fix: include JSX related module in package (#524)
Fixes #503.
5 years ago
Shahar Dawn Or b77cb512f4
refactor(tests): convert to TypeScript (#508)
Closes #293.
Fixes #509.
5 years ago
Shahar Dawn Or 2ada1f55de
chore: more precise paths in .gitignore (#507) 5 years ago
Noj Vek 7ff8d13b4e snabbdom can be used with jsx/tsx via jsxFactory: jsx 5 years ago
Shahar Or (mightyiam) 7c9a7acc1d chore: overhaul gitignore and whitelist packaged files
Fixes #475.
5 years ago
Alexandre Galays fc47e2c9b1 Add package.json/module 8 years ago
cesare soldini 1826bcd3c6 Bugfix: thunk function called two times
PR #273

* Separate test blocks with newlines
* Add a 🔴 failing test that highlights the bug, and some other more detailed tests on thunk renderings
* Fix the bug 
* Correctly gitignore files in base directory
The existing configuration was ignoring the same filenames in subdirectories, for example `test/thunk.js`
* Remove newlines between test blocks
* Make tests titles more explicative
8 years ago
Andre Staltz a0033a635d
Introduce toVNode() to reconstruct root element as vnode
This commit addresses issue #167. Previously, in snabbdom v0.5.0,
patch(element, vnode) would always create a new element for the root.
This resulted in problems with custom elements (web components), and was
fixed in commit c091c59c59.

However, that commit resulted in bug #167. This meant that snabbdom
would have bugs with server-side rendering, where the root element would
be non-empty (it has many children, rendered on the server-side as
HTML), and the client-side rendering should reuse those existing
children (or clear all the children and recreate them again in patch()).

This commit introduces the function toVNode(elm) that deep-converts an
element (and its tree) to a VNode (and its tree), that is separately
imported and used before calling patch(). toVNode(elm) will look at the
element's attributes and gather those as data for the vnode.

Overall, this commit is important for fixing #167 and enabling
client/server-side rendering in an efficient manner
(destruction/recreation client-side is probably too expensive).
8 years ago
Andre Staltz 091dc5f961
Migrate from CommonJS modules to ES2015 modules 8 years ago
Andre Staltz 499cd37b06
Migrate source code to TypeScript v2.0 8 years ago
fix-fix e68fb5884c Add test bundle to gitignore 9 years ago
Sylvain Prat 7ca1d13783 Ignore test/browserified.js 9 years ago
paldepind f1ee781962 Elements can be created with namespace #4 10 years ago
Simon Friis Vindum c3b2989fa6 Initial commit 10 years ago