vite-plugin-nudo 0.4.11 → 0.4.14

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -119,6 +119,7 @@ function nudoPlugin(options = {}) {
119
119
  if (excludeMatch(id)) return null;
120
120
  if (!includeMatch(id)) return null;
121
121
  if (!shouldAnalyzeFile(id, code)) return null;
122
+ let fatal;
122
123
  try {
123
124
  const result = await analyzeFileAsync(id, code, void 0, void 0, void 0, "none");
124
125
  const checkDiags = checkIssuesToDiagnostics(id, code);
@@ -136,7 +137,7 @@ function nudoPlugin(options = {}) {
136
137
  const msg = `[nudo] ${loc} ${diag.severity}: ${diag.message}`;
137
138
  if (diag.severity === "error") {
138
139
  if (failOnError) {
139
- this.error(msg);
140
+ fatal = fatal ?? msg;
140
141
  } else {
141
142
  this.warn(msg);
142
143
  }
@@ -147,6 +148,7 @@ function nudoPlugin(options = {}) {
147
148
  } catch (err) {
148
149
  this.warn(`[nudo] Failed to analyze ${id}: ${err.message}`);
149
150
  }
151
+ if (fatal) this.error(fatal);
150
152
  return null;
151
153
  },
152
154
  buildEnd() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-nudo",
3
- "version": "0.4.11",
3
+ "version": "0.4.14",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },
@@ -38,8 +38,8 @@
38
38
  "registry": "https://registry.npmjs.org"
39
39
  },
40
40
  "dependencies": {
41
- "@nudojs/core": "1.3.0",
42
- "@nudojs/service": "1.2.3"
41
+ "@nudojs/core": "1.5.0",
42
+ "@nudojs/service": "1.4.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "vite": ">=5.0.0"