@wevu/compiler 6.14.0 → 6.14.2
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/index.d.mts +2 -1
- package/dist/index.mjs +13 -4
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,6 @@ import { Expression } from "@weapp-vite/ast/babelTypes";
|
|
|
3
3
|
import { AstEngineName, AstEngineName as AstEngineName$1 } from "@weapp-vite/ast";
|
|
4
4
|
import { LRUCache } from "lru-cache";
|
|
5
5
|
import { SFCBlock, SFCDescriptor, SFCParseResult, SFCStyleBlock } from "vue/compiler-sfc";
|
|
6
|
-
|
|
7
6
|
//#region src/auto-import-components/builtin.d.ts
|
|
8
7
|
/**
|
|
9
8
|
* 内置组件集合(来自自动生成的组件列表)。
|
|
@@ -421,6 +420,8 @@ declare function compileJsxFile(source: string, filename: string, options?: Comp
|
|
|
421
420
|
//#endregion
|
|
422
421
|
//#region src/plugins/utils/cache.d.ts
|
|
423
422
|
declare const mtimeCache: Map<string, {
|
|
423
|
+
ctimeMs: number;
|
|
424
|
+
ino: number;
|
|
424
425
|
mtimeMs: number;
|
|
425
426
|
size: number;
|
|
426
427
|
}>;
|
package/dist/index.mjs
CHANGED
|
@@ -411,11 +411,12 @@ function rewriteJsLikeImportsForTempDir(source, fromDir, tempDir) {
|
|
|
411
411
|
}
|
|
412
412
|
//#endregion
|
|
413
413
|
//#region src/plugins/vue/transform/wevuTempDir.ts
|
|
414
|
+
const PROJECT_WEVU_CONFIG_DIR = path.join(".weapp-vite", "wevu-config");
|
|
414
415
|
function getWevuConfigCacheRoot() {
|
|
415
416
|
const env = process.env.WEAPP_VITE_WEVU_CONFIG_DIR?.trim();
|
|
416
417
|
if (env) return path.resolve(env);
|
|
417
418
|
const cwd = process.cwd();
|
|
418
|
-
const projectCacheDir = path.join(cwd,
|
|
419
|
+
const projectCacheDir = path.join(cwd, PROJECT_WEVU_CONFIG_DIR);
|
|
419
420
|
if (fs.existsSync(projectCacheDir)) return projectCacheDir;
|
|
420
421
|
return path.join(os.tmpdir(), "weapp-vite", "wevu-config");
|
|
421
422
|
}
|
|
@@ -3925,20 +3926,28 @@ async function isInvalidate(id) {
|
|
|
3925
3926
|
const cached = mtimeCache.get(id);
|
|
3926
3927
|
const stats = await stat(id);
|
|
3927
3928
|
const mtimeMs = typeof stats?.mtimeMs === "number" ? stats.mtimeMs : NaN;
|
|
3929
|
+
const ctimeMs = typeof stats?.ctimeMs === "number" ? stats.ctimeMs : NaN;
|
|
3928
3930
|
const size = typeof stats?.size === "number" ? stats.size : NaN;
|
|
3931
|
+
const ino = typeof stats?.ino === "number" ? stats.ino : NaN;
|
|
3929
3932
|
if (!Number.isFinite(mtimeMs)) return true;
|
|
3933
|
+
if (!Number.isFinite(ctimeMs)) return true;
|
|
3930
3934
|
if (!Number.isFinite(size)) return true;
|
|
3935
|
+
if (!Number.isFinite(ino)) return true;
|
|
3931
3936
|
if (cached === void 0) {
|
|
3932
3937
|
mtimeCache.set(id, {
|
|
3933
3938
|
mtimeMs,
|
|
3934
|
-
|
|
3939
|
+
ctimeMs,
|
|
3940
|
+
size,
|
|
3941
|
+
ino
|
|
3935
3942
|
});
|
|
3936
3943
|
return true;
|
|
3937
3944
|
}
|
|
3938
|
-
if (cached.mtimeMs === mtimeMs && cached.size === size) return false;
|
|
3945
|
+
if (cached.mtimeMs === mtimeMs && cached.ctimeMs === ctimeMs && cached.size === size && cached.ino === ino) return false;
|
|
3939
3946
|
mtimeCache.set(id, {
|
|
3940
3947
|
mtimeMs,
|
|
3941
|
-
|
|
3948
|
+
ctimeMs,
|
|
3949
|
+
size,
|
|
3950
|
+
ino
|
|
3942
3951
|
});
|
|
3943
3952
|
return true;
|
|
3944
3953
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wevu/compiler",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.14.
|
|
4
|
+
"version": "6.14.2",
|
|
5
5
|
"description": "wevu 编译器基础包,面向小程序模板的编译与转换",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"@vue/compiler-core": "^3.5.32",
|
|
45
45
|
"@vue/compiler-dom": "^3.5.32",
|
|
46
46
|
"comment-json": "^4.6.2",
|
|
47
|
-
"lru-cache": "^11.2
|
|
47
|
+
"lru-cache": "^11.3.2",
|
|
48
48
|
"magic-string": "^0.30.21",
|
|
49
49
|
"merge": "^2.1.1",
|
|
50
50
|
"pathe": "^2.0.3",
|
|
51
51
|
"vue": "^3.5.32",
|
|
52
52
|
"@weapp-core/shared": "3.0.3",
|
|
53
|
-
"@weapp-vite/ast": "6.14.
|
|
53
|
+
"@weapp-vite/ast": "6.14.2",
|
|
54
54
|
"rolldown-require": "2.0.12"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|