From 726d3bf8dc6cb243b7c267b5a46fab772568e7c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Feb 2023 04:58:10 +0000 Subject: [PATCH 1/4] Bump minimatch from 3.0.4 to 3.1.2 Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index f2c2a525e..9482af0fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2502,9 +2502,9 @@ } }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -5741,9 +5741,9 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" From a1159b71c0c9f6a71377e6682c784fff582615c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Feb 2023 05:00:23 +0000 Subject: [PATCH 2/4] Bump async from 2.6.3 to 2.6.4 Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4. - [Release notes](https://github.com/caolan/async/releases) - [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md) - [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4) --- updated-dependencies: - dependency-name: async dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9482af0fd..46518c1d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -309,9 +309,9 @@ } }, "node_modules/async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "dependencies": { "lodash": "^4.17.14" @@ -1954,7 +1954,7 @@ "node_modules/istanbul/node_modules/async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", "dev": true }, "node_modules/istanbul/node_modules/esprima": { @@ -4066,9 +4066,9 @@ "dev": true }, "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "requires": { "lodash": "^4.17.14" @@ -5321,7 +5321,7 @@ "async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", "dev": true }, "esprima": { From e8767534f46391b203ee92bf793edc107e4452ab Mon Sep 17 00:00:00 2001 From: Keita Furui Date: Fri, 10 Feb 2023 17:43:50 +0900 Subject: [PATCH 3/4] Remove code when vnode.attrs is null Because vnode.attrs is never null by commit f9e5163 --- render/render.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/render/render.js b/render/render.js index 530313809..2b521da65 100644 --- a/render/render.js +++ b/render/render.js @@ -451,9 +451,6 @@ module.exports = function($window) { var element = vnode.dom = old.dom ns = getNameSpace(vnode) || ns - if (vnode.tag === "textarea") { - if (vnode.attrs == null) vnode.attrs = {} - } updateAttrs(vnode, old.attrs, vnode.attrs, ns) if (!maybeSetContentEditable(vnode)) { updateNodes(element, old.children, vnode.children, hooks, null, ns) From 51a1f35a8a8886eeebd0ff66c3631ca0bc5e3d54 Mon Sep 17 00:00:00 2001 From: Keita Furui Date: Fri, 10 Feb 2023 17:58:19 +0900 Subject: [PATCH 4/4] Always keep key in vnode.attrs if it exists Because vnode.attrs is never null by commit f9e5163 --- render/hyperscript.js | 8 +------- render/tests/test-hyperscript.js | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/render/hyperscript.js b/render/hyperscript.js index 26ff753e3..7482cba79 100644 --- a/render/hyperscript.js +++ b/render/hyperscript.js @@ -36,7 +36,6 @@ function execSelector(state, vnode) { var className = hasClass ? attrs.class : attrs.className vnode.tag = state.tag - vnode.attrs = {} if (!isEmpty(state.attrs) && !isEmpty(attrs)) { var newAttrs = {} @@ -64,12 +63,7 @@ function execSelector(state, vnode) { if (hasClass) attrs.class = null - for (var key in attrs) { - if (hasOwn.call(attrs, key) && key !== "key") { - vnode.attrs = attrs - break - } - } + vnode.attrs = attrs return vnode } diff --git a/render/tests/test-hyperscript.js b/render/tests/test-hyperscript.js index 59751f44a..f688ffd4d 100644 --- a/render/tests/test-hyperscript.js +++ b/render/tests/test-hyperscript.js @@ -271,7 +271,7 @@ o.spec("hyperscript", function() { var vnode = m("div", {key:"a"}) o(vnode.tag).equals("div") - o(vnode.attrs).deepEquals({}) + o(vnode.attrs).deepEquals({key:"a"}) o(vnode.key).equals("a") }) o("handles many attrs", function() { @@ -343,7 +343,7 @@ o.spec("hyperscript", function() { var vnode = m("custom-element", {key:"a"}) o(vnode.tag).equals("custom-element") - o(vnode.attrs).deepEquals({}) + o(vnode.attrs).deepEquals({key:"a"}) o(vnode.key).equals("a") }) o("handles many attrs", function() {