@vitest/ui
Advanced tools
Comparing version 0.29.8 to 0.30.0
import { promises } from 'fs'; | ||
import { fileURLToPath } from 'url'; | ||
import { promisify } from 'util'; | ||
import { gzip, constants } from 'zlib'; | ||
import { resolve, basename, dirname, relative } from 'pathe'; | ||
@@ -9,3 +11,2 @@ import c from 'picocolors'; | ||
async function getModuleGraph(ctx, id) { | ||
var _a; | ||
const graph = {}; | ||
@@ -36,3 +37,3 @@ const externalized = /* @__PURE__ */ new Set(); | ||
} | ||
await get(ctx.server.moduleGraph.getModuleById(id) || ((_a = ctx.browser) == null ? void 0 : _a.moduleGraph.getModuleById(id))); | ||
await get(ctx.server.moduleGraph.getModuleById(id)); | ||
return { | ||
@@ -45,3 +46,3 @@ graph, | ||
const getOutputFile = (config, reporter) => { | ||
function getOutputFile(config, reporter) { | ||
if (!(config == null ? void 0 : config.outputFile)) | ||
@@ -52,3 +53,3 @@ return; | ||
return config.outputFile[reporter]; | ||
}; | ||
} | ||
@@ -82,5 +83,9 @@ const distDir = resolve(fileURLToPath(import.meta.url), "../../dist"); | ||
const htmlDir = resolve(this.ctx.config.root, dirname(htmlFile)); | ||
const metaFile = resolve(htmlDir, "html.meta.json"); | ||
const metaFile = resolve(htmlDir, "html.meta.json.gz"); | ||
await promises.mkdir(resolve(htmlDir, "assets"), { recursive: true }); | ||
await promises.writeFile(metaFile, report, "utf-8"); | ||
const promiseGzip = promisify(gzip); | ||
const data = await promiseGzip(report, { | ||
level: constants.Z_BEST_COMPRESSION | ||
}); | ||
await promises.writeFile(metaFile, data, "base64"); | ||
const ui = resolve(distDir, "client"); | ||
@@ -94,3 +99,3 @@ const files = fg.sync("**/*", { cwd: ui }); | ||
resolve(htmlDir, htmlFileName), | ||
html.replace("<!-- !LOAD_METADATA! -->", `<script>window.METADATA_PATH="${filePath}"</script>`) | ||
html.replace("<!-- !LOAD_METADATA! -->", `<script>window.METADATA_PATH="${filePath}"<\/script>`) | ||
); | ||
@@ -97,0 +102,0 @@ } else { |
{ | ||
"name": "@vitest/ui", | ||
"type": "module", | ||
"version": "0.29.8", | ||
"version": "0.30.0", | ||
"description": "UI for Vitest", | ||
@@ -32,6 +32,8 @@ "license": "MIT", | ||
"fast-glob": "^3.2.12", | ||
"fflate": "^0.7.4", | ||
"flatted": "^3.2.7", | ||
"pathe": "^1.1.0", | ||
"picocolors": "^1.0.0", | ||
"sirv": "^2.0.2" | ||
"sirv": "^2.0.2", | ||
"@vitest/utils": "0.30.0" | ||
}, | ||
@@ -41,29 +43,27 @@ "devDependencies": { | ||
"@testing-library/cypress": "^9.0.0", | ||
"@types/codemirror": "^5.60.6", | ||
"@types/codemirror": "^5.60.7", | ||
"@types/d3-force": "^3.0.4", | ||
"@types/d3-selection": "^3.0.4", | ||
"@types/d3-selection": "^3.0.5", | ||
"@types/ws": "^8.5.4", | ||
"@unocss/reset": "^0.48.3", | ||
"@vitejs/plugin-vue": "^4.0.0", | ||
"@vitejs/plugin-vue-jsx": "^3.0.0", | ||
"@vueuse/core": "^9.10.0", | ||
"@unocss/reset": "^0.50.6", | ||
"@vitejs/plugin-vue": "^4.1.0", | ||
"@vitejs/plugin-vue-jsx": "^3.0.1", | ||
"@vueuse/core": "^9.13.0", | ||
"ansi-to-html": "^0.7.2", | ||
"birpc": "^0.2.3", | ||
"codemirror": "^5.65.11", | ||
"codemirror-theme-vars": "^0.1.1", | ||
"cypress": "^12.3.0", | ||
"d3-graph-controller": "^2.5.1", | ||
"diff": "^5.1.0", | ||
"birpc": "0.2.3", | ||
"codemirror": "^5.65.12", | ||
"codemirror-theme-vars": "^0.1.2", | ||
"cypress": "^12.9.0", | ||
"d3-graph-controller": "^2.5.2", | ||
"floating-vue": "^2.0.0-y.0", | ||
"rollup": "^2.79.1", | ||
"splitpanes": "^3.1.5", | ||
"unocss": "^0.48.3", | ||
"unplugin-auto-import": "^0.12.1", | ||
"unplugin-vue-components": "^0.22.12", | ||
"unocss": "^0.50.6", | ||
"unplugin-auto-import": "^0.15.2", | ||
"unplugin-vue-components": "^0.24.1", | ||
"vite": "^4.0.0", | ||
"vite-plugin-pages": "^0.28.0", | ||
"vue": "^3.2.45", | ||
"vite-plugin-pages": "^0.29.0", | ||
"vue": "^3.2.47", | ||
"vue-router": "^4.1.6", | ||
"@vitest/runner": "0.29.8", | ||
"@vitest/ws-client": "0.29.8" | ||
"@vitest/runner": "0.30.0", | ||
"@vitest/ws-client": "0.30.0" | ||
}, | ||
@@ -70,0 +70,0 @@ "scripts": { |
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
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
965888
27
13
3100
7
+ Added@vitest/utils@0.30.0
+ Addedfflate@^0.7.4
+ Added@vitest/utils@0.30.0(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@5.2.0(transitive)
+ Addedblueimp-md5@2.19.0(transitive)
+ Addedconcordance@5.0.4(transitive)
+ Addeddate-time@3.1.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedfast-diff@1.3.0(transitive)
+ Addedfflate@0.7.4(transitive)
+ Addedget-func-name@2.0.2(transitive)
+ Addedjs-string-escape@1.0.1(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedloupe@2.3.7(transitive)
+ Addedmd5-hex@3.0.1(transitive)
+ Addedpretty-format@27.5.1(transitive)
+ Addedreact-is@17.0.2(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedtime-zone@1.0.0(transitive)
+ Addedwell-known-symbols@2.0.0(transitive)