New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hydro-js

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hydro-js - npm Package Compare versions

Comparing version 1.5.11 to 1.5.12

19

CHANGELOG.md
# Changelog
## 1.5.11- 2021-04-30
## 1.5.12- 2022-04-30
- Fix bug where attribute was set twice
- Fix bug where bool attribute was incorrectly set on JSX elements with reactive function
## 1.5.11- 2022-04-30
- Fix bug where old events where not correctly removed
## 1.5.10- 2021-01-27
## 1.5.10- 2022-01-27
- Fix intense memory bug, that lead to Bug too
## 1.5.9- 2021-01-23
## 1.5.9- 2022-01-23

@@ -16,3 +21,3 @@ - Minor perf upgrade

## 1.5.8- 2021-01-19
## 1.5.8- 2022-01-19

@@ -22,11 +27,11 @@ - Minor perf upgrade

## 1.5.7- 2021-01-06
## 1.5.7- 2022-01-06
- Performance and Memory improvements
## 1.5.6- 2021-01-05
## 1.5.6- 2022-01-05
- Repair h function
## 1.5.5- 2021-01-02
## 1.5.5- 2022-01-02

@@ -33,0 +38,0 @@ - Improve TypeScript types of $ and $$

@@ -242,4 +242,6 @@ // Safari Polyfills

for (let i in props) {
//@ts-ignore
i in elem ? (elem[i] = props[i]) : setAttribute(elem, i, props[i]);
i in elem && !boolAttrList.includes(i)
? //@ts-ignore
(elem[i] = props[i])
: setAttribute(elem, i, props[i]);
}

@@ -405,3 +407,2 @@ elem.append(...(children.some((i) => Array.isArray(i))

else {
lastProp = subKey;
if (setAttribute(node, subKey, subVal)) {

@@ -1207,2 +1208,3 @@ end = start + String(subVal).length;

function updateDOM(nodeToChangeMap, val, oldVal) {
let valCopy = val, oldValCopy = oldVal;
nodeToChangeMap.forEach((entry) => {

@@ -1274,2 +1276,7 @@ // Circular reference in order to keep Memory low

setAttribute(node, subKey, subVal);
if (subKey === key) {
useStartEnd = true;
oldValCopy = oldVal[subKey];
valCopy = subVal;
}
}

@@ -1292,3 +1299,3 @@ }

// Update end
change[1] = start + String(val).length;
change[1] = start + String(valCopy).length;
// Because we updated the end, we also have to update the start and end for every other reactive change in the node, for the same key

@@ -1303,3 +1310,3 @@ if (allNodeChanges.has(node)) {

if (passedNode && (isTextNode(node) || key === nodeChange[2])) {
const difference = String(oldVal).length - String(val).length;
const difference = String(oldValCopy).length - String(valCopy).length;
nodeChange[0] -= difference;

@@ -1306,0 +1313,0 @@ nodeChange[1] -= difference;

{
"name": "hydro-js",
"version": "1.5.11",
"version": "1.5.12",
"description": "A lightweight reactive library",

@@ -5,0 +5,0 @@ "type": "module",

@@ -362,4 +362,6 @@ declare global {

for (let i in props) {
//@ts-ignore
i in elem ? (elem[i] = props[i]) : setAttribute(elem, i, props[i]);
i in elem && !boolAttrList.includes(i)
? //@ts-ignore
(elem[i] = props[i])
: setAttribute(elem, i, props[i]);
}

@@ -549,4 +551,2 @@

} else {
lastProp = subKey;
if (setAttribute(node, subKey, subVal)) {

@@ -1522,2 +1522,4 @@ end = start + String(subVal).length;

function updateDOM(nodeToChangeMap: nodeToChangeMap, val: any, oldVal: any) {
let valCopy = val,
oldValCopy = oldVal;
nodeToChangeMap.forEach((entry) => {

@@ -1597,2 +1599,8 @@ // Circular reference in order to keep Memory low

setAttribute(node, subKey, subVal);
if (subKey === key) {
useStartEnd = true;
oldValCopy = oldVal[subKey];
valCopy = subVal;
}
}

@@ -1614,3 +1622,3 @@ }

// Update end
change[1] = start + String(val).length;
change[1] = start + String(valCopy).length;

@@ -1627,3 +1635,4 @@ // Because we updated the end, we also have to update the start and end for every other reactive change in the node, for the same key

if (passedNode && (isTextNode(node) || key === nodeChange[2])) {
const difference = String(oldVal).length - String(val).length;
const difference =
String(oldValCopy).length - String(valCopy).length;
nodeChange[0] -= difference;

@@ -1630,0 +1639,0 @@ nodeChange[1] -= difference;

Sorry, the diff of this file is too big to display

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