@yeger/vitest-utils 1.2.2 → 1.2.3
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.map +1 -1
- package/dist/index.mjs +1 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/config.ts"],"mappings":";;;;cAMa,aAAA,EAAe,MAAA,SAAe,cAAA;AAAA,UAqB1B,oBAAA;EArBjB;;;EAyBE,MAAA;EAzByC;AAqB3C;;EAQE,QAAA;EAQU;;;EAJV,UAAA;;;;EAIA,OAAA,GAAU,qBAAA;AAAA;;;;iBAMI,gBAAA
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/config.ts"],"mappings":";;;;cAMa,aAAA,EAAe,MAAA,SAAe,cAAA;AAAA,UAqB1B,oBAAA;EArBjB;;;EAyBE,MAAA;EAzByC;AAqB3C;;EAQE,QAAA;EAQU;;;EAJV,UAAA;;;;EAIA,OAAA,GAAU,qBAAA;AAAA;;;;iBAMI,gBAAA;EACZ,MAAA;EAAe,QAAA;EAAiB,UAAA;EAAmB;AAAA,IAAW,oBAAA,EAChE,UAAA,GAAY,cAAA,GACX,cAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
2
|
import deepmerge from "deepmerge";
|
|
3
|
-
|
|
4
3
|
//#region src/config.ts
|
|
5
4
|
const configuration = {
|
|
6
5
|
common: { silent: "passed-only" },
|
|
@@ -39,7 +38,7 @@ function defineTestConfig({ common = true, coverage = true, idempotent = true, b
|
|
|
39
38
|
};
|
|
40
39
|
return deepmerge(config, userConfig);
|
|
41
40
|
}
|
|
42
|
-
|
|
43
41
|
//#endregion
|
|
44
42
|
export { configuration, defineTestConfig };
|
|
43
|
+
|
|
45
44
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/config.ts"],"sourcesContent":["import process from 'node:process'\n\nimport deepmerge from 'deepmerge'\nimport type { TestUserConfig } from 'vitest/config'\nimport type { BrowserProviderOption } from 'vitest/node'\n\nexport const configuration: Record<string, TestUserConfig> = {\n common: {\n silent: 'passed-only',\n },\n coverage: {\n coverage: {\n enabled: !!process.env.COVERAGE,\n include: ['src/**/*.*'],\n exclude: ['*.d.ts', '*.ohm', '.gitignore'],\n provider: 'v8' as const,\n },\n },\n idempotent: {\n clearMocks: true,\n mockReset: true,\n restoreMocks: true,\n unstubEnvs: true,\n unstubGlobals: true,\n },\n}\n\nexport interface ConfigurationOptions {\n /**\n * Enables common configuration options. Default: `true`\n */\n common?: boolean\n /**\n * Enable coverage configuration. Default: `true`\n */\n coverage?: boolean\n /**\n * Enable idempotent configuration. Default: `true`\n */\n idempotent?: boolean\n /**\n * Specify the browser provider option. If defined, the browser mode will be auto-configured.\n */\n browser?: BrowserProviderOption\n}\n\n/**\n * Define a Vitest test configuration with coverage, idempotent settings, and browser support.\n */\nexport function defineTestConfig(\n { common = true, coverage = true, idempotent = true, browser }: ConfigurationOptions = {},\n userConfig: TestUserConfig = {},\n): TestUserConfig {\n const config: TestUserConfig = {}\n\n if (common) {\n Object.assign(config, configuration.common)\n }\n\n if (coverage) {\n Object.assign(config, configuration.coverage)\n }\n\n if (idempotent) {\n Object.assign(config, configuration.idempotent)\n }\n\n if (browser) {\n config.browser = {\n enabled: true,\n headless: true,\n instances: [{ browser: 'chromium' }],\n provider: browser,\n screenshotFailures: false,\n }\n }\n\n return deepmerge(config, userConfig) as TestUserConfig\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/config.ts"],"sourcesContent":["import process from 'node:process'\n\nimport deepmerge from 'deepmerge'\nimport type { TestUserConfig } from 'vitest/config'\nimport type { BrowserProviderOption } from 'vitest/node'\n\nexport const configuration: Record<string, TestUserConfig> = {\n common: {\n silent: 'passed-only',\n },\n coverage: {\n coverage: {\n enabled: !!process.env.COVERAGE,\n include: ['src/**/*.*'],\n exclude: ['*.d.ts', '*.ohm', '.gitignore'],\n provider: 'v8' as const,\n },\n },\n idempotent: {\n clearMocks: true,\n mockReset: true,\n restoreMocks: true,\n unstubEnvs: true,\n unstubGlobals: true,\n },\n}\n\nexport interface ConfigurationOptions {\n /**\n * Enables common configuration options. Default: `true`\n */\n common?: boolean\n /**\n * Enable coverage configuration. Default: `true`\n */\n coverage?: boolean\n /**\n * Enable idempotent configuration. Default: `true`\n */\n idempotent?: boolean\n /**\n * Specify the browser provider option. If defined, the browser mode will be auto-configured.\n */\n browser?: BrowserProviderOption\n}\n\n/**\n * Define a Vitest test configuration with coverage, idempotent settings, and browser support.\n */\nexport function defineTestConfig(\n { common = true, coverage = true, idempotent = true, browser }: ConfigurationOptions = {},\n userConfig: TestUserConfig = {},\n): TestUserConfig {\n const config: TestUserConfig = {}\n\n if (common) {\n Object.assign(config, configuration.common)\n }\n\n if (coverage) {\n Object.assign(config, configuration.coverage)\n }\n\n if (idempotent) {\n Object.assign(config, configuration.idempotent)\n }\n\n if (browser) {\n config.browser = {\n enabled: true,\n headless: true,\n instances: [{ browser: 'chromium' }],\n provider: browser,\n screenshotFailures: false,\n }\n }\n\n return deepmerge(config, userConfig) as TestUserConfig\n}\n"],"mappings":";;;AAMA,MAAa,gBAAgD;CAC3D,QAAQ,EACN,QAAQ,cACV;CACA,UAAU,EACR,UAAU;EACR,SAAS,CAAC,CAAC,QAAQ,IAAI;EACvB,SAAS,CAAC,YAAY;EACtB,SAAS;GAAC;GAAU;GAAS;EAAY;EACzC,UAAU;CACZ,EACF;CACA,YAAY;EACV,YAAY;EACZ,WAAW;EACX,cAAc;EACd,YAAY;EACZ,eAAe;CACjB;AACF;;;;AAwBA,SAAgB,iBACd,EAAE,SAAS,MAAM,WAAW,MAAM,aAAa,MAAM,YAAkC,CAAC,GACxF,aAA6B,CAAC,GACd;CAChB,MAAM,SAAyB,CAAC;CAEhC,IAAI,QACF,OAAO,OAAO,QAAQ,cAAc,MAAM;CAG5C,IAAI,UACF,OAAO,OAAO,QAAQ,cAAc,QAAQ;CAG9C,IAAI,YACF,OAAO,OAAO,QAAQ,cAAc,UAAU;CAGhD,IAAI,SACF,OAAO,UAAU;EACf,SAAS;EACT,UAAU;EACV,WAAW,CAAC,EAAE,SAAS,WAAW,CAAC;EACnC,UAAU;EACV,oBAAoB;CACtB;CAGF,OAAO,UAAU,QAAQ,UAAU;AACrC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yeger/vitest-utils",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"bugs": {
|
|
5
5
|
"url": "https://github.com/DerYeger/yeger/issues"
|
|
6
6
|
},
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"deepmerge": "4.3.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"publint": "0.3.
|
|
39
|
-
"tsdown": "0.
|
|
40
|
-
"typescript": "
|
|
41
|
-
"@yeger/tsconfig": "2.1.
|
|
38
|
+
"publint": "0.3.21",
|
|
39
|
+
"tsdown": "0.22.3",
|
|
40
|
+
"typescript": "6.0.3",
|
|
41
|
+
"@yeger/tsconfig": "2.1.3"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"vitest": "^4.0.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "tsdown",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
48
|
+
"dev": "tsdown --watch",
|
|
49
|
+
"publint": "publint run --strict",
|
|
50
|
+
"typecheck": "tsc"
|
|
51
51
|
}
|
|
52
52
|
}
|