@vue/compiler-sfc 3.5.13 → 3.5.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.
- package/dist/compiler-sfc.cjs.js +24 -16
- package/dist/compiler-sfc.d.ts +2 -1
- package/dist/compiler-sfc.esm-browser.js +8145 -10987
- package/package.json +14 -14
package/dist/compiler-sfc.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.5.
|
|
2
|
+
* @vue/compiler-sfc v3.5.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -4882,29 +4882,39 @@ function requireContainer$1 () {
|
|
|
4882
4882
|
return this.removeAll();
|
|
4883
4883
|
};
|
|
4884
4884
|
_proto.insertAfter = function insertAfter(oldNode, newNode) {
|
|
4885
|
+
var _this$nodes;
|
|
4885
4886
|
newNode.parent = this;
|
|
4886
4887
|
var oldIndex = this.index(oldNode);
|
|
4887
|
-
|
|
4888
|
+
var resetNode = [];
|
|
4889
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
4890
|
+
resetNode.push(arguments[i]);
|
|
4891
|
+
}
|
|
4892
|
+
(_this$nodes = this.nodes).splice.apply(_this$nodes, [oldIndex + 1, 0, newNode].concat(resetNode));
|
|
4888
4893
|
newNode.parent = this;
|
|
4889
4894
|
var index;
|
|
4890
4895
|
for (var id in this.indexes) {
|
|
4891
4896
|
index = this.indexes[id];
|
|
4892
4897
|
if (oldIndex < index) {
|
|
4893
|
-
this.indexes[id] = index + 1;
|
|
4898
|
+
this.indexes[id] = index + arguments.length - 1;
|
|
4894
4899
|
}
|
|
4895
4900
|
}
|
|
4896
4901
|
return this;
|
|
4897
4902
|
};
|
|
4898
4903
|
_proto.insertBefore = function insertBefore(oldNode, newNode) {
|
|
4904
|
+
var _this$nodes2;
|
|
4899
4905
|
newNode.parent = this;
|
|
4900
4906
|
var oldIndex = this.index(oldNode);
|
|
4901
|
-
|
|
4907
|
+
var resetNode = [];
|
|
4908
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
4909
|
+
resetNode.push(arguments[i]);
|
|
4910
|
+
}
|
|
4911
|
+
(_this$nodes2 = this.nodes).splice.apply(_this$nodes2, [oldIndex, 0, newNode].concat(resetNode));
|
|
4902
4912
|
newNode.parent = this;
|
|
4903
4913
|
var index;
|
|
4904
4914
|
for (var id in this.indexes) {
|
|
4905
4915
|
index = this.indexes[id];
|
|
4906
4916
|
if (index >= oldIndex) {
|
|
4907
|
-
this.indexes[id] = index + 1;
|
|
4917
|
+
this.indexes[id] = index + arguments.length - 1;
|
|
4908
4918
|
}
|
|
4909
4919
|
}
|
|
4910
4920
|
return this;
|
|
@@ -4930,7 +4940,7 @@ function requireContainer$1 () {
|
|
|
4930
4940
|
* Return the most specific node at the line and column number given.
|
|
4931
4941
|
* The source location is based on the original parsed location, locations aren't
|
|
4932
4942
|
* updated as selector nodes are mutated.
|
|
4933
|
-
*
|
|
4943
|
+
*
|
|
4934
4944
|
* Note that this location is relative to the location of the first character
|
|
4935
4945
|
* of the selector, and not the location of the selector in the overall document
|
|
4936
4946
|
* when used in conjunction with postcss.
|
|
@@ -12056,8 +12066,6 @@ var hasRequiredLodash_camelcase;
|
|
|
12056
12066
|
function requireLodash_camelcase () {
|
|
12057
12067
|
if (hasRequiredLodash_camelcase) return lodash_camelcase;
|
|
12058
12068
|
hasRequiredLodash_camelcase = 1;
|
|
12059
|
-
/** Used as references for various `Number` constants. */
|
|
12060
|
-
var INFINITY = 1 / 0;
|
|
12061
12069
|
|
|
12062
12070
|
/** `Object#toString` result references. */
|
|
12063
12071
|
var symbolTag = '[object Symbol]';
|
|
@@ -12393,7 +12401,7 @@ function requireLodash_camelcase () {
|
|
|
12393
12401
|
return symbolToString ? symbolToString.call(value) : '';
|
|
12394
12402
|
}
|
|
12395
12403
|
var result = (value + '');
|
|
12396
|
-
return (result == '0' && (1 / value) == -
|
|
12404
|
+
return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
|
|
12397
12405
|
}
|
|
12398
12406
|
|
|
12399
12407
|
/**
|
|
@@ -12408,7 +12416,7 @@ function requireLodash_camelcase () {
|
|
|
12408
12416
|
function castSlice(array, start, end) {
|
|
12409
12417
|
var length = array.length;
|
|
12410
12418
|
end = end === undefined ? length : end;
|
|
12411
|
-
return (
|
|
12419
|
+
return (false && end >= length) ? array : baseSlice(array, start, end);
|
|
12412
12420
|
}
|
|
12413
12421
|
|
|
12414
12422
|
/**
|
|
@@ -13161,7 +13169,7 @@ function requireWasmHash () {
|
|
|
13161
13169
|
// 64 is the maximum chunk size for every possible wasm hash implementation
|
|
13162
13170
|
// 4 is the maximum number of bytes per char for string encoding (max is utf-8)
|
|
13163
13171
|
// ~3 makes sure that it's always a block of 4 chars, so avoid partially encoded bytes for base64
|
|
13164
|
-
const MAX_SHORT_STRING = Math.floor((65536 - 64) / 4) &
|
|
13172
|
+
const MAX_SHORT_STRING = Math.floor((65536 - 64) / 4) & -4;
|
|
13165
13173
|
|
|
13166
13174
|
class WasmHash {
|
|
13167
13175
|
/**
|
|
@@ -19796,7 +19804,7 @@ const ${as} = {}`);
|
|
|
19796
19804
|
ast.forEach((node) => {
|
|
19797
19805
|
if (node.type === "ExportDefaultDeclaration") {
|
|
19798
19806
|
if (node.declaration.type === "ClassDeclaration" && node.declaration.id) {
|
|
19799
|
-
|
|
19807
|
+
const start = node.declaration.decorators && node.declaration.decorators.length > 0 ? node.declaration.decorators[node.declaration.decorators.length - 1].end : node.start;
|
|
19800
19808
|
s.overwrite(start, node.declaration.id.start, ` class `);
|
|
19801
19809
|
s.append(`
|
|
19802
19810
|
const ${as} = ${node.declaration.id.name}`);
|
|
@@ -20858,7 +20866,7 @@ class AST {
|
|
|
20858
20866
|
return [s, unescape(this.toString()), false, false];
|
|
20859
20867
|
}
|
|
20860
20868
|
// XXX abstract out this map method
|
|
20861
|
-
let bodyDotAllowed = !repeated || allowDot || dot ||
|
|
20869
|
+
let bodyDotAllowed = !repeated || allowDot || dot || false
|
|
20862
20870
|
? ''
|
|
20863
20871
|
: this.#partsToRegExp(true);
|
|
20864
20872
|
if (bodyDotAllowed === body) {
|
|
@@ -23926,7 +23934,7 @@ function transformDestructuredProps(ctx, vueImportAliases) {
|
|
|
23926
23934
|
},
|
|
23927
23935
|
leave(node, parent) {
|
|
23928
23936
|
parent && parentStack.pop();
|
|
23929
|
-
if (node.type === "BlockStatement" && !CompilerDOM.isFunctionType(parent) || CompilerDOM.isFunctionType(node)) {
|
|
23937
|
+
if (node.type === "BlockStatement" && !CompilerDOM.isFunctionType(parent) || CompilerDOM.isFunctionType(node) || node.type === "CatchClause") {
|
|
23930
23938
|
popScope();
|
|
23931
23939
|
}
|
|
23932
23940
|
}
|
|
@@ -24808,7 +24816,7 @@ function walkDeclaration(from, node, bindings, userImportAliases, hoistStatic, i
|
|
|
24808
24816
|
} else if (isConst) {
|
|
24809
24817
|
if (isCallOf(
|
|
24810
24818
|
init,
|
|
24811
|
-
(m) => m === userImportAliases["ref"] || m === userImportAliases["computed"] || m === userImportAliases["shallowRef"] || m === userImportAliases["customRef"] || m === userImportAliases["toRef"] || m === DEFINE_MODEL
|
|
24819
|
+
(m) => m === userImportAliases["ref"] || m === userImportAliases["computed"] || m === userImportAliases["shallowRef"] || m === userImportAliases["customRef"] || m === userImportAliases["toRef"] || m === userImportAliases["useTemplateRef"] || m === DEFINE_MODEL
|
|
24812
24820
|
)) {
|
|
24813
24821
|
bindingType = "setup-ref";
|
|
24814
24822
|
} else {
|
|
@@ -24934,7 +24942,7 @@ function isStaticNode(node) {
|
|
|
24934
24942
|
return false;
|
|
24935
24943
|
}
|
|
24936
24944
|
|
|
24937
|
-
const version = "3.5.
|
|
24945
|
+
const version = "3.5.14";
|
|
24938
24946
|
const parseCache = parseCache$1;
|
|
24939
24947
|
const errorMessages = {
|
|
24940
24948
|
...CompilerDOM.errorMessages,
|
package/dist/compiler-sfc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _babel_types from '@babel/types';
|
|
2
2
|
import { Statement, Expression, TSType, Node, Program, CallExpression, ObjectPattern, TSModuleDeclaration, TSPropertySignature, TSMethodSignature, TSCallSignatureDeclaration, TSFunctionType } from '@babel/types';
|
|
3
|
-
import { RootNode, CompilerOptions, CodegenResult, ParserOptions,
|
|
3
|
+
import { RootNode, CompilerOptions, CodegenResult, ParserOptions, RawSourceMap, CompilerError, SourceLocation, BindingMetadata as BindingMetadata$1 } from '@vue/compiler-core';
|
|
4
4
|
export { BindingMetadata, CompilerError, CompilerOptions, extractIdentifiers, generateCodeFrame, isInDestructureAssignment, isStaticProperty, walkIdentifiers } from '@vue/compiler-core';
|
|
5
5
|
import { ParserPlugin } from '@babel/parser';
|
|
6
6
|
export { parse as babelParse } from '@babel/parser';
|
|
@@ -482,3 +482,4 @@ export declare const walk: any;
|
|
|
482
482
|
*/
|
|
483
483
|
export declare const shouldTransformRef: () => boolean;
|
|
484
484
|
|
|
485
|
+
|