@marko/compiler 5.36.1 → 5.36.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.
@@ -49,7 +49,7 @@ Object.assign(_printer.default.prototype, {
49
49
  this.token("\n");
50
50
  }
51
51
 
52
- this.token(`${node.static ? "static" : "$"} `);
52
+ this.token(`${node.static ? node.target ?? "static" : "$"} `);
53
53
 
54
54
  if (
55
55
  node.body.length === 1 &&
@@ -76,7 +76,7 @@ const MarkoDefinitions = {
76
76
 
77
77
  MarkoScriptlet: {
78
78
  aliases: ["Marko", "Statement"],
79
- builder: ["body", "static"],
79
+ builder: ["body", "static", "target"],
80
80
  visitor: ["body"],
81
81
  fields: {
82
82
  body: {
@@ -85,6 +85,10 @@ const MarkoDefinitions = {
85
85
  static: {
86
86
  validate: (0, _utils.assertValueType)("boolean"),
87
87
  default: false
88
+ },
89
+ target: {
90
+ validate: (0, _utils.assertValueType)("string"),
91
+ optional: true
88
92
  }
89
93
  }
90
94
  },
package/dist/types.d.ts CHANGED
@@ -1706,6 +1706,7 @@ export interface MarkoScriptlet extends BaseNode {
1706
1706
  type: "MarkoScriptlet";
1707
1707
  body: Array<Statement>;
1708
1708
  static: boolean;
1709
+ target: string | null;
1709
1710
  }
1710
1711
 
1711
1712
  export interface MarkoClass extends BaseNode {
@@ -2133,7 +2134,7 @@ export function markoCDATA(value: string): MarkoCDATA;
2133
2134
  export function markoComment(value: string): MarkoComment;
2134
2135
  export function markoText(value: string): MarkoText;
2135
2136
  export function markoPlaceholder(value: Expression, escape?: boolean): MarkoPlaceholder;
2136
- export function markoScriptlet(body: Array<Statement>, _static?: boolean): MarkoScriptlet;
2137
+ export function markoScriptlet(body: Array<Statement>, _static?: boolean, target?: string | null): MarkoScriptlet;
2137
2138
  export function markoClass(body: ClassBody): MarkoClass;
2138
2139
  export function markoAttribute(name: string, value: Expression, modifier?: string | null, _arguments?: Array<Expression | SpreadElement> | null, _default?: boolean | null, bound?: boolean | null): MarkoAttribute;
2139
2140
  export function markoSpreadAttribute(value: Expression): MarkoSpreadAttribute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/compiler",
3
- "version": "5.36.1",
3
+ "version": "5.36.2",
4
4
  "description": "Marko template to JS compiler.",
5
5
  "keywords": [
6
6
  "babel",
@@ -80,7 +80,7 @@
80
80
  "source-map-support": "^0.5.21"
81
81
  },
82
82
  "devDependencies": {
83
- "@marko/translator-default": "^5.33.1"
83
+ "@marko/translator-default": "^6.0.1"
84
84
  },
85
85
  "publishConfig": {
86
86
  "access": "public"