@nx/vitest 22.4.3 → 22.4.5

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
@@ -1,7 +1,7 @@
1
1
  <p style="text-align: center;">
2
2
  <picture>
3
3
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
4
- <img alt="Nx - Smart Repos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
4
+ <img alt="Nx - Smart Monorepos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
5
5
  </picture>
6
6
  </p>
7
7
 
@@ -20,7 +20,7 @@
20
20
 
21
21
  <hr>
22
22
 
23
- # Nx: Smart Repos · Fast Builds
23
+ # Nx: Smart Monorepos · Fast Builds
24
24
 
25
25
  Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.
26
26
 
@@ -64,5 +64,5 @@ npx nx@latest init
64
64
  - [Blog Posts About Nx](https://nx.dev/blog)
65
65
 
66
66
  <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
67
- width="100%" alt="Nx - Smart Repos · Fast Builds"></a></p>
67
+ width="100%" alt="Nx - Smart Monorepos · Fast Builds"></a></p>
68
68
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/vitest",
3
3
  "description": "The Nx Plugin for Vitest to enable fast unit testing with Vitest.",
4
- "version": "22.4.3",
4
+ "version": "22.4.5",
5
5
  "type": "commonjs",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -52,8 +52,8 @@
52
52
  "executors": "./executors.json",
53
53
  "generators": "./generators.json",
54
54
  "dependencies": {
55
- "@nx/devkit": "22.4.3",
56
- "@nx/js": "22.4.3",
55
+ "@nx/devkit": "22.4.5",
56
+ "@nx/js": "22.4.5",
57
57
  "tslib": "^2.3.0",
58
58
  "semver": "^7.6.3",
59
59
  "@phenomnomnominal/tsquery": "~6.1.4"
@@ -71,7 +71,7 @@
71
71
  }
72
72
  },
73
73
  "devDependencies": {
74
- "nx": "22.4.3"
74
+ "nx": "22.4.5"
75
75
  },
76
76
  "types": "./src/index.d.ts"
77
77
  }
@@ -100,6 +100,18 @@ async function buildVitestTargets(configFilePath, projectRoot, options, context)
100
100
  catch {
101
101
  // Plugin not installed or not needed, ignore
102
102
  }
103
+ // Workaround for race condition with vitest/node on Node 24+
104
+ // When multiple vitest.config files are processed in parallel, Node can throw:
105
+ // Error [ERR_INTERNAL_ASSERTION]: Cannot require() ES Module vitest/dist/node.js
106
+ // because it is not yet fully loaded.
107
+ // See: https://github.com/nrwl/nx/issues/34028
108
+ try {
109
+ const importVitestNode = () => new Function('return import("vitest/node")')();
110
+ await importVitestNode();
111
+ }
112
+ catch {
113
+ // vitest/node not available or not needed, ignore
114
+ }
103
115
  const { resolveConfig } = await (0, executor_utils_1.loadViteDynamicImport)();
104
116
  const viteBuildConfig = await resolveConfig({
105
117
  configFile: absoluteConfigFilePath,