vite-plugin-nudo 0.1.0 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # vite-plugin-nudo
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - @nudojs/service@0.2.1
8
+
9
+ ## 0.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 6c38283: docs and ci
14
+ - 9f7f819: fix pkg info
15
+ - c175f71: version
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [6c38283]
20
+ - Updated dependencies [9f7f819]
21
+ - Updated dependencies [c175f71]
22
+ - @nudojs/service@0.2.0
23
+
3
24
  ## 0.1.0
4
25
 
5
26
  ### Minor Changes
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nudo Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # vite-plugin-nudo
2
+
3
+ Vite plugin for build-time JavaScript type inference with [Nudo](https://github.com/nudojs/nudo).
4
+
5
+ ## What is Nudo?
6
+
7
+ Nudo is a type inference engine for JavaScript. Instead of a separate type system, it runs your code with symbolic type values via abstract interpretation — no TypeScript, no build step.
8
+
9
+ ## This package
10
+
11
+ `vite-plugin-nudo` runs Nudo analysis during your Vite build, reporting type diagnostics as build warnings or errors.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ npm install -D vite-plugin-nudo
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```js
22
+ // vite.config.js
23
+ import nudo from 'vite-plugin-nudo'
24
+
25
+ export default {
26
+ plugins: [
27
+ nudo({
28
+ include: '**/*.js', // default
29
+ exclude: '**/node_modules/**', // default
30
+ failOnError: false, // default
31
+ }),
32
+ ],
33
+ }
34
+ ```
35
+
36
+ ## License
37
+
38
+ [MIT](https://github.com/nudojs/nudo/blob/main/LICENSE)
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ function nudoPlugin(options = {}) {
27
27
  },
28
28
  transform(code, id) {
29
29
  if (!matchesPatterns(id, include, exclude)) return null;
30
- if (!/@nudo:(case|mock|pure|skip|sample|returns)\b/.test(code)) return null;
30
+ if (!/@nudo:(case|mock|pure|skip|sample|returns|env|mock-module|as|replace)\b/.test(code)) return null;
31
31
  try {
32
32
  const result = analyzeFile(id, code);
33
33
  analysisCache.set(id, result);
package/package.json CHANGED
@@ -1,10 +1,31 @@
1
1
  {
2
2
  "name": "vite-plugin-nudo",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
+ "description": "Vite plugin for build-time JavaScript type inference with Nudo",
4
5
  "type": "module",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "nudo",
9
+ "type-inference",
10
+ "javascript",
11
+ "vite",
12
+ "vite-plugin"
13
+ ],
5
14
  "main": "src/index.ts",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/nudojs/nudo.git",
18
+ "directory": "packages/vite-plugin"
19
+ },
20
+ "homepage": "https://github.com/nudojs/nudo/tree/main/packages/vite-plugin",
21
+ "bugs": "https://github.com/nudojs/nudo/issues",
22
+ "publishConfig": {
23
+ "access": "public",
24
+ "provenance": true,
25
+ "registry": "https://registry.npmjs.org"
26
+ },
6
27
  "dependencies": {
7
- "@nudojs/service": "0.1.0"
28
+ "@nudojs/service": "0.2.1"
8
29
  },
9
30
  "peerDependencies": {
10
31
  "vite": ">=5.0.0"
package/src/index.ts CHANGED
@@ -40,7 +40,7 @@ export default function nudoPlugin(options: NudoPluginOptions = {}): any {
40
40
 
41
41
  transform(code: string, id: string) {
42
42
  if (!matchesPatterns(id, include, exclude)) return null;
43
- if (!/@nudo:(case|mock|pure|skip|sample|returns)\b/.test(code)) return null;
43
+ if (!/@nudo:(case|mock|pure|skip|sample|returns|env|mock-module|as|replace)\b/.test(code)) return null;
44
44
 
45
45
  try {
46
46
  const result = analyzeFile(id, code);