@vue/compiler-sfc 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.
- package/dist/compiler-sfc.cjs.js +7 -5
- package/dist/compiler-sfc.esm-browser.js +904 -218
- package/package.json +7 -7
package/dist/compiler-sfc.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-sfc v3.6.0-beta.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -13892,25 +13892,28 @@ function loadTSConfig(configPath, ts, fs, visited = /* @__PURE__ */ new Set()) {
|
|
|
13892
13892
|
return res;
|
|
13893
13893
|
}
|
|
13894
13894
|
const fileToScopeCache = createCache();
|
|
13895
|
+
const fileToGlobalScopeCache = createCache();
|
|
13895
13896
|
/**
|
|
13896
13897
|
* @private
|
|
13897
13898
|
*/
|
|
13898
13899
|
function invalidateTypeCache(filename) {
|
|
13899
13900
|
filename = normalizePath(filename);
|
|
13900
13901
|
fileToScopeCache.delete(filename);
|
|
13902
|
+
fileToGlobalScopeCache.delete(filename);
|
|
13901
13903
|
tsConfigCache.delete(filename);
|
|
13902
13904
|
const affectedConfig = tsConfigRefMap.get(filename);
|
|
13903
13905
|
if (affectedConfig) tsConfigCache.delete(affectedConfig);
|
|
13904
13906
|
}
|
|
13905
13907
|
function fileToScope(ctx, filename, asGlobal = false) {
|
|
13906
|
-
const
|
|
13908
|
+
const cache = asGlobal ? fileToGlobalScopeCache : fileToScopeCache;
|
|
13909
|
+
const cached = cache.get(filename);
|
|
13907
13910
|
if (cached) return cached;
|
|
13908
13911
|
const fs = resolveFS(ctx);
|
|
13909
13912
|
const source = fs.readFile(filename) || "";
|
|
13910
13913
|
const body = parseFile(filename, source, fs, ctx.options.babelParserPlugins);
|
|
13911
13914
|
const scope = new TypeScope(filename, source, 0, recordImports(body));
|
|
13912
13915
|
recordTypes(ctx, body, scope, asGlobal);
|
|
13913
|
-
|
|
13916
|
+
cache.set(filename, scope);
|
|
13914
13917
|
return scope;
|
|
13915
13918
|
}
|
|
13916
13919
|
function parseFile(filename, content, fs, parserPlugins) {
|
|
@@ -15041,7 +15044,6 @@ function compileScript(sfc, options) {
|
|
|
15041
15044
|
const local = specifier.local.name;
|
|
15042
15045
|
const imported = getImportedName(specifier);
|
|
15043
15046
|
const source = node.source.value;
|
|
15044
|
-
if (vapor && ssr && specifier.type === "ImportSpecifier" && source === "vue" && imported === "defineVaporAsyncComponent") ctx.s.overwrite(specifier.start + startOffset, specifier.end + startOffset, `defineAsyncComponent as ${local}`);
|
|
15045
15047
|
const existing = ctx.userImports[local];
|
|
15046
15048
|
if (source === "vue" && MACROS.includes(imported)) {
|
|
15047
15049
|
if (local === imported) warnOnce(`\`${imported}\` is a compiler macro and no longer needs to be imported.`);
|
|
@@ -15440,7 +15442,7 @@ function mergeSourceMaps(scriptMap, templateMap, templateLineOffset) {
|
|
|
15440
15442
|
}
|
|
15441
15443
|
//#endregion
|
|
15442
15444
|
//#region packages/compiler-sfc/src/index.ts
|
|
15443
|
-
const version = "3.6.0-beta.
|
|
15445
|
+
const version = "3.6.0-beta.14";
|
|
15444
15446
|
const parseCache = parseCache$1;
|
|
15445
15447
|
const errorMessages = {
|
|
15446
15448
|
..._vue_compiler_dom.errorMessages,
|