@vue/compiler-sfc 3.4.0 → 3.4.1
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.
package/dist/compiler-sfc.cjs.js
CHANGED
|
@@ -1808,6 +1808,7 @@ function parse$2(source, {
|
|
|
1808
1808
|
pad = false,
|
|
1809
1809
|
ignoreEmpty = true,
|
|
1810
1810
|
compiler = CompilerDOM__namespace,
|
|
1811
|
+
templateParseOptions = {},
|
|
1811
1812
|
parseExpressions = true
|
|
1812
1813
|
} = {}) {
|
|
1813
1814
|
const sourceKey = source + sourceMap + filename + sourceRoot + pad + compiler.parse;
|
|
@@ -1831,6 +1832,7 @@ function parse$2(source, {
|
|
|
1831
1832
|
const ast = compiler.parse(source, {
|
|
1832
1833
|
parseMode: "sfc",
|
|
1833
1834
|
prefixIdentifiers: parseExpressions,
|
|
1835
|
+
...templateParseOptions,
|
|
1834
1836
|
onError: (e) => {
|
|
1835
1837
|
errors.push(e);
|
|
1836
1838
|
}
|
|
@@ -20577,7 +20579,7 @@ function isStaticNode(node) {
|
|
|
20577
20579
|
return false;
|
|
20578
20580
|
}
|
|
20579
20581
|
|
|
20580
|
-
const version = "3.4.
|
|
20582
|
+
const version = "3.4.1";
|
|
20581
20583
|
const parseCache = parseCache$1;
|
|
20582
20584
|
const errorMessages = {
|
|
20583
20585
|
...CompilerDOM.errorMessages,
|
package/dist/compiler-sfc.d.ts
CHANGED
|
@@ -158,6 +158,11 @@ export interface SFCParseOptions {
|
|
|
158
158
|
pad?: boolean | 'line' | 'space';
|
|
159
159
|
ignoreEmpty?: boolean;
|
|
160
160
|
compiler?: TemplateCompiler;
|
|
161
|
+
templateParseOptions?: ParserOptions;
|
|
162
|
+
/**
|
|
163
|
+
* TODO remove in 3.5
|
|
164
|
+
* @deprecated use `templateParseOptions: { prefixIdentifiers: false }` instead
|
|
165
|
+
*/
|
|
161
166
|
parseExpressions?: boolean;
|
|
162
167
|
}
|
|
163
168
|
export interface SFCBlock {
|
|
@@ -221,7 +226,7 @@ export interface SFCParseResult {
|
|
|
221
226
|
descriptor: SFCDescriptor;
|
|
222
227
|
errors: (CompilerError | SyntaxError)[];
|
|
223
228
|
}
|
|
224
|
-
export declare function parse(source: string, { sourceMap, filename, sourceRoot, pad, ignoreEmpty, compiler, parseExpressions, }?: SFCParseOptions): SFCParseResult;
|
|
229
|
+
export declare function parse(source: string, { sourceMap, filename, sourceRoot, pad, ignoreEmpty, compiler, templateParseOptions, parseExpressions, }?: SFCParseOptions): SFCParseResult;
|
|
225
230
|
|
|
226
231
|
type PreprocessLang = 'less' | 'sass' | 'scss' | 'styl' | 'stylus';
|
|
227
232
|
|
|
@@ -2073,7 +2073,7 @@ const CompilerDeprecationTypes = {
|
|
|
2073
2073
|
"COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE",
|
|
2074
2074
|
"COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE",
|
|
2075
2075
|
"COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE",
|
|
2076
|
-
"COMPILER_FILTERS": "
|
|
2076
|
+
"COMPILER_FILTERS": "COMPILER_FILTERS"
|
|
2077
2077
|
};
|
|
2078
2078
|
const deprecationData = {
|
|
2079
2079
|
["COMPILER_IS_ON_ELEMENT"]: {
|
|
@@ -2103,7 +2103,7 @@ const deprecationData = {
|
|
|
2103
2103
|
message: `"inline-template" has been removed in Vue 3.`,
|
|
2104
2104
|
link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
|
|
2105
2105
|
},
|
|
2106
|
-
["
|
|
2106
|
+
["COMPILER_FILTERS"]: {
|
|
2107
2107
|
message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`,
|
|
2108
2108
|
link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
|
|
2109
2109
|
}
|
|
@@ -26630,6 +26630,25 @@ function extractIdentifiers(ids, node) {
|
|
|
26630
26630
|
}
|
|
26631
26631
|
}
|
|
26632
26632
|
|
|
26633
|
+
var __defProp$a = Object.defineProperty;
|
|
26634
|
+
var __defProps$9 = Object.defineProperties;
|
|
26635
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
26636
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
26637
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
26638
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
26639
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
26640
|
+
var __spreadValues$a = (a, b) => {
|
|
26641
|
+
for (var prop in b || (b = {}))
|
|
26642
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
26643
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
26644
|
+
if (__getOwnPropSymbols$a)
|
|
26645
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
26646
|
+
if (__propIsEnum$a.call(b, prop))
|
|
26647
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
26648
|
+
}
|
|
26649
|
+
return a;
|
|
26650
|
+
};
|
|
26651
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
26633
26652
|
const DEFAULT_FILENAME = "anonymous.vue";
|
|
26634
26653
|
const parseCache$1 = createCache();
|
|
26635
26654
|
function parse$7(source, {
|
|
@@ -26639,6 +26658,7 @@ function parse$7(source, {
|
|
|
26639
26658
|
pad = false,
|
|
26640
26659
|
ignoreEmpty = true,
|
|
26641
26660
|
compiler = CompilerDOM,
|
|
26661
|
+
templateParseOptions = {},
|
|
26642
26662
|
parseExpressions = true
|
|
26643
26663
|
} = {}) {
|
|
26644
26664
|
const sourceKey = source + sourceMap + filename + sourceRoot + pad + compiler.parse;
|
|
@@ -26659,13 +26679,14 @@ function parse$7(source, {
|
|
|
26659
26679
|
shouldForceReload: (prevImports) => hmrShouldReload(prevImports, descriptor)
|
|
26660
26680
|
};
|
|
26661
26681
|
const errors = [];
|
|
26662
|
-
const ast = compiler.parse(source, {
|
|
26682
|
+
const ast = compiler.parse(source, __spreadProps$9(__spreadValues$a({
|
|
26663
26683
|
parseMode: "sfc",
|
|
26664
|
-
prefixIdentifiers: parseExpressions
|
|
26684
|
+
prefixIdentifiers: parseExpressions
|
|
26685
|
+
}, templateParseOptions), {
|
|
26665
26686
|
onError: (e) => {
|
|
26666
26687
|
errors.push(e);
|
|
26667
26688
|
}
|
|
26668
|
-
});
|
|
26689
|
+
}));
|
|
26669
26690
|
ast.children.forEach((node) => {
|
|
26670
26691
|
if (node.type !== 1) {
|
|
26671
26692
|
return;
|
|
@@ -48577,7 +48598,7 @@ var __spreadValues = (a, b) => {
|
|
|
48577
48598
|
}
|
|
48578
48599
|
return a;
|
|
48579
48600
|
};
|
|
48580
|
-
const version = "3.4.
|
|
48601
|
+
const version = "3.4.1";
|
|
48581
48602
|
const parseCache = parseCache$1;
|
|
48582
48603
|
const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
|
|
48583
48604
|
const walk = walk$2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-sfc",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "@vue/compiler-sfc",
|
|
5
5
|
"main": "dist/compiler-sfc.cjs.js",
|
|
6
6
|
"module": "dist/compiler-sfc.esm-browser.js",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"magic-string": "^0.30.5",
|
|
38
38
|
"postcss": "^8.4.32",
|
|
39
39
|
"source-map-js": "^1.0.2",
|
|
40
|
-
"@vue/compiler-core": "3.4.
|
|
41
|
-
"@vue/compiler-dom": "3.4.
|
|
42
|
-
"@vue/
|
|
43
|
-
"@vue/
|
|
40
|
+
"@vue/compiler-core": "3.4.1",
|
|
41
|
+
"@vue/compiler-dom": "3.4.1",
|
|
42
|
+
"@vue/compiler-ssr": "3.4.1",
|
|
43
|
+
"@vue/shared": "3.4.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@babel/types": "^7.23.6",
|