miaoda-game-devkit 0.2.0 → 0.2.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/cli/lint.js
CHANGED
|
@@ -33,8 +33,11 @@ function run(name, packageName, binName, args) {
|
|
|
33
33
|
console.error(`[${name}] ${error.message}`);
|
|
34
34
|
resolveResult({ name, ok: false });
|
|
35
35
|
});
|
|
36
|
-
child.once("
|
|
37
|
-
|
|
36
|
+
child.once("close", (code, signal) => {
|
|
37
|
+
if (signal) {
|
|
38
|
+
console.error(`[${name}] terminated by ${signal}`);
|
|
39
|
+
}
|
|
40
|
+
resolveResult({ name, ok: code === 0 && signal === null });
|
|
38
41
|
});
|
|
39
42
|
});
|
|
40
43
|
}
|
|
@@ -359,7 +359,10 @@ function defineGameVitestConfig(options) {
|
|
|
359
359
|
hookTimeout: options.hookTimeout,
|
|
360
360
|
server: {
|
|
361
361
|
deps: {
|
|
362
|
-
|
|
362
|
+
// devkit 模块需要在配置和审计阶段使用 Node 内置模块。
|
|
363
|
+
// 如果强制内联,Vite 会把这些模块按浏览器模块转换,
|
|
364
|
+
// 最终触发 "No such built-in module: node:"。
|
|
365
|
+
external: [/miaoda-game-devkit/]
|
|
363
366
|
}
|
|
364
367
|
},
|
|
365
368
|
environment: "jsdom",
|
|
@@ -419,6 +422,11 @@ describe("defineGameVitestConfig", () => {
|
|
|
419
422
|
});
|
|
420
423
|
expect(config.test).toMatchObject({
|
|
421
424
|
include: ["tests/**/*.test.ts"],
|
|
425
|
+
server: {
|
|
426
|
+
deps: {
|
|
427
|
+
external: [/miaoda-game-devkit/]
|
|
428
|
+
}
|
|
429
|
+
},
|
|
422
430
|
environment: "jsdom",
|
|
423
431
|
environmentOptions: { jsdom: { url: "http://localhost/" } },
|
|
424
432
|
setupFiles: ["miaoda-game-devkit/vitest-setup"],
|
package/dist/vitest-config.js
CHANGED
|
@@ -379,7 +379,10 @@ function defineGameVitestConfig(options) {
|
|
|
379
379
|
hookTimeout: options.hookTimeout,
|
|
380
380
|
server: {
|
|
381
381
|
deps: {
|
|
382
|
-
|
|
382
|
+
// devkit 模块需要在配置和审计阶段使用 Node 内置模块。
|
|
383
|
+
// 如果强制内联,Vite 会把这些模块按浏览器模块转换,
|
|
384
|
+
// 最终触发 "No such built-in module: node:"。
|
|
385
|
+
external: [/miaoda-game-devkit/]
|
|
383
386
|
}
|
|
384
387
|
},
|
|
385
388
|
environment: "jsdom",
|
package/dist/vitest-config.mjs
CHANGED
|
@@ -355,7 +355,10 @@ function defineGameVitestConfig(options) {
|
|
|
355
355
|
hookTimeout: options.hookTimeout,
|
|
356
356
|
server: {
|
|
357
357
|
deps: {
|
|
358
|
-
|
|
358
|
+
// devkit 模块需要在配置和审计阶段使用 Node 内置模块。
|
|
359
|
+
// 如果强制内联,Vite 会把这些模块按浏览器模块转换,
|
|
360
|
+
// 最终触发 "No such built-in module: node:"。
|
|
361
|
+
external: [/miaoda-game-devkit/]
|
|
359
362
|
}
|
|
360
363
|
},
|
|
361
364
|
environment: "jsdom",
|