@vitest/ui
Advanced tools
Comparing version 1.0.0-beta.2 to 1.0.0-beta.3
@@ -1,2 +0,2 @@ | ||
import { fileURLToPath } from 'url'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { resolve, basename } from 'pathe'; | ||
@@ -33,5 +33,4 @@ import sirv from 'sirv'; | ||
function resolveCoverageFolder(ctx) { | ||
var _a, _b, _c; | ||
const options = ctx.config; | ||
const htmlReporter = ((_a = options.api) == null ? void 0 : _a.port) && ((_b = options.coverage) == null ? void 0 : _b.enabled) ? options.coverage.reporter.find((reporter) => { | ||
const htmlReporter = options.api?.port && options.coverage?.enabled ? options.coverage.reporter.find((reporter) => { | ||
if (typeof reporter === "string") | ||
@@ -44,3 +43,3 @@ return reporter === "html"; | ||
const root = resolve( | ||
((_c = ctx.config) == null ? void 0 : _c.root) || options.root || process.cwd(), | ||
ctx.config?.root || options.root || process.cwd(), | ||
options.coverage.reportsDirectory || coverageConfigDefaults.reportsDirectory | ||
@@ -47,0 +46,0 @@ ); |
@@ -1,2 +0,2 @@ | ||
import { fileURLToPath } from 'url'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { resolve, basename } from 'pathe'; | ||
@@ -33,5 +33,4 @@ import sirv from 'sirv'; | ||
function resolveCoverageFolder(ctx) { | ||
var _a, _b, _c; | ||
const options = ctx.config; | ||
const htmlReporter = ((_a = options.api) == null ? void 0 : _a.port) && ((_b = options.coverage) == null ? void 0 : _b.enabled) ? options.coverage.reporter.find((reporter) => { | ||
const htmlReporter = options.api?.port && options.coverage?.enabled ? options.coverage.reporter.find((reporter) => { | ||
if (typeof reporter === "string") | ||
@@ -44,3 +43,3 @@ return reporter === "html"; | ||
const root = resolve( | ||
((_c = ctx.config) == null ? void 0 : _c.root) || options.root || process.cwd(), | ||
ctx.config?.root || options.root || process.cwd(), | ||
options.coverage.reportsDirectory || coverageConfigDefaults.reportsDirectory | ||
@@ -47,0 +46,0 @@ ); |
@@ -1,5 +0,5 @@ | ||
import { promises } from 'fs'; | ||
import { fileURLToPath } from 'url'; | ||
import { promisify } from 'util'; | ||
import { gzip, constants } from 'zlib'; | ||
import { promises } from 'node:fs'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { promisify } from 'node:util'; | ||
import { gzip, constants } from 'node:zlib'; | ||
import { resolve, basename, dirname, relative } from 'pathe'; | ||
@@ -15,3 +15,3 @@ import c from 'picocolors'; | ||
function clearId(id2) { | ||
return (id2 == null ? void 0 : id2.replace(/\?v=\w+$/, "")) || ""; | ||
return id2?.replace(/\?v=\w+$/, "") || ""; | ||
} | ||
@@ -45,10 +45,9 @@ async function get(mod, seen = /* @__PURE__ */ new Map()) { | ||
function getOutputFile(config, reporter) { | ||
if (!(config == null ? void 0 : config.outputFile)) | ||
function getOutputFile(config) { | ||
if (!config?.outputFile) | ||
return; | ||
if (typeof config.outputFile === "string") | ||
return config.outputFile; | ||
return config.outputFile[reporter]; | ||
return config.outputFile.html; | ||
} | ||
const distDir = resolve(fileURLToPath(import.meta.url), "../../dist"); | ||
@@ -78,3 +77,3 @@ class HTMLReporter { | ||
async writeReport(report) { | ||
const htmlFile = getOutputFile(this.ctx.config, "html") || "html/index.html"; | ||
const htmlFile = getOutputFile(this.ctx.config) || "html/index.html"; | ||
const htmlFileName = basename(htmlFile); | ||
@@ -81,0 +80,0 @@ const htmlDir = resolve(this.ctx.config.root, dirname(htmlFile)); |
{ | ||
"name": "@vitest/ui", | ||
"type": "module", | ||
"version": "1.0.0-beta.2", | ||
"version": "1.0.0-beta.3", | ||
"description": "UI for Vitest", | ||
@@ -24,3 +24,3 @@ "license": "MIT", | ||
"./reporter": { | ||
"types": "./dist/reporter.d.ts", | ||
"types": "./reporter.d.ts", | ||
"import": "./dist/reporter.js" | ||
@@ -37,3 +37,3 @@ }, | ||
"peerDependencies": { | ||
"vitest": ">=0.30.1 <1" | ||
"vitest": "^1.0.0-0" | ||
}, | ||
@@ -47,6 +47,7 @@ "dependencies": { | ||
"sirv": "^2.0.3", | ||
"@vitest/utils": "1.0.0-beta.2" | ||
"@vitest/utils": "1.0.0-beta.3" | ||
}, | ||
"devDependencies": { | ||
"@faker-js/faker": "^8.0.2", | ||
"@iconify-json/logos": "^1.1.37", | ||
"@testing-library/cypress": "^9.0.0", | ||
@@ -72,8 +73,8 @@ "@types/codemirror": "^5.60.8", | ||
"unplugin-vue-components": "^0.25.1", | ||
"vite": "^4.0.0", | ||
"vite": "^4.5.0", | ||
"vite-plugin-pages": "^0.31.0", | ||
"vue": "^3.3.4", | ||
"vue-router": "^4.2.2", | ||
"@vitest/ws-client": "1.0.0-beta.2", | ||
"@vitest/runner": "1.0.0-beta.2" | ||
"@vitest/runner": "1.0.0-beta.3", | ||
"@vitest/ws-client": "1.0.0-beta.3" | ||
}, | ||
@@ -84,2 +85,3 @@ "scripts": { | ||
"build:node": "rollup -c", | ||
"typecheck": "tsc --noEmit", | ||
"dev:client": "vite", | ||
@@ -86,0 +88,0 @@ "dev": "rollup -c --watch --watch.include=node", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
811837
0
28
12
2547
5
+ Added@vitest/expect@1.6.0(transitive)
+ Added@vitest/runner@1.6.0(transitive)
+ Added@vitest/snapshot@1.6.0(transitive)
+ Added@vitest/spy@1.6.0(transitive)
+ Added@vitest/utils@1.0.0-beta.31.6.0(transitive)
+ Addedcross-spawn@7.0.3(transitive)
+ Addedestree-walker@3.0.3(transitive)
+ Addedexeca@8.0.1(transitive)
+ Addedget-stream@8.0.1(transitive)
+ Addedhuman-signals@5.0.0(transitive)
+ Addedis-stream@3.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjs-tokens@9.0.0(transitive)
+ Addedlocal-pkg@0.5.0(transitive)
+ Addedmerge-stream@2.0.0(transitive)
+ Addedmimic-fn@4.0.0(transitive)
+ Addednpm-run-path@5.3.0(transitive)
+ Addedonetime@6.0.0(transitive)
+ Addedp-limit@5.0.0(transitive)
+ Addedpath-key@3.1.14.0.0(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedstrip-final-newline@3.0.0(transitive)
+ Addedstrip-literal@2.1.0(transitive)
+ Addedtinypool@0.8.4(transitive)
+ Addedvite-node@1.6.0(transitive)
+ Addedvitest@1.6.0(transitive)
+ Addedwhich@2.0.2(transitive)
- Removed@types/chai@4.3.20(transitive)
- Removed@types/chai-subset@1.3.5(transitive)
- Removed@types/node@22.7.4(transitive)
- Removed@vitest/expect@0.34.6(transitive)
- Removed@vitest/runner@0.34.6(transitive)
- Removed@vitest/snapshot@0.34.6(transitive)
- Removed@vitest/spy@0.34.6(transitive)
- Removed@vitest/utils@0.34.61.0.0-beta.2(transitive)
- Removedlocal-pkg@0.4.3(transitive)
- Removedp-limit@4.0.0(transitive)
- Removedstrip-literal@1.3.0(transitive)
- Removedtinypool@0.7.0(transitive)
- Removedundici-types@6.19.8(transitive)
- Removedvite-node@0.34.6(transitive)
- Removedvitest@0.34.6(transitive)
Updated@vitest/utils@1.0.0-beta.3