@marko/language-tools 2.5.62 → 2.5.64

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
@@ -2641,6 +2641,7 @@ function ${templateName}() {
2641
2641
  )}<${internalInput}, Marko.Directives & Input${typeArgsStr}>) => (${varShared(
2642
2642
  "ReturnWithScope"
2643
2643
  )}<${internalInput}, ${returnTypeStr}>)`;
2644
+ const apiVar = varLocal("api");
2644
2645
  const templateOverrideClass = `${templateBaseClass}<{${this.#runtimeTypes ? getRuntimeOverrides(
2645
2646
  this.#api,
2646
2647
  this.#runtimeTypes,
@@ -2648,7 +2649,7 @@ function ${templateName}() {
2648
2649
  typeArgsStr,
2649
2650
  returnTypeStr
2650
2651
  ) : ""}
2651
- ${this.#interop ? `api: "${this.#api}",` : ""}
2652
+ ${this.#interop ? `api: typeof ${apiVar},` : ""}
2652
2653
  _${typeParamsStr ? `<${internalApply} = 1>(): ${internalApply} extends 0
2653
2654
  ? ${typeParamsStr}() => <${internalInputWithExtends}>${renderAndReturn}
2654
2655
  : () => <${internalInputWithExtends}, ${typeParamsStr.slice(
@@ -2656,6 +2657,13 @@ function ${templateName}() {
2656
2657
  -1
2657
2658
  )}>${renderAndReturn};` : `(): () => <${internalInputWithExtends}>${renderAndReturn};`}
2658
2659
  }>`;
2660
+ if (this.#interop) {
2661
+ this.#extractor.write(
2662
+ `const ${apiVar} = "${this.#api}";
2663
+ export { ${apiVar} as "~api" };
2664
+ `
2665
+ );
2666
+ }
2659
2667
  this.#extractor.write(`export default new `).anchor(START_OF_FILE);
2660
2668
  if (this.#scriptLang === "ts" /* ts */) {
2661
2669
  this.#extractor.write(`(
package/dist/index.mjs CHANGED
@@ -2603,6 +2603,7 @@ function ${templateName}() {
2603
2603
  )}<${internalInput}, Marko.Directives & Input${typeArgsStr}>) => (${varShared(
2604
2604
  "ReturnWithScope"
2605
2605
  )}<${internalInput}, ${returnTypeStr}>)`;
2606
+ const apiVar = varLocal("api");
2606
2607
  const templateOverrideClass = `${templateBaseClass}<{${this.#runtimeTypes ? getRuntimeOverrides(
2607
2608
  this.#api,
2608
2609
  this.#runtimeTypes,
@@ -2610,7 +2611,7 @@ function ${templateName}() {
2610
2611
  typeArgsStr,
2611
2612
  returnTypeStr
2612
2613
  ) : ""}
2613
- ${this.#interop ? `api: "${this.#api}",` : ""}
2614
+ ${this.#interop ? `api: typeof ${apiVar},` : ""}
2614
2615
  _${typeParamsStr ? `<${internalApply} = 1>(): ${internalApply} extends 0
2615
2616
  ? ${typeParamsStr}() => <${internalInputWithExtends}>${renderAndReturn}
2616
2617
  : () => <${internalInputWithExtends}, ${typeParamsStr.slice(
@@ -2618,6 +2619,13 @@ function ${templateName}() {
2618
2619
  -1
2619
2620
  )}>${renderAndReturn};` : `(): () => <${internalInputWithExtends}>${renderAndReturn};`}
2620
2621
  }>`;
2622
+ if (this.#interop) {
2623
+ this.#extractor.write(
2624
+ `const ${apiVar} = "${this.#api}";
2625
+ export { ${apiVar} as "~api" };
2626
+ `
2627
+ );
2628
+ }
2621
2629
  this.#extractor.write(`export default new `).anchor(START_OF_FILE);
2622
2630
  if (this.#scriptLang === "ts" /* ts */) {
2623
2631
  this.#extractor.write(`(
package/dist/parser.d.ts CHANGED
@@ -43,7 +43,7 @@ export declare namespace Node {
43
43
  type AttrNode = AttrNamed | AttrSpread;
44
44
  type ControlFlowTag = Tag & {
45
45
  nameText: "if" | "else" | "else-if" | "for" | "while";
46
- bodyType: TagType.html;
46
+ bodyType: typeof TagType.html;
47
47
  };
48
48
  type ChildNode = Tag | AttrTag | Text | Doctype | Declaration | CDATA | Placeholder | Scriptlet;
49
49
  interface Commentable {
@@ -87,7 +87,7 @@ export declare namespace Node {
87
87
  open: Range;
88
88
  close: Range | undefined;
89
89
  nameText: string;
90
- bodyType: TagType.html;
90
+ bodyType: typeof TagType.html;
91
91
  name: OpenTagName;
92
92
  var: TagVar | undefined;
93
93
  args: TagArgs | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/language-tools",
3
- "version": "2.5.62",
3
+ "version": "2.5.64",
4
4
  "description": "Marko Language Tools",
5
5
  "keywords": [
6
6
  "analysis",
@@ -37,15 +37,15 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@luxass/strip-json-comments": "^1.4.0",
40
- "@marko/compiler": "^5.39.63",
41
- "htmljs-parser": "^5.10.2",
40
+ "@marko/compiler": "^5.39.66",
41
+ "htmljs-parser": "^5.11.0",
42
42
  "relative-import-path": "^1.0.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/babel__code-frame": "^7.27.0",
46
46
  "@typescript/vfs": "^1.6.4",
47
- "marko": "^5.38.36",
47
+ "marko": "^5.39.11",
48
48
  "mitata": "^1.0.34",
49
- "tsx": "^4.21.0"
49
+ "tsx": "^4.22.4"
50
50
  }
51
51
  }