@zessjs/compiler 1.1.5 → 1.1.7

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/compiler.cjs CHANGED
@@ -536,6 +536,12 @@ function compile(code, options = {}) {
536
536
  ThisExpression(node) {
537
537
  if (JSXScope === currentContext.functionScope) this.replace(transformThisExpression(node));
538
538
  },
539
+ ImportDeclaration() {
540
+ this.skip();
541
+ },
542
+ ExportAllDeclaration() {
543
+ this.skip();
544
+ },
539
545
  exit(node) {
540
546
  if (node === currentContext.functionScope) {
541
547
  currentContext.functionScope = prevFunctionScope ?? ast;
@@ -585,53 +591,59 @@ function transformElement(node) {
585
591
  return stmts;
586
592
  }
587
593
  function transformFragment(children, position, isInComponent) {
588
- const elements = [];
589
594
  let hasDynamicChildren = false;
590
595
  let shouldImportUseMemo = false;
591
596
  let textContent;
592
597
  let textPosition;
593
598
  let elementsPosition;
594
599
  let childExpression;
595
- for (let i = 0; i < children.length; ++i) {
596
- const childNode = children[i];
597
- if (childNode.type === "JSXText") {
598
- const text = childNode.value;
599
- if (isBlankLine(text)) continue;
600
- if (textContent) textContent = `${textContent}${text}`;
601
- else {
602
- textContent = text;
603
- textPosition = copyPosition(childNode);
604
- elementsPosition ??= textPosition;
605
- }
606
- } else if (isJSXEmptyExpression(childNode)) continue;
607
- else if (childNode.type === "JSXFragment") children.splice(i--, 1, ...childNode.children);
608
- else {
609
- const childPosition = copyPosition(childNode);
610
- let childElement;
611
- if (textContent) {
612
- elements.push(createLiteral(decodeText(textContent), textPosition));
613
- textContent = textPosition = void 0;
614
- }
615
- if (childNode.type === "JSXElement") {
616
- const stmts = transformElement(childNode);
617
- if (isInComponent) hasDynamicChildren = true;
618
- if (stmts.length > 1) {
619
- const id = stmts[0].declarations[0].id;
620
- childElement = createCallExpression(createArrowFunctionExpression(createBlockStatement([...stmts, createReturnStatement(id, childPosition)], childPosition), childPosition), [], childPosition);
621
- } else if (stmts[0].type === "VariableDeclaration") childElement = stmts[0].declarations[0].init;
622
- else childElement = stmts[0].expression;
623
- } else {
624
- const expression = childNode.expression;
625
- if (isInComponent) childExpression ??= expression;
626
- if (isDynamicExpression(expression, isInComponent)) {
627
- shouldImportUseMemo = hasDynamicChildren = true;
628
- childElement = createCallExpression(createIdentifier("_$memo", childPosition), [!isInComponent && isBareIdentifierCall(expression) ? expression.callee : createArrowFunctionExpression(expression, copyPosition(expression))], childPosition);
629
- } else childElement = expression;
600
+ const stack = [[children, 0]];
601
+ const elements = [];
602
+ outer: do {
603
+ const top = stack.at(-1);
604
+ while (top[1] < top[0].length) {
605
+ const childNode = top[0][top[1]++];
606
+ if (childNode.type === "JSXText") {
607
+ const text = childNode.value;
608
+ if (isBlankLine(text)) continue;
609
+ if (textContent) textContent = `${textContent}${text}`;
610
+ else {
611
+ textContent = text;
612
+ textPosition = copyPosition(childNode);
613
+ elementsPosition ??= textPosition;
614
+ }
615
+ } else if (childNode.type === "JSXFragment") {
616
+ stack.push([childNode.children, 0]);
617
+ continue outer;
618
+ } else if (!isJSXEmptyExpression(childNode)) {
619
+ const childPosition = copyPosition(childNode);
620
+ let childElement;
621
+ if (textContent) {
622
+ elements.push(createLiteral(decodeText(textContent), textPosition));
623
+ textContent = textPosition = void 0;
624
+ }
625
+ if (childNode.type === "JSXElement") {
626
+ const stmts = transformElement(childNode);
627
+ if (isInComponent) hasDynamicChildren = true;
628
+ if (stmts.length > 1) {
629
+ const id = stmts[0].declarations[0].id;
630
+ childElement = createCallExpression(createArrowFunctionExpression(createBlockStatement([...stmts, createReturnStatement(id, childPosition)], childPosition), childPosition), [], childPosition);
631
+ } else if (stmts[0].type === "VariableDeclaration") childElement = stmts[0].declarations[0].init;
632
+ else childElement = stmts[0].expression;
633
+ } else {
634
+ const expression = childNode.expression;
635
+ if (isInComponent) childExpression ??= expression;
636
+ if (isDynamicExpression(expression, isInComponent)) {
637
+ shouldImportUseMemo = hasDynamicChildren = true;
638
+ childElement = createCallExpression(createIdentifier("_$memo", childPosition), [!isInComponent && isBareIdentifierCall(expression) ? expression.callee : createArrowFunctionExpression(expression, copyPosition(expression))], childPosition);
639
+ } else childElement = expression;
640
+ }
641
+ elements.push(childElement);
642
+ elementsPosition ??= childPosition;
630
643
  }
631
- elements.push(childElement);
632
- elementsPosition ??= childPosition;
633
644
  }
634
- }
645
+ stack.pop();
646
+ } while (stack.length);
635
647
  if (textContent) elements.push(createLiteral(decodeText(textContent), textPosition));
636
648
  if (isInComponent) {
637
649
  currentContext.prevHasDynamicChildrenInComponent = currentContext.hasDynamicChildrenInComponent;
@@ -983,58 +995,64 @@ function transformAttributes(attrs, id) {
983
995
  return stmts;
984
996
  }
985
997
  function transformChildren(children, id) {
986
- const stmts = [];
987
998
  let elements = [];
988
999
  let textContent;
989
1000
  let textPosition;
990
1001
  let elementsPosition;
991
- for (let i = 0; i < children.length; ++i) {
992
- const childNode = children[i];
993
- if (childNode.type === "JSXText") {
994
- const text = childNode.value;
995
- if (isBlankLine(text)) continue;
996
- if (textContent) textContent = `${textContent}${text}`;
997
- else {
998
- textContent = text;
999
- textPosition = copyPosition(childNode);
1000
- elementsPosition ??= textPosition;
1001
- }
1002
- } else if (isJSXEmptyExpression(childNode)) continue;
1003
- else if (childNode.type === "JSXFragment") children.splice(i--, 1, ...childNode.children);
1004
- else {
1005
- const childPosition = copyPosition(childNode);
1006
- let expression;
1007
- if (textContent) {
1008
- elements.push(createLiteral(decodeText(textContent), textPosition));
1009
- textContent = textPosition = void 0;
1010
- }
1011
- if (childNode.type === "JSXElement") {
1012
- const childStmts = transformElement(childNode);
1013
- if (childStmts.length > 1) {
1014
- const stmt = childStmts[0];
1015
- elements.push(stmt.declarations[0].id);
1016
- elementsPosition ??= childPosition;
1017
- stmts.push(...childStmts);
1018
- continue;
1019
- } else if (childStmts[0].type === "VariableDeclaration") {
1020
- elements.push(childStmts[0].declarations[0].init);
1021
- elementsPosition ??= childPosition;
1022
- continue;
1023
- } else expression = childStmts[0].expression;
1024
- } else {
1025
- expression = childNode.expression;
1026
- if (isBareIdentifierCall(expression)) expression = expression.callee;
1027
- else if (isDynamicExpression(expression)) expression = createArrowFunctionExpression(expression, copyPosition(expression));
1028
- }
1029
- if (elements.length) {
1030
- stmts.push(createExpressionStatement(createCallExpression(createMemberExpression(id, createIdentifier("append", elementsPosition), false, elementsPosition), elements, elementsPosition), elementsPosition));
1031
- elements = [];
1032
- elementsPosition = void 0;
1002
+ const stack = [[children, 0]];
1003
+ const stmts = [];
1004
+ outer: do {
1005
+ const top = stack.at(-1);
1006
+ while (top[1] < top[0].length) {
1007
+ const childNode = top[0][top[1]++];
1008
+ if (childNode.type === "JSXText") {
1009
+ const text = childNode.value;
1010
+ if (isBlankLine(text)) continue;
1011
+ if (textContent) textContent = `${textContent}${text}`;
1012
+ else {
1013
+ textContent = text;
1014
+ textPosition = copyPosition(childNode);
1015
+ elementsPosition ??= textPosition;
1016
+ }
1017
+ } else if (childNode.type === "JSXFragment") {
1018
+ stack.push([childNode.children, 0]);
1019
+ continue outer;
1020
+ } else if (!isJSXEmptyExpression(childNode)) {
1021
+ const childPosition = copyPosition(childNode);
1022
+ let expression;
1023
+ if (textContent) {
1024
+ elements.push(createLiteral(decodeText(textContent), textPosition));
1025
+ textContent = textPosition = void 0;
1026
+ }
1027
+ if (childNode.type === "JSXElement") {
1028
+ const childStmts = transformElement(childNode);
1029
+ if (childStmts.length > 1) {
1030
+ const stmt = childStmts[0];
1031
+ elements.push(stmt.declarations[0].id);
1032
+ elementsPosition ??= childPosition;
1033
+ stmts.push(...childStmts);
1034
+ continue;
1035
+ } else if (childStmts[0].type === "VariableDeclaration") {
1036
+ elements.push(childStmts[0].declarations[0].init);
1037
+ elementsPosition ??= childPosition;
1038
+ continue;
1039
+ } else expression = childStmts[0].expression;
1040
+ } else {
1041
+ expression = childNode.expression;
1042
+ if (isBareIdentifierCall(expression)) expression = expression.callee;
1043
+ else if (isDynamicExpression(expression)) expression = createArrowFunctionExpression(expression, copyPosition(expression));
1044
+ }
1045
+ if (elements.length) {
1046
+ stmts.push(createExpressionStatement(createCallExpression(createMemberExpression(id, createIdentifier("append", elementsPosition), false, elementsPosition), elements, elementsPosition), elementsPosition));
1047
+ elements = [];
1048
+ elementsPosition = void 0;
1049
+ }
1050
+ currentContext.shouldImportInsert = true;
1051
+ stmts.push(createExpressionStatement(createCallExpression(createIdentifier("_$insert", childPosition), [id, expression], childPosition), childPosition));
1033
1052
  }
1034
- currentContext.shouldImportInsert = true;
1035
- stmts.push(createExpressionStatement(createCallExpression(createIdentifier("_$insert", childPosition), [id, expression], childPosition), childPosition));
1036
1053
  }
1037
- }
1054
+ stack.pop();
1055
+ } while (stack.length);
1038
1056
  if (textContent) elements.push(createLiteral(decodeText(textContent), textPosition));
1039
1057
  if (elements.length) stmts.push(createExpressionStatement(!stmts.length && elements.length === 1 && textContent ? createAssignmentExpression(createMemberExpression(id, createIdentifier("textContent", elementsPosition), false, elementsPosition), elements[0], elementsPosition) : createCallExpression(createMemberExpression(id, createIdentifier("append", elementsPosition), false, elementsPosition), elements, elementsPosition), elementsPosition));
1040
1058
  return stmts;
@@ -1377,6 +1395,10 @@ function isDynamicExpression(node, checkTags) {
1377
1395
  isDynamic = true;
1378
1396
  this.break();
1379
1397
  },
1398
+ TaggedTemplateExpression() {
1399
+ isDynamic = true;
1400
+ this.break();
1401
+ },
1380
1402
  JSXElement() {
1381
1403
  if (checkTags) {
1382
1404
  isDynamic = true;
package/dist/compiler.js CHANGED
@@ -508,6 +508,12 @@ function compile(code, options = {}) {
508
508
  ThisExpression(node) {
509
509
  if (JSXScope === currentContext.functionScope) this.replace(transformThisExpression(node));
510
510
  },
511
+ ImportDeclaration() {
512
+ this.skip();
513
+ },
514
+ ExportAllDeclaration() {
515
+ this.skip();
516
+ },
511
517
  exit(node) {
512
518
  if (node === currentContext.functionScope) {
513
519
  currentContext.functionScope = prevFunctionScope ?? ast;
@@ -557,53 +563,59 @@ function transformElement(node) {
557
563
  return stmts;
558
564
  }
559
565
  function transformFragment(children, position, isInComponent) {
560
- const elements = [];
561
566
  let hasDynamicChildren = false;
562
567
  let shouldImportUseMemo = false;
563
568
  let textContent;
564
569
  let textPosition;
565
570
  let elementsPosition;
566
571
  let childExpression;
567
- for (let i = 0; i < children.length; ++i) {
568
- const childNode = children[i];
569
- if (childNode.type === "JSXText") {
570
- const text = childNode.value;
571
- if (isBlankLine(text)) continue;
572
- if (textContent) textContent = `${textContent}${text}`;
573
- else {
574
- textContent = text;
575
- textPosition = copyPosition(childNode);
576
- elementsPosition ??= textPosition;
577
- }
578
- } else if (isJSXEmptyExpression(childNode)) continue;
579
- else if (childNode.type === "JSXFragment") children.splice(i--, 1, ...childNode.children);
580
- else {
581
- const childPosition = copyPosition(childNode);
582
- let childElement;
583
- if (textContent) {
584
- elements.push(createLiteral(decodeText(textContent), textPosition));
585
- textContent = textPosition = void 0;
586
- }
587
- if (childNode.type === "JSXElement") {
588
- const stmts = transformElement(childNode);
589
- if (isInComponent) hasDynamicChildren = true;
590
- if (stmts.length > 1) {
591
- const id = stmts[0].declarations[0].id;
592
- childElement = createCallExpression(createArrowFunctionExpression(createBlockStatement([...stmts, createReturnStatement(id, childPosition)], childPosition), childPosition), [], childPosition);
593
- } else if (stmts[0].type === "VariableDeclaration") childElement = stmts[0].declarations[0].init;
594
- else childElement = stmts[0].expression;
595
- } else {
596
- const expression = childNode.expression;
597
- if (isInComponent) childExpression ??= expression;
598
- if (isDynamicExpression(expression, isInComponent)) {
599
- shouldImportUseMemo = hasDynamicChildren = true;
600
- childElement = createCallExpression(createIdentifier("_$memo", childPosition), [!isInComponent && isBareIdentifierCall(expression) ? expression.callee : createArrowFunctionExpression(expression, copyPosition(expression))], childPosition);
601
- } else childElement = expression;
572
+ const stack = [[children, 0]];
573
+ const elements = [];
574
+ outer: do {
575
+ const top = stack.at(-1);
576
+ while (top[1] < top[0].length) {
577
+ const childNode = top[0][top[1]++];
578
+ if (childNode.type === "JSXText") {
579
+ const text = childNode.value;
580
+ if (isBlankLine(text)) continue;
581
+ if (textContent) textContent = `${textContent}${text}`;
582
+ else {
583
+ textContent = text;
584
+ textPosition = copyPosition(childNode);
585
+ elementsPosition ??= textPosition;
586
+ }
587
+ } else if (childNode.type === "JSXFragment") {
588
+ stack.push([childNode.children, 0]);
589
+ continue outer;
590
+ } else if (!isJSXEmptyExpression(childNode)) {
591
+ const childPosition = copyPosition(childNode);
592
+ let childElement;
593
+ if (textContent) {
594
+ elements.push(createLiteral(decodeText(textContent), textPosition));
595
+ textContent = textPosition = void 0;
596
+ }
597
+ if (childNode.type === "JSXElement") {
598
+ const stmts = transformElement(childNode);
599
+ if (isInComponent) hasDynamicChildren = true;
600
+ if (stmts.length > 1) {
601
+ const id = stmts[0].declarations[0].id;
602
+ childElement = createCallExpression(createArrowFunctionExpression(createBlockStatement([...stmts, createReturnStatement(id, childPosition)], childPosition), childPosition), [], childPosition);
603
+ } else if (stmts[0].type === "VariableDeclaration") childElement = stmts[0].declarations[0].init;
604
+ else childElement = stmts[0].expression;
605
+ } else {
606
+ const expression = childNode.expression;
607
+ if (isInComponent) childExpression ??= expression;
608
+ if (isDynamicExpression(expression, isInComponent)) {
609
+ shouldImportUseMemo = hasDynamicChildren = true;
610
+ childElement = createCallExpression(createIdentifier("_$memo", childPosition), [!isInComponent && isBareIdentifierCall(expression) ? expression.callee : createArrowFunctionExpression(expression, copyPosition(expression))], childPosition);
611
+ } else childElement = expression;
612
+ }
613
+ elements.push(childElement);
614
+ elementsPosition ??= childPosition;
602
615
  }
603
- elements.push(childElement);
604
- elementsPosition ??= childPosition;
605
616
  }
606
- }
617
+ stack.pop();
618
+ } while (stack.length);
607
619
  if (textContent) elements.push(createLiteral(decodeText(textContent), textPosition));
608
620
  if (isInComponent) {
609
621
  currentContext.prevHasDynamicChildrenInComponent = currentContext.hasDynamicChildrenInComponent;
@@ -955,58 +967,64 @@ function transformAttributes(attrs, id) {
955
967
  return stmts;
956
968
  }
957
969
  function transformChildren(children, id) {
958
- const stmts = [];
959
970
  let elements = [];
960
971
  let textContent;
961
972
  let textPosition;
962
973
  let elementsPosition;
963
- for (let i = 0; i < children.length; ++i) {
964
- const childNode = children[i];
965
- if (childNode.type === "JSXText") {
966
- const text = childNode.value;
967
- if (isBlankLine(text)) continue;
968
- if (textContent) textContent = `${textContent}${text}`;
969
- else {
970
- textContent = text;
971
- textPosition = copyPosition(childNode);
972
- elementsPosition ??= textPosition;
973
- }
974
- } else if (isJSXEmptyExpression(childNode)) continue;
975
- else if (childNode.type === "JSXFragment") children.splice(i--, 1, ...childNode.children);
976
- else {
977
- const childPosition = copyPosition(childNode);
978
- let expression;
979
- if (textContent) {
980
- elements.push(createLiteral(decodeText(textContent), textPosition));
981
- textContent = textPosition = void 0;
982
- }
983
- if (childNode.type === "JSXElement") {
984
- const childStmts = transformElement(childNode);
985
- if (childStmts.length > 1) {
986
- const stmt = childStmts[0];
987
- elements.push(stmt.declarations[0].id);
988
- elementsPosition ??= childPosition;
989
- stmts.push(...childStmts);
990
- continue;
991
- } else if (childStmts[0].type === "VariableDeclaration") {
992
- elements.push(childStmts[0].declarations[0].init);
993
- elementsPosition ??= childPosition;
994
- continue;
995
- } else expression = childStmts[0].expression;
996
- } else {
997
- expression = childNode.expression;
998
- if (isBareIdentifierCall(expression)) expression = expression.callee;
999
- else if (isDynamicExpression(expression)) expression = createArrowFunctionExpression(expression, copyPosition(expression));
1000
- }
1001
- if (elements.length) {
1002
- stmts.push(createExpressionStatement(createCallExpression(createMemberExpression(id, createIdentifier("append", elementsPosition), false, elementsPosition), elements, elementsPosition), elementsPosition));
1003
- elements = [];
1004
- elementsPosition = void 0;
974
+ const stack = [[children, 0]];
975
+ const stmts = [];
976
+ outer: do {
977
+ const top = stack.at(-1);
978
+ while (top[1] < top[0].length) {
979
+ const childNode = top[0][top[1]++];
980
+ if (childNode.type === "JSXText") {
981
+ const text = childNode.value;
982
+ if (isBlankLine(text)) continue;
983
+ if (textContent) textContent = `${textContent}${text}`;
984
+ else {
985
+ textContent = text;
986
+ textPosition = copyPosition(childNode);
987
+ elementsPosition ??= textPosition;
988
+ }
989
+ } else if (childNode.type === "JSXFragment") {
990
+ stack.push([childNode.children, 0]);
991
+ continue outer;
992
+ } else if (!isJSXEmptyExpression(childNode)) {
993
+ const childPosition = copyPosition(childNode);
994
+ let expression;
995
+ if (textContent) {
996
+ elements.push(createLiteral(decodeText(textContent), textPosition));
997
+ textContent = textPosition = void 0;
998
+ }
999
+ if (childNode.type === "JSXElement") {
1000
+ const childStmts = transformElement(childNode);
1001
+ if (childStmts.length > 1) {
1002
+ const stmt = childStmts[0];
1003
+ elements.push(stmt.declarations[0].id);
1004
+ elementsPosition ??= childPosition;
1005
+ stmts.push(...childStmts);
1006
+ continue;
1007
+ } else if (childStmts[0].type === "VariableDeclaration") {
1008
+ elements.push(childStmts[0].declarations[0].init);
1009
+ elementsPosition ??= childPosition;
1010
+ continue;
1011
+ } else expression = childStmts[0].expression;
1012
+ } else {
1013
+ expression = childNode.expression;
1014
+ if (isBareIdentifierCall(expression)) expression = expression.callee;
1015
+ else if (isDynamicExpression(expression)) expression = createArrowFunctionExpression(expression, copyPosition(expression));
1016
+ }
1017
+ if (elements.length) {
1018
+ stmts.push(createExpressionStatement(createCallExpression(createMemberExpression(id, createIdentifier("append", elementsPosition), false, elementsPosition), elements, elementsPosition), elementsPosition));
1019
+ elements = [];
1020
+ elementsPosition = void 0;
1021
+ }
1022
+ currentContext.shouldImportInsert = true;
1023
+ stmts.push(createExpressionStatement(createCallExpression(createIdentifier("_$insert", childPosition), [id, expression], childPosition), childPosition));
1005
1024
  }
1006
- currentContext.shouldImportInsert = true;
1007
- stmts.push(createExpressionStatement(createCallExpression(createIdentifier("_$insert", childPosition), [id, expression], childPosition), childPosition));
1008
1025
  }
1009
- }
1026
+ stack.pop();
1027
+ } while (stack.length);
1010
1028
  if (textContent) elements.push(createLiteral(decodeText(textContent), textPosition));
1011
1029
  if (elements.length) stmts.push(createExpressionStatement(!stmts.length && elements.length === 1 && textContent ? createAssignmentExpression(createMemberExpression(id, createIdentifier("textContent", elementsPosition), false, elementsPosition), elements[0], elementsPosition) : createCallExpression(createMemberExpression(id, createIdentifier("append", elementsPosition), false, elementsPosition), elements, elementsPosition), elementsPosition));
1012
1030
  return stmts;
@@ -1349,6 +1367,10 @@ function isDynamicExpression(node, checkTags) {
1349
1367
  isDynamic = true;
1350
1368
  this.break();
1351
1369
  },
1370
+ TaggedTemplateExpression() {
1371
+ isDynamic = true;
1372
+ this.break();
1373
+ },
1352
1374
  JSXElement() {
1353
1375
  if (checkTags) {
1354
1376
  isDynamic = true;
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
1
  {
2
2
  "name": "@zessjs/compiler",
3
- "version": "1.1.5",
4
- "description": "Zess JSX compiler 💥 Delivers efficient code conversion for super - responsive web experiences.",
5
3
  "type": "module",
6
- "keywords": [
7
- "zess",
8
- "zessjs",
9
- "compiler",
10
- "JSX"
11
- ],
4
+ "version": "1.1.7",
5
+ "description": "Zess JSX compiler 💥 Delivers efficient code conversion for super - responsive web experiences.",
6
+ "author": "Columsys",
12
7
  "license": "MIT",
13
8
  "homepage": "https://github.com/rpsffx/zess/tree/main/packages/compiler#readme",
14
- "bugs": {
15
- "url": "https://github.com/rpsffx/zess/issues"
16
- },
17
9
  "repository": {
18
10
  "type": "git",
19
11
  "url": "git+https://github.com/rpsffx/zess.git",
20
12
  "directory": "packages/compiler"
21
13
  },
22
- "author": "Columsys",
23
- "files": [
24
- "dist"
14
+ "bugs": {
15
+ "url": "https://github.com/rpsffx/zess/issues"
16
+ },
17
+ "keywords": [
18
+ "zess",
19
+ "zessjs",
20
+ "compiler",
21
+ "JSX"
25
22
  ],
26
- "main": "./dist/compiler.js",
27
- "module": "./dist/compiler.js",
28
- "types": "./dist/compiler.d.ts",
29
23
  "exports": {
30
24
  "types": "./dist/compiler.d.ts",
31
- "require": "./dist/compiler.cjs",
32
- "import": "./dist/compiler.js"
25
+ "import": "./dist/compiler.js",
26
+ "require": "./dist/compiler.cjs"
33
27
  },
28
+ "main": "./dist/compiler.js",
29
+ "module": "./dist/compiler.js",
30
+ "types": "./dist/compiler.d.ts",
31
+ "files": [
32
+ "dist"
33
+ ],
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
+ "engines": {
38
+ "node": ">=18.12.0"
39
+ },
37
40
  "dependencies": {
38
41
  "astring": "^1.9.0",
39
- "entities": "^7.0.0",
42
+ "entities": "^7.0.1",
40
43
  "merge-source-map": "^1.1.0",
41
- "meriyah": "^6.1.4",
44
+ "meriyah": "^7.1.0",
42
45
  "source-map": "^0.7.6"
43
46
  },
44
- "engines": {
45
- "node": ">=18.12.0"
46
- },
47
47
  "scripts": {
48
48
  "build": "tsdown",
49
49
  "dev": "tsdown --watch"