@kubb/ast 5.0.0-beta.41 → 5.0.0-beta.42
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/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/factory.ts +2 -2
- package/src/signature.ts +2 -2
- package/src/utils.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1053,7 +1053,7 @@ function sortKey(node) {
|
|
|
1053
1053
|
const isArray = Array.isArray(node.name) ? "1" : "0";
|
|
1054
1054
|
const typeOnly = node.isTypeOnly ? "0" : "1";
|
|
1055
1055
|
const hasName = node.name != null ? "1" : "0";
|
|
1056
|
-
const name = Array.isArray(node.name) ?
|
|
1056
|
+
const name = Array.isArray(node.name) ? node.name.toSorted().join("\0") : node.name ?? "";
|
|
1057
1057
|
return `${isArray}:${typeOnly}:${node.path}:${hasName}:${name}`;
|
|
1058
1058
|
}
|
|
1059
1059
|
/**
|
|
@@ -1844,7 +1844,7 @@ function createFile(input) {
|
|
|
1844
1844
|
return {
|
|
1845
1845
|
kind: "File",
|
|
1846
1846
|
...input,
|
|
1847
|
-
id: (0, node_crypto.
|
|
1847
|
+
id: (0, node_crypto.hash)("sha256", input.path, "hex"),
|
|
1848
1848
|
name: trimExtName(input.baseName),
|
|
1849
1849
|
extname,
|
|
1850
1850
|
imports: resolvedImports,
|
|
@@ -2289,7 +2289,7 @@ const signatureCache = /* @__PURE__ */ new WeakMap();
|
|
|
2289
2289
|
function signatureOf(node) {
|
|
2290
2290
|
const cached = signatureCache.get(node);
|
|
2291
2291
|
if (cached !== void 0) return cached;
|
|
2292
|
-
const signature = (0, node_crypto.
|
|
2292
|
+
const signature = (0, node_crypto.hash)("sha256", describeShape(node), "hex");
|
|
2293
2293
|
signatureCache.set(node, signature);
|
|
2294
2294
|
return signature;
|
|
2295
2295
|
}
|