lahama 2.4.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lahama.js +11 -1
- package/package.json +5 -8
package/dist/lahama.js
CHANGED
|
@@ -191,7 +191,7 @@ function addEventListener(
|
|
|
191
191
|
function addEventListeners(listeners = {}, el) {
|
|
192
192
|
const addedListeners = {};
|
|
193
193
|
Object.entries(listeners).forEach(([eventName, handler]) => {
|
|
194
|
-
addedListeners[eventName] =
|
|
194
|
+
addedListeners[eventName] = addEventListener(eventName, handler, el);
|
|
195
195
|
});
|
|
196
196
|
return addedListeners
|
|
197
197
|
}
|
|
@@ -380,6 +380,12 @@ class Dispatcher {
|
|
|
380
380
|
}
|
|
381
381
|
|
|
382
382
|
function areNodesEqual(nodeOne, nodeTwo) {
|
|
383
|
+
if (!nodeOne || !nodeTwo) {
|
|
384
|
+
console.error('Invalid VDOM node', { nodeOne, nodeTwo });
|
|
385
|
+
}
|
|
386
|
+
if (!nodeOne.type || !nodeTwo.type) {
|
|
387
|
+
console.error('Invalid VDOM node', { nodeOne, nodeTwo });
|
|
388
|
+
}
|
|
383
389
|
if (nodeOne.type !== nodeTwo.type) {
|
|
384
390
|
return false
|
|
385
391
|
}
|
|
@@ -586,6 +592,10 @@ function createApp({ state, view, reducers = {} }) {
|
|
|
586
592
|
}
|
|
587
593
|
function renderApp() {
|
|
588
594
|
const newVdom = view(state, emit);
|
|
595
|
+
if (!newVdom) {
|
|
596
|
+
console.error('View returned', newVdom);
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
589
599
|
vdom = patchDOM(vdom, newVdom, parentEl);
|
|
590
600
|
}
|
|
591
601
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lahama",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/lahama.js",
|
|
6
6
|
"files": [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"scripts": {
|
|
10
10
|
"prepack": "npm run build",
|
|
11
|
-
"build": "rollup -c",
|
|
11
|
+
"build": "rimraf dist && rollup -c",
|
|
12
12
|
"lint": "eslint src",
|
|
13
13
|
"lint:fix": "eslint src --fix",
|
|
14
14
|
"test": "vitest",
|
|
@@ -19,16 +19,13 @@
|
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"eslint": "^9.39.0",
|
|
22
|
+
"@eslint/js": "^9.39.0",
|
|
23
|
+
"globals": "^16.5.0",
|
|
23
24
|
"jsdom": "^27.2.0",
|
|
25
|
+
"rimraf": "^3.0.2",
|
|
24
26
|
"rollup": "^4.52.5",
|
|
25
27
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
26
28
|
"rollup-plugin-filesize": "^10.0.0",
|
|
27
29
|
"vitest": "^4.0.15"
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@eslint/js": "^9.39.0",
|
|
31
|
-
"globals": "^16.5.0",
|
|
32
|
-
"lahama": "^1.1.0"
|
|
33
30
|
}
|
|
34
31
|
}
|