@vue/compiler-core 3.6.0-beta.12 → 3.6.0-beta.14
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-core v3.6.0-beta.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -4212,12 +4212,9 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
4212
4212
|
const keyProp = findProp(node, `key`, false, true);
|
|
4213
4213
|
const isDirKey = keyProp && keyProp.type === 7;
|
|
4214
4214
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
if (isTemplate)
|
|
4218
|
-
if (memo) memo.exp = processExpression(memo.exp, context);
|
|
4219
|
-
if (keyProperty && keyProp.type !== 6) keyProperty.value = processExpression(keyProperty.value, context);
|
|
4220
|
-
}
|
|
4215
|
+
const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
4216
|
+
if (isTemplate && memo) memo.exp = processExpression(memo.exp, context);
|
|
4217
|
+
if ((isTemplate || memo) && keyProperty && isDirKey) keyExp = keyProp.exp = keyProperty.value = processExpression(keyProperty.value, context);
|
|
4221
4218
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
4222
4219
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
4223
4220
|
forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-core v3.6.0-beta.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -4170,12 +4170,9 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
4170
4170
|
const keyProp = findProp(node, `key`, false, true);
|
|
4171
4171
|
const isDirKey = keyProp && keyProp.type === 7;
|
|
4172
4172
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
if (isTemplate)
|
|
4176
|
-
if (memo) memo.exp = processExpression(memo.exp, context);
|
|
4177
|
-
if (keyProperty && keyProp.type !== 6) keyProperty.value = processExpression(keyProperty.value, context);
|
|
4178
|
-
}
|
|
4173
|
+
const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
4174
|
+
if (isTemplate && memo) memo.exp = processExpression(memo.exp, context);
|
|
4175
|
+
if ((isTemplate || memo) && keyProperty && isDirKey) keyExp = keyProp.exp = keyProperty.value = processExpression(keyProperty.value, context);
|
|
4179
4176
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
4180
4177
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
4181
4178
|
forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);
|
package/dist/compiler-core.d.ts
CHANGED
|
@@ -981,7 +981,7 @@ export type CompilerOptions = ParserOptions & TransformOptions & CodegenOptions;
|
|
|
981
981
|
*
|
|
982
982
|
* Since TS 5.3, dts generation starts to strangely include broken triple slash
|
|
983
983
|
* references for source-map-js, so we are inlining all source map related types
|
|
984
|
-
* here to
|
|
984
|
+
* here to workaround that.
|
|
985
985
|
*/
|
|
986
986
|
export interface CodegenSourceMapGenerator {
|
|
987
987
|
setSourceContent(sourceFile: string, sourceContent: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-core v3.6.0-beta.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3304,10 +3304,9 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
3304
3304
|
const isTemplate = isTemplateNode(node);
|
|
3305
3305
|
const memo = findDir(node, "memo");
|
|
3306
3306
|
const keyProp = findProp(node, `key`, false, true);
|
|
3307
|
-
|
|
3307
|
+
keyProp && keyProp.type;
|
|
3308
3308
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
3309
|
-
|
|
3310
|
-
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
3309
|
+
const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
3311
3310
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
3312
3311
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
3313
3312
|
forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.6.0-beta.
|
|
3
|
+
"version": "3.6.0-beta.14",
|
|
4
4
|
"description": "@vue/compiler-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/compiler-core.esm-bundler.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"entities": "^7.0.1",
|
|
51
51
|
"estree-walker": "^2.0.2",
|
|
52
52
|
"source-map-js": "^1.2.1",
|
|
53
|
-
"@vue/shared": "3.6.0-beta.
|
|
53
|
+
"@vue/shared": "3.6.0-beta.14"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@babel/types": "^7.29.0"
|