@untestutils/vitest 0.5.3 → 0.6.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"global-setup.d.ts","sourceRoot":"","sources":["../src/global-setup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA8B/C,wBAA8B,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAyD5F"}
1
+ {"version":3,"file":"global-setup.d.ts","sourceRoot":"","sources":["../src/global-setup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAyC/C,wBAA8B,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAyD5F"}
@@ -15,6 +15,12 @@ function readRegistryUrls(artifactsRoot, map) {
15
15
  void artifactsRoot;
16
16
  return urls;
17
17
  }
18
+ function formatKnownIds(recipesMap) {
19
+ const fromMap = recipesMap ? Object.keys(recipesMap) : [];
20
+ const fromReg = listRegisteredRecipes().map((r) => r.id).filter(Boolean);
21
+ const known = [...new Set([...fromMap, ...fromReg])].sort();
22
+ return known.length ? ` Known ids: ${known.join(", ")}.` : "";
23
+ }
18
24
  export default async function globalSetup(project) {
19
25
  await loadRecipesModule();
20
26
  const artifactsRoot = resolveArtifactsRoot();
@@ -32,7 +38,7 @@ export default async function globalSetup(project) {
32
38
  for (const id of prewarm) {
33
39
  const recipe = recipesMap?.[id] ?? getRegisteredRecipe(id);
34
40
  if (!recipe) {
35
- throw new Error(`[untestutils] prewarm id "${id}" not found. Pass recipesModule to untestutils() and call defineRecipes() in that module.`);
41
+ throw new Error(`[untestutils] prewarm id "${id}" not found.${formatKnownIds(recipesMap)} Pass recipesModule to untestutils() and call defineRecipes() in that module.`);
36
42
  }
37
43
  await ensurePrepared(recipe, { artifactsRoot });
38
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@untestutils/vitest",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "homepage": "https://s00d.github.io/untestutils/",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "pathe": "^2.0.3",
48
- "@untestutils/core": "0.5.3"
48
+ "@untestutils/core": "0.6.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^26.6.1",