feat: patch again
This commit is contained in:
parent
f241905397
commit
584e8b7929
|
|
@ -1,18 +1,17 @@
|
||||||
diff --git a/dist/index.js b/dist/index.js
|
diff --git a/dist/index.js b/dist/index.js
|
||||||
index 8b8e0d078e27474da1cf58ce3fef1d7acefb1cd4..ebf812a6a06dec6e7367233db773cd03f03db90e 100644
|
index 8b8e0d078e27474da1cf58ce3fef1d7acefb1cd4..0753137ff48b7d34338db98c3568c82e9798b3b7 100644
|
||||||
--- a/dist/index.js
|
--- a/dist/index.js
|
||||||
+++ b/dist/index.js
|
+++ b/dist/index.js
|
||||||
@@ -146,7 +146,12 @@ async function removeTypesFromVueSfcScript(code, fileName, script, templateAst,
|
@@ -146,9 +146,10 @@ async function removeTypesFromVueSfcScript(code, fileName, script, templateAst,
|
||||||
(0, import_template_ast_types.traverse)(templateAst, {
|
(0, import_template_ast_types.traverse)(templateAst, {
|
||||||
enter(node) {
|
enter(node) {
|
||||||
if ((0, import_template_ast_types.isSimpleExpressionNode)(node) && !node.isStatic) {
|
if ((0, import_template_ast_types.isSimpleExpressionNode)(node) && !node.isStatic) {
|
||||||
- expressions.add(node.content);
|
- expressions.add(node.content);
|
||||||
+ const content = node.content.trim();
|
+ const content = node.content.trim();
|
||||||
+ if (content.startsWith("{") && content.endsWith("}")) {
|
+ expressions.add(`[${content}]`);
|
||||||
+ expressions.add(`[${content}]`);
|
|
||||||
+ } else {
|
|
||||||
+ expressions.add(content);
|
|
||||||
+ }
|
|
||||||
} else if ((0, import_template_ast_types.isComponentNode)(node)) {
|
} else if ((0, import_template_ast_types.isComponentNode)(node)) {
|
||||||
expressions.add(node.tag);
|
- expressions.add(node.tag);
|
||||||
}
|
+ expressions.add(`[${node.tag}]`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
@ -6,7 +6,7 @@ settings:
|
||||||
|
|
||||||
patchedDependencies:
|
patchedDependencies:
|
||||||
detype@0.6.3:
|
detype@0.6.3:
|
||||||
hash: g5z5gyssezsozt6u6tz5kefv34
|
hash: 6ktqwatz2smalcxwhreeceligi
|
||||||
path: patches/detype@0.6.3.patch
|
path: patches/detype@0.6.3.patch
|
||||||
|
|
||||||
importers:
|
importers:
|
||||||
|
|
@ -245,7 +245,7 @@ importers:
|
||||||
version: 0.34.3(vitest@0.34.3)
|
version: 0.34.3(vitest@0.34.3)
|
||||||
detype:
|
detype:
|
||||||
specifier: ^0.6.3
|
specifier: ^0.6.3
|
||||||
version: 0.6.3(patch_hash=g5z5gyssezsozt6u6tz5kefv34)
|
version: 0.6.3(patch_hash=6ktqwatz2smalcxwhreeceligi)
|
||||||
tsup:
|
tsup:
|
||||||
specifier: ^7.2.0
|
specifier: ^7.2.0
|
||||||
version: 7.2.0(ts-node@10.9.1)(typescript@5.2.2)
|
version: 7.2.0(ts-node@10.9.1)(typescript@5.2.2)
|
||||||
|
|
@ -3978,7 +3978,7 @@ packages:
|
||||||
resolution: {integrity: sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==}
|
resolution: {integrity: sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/detype@0.6.3(patch_hash=g5z5gyssezsozt6u6tz5kefv34):
|
/detype@0.6.3(patch_hash=6ktqwatz2smalcxwhreeceligi):
|
||||||
resolution: {integrity: sha512-b42ytoZGAOo2U9V4zAMqtiWHgeG8F6kRQsg1E6n0uARMxOItxlWWS+pSsNbvmejInhfui0Q0mn9Bd4lwqhLaSA==}
|
resolution: {integrity: sha512-b42ytoZGAOo2U9V4zAMqtiWHgeG8F6kRQsg1E6n0uARMxOItxlWWS+pSsNbvmejInhfui0Q0mn9Bd4lwqhLaSA==}
|
||||||
engines: {node: '>=14.19.3'}
|
engines: {node: '>=14.19.3'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user