@lage-run/hasher
Advanced tools
Comparing version 1.6.8 to 1.6.9
@@ -5,3 +5,18 @@ { | ||
{ | ||
"date": "Wed, 15 Jan 2025 16:55:51 GMT", | ||
"date": "Fri, 17 Jan 2025 21:57:15 GMT", | ||
"version": "1.6.9", | ||
"tag": "@lage-run/hasher_v1.6.9", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"author": "kchau@microsoft.com", | ||
"package": "@lage-run/hasher", | ||
"commit": "0cb67940795a8b1366c91a27959b123d4fd056c2", | ||
"comment": "Make package tree handle nested packages" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Wed, 15 Jan 2025 16:56:22 GMT", | ||
"version": "1.6.8", | ||
@@ -8,0 +23,0 @@ "tag": "@lage-run/hasher_v1.6.8", |
# Change Log - @lage-run/hasher | ||
<!-- This log was last generated on Wed, 15 Jan 2025 16:55:51 GMT and should not be manually modified. --> | ||
<!-- This log was last generated on Fri, 17 Jan 2025 21:57:15 GMT and should not be manually modified. --> | ||
<!-- Start content --> | ||
## 1.6.9 | ||
Fri, 17 Jan 2025 21:57:15 GMT | ||
### Patches | ||
- Make package tree handle nested packages (kchau@microsoft.com) | ||
## 1.6.8 | ||
Wed, 15 Jan 2025 16:55:51 GMT | ||
Wed, 15 Jan 2025 16:56:22 GMT | ||
@@ -11,0 +19,0 @@ ### Patches |
@@ -77,3 +77,6 @@ "use strict"; | ||
// reset the internal state | ||
_class_private_field_set(this, _tree, {}); | ||
_class_private_field_set(this, _tree, { | ||
children: {}, | ||
isPackage: true | ||
}); | ||
_class_private_field_set(this, _packageFiles, {}); | ||
@@ -91,5 +94,10 @@ _class_private_field_set(this, _memoizedPackageFiles, {}); | ||
for (const part of pathParts){ | ||
currentNode[part] = currentNode[part] || {}; | ||
currentNode = currentNode[part]; | ||
// initialize the children if not already done | ||
currentNode.children[part] = currentNode.children[part] || { | ||
children: {}, | ||
isPackage: false | ||
}; | ||
currentNode = currentNode.children[part]; | ||
} | ||
currentNode.isPackage = true; | ||
} | ||
@@ -129,7 +137,13 @@ // Get all files in the workspace (scale: ~2000) according to git | ||
let node = _class_private_field_get(this, _tree); | ||
const packagePathParts = []; | ||
const pathPartsBuffer = []; | ||
let packagePathParts = []; | ||
for (const part of pathParts){ | ||
if (node[part]) { | ||
node = node[part]; | ||
packagePathParts.push(part); | ||
if (node.children[part]) { | ||
node = node.children[part]; | ||
pathPartsBuffer.push(part); | ||
if (node.isPackage) { | ||
packagePathParts = [ | ||
...pathPartsBuffer | ||
]; | ||
} | ||
} else { | ||
@@ -180,3 +194,6 @@ break; | ||
this.options = options; | ||
_class_private_field_set(this, _tree, {}); | ||
_class_private_field_set(this, _tree, { | ||
children: {}, | ||
isPackage: true | ||
}); | ||
_class_private_field_set(this, _packageFiles, {}); | ||
@@ -183,0 +200,0 @@ _class_private_field_set(this, _memoizedPackageFiles, {}); |
{ | ||
"name": "@lage-run/hasher", | ||
"version": "1.6.8", | ||
"version": "1.6.9", | ||
"description": "Hasher for Lage Targets", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
230620
66
2822