@rethinkhealth/hl7v2-util-visit 0.12.0 → 0.13.2

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.js CHANGED
@@ -1,83 +1,93 @@
1
- // src/index.ts
2
- import { visitParents } from "unist-util-visit-parents";
3
-
4
- // src/utils.ts
1
+ import { EXIT, SKIP, visitParents } from "unist-util-visit-parents";
2
+ //#region src/utils.ts
3
+ /**
4
+ * Create test predicate from various input types.
5
+ *
6
+ * Assumptions:
7
+ * - null test matches all nodes
8
+ * - String test matches by node.type property
9
+ * - Object test uses strict equality (===) for property matching
10
+ * - Explicit undefined values in test object check for property absence
11
+ * - Dangerous keys (__proto__, constructor, prototype) are filtered for security
12
+ *
13
+ * @param test - Filter criteria: null (all), string (type), object (properties), or function
14
+ * @returns Predicate function that returns true if node matches test criteria
15
+ */
5
16
  function createTest(test) {
6
- if (test === null) {
7
- return () => true;
8
- }
9
- if (typeof test === "string") {
10
- return (node) => node.type === test;
11
- }
12
- if (typeof test === "function") {
13
- return test;
14
- }
15
- return (node) => {
16
- for (const key of Object.keys(test)) {
17
- if (key === "__proto__" || key === "constructor" || key === "prototype") {
18
- continue;
19
- }
20
- const testValue = test[key];
21
- const nodeValue = node[key];
22
- if (testValue === void 0) {
23
- if (Object.hasOwn(node, key) && nodeValue !== void 0) {
24
- return false;
25
- }
26
- } else if (nodeValue !== testValue) {
27
- return false;
28
- }
29
- }
30
- return true;
31
- };
17
+ if (test === null) return () => true;
18
+ if (typeof test === "string") return (node) => node.type === test;
19
+ if (typeof test === "function") return test;
20
+ return (node) => {
21
+ for (const key of Object.keys(test)) {
22
+ if (key === "__proto__" || key === "constructor" || key === "prototype") continue;
23
+ const testValue = test[key];
24
+ const nodeValue = node[key];
25
+ if (testValue === void 0) {
26
+ if (Object.hasOwn(node, key) && nodeValue !== void 0) return false;
27
+ } else if (nodeValue !== testValue) return false;
28
+ }
29
+ return true;
30
+ };
32
31
  }
33
-
34
- // src/index.ts
35
- import { EXIT, SKIP } from "unist-util-visit-parents";
32
+ //#endregion
33
+ //#region src/index.ts
34
+ /**
35
+ * Build index map for O(1) child index lookups.
36
+ * Pre-computes the index of each node within its parent's children array.
37
+ *
38
+ * @param tree - Root of tree to index
39
+ * @returns WeakMap mapping each node to its index in parent.children
40
+ */
36
41
  function buildIndexMap(tree) {
37
- const map = /* @__PURE__ */ new WeakMap();
38
- function traverse(node) {
39
- if ("children" in node && Array.isArray(node.children)) {
40
- for (let i = 0; i < node.children.length; i++) {
41
- const child = node.children[i];
42
- if (child) {
43
- map.set(child, i);
44
- traverse(child);
45
- }
46
- }
47
- }
48
- }
49
- traverse(tree);
50
- return map;
42
+ const map = /* @__PURE__ */ new WeakMap();
43
+ function traverse(node) {
44
+ if ("children" in node && Array.isArray(node.children)) for (let i = 0; i < node.children.length; i++) {
45
+ const child = node.children[i];
46
+ if (child) {
47
+ map.set(child, i);
48
+ traverse(child);
49
+ }
50
+ }
51
+ }
52
+ traverse(tree);
53
+ return map;
51
54
  }
55
+ /**
56
+ * Visit nodes in an HL7 AST tree.
57
+ * Wraps unist-util-visit-parents to add HL7v2-specific context.
58
+ *
59
+ * @param tree - The tree to traverse (can be any node type, not just Root)
60
+ * @param test - Optional test to filter nodes (type string, partial match, or Test function)
61
+ * @param visitor - Function called for each matching node
62
+ *
63
+ * **Important**: If you pass a function as the second argument, it is always treated
64
+ * as a Visitor, never as a Test. To use a Test function, you MUST provide both the
65
+ * test and visitor parameters: `visit(tree, testFn, visitorFn)`.
66
+ */
52
67
  function visit(tree, arg2, arg3) {
53
- let test = null;
54
- let visitor;
55
- if (arg3 === void 0) {
56
- visitor = arg2;
57
- } else {
58
- test = arg2;
59
- visitor = arg3;
60
- }
61
- const predicate = createTest(test);
62
- const indexMap = buildIndexMap(tree);
63
- visitParents(tree, (node, ancestors) => {
64
- if (!predicate(node, ancestors)) {
65
- return;
66
- }
67
- const parent = ancestors.at(-1);
68
- const childIndex = parent ? indexMap.get(node) ?? 0 : 0;
69
- const info = {
70
- depth: ancestors.length + 1,
71
- index: parent ? childIndex : 0,
72
- metadata: "name" in node && typeof node.name === "string" ? { name: node.name } : void 0,
73
- sequence: parent ? childIndex + 1 : 1
74
- };
75
- return visitor(node, ancestors, info);
76
- });
68
+ let test = null;
69
+ let visitor;
70
+ if (arg3 === void 0) visitor = arg2;
71
+ else {
72
+ test = arg2;
73
+ visitor = arg3;
74
+ }
75
+ const predicate = createTest(test);
76
+ const indexMap = buildIndexMap(tree);
77
+ visitParents(tree, (node, ancestors) => {
78
+ if (!predicate(node, ancestors)) return;
79
+ const parent = ancestors.at(-1);
80
+ const childIndex = parent ? indexMap.get(node) ?? 0 : 0;
81
+ const info = {
82
+ depth: ancestors.length + 1,
83
+ index: parent ? childIndex : 0,
84
+ metadata: "name" in node && typeof node.name === "string" ? { name: node.name } : void 0,
85
+ sequence: parent ? childIndex + 1 : 1
86
+ };
87
+ return visitor(node, ancestors, info);
88
+ });
77
89
  }
78
- export {
79
- EXIT,
80
- SKIP,
81
- visit
82
- };
90
+ //#endregion
91
+ export { EXIT, SKIP, visit };
92
+
83
93
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/utils.ts"],"sourcesContent":["/**\n * HL7v2 AST Visitor\n *\n * Wraps unist-util-visit-parents to add HL7v2-specific context\n * (index, sequence, depth, metadata) while delegating core traversal.\n */\n\nimport type { Nodes } from \"@rethinkhealth/hl7v2-ast\";\nimport { visitParents } from \"unist-util-visit-parents\";\n\nimport type { Test, VisitInfo, Visitor } from \"./types\";\nimport { createTest } from \"./utils\";\n\nexport type { VisitorResult } from \"unist-util-visit-parents\";\n\n// biome-ignore lint/performance/noBarrelFile: fine\nexport { EXIT, SKIP } from \"unist-util-visit-parents\";\n\nexport type { Predicate, Test, VisitInfo, Visitor } from \"./types\";\n\n/**\n * Build index map for O(1) child index lookups.\n * Pre-computes the index of each node within its parent's children array.\n *\n * @param tree - Root of tree to index\n * @returns WeakMap mapping each node to its index in parent.children\n */\nfunction buildIndexMap(tree: Nodes): WeakMap<Nodes, number> {\n const map = new WeakMap<Nodes, number>();\n\n function traverse(node: Nodes): void {\n if (\"children\" in node && Array.isArray(node.children)) {\n // oxlint-disable-next-line no-plusplus\n for (let i = 0; i < node.children.length; i++) {\n const child = node.children[i];\n if (child) {\n map.set(child, i);\n traverse(child);\n }\n }\n }\n }\n\n traverse(tree);\n return map;\n}\n\n// Overload signatures\nexport function visit(tree: Nodes, visitor: Visitor): void;\nexport function visit<Type extends Nodes[\"type\"]>(\n tree: Nodes,\n test: Type,\n visitor: Visitor<Extract<Nodes, { type: Type }>>\n): void;\nexport function visit<T extends Nodes>(\n tree: Nodes,\n test: Test<T>,\n visitor: Visitor<T>\n): void;\n\n/**\n * Visit nodes in an HL7 AST tree.\n * Wraps unist-util-visit-parents to add HL7v2-specific context.\n *\n * @param tree - The tree to traverse (can be any node type, not just Root)\n * @param test - Optional test to filter nodes (type string, partial match, or Test function)\n * @param visitor - Function called for each matching node\n *\n * **Important**: If you pass a function as the second argument, it is always treated\n * as a Visitor, never as a Test. To use a Test function, you MUST provide both the\n * test and visitor parameters: `visit(tree, testFn, visitorFn)`.\n */\nexport function visit<T extends Nodes>(\n tree: Nodes,\n arg2: Visitor<T> | Test<T>,\n arg3?: Visitor<T>\n): void {\n let test: Test<T> = null;\n let visitor: Visitor<T>;\n\n if (arg3 === undefined) {\n visitor = arg2 as Visitor<T>;\n } else {\n test = arg2 as Test<T>;\n visitor = arg3;\n }\n\n const predicate = createTest(test as Test<Nodes>);\n\n // Pre-compute index map for O(1) lookups\n const indexMap = buildIndexMap(tree);\n\n // Delegate traversal to unist-util-visit-parents\n visitParents(tree, (node, ancestors) => {\n // Only call visitor if node matches test\n if (!predicate(node, ancestors)) {\n return; // Continue traversal but skip visitor\n }\n\n // Compute HL7v2-specific context\n const parent = ancestors.at(-1);\n\n // For root node (no parent), use defaults\n // For children, look up their index in the parent's children array\n const childIndex = parent ? (indexMap.get(node) ?? 0) : 0;\n\n const info: VisitInfo = {\n depth: ancestors.length + 1,\n index: parent ? childIndex : 0,\n metadata:\n \"name\" in node && typeof node.name === \"string\"\n ? { name: node.name }\n : undefined,\n sequence: parent ? childIndex + 1 : 1,\n };\n\n // Call user visitor with augmented signature\n return visitor(node as T, ancestors, info);\n });\n}\n","import type { Nodes } from \"@rethinkhealth/hl7v2-ast\";\n\nimport type { Predicate, Test } from \"./types\";\n\n/**\n * Create test predicate from various input types.\n *\n * Assumptions:\n * - null test matches all nodes\n * - String test matches by node.type property\n * - Object test uses strict equality (===) for property matching\n * - Explicit undefined values in test object check for property absence\n * - Dangerous keys (__proto__, constructor, prototype) are filtered for security\n *\n * @param test - Filter criteria: null (all), string (type), object (properties), or function\n * @returns Predicate function that returns true if node matches test criteria\n */\nexport function createTest(test: Test<Nodes>): Predicate {\n if (test === null) {\n return () => true;\n }\n if (typeof test === \"string\") {\n return (node) => node.type === test;\n }\n if (typeof test === \"function\") {\n return test;\n }\n // Object property matching\n // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Property matching requires checking multiple conditions\n return (node) => {\n for (const key of Object.keys(test)) {\n // Guard against prototype pollution\n if (key === \"__proto__\" || key === \"constructor\" || key === \"prototype\") {\n continue;\n }\n\n const testValue = test[key as keyof typeof test];\n // oxlint-disable-next-line typescript/no-explicit-any\n const nodeValue = (node as any)[key];\n\n // If test has explicit undefined, check property doesn't exist or is undefined\n if (testValue === undefined) {\n if (Object.hasOwn(node, key) && nodeValue !== undefined) {\n return false;\n }\n } else if (nodeValue !== testValue) {\n // For non-undefined values, strict equality check\n return false;\n }\n }\n return true;\n };\n}\n"],"mappings":";AAQA,SAAS,oBAAoB;;;ACStB,SAAS,WAAW,MAA8B;AACvD,MAAI,SAAS,MAAM;AACjB,WAAO,MAAM;AAAA,EACf;AACA,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO,CAAC,SAAS,KAAK,SAAS;AAAA,EACjC;AACA,MAAI,OAAO,SAAS,YAAY;AAC9B,WAAO;AAAA,EACT;AAGA,SAAO,CAAC,SAAS;AACf,eAAW,OAAO,OAAO,KAAK,IAAI,GAAG;AAEnC,UAAI,QAAQ,eAAe,QAAQ,iBAAiB,QAAQ,aAAa;AACvE;AAAA,MACF;AAEA,YAAM,YAAY,KAAK,GAAwB;AAE/C,YAAM,YAAa,KAAa,GAAG;AAGnC,UAAI,cAAc,QAAW;AAC3B,YAAI,OAAO,OAAO,MAAM,GAAG,KAAK,cAAc,QAAW;AACvD,iBAAO;AAAA,QACT;AAAA,MACF,WAAW,cAAc,WAAW;AAElC,eAAO;AAAA,MACT;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;;;ADpCA,SAAS,MAAM,YAAY;AAW3B,SAAS,cAAc,MAAqC;AAC1D,QAAM,MAAM,oBAAI,QAAuB;AAEvC,WAAS,SAAS,MAAmB;AACnC,QAAI,cAAc,QAAQ,MAAM,QAAQ,KAAK,QAAQ,GAAG;AAEtD,eAAS,IAAI,GAAG,IAAI,KAAK,SAAS,QAAQ,KAAK;AAC7C,cAAM,QAAQ,KAAK,SAAS,CAAC;AAC7B,YAAI,OAAO;AACT,cAAI,IAAI,OAAO,CAAC;AAChB,mBAAS,KAAK;AAAA,QAChB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,WAAS,IAAI;AACb,SAAO;AACT;AA2BO,SAAS,MACd,MACA,MACA,MACM;AACN,MAAI,OAAgB;AACpB,MAAI;AAEJ,MAAI,SAAS,QAAW;AACtB,cAAU;AAAA,EACZ,OAAO;AACL,WAAO;AACP,cAAU;AAAA,EACZ;AAEA,QAAM,YAAY,WAAW,IAAmB;AAGhD,QAAM,WAAW,cAAc,IAAI;AAGnC,eAAa,MAAM,CAAC,MAAM,cAAc;AAEtC,QAAI,CAAC,UAAU,MAAM,SAAS,GAAG;AAC/B;AAAA,IACF;AAGA,UAAM,SAAS,UAAU,GAAG,EAAE;AAI9B,UAAM,aAAa,SAAU,SAAS,IAAI,IAAI,KAAK,IAAK;AAExD,UAAM,OAAkB;AAAA,MACtB,OAAO,UAAU,SAAS;AAAA,MAC1B,OAAO,SAAS,aAAa;AAAA,MAC7B,UACE,UAAU,QAAQ,OAAO,KAAK,SAAS,WACnC,EAAE,MAAM,KAAK,KAAK,IAClB;AAAA,MACN,UAAU,SAAS,aAAa,IAAI;AAAA,IACtC;AAGA,WAAO,QAAQ,MAAW,WAAW,IAAI;AAAA,EAC3C,CAAC;AACH;","names":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/utils.ts","../src/index.ts"],"sourcesContent":["import type { Nodes } from \"@rethinkhealth/hl7v2-ast\";\n\nimport type { Predicate, Test } from \"./types\";\n\n/**\n * Create test predicate from various input types.\n *\n * Assumptions:\n * - null test matches all nodes\n * - String test matches by node.type property\n * - Object test uses strict equality (===) for property matching\n * - Explicit undefined values in test object check for property absence\n * - Dangerous keys (__proto__, constructor, prototype) are filtered for security\n *\n * @param test - Filter criteria: null (all), string (type), object (properties), or function\n * @returns Predicate function that returns true if node matches test criteria\n */\nexport function createTest(test: Test<Nodes>): Predicate {\n if (test === null) {\n return () => true;\n }\n if (typeof test === \"string\") {\n return (node) => node.type === test;\n }\n if (typeof test === \"function\") {\n return test;\n }\n // Object property matching\n // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Property matching requires checking multiple conditions\n return (node) => {\n for (const key of Object.keys(test)) {\n // Guard against prototype pollution\n if (key === \"__proto__\" || key === \"constructor\" || key === \"prototype\") {\n continue;\n }\n\n const testValue = test[key as keyof typeof test];\n // oxlint-disable-next-line typescript/no-explicit-any\n const nodeValue = (node as any)[key];\n\n // If test has explicit undefined, check property doesn't exist or is undefined\n if (testValue === undefined) {\n if (Object.hasOwn(node, key) && nodeValue !== undefined) {\n return false;\n }\n } else if (nodeValue !== testValue) {\n // For non-undefined values, strict equality check\n return false;\n }\n }\n return true;\n };\n}\n","/**\n * HL7v2 AST Visitor\n *\n * Wraps unist-util-visit-parents to add HL7v2-specific context\n * (index, sequence, depth, metadata) while delegating core traversal.\n */\n\nimport type { Nodes } from \"@rethinkhealth/hl7v2-ast\";\nimport { visitParents } from \"unist-util-visit-parents\";\n\nimport type { Test, VisitInfo, Visitor } from \"./types\";\nimport { createTest } from \"./utils\";\n\nexport type { VisitorResult } from \"unist-util-visit-parents\";\n\n// biome-ignore lint/performance/noBarrelFile: fine\nexport { EXIT, SKIP } from \"unist-util-visit-parents\";\n\nexport type { Predicate, Test, VisitInfo, Visitor } from \"./types\";\n\n/**\n * Build index map for O(1) child index lookups.\n * Pre-computes the index of each node within its parent's children array.\n *\n * @param tree - Root of tree to index\n * @returns WeakMap mapping each node to its index in parent.children\n */\nfunction buildIndexMap(tree: Nodes): WeakMap<Nodes, number> {\n const map = new WeakMap<Nodes, number>();\n\n function traverse(node: Nodes): void {\n if (\"children\" in node && Array.isArray(node.children)) {\n // oxlint-disable-next-line no-plusplus\n for (let i = 0; i < node.children.length; i++) {\n const child = node.children[i];\n if (child) {\n map.set(child, i);\n traverse(child);\n }\n }\n }\n }\n\n traverse(tree);\n return map;\n}\n\n// Overload signatures\nexport function visit(tree: Nodes, visitor: Visitor): void;\nexport function visit<Type extends Nodes[\"type\"]>(\n tree: Nodes,\n test: Type,\n visitor: Visitor<Extract<Nodes, { type: Type }>>\n): void;\nexport function visit<T extends Nodes>(\n tree: Nodes,\n test: Test<T>,\n visitor: Visitor<T>\n): void;\n\n/**\n * Visit nodes in an HL7 AST tree.\n * Wraps unist-util-visit-parents to add HL7v2-specific context.\n *\n * @param tree - The tree to traverse (can be any node type, not just Root)\n * @param test - Optional test to filter nodes (type string, partial match, or Test function)\n * @param visitor - Function called for each matching node\n *\n * **Important**: If you pass a function as the second argument, it is always treated\n * as a Visitor, never as a Test. To use a Test function, you MUST provide both the\n * test and visitor parameters: `visit(tree, testFn, visitorFn)`.\n */\nexport function visit<T extends Nodes>(\n tree: Nodes,\n arg2: Visitor<T> | Test<T>,\n arg3?: Visitor<T>\n): void {\n let test: Test<T> = null;\n let visitor: Visitor<T>;\n\n if (arg3 === undefined) {\n visitor = arg2 as Visitor<T>;\n } else {\n test = arg2 as Test<T>;\n visitor = arg3;\n }\n\n const predicate = createTest(test as Test<Nodes>);\n\n // Pre-compute index map for O(1) lookups\n const indexMap = buildIndexMap(tree);\n\n // Delegate traversal to unist-util-visit-parents\n visitParents(tree, (node, ancestors) => {\n // Only call visitor if node matches test\n if (!predicate(node, ancestors)) {\n return; // Continue traversal but skip visitor\n }\n\n // Compute HL7v2-specific context\n const parent = ancestors.at(-1);\n\n // For root node (no parent), use defaults\n // For children, look up their index in the parent's children array\n const childIndex = parent ? (indexMap.get(node) ?? 0) : 0;\n\n const info: VisitInfo = {\n depth: ancestors.length + 1,\n index: parent ? childIndex : 0,\n metadata:\n \"name\" in node && typeof node.name === \"string\"\n ? { name: node.name }\n : undefined,\n sequence: parent ? childIndex + 1 : 1,\n };\n\n // Call user visitor with augmented signature\n return visitor(node as T, ancestors, info);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiBA,SAAgB,WAAW,MAA8B;AACvD,KAAI,SAAS,KACX,cAAa;AAEf,KAAI,OAAO,SAAS,SAClB,SAAQ,SAAS,KAAK,SAAS;AAEjC,KAAI,OAAO,SAAS,WAClB,QAAO;AAIT,SAAQ,SAAS;AACf,OAAK,MAAM,OAAO,OAAO,KAAK,KAAK,EAAE;AAEnC,OAAI,QAAQ,eAAe,QAAQ,iBAAiB,QAAQ,YAC1D;GAGF,MAAM,YAAY,KAAK;GAEvB,MAAM,YAAa,KAAa;AAGhC,OAAI,cAAc,KAAA;QACZ,OAAO,OAAO,MAAM,IAAI,IAAI,cAAc,KAAA,EAC5C,QAAO;cAEA,cAAc,UAEvB,QAAO;;AAGX,SAAO;;;;;;;;;;;;ACvBX,SAAS,cAAc,MAAqC;CAC1D,MAAM,sBAAM,IAAI,SAAwB;CAExC,SAAS,SAAS,MAAmB;AACnC,MAAI,cAAc,QAAQ,MAAM,QAAQ,KAAK,SAAS,CAEpD,MAAK,IAAI,IAAI,GAAG,IAAI,KAAK,SAAS,QAAQ,KAAK;GAC7C,MAAM,QAAQ,KAAK,SAAS;AAC5B,OAAI,OAAO;AACT,QAAI,IAAI,OAAO,EAAE;AACjB,aAAS,MAAM;;;;AAMvB,UAAS,KAAK;AACd,QAAO;;;;;;;;;;;;;;AA4BT,SAAgB,MACd,MACA,MACA,MACM;CACN,IAAI,OAAgB;CACpB,IAAI;AAEJ,KAAI,SAAS,KAAA,EACX,WAAU;MACL;AACL,SAAO;AACP,YAAU;;CAGZ,MAAM,YAAY,WAAW,KAAoB;CAGjD,MAAM,WAAW,cAAc,KAAK;AAGpC,cAAa,OAAO,MAAM,cAAc;AAEtC,MAAI,CAAC,UAAU,MAAM,UAAU,CAC7B;EAIF,MAAM,SAAS,UAAU,GAAG,GAAG;EAI/B,MAAM,aAAa,SAAU,SAAS,IAAI,KAAK,IAAI,IAAK;EAExD,MAAM,OAAkB;GACtB,OAAO,UAAU,SAAS;GAC1B,OAAO,SAAS,aAAa;GAC7B,UACE,UAAU,QAAQ,OAAO,KAAK,SAAS,WACnC,EAAE,MAAM,KAAK,MAAM,GACnB,KAAA;GACN,UAAU,SAAS,aAAa,IAAI;GACrC;AAGD,SAAO,QAAQ,MAAW,WAAW,KAAK;GAC1C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rethinkhealth/hl7v2-util-visit",
3
- "version": "0.12.0",
3
+ "version": "0.13.2",
4
4
  "description": "An AST visitor for HL7v2 messages",
5
5
  "keywords": [
6
6
  "health",
@@ -35,22 +35,22 @@
35
35
  "devDependencies": {
36
36
  "@types/node": "^25.5.0",
37
37
  "@vitest/coverage-v8": "4.1.0",
38
- "tsup": "^8.5.1",
38
+ "tsdown": "0.21.7",
39
39
  "typescript": "^5.9.3",
40
40
  "vitest": "4.1.0",
41
- "@rethinkhealth/hl7v2-ast": "0.12.0",
42
- "@rethinkhealth/hl7v2-config": "0.12.0",
43
- "@rethinkhealth/hl7v2-builder": "0.12.0",
44
- "@rethinkhealth/testing": "0.0.2",
41
+ "@rethinkhealth/hl7v2-ast": "0.13.2",
42
+ "@rethinkhealth/hl7v2-config": "0.13.2",
43
+ "@rethinkhealth/hl7v2-parser": "0.13.2",
45
44
  "@rethinkhealth/tsconfig": "0.0.1",
46
- "@rethinkhealth/hl7v2-parser": "0.12.0"
45
+ "@rethinkhealth/hl7v2-builder": "0.13.2",
46
+ "@rethinkhealth/testing": "0.0.2"
47
47
  },
48
48
  "engines": {
49
49
  "node": ">=18"
50
50
  },
51
51
  "packageManager": "pnpm@10.14.0",
52
52
  "scripts": {
53
- "build": "tsup && tsc --emitDeclarationOnly",
53
+ "build": "tsdown && tsc --emitDeclarationOnly",
54
54
  "check-types": "tsc --noEmit",
55
55
  "test": "vitest run",
56
56
  "test:coverage": "vitest run --coverage",