@malloydata/malloy 0.0.338 → 0.0.339

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.
@@ -33,7 +33,7 @@ export declare function generateHash(input: string): string;
33
33
  * Takes variable string arguments and combines them in a collision-resistant
34
34
  * way by including the length of each string (similar to pathToKey pattern).
35
35
  */
36
- export declare function makeDigest(...parts: string[]): string;
36
+ export declare function makeDigest(...parts: (string | undefined)[]): string;
37
37
  export declare function joinWith<T>(els: T[][], sep: T): T[];
38
38
  export declare function range(start: number, end: number): number[];
39
39
  export declare function exprKids(eNode: Expr): IterableIterator<Expr>;
@@ -127,7 +127,10 @@ function makeDigest(...parts) {
127
127
  // Combine parts with length prefix to avoid collisions
128
128
  // e.g., ("ab", "c") vs ("a", "bc") both concat to "abc"
129
129
  // but with lengths: "2:ab/1:c" vs "1:a/2:bc"
130
- const combined = parts.map(p => `${p.length}:${p}`).join('/');
130
+ // undefined is distinct from empty string in the hash
131
+ const combined = parts
132
+ .map(p => (p === undefined ? '{undefined}' : `${p.length}:${p}`))
133
+ .join('/');
131
134
  return (0, utils_1.bytesToHex)((0, sha256_1.sha256)(combined));
132
135
  }
133
136
  function joinWith(els, sep) {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const MALLOY_VERSION = "0.0.338";
1
+ export declare const MALLOY_VERSION = "0.0.339";
package/dist/version.js CHANGED
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MALLOY_VERSION = void 0;
4
4
  // generated with 'generate-version-file' script; do not edit manually
5
- exports.MALLOY_VERSION = '0.0.338';
5
+ exports.MALLOY_VERSION = '0.0.339';
6
6
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.338",
3
+ "version": "0.0.339",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -45,9 +45,9 @@
45
45
  "generate-version-file": "VERSION=$(npm pkg get version --workspaces=false | tr -d \\\")\necho \"// generated with 'generate-version-file' script; do not edit manually\\nexport const MALLOY_VERSION = '$VERSION';\" > src/version.ts"
46
46
  },
47
47
  "dependencies": {
48
- "@malloydata/malloy-filter": "0.0.338",
49
- "@malloydata/malloy-interfaces": "0.0.338",
50
- "@malloydata/malloy-tag": "0.0.338",
48
+ "@malloydata/malloy-filter": "0.0.339",
49
+ "@malloydata/malloy-interfaces": "0.0.339",
50
+ "@malloydata/malloy-tag": "0.0.339",
51
51
  "@noble/hashes": "^1.8.0",
52
52
  "antlr4ts": "^0.5.0-alpha.4",
53
53
  "assert": "^2.0.0",