@marko/translator-default 5.31.17 → 5.32.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/tag/custom-tag.js +15 -1
- package/package.json +10 -11
package/dist/tag/custom-tag.js
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
+
|
7
8
|
var _compiler = require("@marko/compiler");
|
8
9
|
var _withPreviousLocation = _interopRequireDefault(require("../util/with-previous-location"));
|
9
10
|
var _dynamicTag = _interopRequireDefault(require("./dynamic-tag"));
|
@@ -43,7 +44,20 @@ function _default(path, isNullable) {
|
|
43
44
|
let binding = path.scope.getBinding(tagName);
|
44
45
|
if (binding && !binding.identifier.loc) binding = null;
|
45
46
|
|
46
|
-
|
47
|
+
const childFile = (0, _babelUtils.loadFileForTag)(path);
|
48
|
+
const childProgram = childFile?.ast.program;
|
49
|
+
|
50
|
+
if (childProgram?.extra?.___featureType === "tags") {
|
51
|
+
(0, _babelUtils.importDefault)(
|
52
|
+
file,
|
53
|
+
`marko/src/runtime/helpers/tags-compat-${
|
54
|
+
markoOpts.output === "html" ? "html" : "dom"
|
55
|
+
}.js`,
|
56
|
+
"marko_tags_compat"
|
57
|
+
);
|
58
|
+
path.set("name", (0, _babelUtils.importDefault)(file, relativePath, path.node.name.value));
|
59
|
+
return (0, _dynamicTag.default)(path);
|
60
|
+
} else if (relativePath) {
|
47
61
|
if (binding) {
|
48
62
|
|
49
63
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@marko/translator-default",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.32.0",
|
4
4
|
"description": "Translates Marko templates to the default Marko runtime.",
|
5
5
|
"keywords": [
|
6
6
|
"babel",
|
@@ -10,11 +10,11 @@
|
|
10
10
|
"parser",
|
11
11
|
"plugin"
|
12
12
|
],
|
13
|
-
"homepage": "https://github.com/marko-js/marko/blob/
|
13
|
+
"homepage": "https://github.com/marko-js/marko/blob/main/packages/translator-default/README.md",
|
14
14
|
"bugs": "https://github.com/marko-js/marko/issues/new?template=Bug_report.md",
|
15
15
|
"repository": {
|
16
16
|
"type": "git",
|
17
|
-
"url": "https://github.com/marko-js/marko/tree/
|
17
|
+
"url": "https://github.com/marko-js/marko/tree/main/packages/translator-default"
|
18
18
|
},
|
19
19
|
"license": "MIT",
|
20
20
|
"author": "Dylan Piercey <dpiercey@ebay.com>",
|
@@ -25,17 +25,17 @@
|
|
25
25
|
"index.d.ts"
|
26
26
|
],
|
27
27
|
"scripts": {
|
28
|
-
"build": "babel ./src --out-dir ./dist --
|
28
|
+
"build": "babel ./src --out-dir ./dist --copy-files --config-file ../../babel.config.js --env-name=production"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@babel/runtime": "^7.23.
|
32
|
-
"@marko/babel-utils": "^6.
|
33
|
-
"magic-string": "^0.30.
|
31
|
+
"@babel/runtime": "^7.23.9",
|
32
|
+
"@marko/babel-utils": "^6.4.0",
|
33
|
+
"magic-string": "^0.30.6",
|
34
34
|
"self-closing-tags": "^1.0.1"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
|
-
"@marko/compiler": "^5.
|
38
|
-
"marko": "^5.
|
37
|
+
"@marko/compiler": "^5.35.0",
|
38
|
+
"marko": "^5.33.0"
|
39
39
|
},
|
40
40
|
"peerDependencies": {
|
41
41
|
"@marko/compiler": "^5.16.1",
|
@@ -44,6 +44,5 @@
|
|
44
44
|
"publishConfig": {
|
45
45
|
"access": "public"
|
46
46
|
},
|
47
|
-
"main:
|
48
|
-
"main:npm": "dist/index.js"
|
47
|
+
"main:override": "src/index.js"
|
49
48
|
}
|