Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

snabbdom

Package Overview
Dependencies
Maintainers
4
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snabbdom - npm Package Compare versions

Comparing version 3.4.0 to 3.5.0

11

build/init.js

@@ -295,3 +295,3 @@ import { vnode } from "./vnode";

function patchVnode(oldVnode, vnode, insertedVnodeQueue) {
var _a, _b, _c, _d, _e;
var _a, _b, _c, _d, _e, _f, _g, _h;
const hook = (_a = vnode.data) === null || _a === void 0 ? void 0 : _a.hook;

@@ -304,6 +304,9 @@ (_b = hook === null || hook === void 0 ? void 0 : hook.prepatch) === null || _b === void 0 ? void 0 : _b.call(hook, oldVnode, vnode);

return;
if (vnode.data !== undefined) {
if (vnode.data !== undefined ||
(isDef(vnode.text) && vnode.text !== oldVnode.text)) {
(_c = vnode.data) !== null && _c !== void 0 ? _c : (vnode.data = {});
(_d = oldVnode.data) !== null && _d !== void 0 ? _d : (oldVnode.data = {});
for (let i = 0; i < cbs.update.length; ++i)
cbs.update[i](oldVnode, vnode);
(_d = (_c = vnode.data.hook) === null || _c === void 0 ? void 0 : _c.update) === null || _d === void 0 ? void 0 : _d.call(_c, oldVnode, vnode);
(_g = (_f = (_e = vnode.data) === null || _e === void 0 ? void 0 : _e.hook) === null || _f === void 0 ? void 0 : _f.update) === null || _g === void 0 ? void 0 : _g.call(_f, oldVnode, vnode);
}

@@ -333,3 +336,3 @@ if (isUndef(vnode.text)) {

}
(_e = hook === null || hook === void 0 ? void 0 : hook.postpatch) === null || _e === void 0 ? void 0 : _e.call(hook, oldVnode, vnode);
(_h = hook === null || hook === void 0 ? void 0 : hook.postpatch) === null || _h === void 0 ? void 0 : _h.call(hook, oldVnode, vnode);
}

@@ -336,0 +339,0 @@ return function patch(oldVnode, vnode) {

@@ -380,3 +380,3 @@ 'use strict';

function patchVnode(oldVnode, vnode, insertedVnodeQueue) {
var _a, _b, _c, _d, _e;
var _a, _b, _c, _d, _e, _f, _g, _h;
const hook = (_a = vnode.data) === null || _a === void 0 ? void 0 : _a.hook;

@@ -389,6 +389,9 @@ (_b = hook === null || hook === void 0 ? void 0 : hook.prepatch) === null || _b === void 0 ? void 0 : _b.call(hook, oldVnode, vnode);

return;
if (vnode.data !== undefined) {
if (vnode.data !== undefined ||
(isDef(vnode.text) && vnode.text !== oldVnode.text)) {
(_c = vnode.data) !== null && _c !== void 0 ? _c : (vnode.data = {});
(_d = oldVnode.data) !== null && _d !== void 0 ? _d : (oldVnode.data = {});
for (let i = 0; i < cbs.update.length; ++i)
cbs.update[i](oldVnode, vnode);
(_d = (_c = vnode.data.hook) === null || _c === void 0 ? void 0 : _c.update) === null || _d === void 0 ? void 0 : _d.call(_c, oldVnode, vnode);
(_g = (_f = (_e = vnode.data) === null || _e === void 0 ? void 0 : _e.hook) === null || _f === void 0 ? void 0 : _f.update) === null || _g === void 0 ? void 0 : _g.call(_f, oldVnode, vnode);
}

@@ -418,3 +421,3 @@ if (isUndef(vnode.text)) {

}
(_e = hook === null || hook === void 0 ? void 0 : hook.postpatch) === null || _e === void 0 ? void 0 : _e.call(hook, oldVnode, vnode);
(_h = hook === null || hook === void 0 ? void 0 : hook.postpatch) === null || _h === void 0 ? void 0 : _h.call(hook, oldVnode, vnode);
}

@@ -421,0 +424,0 @@ return function patch(oldVnode, vnode) {

# [3.5.0](https://github.com/snabbdom/snabbdom/compare/v3.4.0...v3.5.0) (2022-04-26)
### Features
* notify hooks and modules about textContent changes ([c230eb8](https://github.com/snabbdom/snabbdom/commit/c230eb8aded06781e57e0f7efdff0b87d989e462))
# [3.4.0](https://github.com/snabbdom/snabbdom/compare/v3.3.1...v3.4.0) (2022-03-20)
### Bug Fixes
* use array access instead of string.startsWith ([515bc97](https://github.com/snabbdom/snabbdom/commit/515bc97c27239521c516e403d975117ad268ba6b))
- use array access instead of string.startsWith ([515bc97](https://github.com/snabbdom/snabbdom/commit/515bc97c27239521c516e403d975117ad268ba6b))
### Features
* export `Options` type ([#1005](https://github.com/snabbdom/snabbdom/issues/1005)) ([dca0b0c](https://github.com/snabbdom/snabbdom/commit/dca0b0c9af5ff514b26ca684c2c75b11733c2418))
* toVnode is support dataset ([#1008](https://github.com/snabbdom/snabbdom/issues/1008)) ([47ef5c1](https://github.com/snabbdom/snabbdom/commit/47ef5c14e92c15fde7d018a94fa2c6dad2a1a342)), closes [#976](https://github.com/snabbdom/snabbdom/issues/976)## [3.3.1](https://github.com/snabbdom/snabbdom/compare/v3.3.0...v3.3.1) (2022-01-18)
- export `Options` type ([#1005](https://github.com/snabbdom/snabbdom/issues/1005)) ([dca0b0c](https://github.com/snabbdom/snabbdom/commit/dca0b0c9af5ff514b26ca684c2c75b11733c2418))
- toVnode is support dataset ([#1008](https://github.com/snabbdom/snabbdom/issues/1008)) ([47ef5c1](https://github.com/snabbdom/snabbdom/commit/47ef5c14e92c15fde7d018a94fa2c6dad2a1a342)), closes [#976](https://github.com/snabbdom/snabbdom/issues/976)## [3.3.1](https://github.com/snabbdom/snabbdom/compare/v3.3.0...v3.3.1) (2022-01-18)

@@ -16,0 +21,0 @@ ### Bug Fixes

{
"name": "snabbdom",
"version": "3.4.0",
"version": "3.5.0",
"description": "A virtual DOM library with focus on simplicity, modularity, powerful features and performance.",

@@ -42,8 +42,8 @@ "homepage": "https://github.com/snabbdom/snabbdom#readme",

"devDependencies": {
"@release-it/conventional-changelog": "^4.2.2",
"@types/chai": "4.3.0",
"@types/lodash.shuffle": "4.2.6",
"@types/mocha": "9.1.0",
"@typescript-eslint/eslint-plugin": "5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"@release-it/conventional-changelog": "^4.3.0",
"@types/chai": "4.3.1",
"@types/lodash.shuffle": "4.2.7",
"@types/mocha": "9.1.1",
"@typescript-eslint/eslint-plugin": "5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"chai": "4.3.6",

@@ -53,9 +53,9 @@ "commithelper": "^1.2.0",

"cross-env": "7.0.3",
"eslint": "8.11.0",
"eslint": "8.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "11.1.0",
"husky": "7.0.4",
"karma": "6.3.17",
"karma": "6.3.19",
"karma-browserstack-launcher": "1.6.0",

@@ -65,12 +65,12 @@ "karma-chrome-launcher": "3.1.1",

"karma-mocha": "2.0.1",
"karma-mocha-reporter": "^2.2.3",
"karma-mocha-reporter": "^2.2.5",
"karma-typescript": "^5.5.3",
"lint-staged": "^12.3.7",
"lint-staged": "^12.4.1",
"lodash.shuffle": "4.2.0",
"mocha": "9.2.2",
"prettier": "^2.6.0",
"release-it": "^14.13.0",
"rollup": "^2.70.1",
"prettier": "^2.6.2",
"release-it": "^14.14.2",
"rollup": "^2.70.2",
"serve": "^13.0.2",
"typescript": "4.6.2"
"typescript": "4.6.3"
},

@@ -77,0 +77,0 @@ "prettier": {},

@@ -386,6 +386,11 @@ import { Module } from "./modules/module";

if (oldVnode === vnode) return;
if (vnode.data !== undefined) {
if (
vnode.data !== undefined ||
(isDef(vnode.text) && vnode.text !== oldVnode.text)
) {
vnode.data ??= {};
oldVnode.data ??= {};
for (let i = 0; i < cbs.update.length; ++i)
cbs.update[i](oldVnode, vnode);
vnode.data.hook?.update?.(oldVnode, vnode);
vnode.data?.hook?.update?.(oldVnode, vnode);
}

@@ -392,0 +397,0 @@ if (isUndef(vnode.text)) {

@@ -1146,4 +1146,4 @@ import { assert } from "chai";

assert(vnode.elm instanceof Element);
assert.strictEqual((vnode.elm as HTMLDivElement).children.length, 2);
assert.strictEqual(vnode.elm!.parentNode, null);
assert.strictEqual(vnode.elm.children.length, 2);
assert.strictEqual(vnode.elm.parentNode, null);
result.push(vnode);

@@ -1166,4 +1166,4 @@ };

assert(vnode.elm instanceof Element);
assert.strictEqual((vnode.elm as HTMLDivElement).children.length, 2);
assert.strictEqual(vnode.elm!.parentNode!.children.length, 3);
assert.strictEqual(vnode.elm.children.length, 2);
assert.strictEqual(vnode.elm.parentNode!.children.length, 3);
result.push(vnode);

@@ -1170,0 +1170,0 @@ };

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc