@marko/compiler
Advanced tools
Comparing version 5.38.4 to 5.38.5
@@ -1,2 +0,2 @@ | ||
"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = void 0;exports.getMarkoFile = getMarkoFile;var _traverse = require("@babel/traverse"); | ||
"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = void 0;exports.getMarkoFile = getMarkoFile;var _traverse = _interopRequireDefault(require("@babel/traverse")); | ||
var _babelUtils = require("@marko/babel-utils"); | ||
@@ -361,7 +361,7 @@ var _crypto = require("crypto"); | ||
} else { | ||
return _traverse.visitors.merge(all); | ||
return _traverse.default.visitors.merge(all); | ||
} | ||
} | ||
return _traverse.visitors.explode(all); | ||
return _traverse.default.visitors.explode(all); | ||
} | ||
@@ -371,14 +371,10 @@ | ||
const program = file.path; | ||
const { Program, ...mergedVisitors } = mergeVisitors(visitors); | ||
program.state = {}; | ||
// Traverse only walks into children by default | ||
// This manually traverses into the Program node as well. | ||
if (!(Program && Program.enter && program._call(Program.enter))) { | ||
program.traverse(mergedVisitors, program.state); | ||
if (Program && Program.exit) { | ||
program._call(Program.exit); | ||
} | ||
} | ||
(0, _traverse.default)( | ||
program.node, | ||
mergeVisitors(visitors), | ||
program.scope, | ||
program.state = {}, | ||
program, | ||
true | ||
); | ||
} | ||
@@ -385,0 +381,0 @@ |
@@ -139,3 +139,3 @@ "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");require("../types/patch"); | ||
MarkoTagBody(node) { | ||
this.printSequence(node.body, { indent: true }); | ||
this.printSequence(node.body, true); | ||
}, | ||
@@ -220,3 +220,3 @@ MarkoTag(node) { | ||
this.printJoin(attributes, { separator: spaceSeparator }); | ||
this.printJoin(attributes, undefined, undefined, spaceSeparator); | ||
} | ||
@@ -235,5 +235,3 @@ } | ||
this.newline(); | ||
this.printSequence(bodyOverride || zipAttributeTagsAndBody(node), { | ||
indent: true | ||
}); | ||
this.printSequence(bodyOverride || zipAttributeTagsAndBody(node), true); | ||
this.token("</"); | ||
@@ -240,0 +238,0 @@ if (!isDynamicTag) { |
{ | ||
"name": "@marko/compiler", | ||
"version": "5.38.4", | ||
"version": "5.38.5", | ||
"description": "Marko template to JS compiler.", | ||
@@ -60,16 +60,16 @@ "keywords": [ | ||
"@babel/core": "^7.26.0", | ||
"@babel/generator": "^7.26.2", | ||
"@babel/parser": "^7.26.2", | ||
"@babel/generator": "^7.26.3", | ||
"@babel/parser": "^7.26.3", | ||
"@babel/plugin-syntax-typescript": "^7.25.9", | ||
"@babel/plugin-transform-modules-commonjs": "^7.25.9", | ||
"@babel/plugin-transform-typescript": "^7.25.9", | ||
"@babel/plugin-transform-modules-commonjs": "^7.26.3", | ||
"@babel/plugin-transform-typescript": "^7.26.3", | ||
"@babel/runtime": "^7.26.0", | ||
"@babel/traverse": "^7.25.9", | ||
"@babel/types": "^7.26.0", | ||
"@babel/traverse": "^7.26.4", | ||
"@babel/types": "^7.26.3", | ||
"@luxass/strip-json-comments": "^1.3.2", | ||
"@marko/babel-utils": "^6.6.2", | ||
"@marko/babel-utils": "^6.6.3", | ||
"complain": "^1.6.1", | ||
"he": "^1.2.0", | ||
"htmljs-parser": "^5.5.2", | ||
"jsesc": "^3.0.2", | ||
"htmljs-parser": "^5.5.3", | ||
"jsesc": "^3.1.0", | ||
"kleur": "^4.1.5", | ||
@@ -84,3 +84,3 @@ "lasso-package-root": "^1.0.1", | ||
"devDependencies": { | ||
"@marko/translator-default": "^6.1.2" | ||
"@marko/translator-default": "^6.1.3" | ||
}, | ||
@@ -87,0 +87,0 @@ "publishConfig": { |
468211
10963
Updated@babel/generator@^7.26.3
Updated@babel/parser@^7.26.3
Updated@babel/traverse@^7.26.4
Updated@babel/types@^7.26.3
Updated@marko/babel-utils@^6.6.3
Updatedhtmljs-parser@^5.5.3
Updatedjsesc@^3.1.0