@gsc-basic/vitest-config 1.0.0 → 1.0.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/README.md CHANGED
@@ -44,6 +44,8 @@
44
44
  - `css`: 透传 Vite `css` 配置
45
45
  - `test`: Vitest 运行时配置(`environment`、`setupFiles`、`coverage`、`depsInline`、`ui` 等)
46
46
 
47
+ 当前包开箱即用仅保证 `node` 与 `happy-dom` 两类测试环境,这也与内置预设和依赖保持一致。
48
+
47
49
  ### 预设说明
48
50
 
49
51
  - `node`
@@ -135,3 +137,4 @@ export default defineVitestConfig({
135
137
  ## 注意事项
136
138
 
137
139
  - 测试代码中直接使用到的库,请在使用方项目显式声明(如 `@vue/test-utils`)。
140
+ - `test.environment` 当前仅建议使用 `node` 或 `happy-dom`,包本身未内置 `jsdom`、`edge-runtime` 相关支持。
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ interface GscVitestPluginOptions {
15
15
  vueJsx?: boolean;
16
16
  }
17
17
  interface GscVitestTestOptions {
18
- environment?: 'node' | 'happy-dom' | 'jsdom' | 'edge-runtime';
18
+ environment?: 'node' | 'happy-dom';
19
19
  includeSource?: string[];
20
20
  exclude?: string[];
21
21
  setupFiles?: string[];
package/dist/index.js CHANGED
@@ -7,8 +7,8 @@ You shall not disclose such Confidential Information and shall use it only in
7
7
  accordance with the terms of the license agreement.
8
8
 
9
9
  --- Build Info ---
10
- Version: 0.0.0
11
- Build Time: 2026/5/21 09:37:58
12
- Build Commit: 98b7f75ab1883e7e13a31b2f1dfd4c5da2d75fb5
10
+ Version: 1.0.0
11
+ Build Time: 2026/5/22 15:00:36
12
+ Build Commit: 8608552b5d573151945132e89fddaad068fc35b4
13
13
  */
14
14
  import e from"@vitejs/plugin-vue";import t from"@vitejs/plugin-vue-jsx";import{configDefaults as n,defineConfig as r,mergeConfig as i}from"vitest/config";const a={provider:`v8`,reporter:[`text`,`lcov`]},o={node:{environment:`node`,css:!1,vue:!1,vueJsx:!1},web:{environment:`happy-dom`,css:!0,vue:!1,vueJsx:!1},vue:{environment:`happy-dom`,css:!0,vue:!0,vueJsx:!0}};function s(e){if(e!==!1)return e===!0||e==null?a:{...a,...e}}function c(n,r){let i=[],a=o[r],s=n.plugins?.vue??a.vue,c=n.plugins?.vueJsx??a.vueJsx;return s&&i.push(e()),c&&i.push(t()),i}function l(e={}){let t=e.preset||`node`,r=o[t];return{plugins:c(e,t),root:e.root,resolve:e.resolve,...e.css?{css:e.css}:{},test:{environment:e.test?.environment||r.environment,includeSource:e.test?.includeSource,exclude:[...n.exclude,...e.test?.exclude||[]],setupFiles:e.test?.setupFiles||[],css:e.test?.css??r.css,globals:e.test?.globals,passWithNoTests:e.test?.passWithNoTests,ui:e.test?.ui,server:{deps:{inline:e.test?.depsInline,external:e.test?.depsExternal}},coverage:s(e.test?.coverage)}}}function u(e={},t={}){return r(i(l(e),t))}function d(e,t){return i(e,t)}export{l as createVitestConfig,u as defineVitestConfig,d as mergeVitestConfig};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gsc-basic/vitest-config",
3
3
  "type": "module",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "description": "Vitest Config for GSC Basic Service",
6
6
  "author": "Lenovo SSG BASD <-GSC_Scaffolding_Support@lenovo.com>",
7
7
  "license": "LicenseRef-Proprietary",