vue 2.7.0-alpha.6 → 2.7.0-alpha.7
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.js +14 -0
- package/dist/vue.common.dev.js +16 -9
- package/dist/vue.common.prod.js +3 -3
- package/dist/vue.esm.browser.js +16 -9
- package/dist/vue.esm.browser.min.js +3 -3
- package/dist/vue.esm.js +16 -9
- package/dist/vue.js +16 -9
- package/dist/vue.min.js +3 -3
- package/dist/vue.runtime.common.dev.js +9 -3
- package/dist/vue.runtime.common.prod.js +3 -3
- package/dist/vue.runtime.esm.js +9 -3
- package/dist/vue.runtime.js +9 -3
- package/dist/vue.runtime.min.js +3 -3
- package/dist/vue.runtime.mjs +9 -3
- package/package.json +24 -21
- package/packages/compiler-sfc/api-extractor.json +64 -0
- package/packages/compiler-sfc/dist/compiler-sfc.d.ts +259 -0
- package/packages/compiler-sfc/dist/compiler-sfc.js +17610 -2
- package/packages/compiler-sfc/node_modules/.bin/lessc +17 -0
- package/packages/compiler-sfc/node_modules/.bin/sass +2 -2
- package/packages/compiler-sfc/node_modules/.bin/stylus +17 -0
- package/packages/compiler-sfc/package.json +17 -12
- package/packages/compiler-sfc/src/babelUtils.ts +423 -0
- package/packages/compiler-sfc/src/compileScript.ts +1948 -0
- package/packages/compiler-sfc/src/compileStyle.ts +143 -0
- package/packages/compiler-sfc/src/compileTemplate.ts +197 -0
- package/packages/compiler-sfc/src/index.ts +15 -0
- package/packages/compiler-sfc/src/parse.ts +117 -0
- package/packages/compiler-sfc/src/{parser.ts → parseComponent.ts} +86 -17
- package/packages/compiler-sfc/src/stripWith.ts +60 -0
- package/packages/compiler-sfc/src/stylePlugins/scoped.ts +207 -0
- package/packages/compiler-sfc/src/stylePlugins/trim.ts +18 -0
- package/packages/compiler-sfc/src/stylePreprocessors.ts +135 -0
- package/packages/compiler-sfc/src/templateCompilerModules/assetUrl.ts +80 -0
- package/packages/compiler-sfc/src/templateCompilerModules/srcset.ts +76 -0
- package/packages/compiler-sfc/src/templateCompilerModules/utils.ts +64 -0
- package/packages/compiler-sfc/src/types.ts +95 -0
- package/packages/compiler-sfc/src/warn.ts +16 -0
- package/packages/compiler-sfc/test/__snapshots__/compileScript.spec.ts.snap +1393 -0
- package/packages/compiler-sfc/test/compileScript.spec.ts +1708 -0
- package/packages/compiler-sfc/test/compileStyle.spec.ts +203 -0
- package/packages/compiler-sfc/test/compileTemplate.spec.ts +229 -0
- package/packages/compiler-sfc/test/parseComponent.spec.ts +266 -0
- package/packages/compiler-sfc/test/stripWith.spec.ts +55 -0
- package/packages/compiler-sfc/test/stylePluginScoped.spec.ts +137 -0
- package/packages/compiler-sfc/test/tsconfig.json +7 -0
- package/src/compiler/codegen/index.ts +0 -1
- package/src/compiler/helpers.ts +2 -2
- package/src/compiler/parser/html-parser.ts +17 -3
- package/src/compiler/parser/index.ts +7 -5
- package/src/platforms/web/entry-compiler.ts +1 -1
- package/src/types/compiler.ts +5 -27
- package/src/v3/apiSetup.ts +6 -1
- package/src/platforms/web/entry-compiler-sfc.ts +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var compilerSfc = require('@vue/compiler-sfc');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.keys(compilerSfc).forEach(function (k) {
|
|
10
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return compilerSfc[k]; }
|
|
13
|
+
});
|
|
14
|
+
});
|
package/dist/vue.common.dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vue.js v2.7.0-alpha.
|
|
2
|
+
* Vue.js v2.7.0-alpha.7
|
|
3
3
|
* (c) 2014-2022 Evan You
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1492,6 +1492,9 @@ function initSetup(vm) {
|
|
|
1492
1492
|
if (!isReserved(key)) {
|
|
1493
1493
|
proxySetupProperty(vm, setupResult, key);
|
|
1494
1494
|
}
|
|
1495
|
+
else {
|
|
1496
|
+
warn$2("Avoid using variables that start with _ or $ in setup().");
|
|
1497
|
+
}
|
|
1495
1498
|
}
|
|
1496
1499
|
}
|
|
1497
1500
|
else if (setupResult !== undefined) {
|
|
@@ -1517,7 +1520,10 @@ function createSetupContext(vm) {
|
|
|
1517
1520
|
get slots() {
|
|
1518
1521
|
return initSlotsProxy(vm);
|
|
1519
1522
|
},
|
|
1520
|
-
emit: bind$1(vm.$emit, vm)
|
|
1523
|
+
emit: bind$1(vm.$emit, vm),
|
|
1524
|
+
expose: function () {
|
|
1525
|
+
// TODO
|
|
1526
|
+
}
|
|
1521
1527
|
};
|
|
1522
1528
|
}
|
|
1523
1529
|
function initAttrsProxy(vm) {
|
|
@@ -5797,7 +5803,7 @@ Object.defineProperty(Vue.prototype, '$ssrContext', {
|
|
|
5797
5803
|
Object.defineProperty(Vue, 'FunctionalRenderContext', {
|
|
5798
5804
|
value: FunctionalRenderContext
|
|
5799
5805
|
});
|
|
5800
|
-
Vue.version = '2.7.0-alpha.
|
|
5806
|
+
Vue.version = '2.7.0-alpha.7';
|
|
5801
5807
|
|
|
5802
5808
|
// these are reserved for web because they are directly compiled away
|
|
5803
5809
|
// during template compilation
|
|
@@ -9208,7 +9214,7 @@ function parseHTML(html, options) {
|
|
|
9208
9214
|
if (comment.test(html)) {
|
|
9209
9215
|
var commentEnd = html.indexOf('-->');
|
|
9210
9216
|
if (commentEnd >= 0) {
|
|
9211
|
-
if (options.shouldKeepComment) {
|
|
9217
|
+
if (options.shouldKeepComment && options.comment) {
|
|
9212
9218
|
options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);
|
|
9213
9219
|
}
|
|
9214
9220
|
advance(commentEnd + 3);
|
|
@@ -9618,10 +9624,12 @@ function parse(template, options) {
|
|
|
9618
9624
|
attrs.forEach(function (attr) {
|
|
9619
9625
|
if (invalidAttributeRE.test(attr.name)) {
|
|
9620
9626
|
warn("Invalid dynamic argument expression: attribute names cannot contain " +
|
|
9621
|
-
"spaces, quotes, <, >, / or =.",
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9627
|
+
"spaces, quotes, <, >, / or =.", options.outputSourceRange
|
|
9628
|
+
? {
|
|
9629
|
+
start: attr.start + attr.name.indexOf("["),
|
|
9630
|
+
end: attr.start + attr.name.length
|
|
9631
|
+
}
|
|
9632
|
+
: undefined);
|
|
9625
9633
|
}
|
|
9626
9634
|
});
|
|
9627
9635
|
}
|
|
@@ -10638,7 +10646,6 @@ var CodegenState = /** @class */ (function () {
|
|
|
10638
10646
|
function CodegenState(options) {
|
|
10639
10647
|
this.options = options;
|
|
10640
10648
|
this.warn = options.warn || baseWarn;
|
|
10641
|
-
//@ts-expect-error `this.transforms ` is a different type than `options.modules.transformCode`
|
|
10642
10649
|
this.transforms = pluckModuleFunction(options.modules, 'transformCode');
|
|
10643
10650
|
this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
|
|
10644
10651
|
this.directives = extend(extend({}, baseDirectives), options.directives);
|