@nuxt/module-builder 1.0.0 → 1.0.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/README.md CHANGED
@@ -13,7 +13,6 @@
13
13
  - Unified build with [unjs/unbuild](https://github.com/unjs/unbuild)
14
14
  - Automated build config using last module spec
15
15
  - Typescript and ESM support
16
- - Auto generated CommonJS stubs
17
16
  - Auto generated types and shims for `@nuxt/schema`
18
17
 
19
18
  We recommend to checkout the [Nuxt modules author guide](https://nuxt.com/docs/guide/going-further/modules) before starting with the module-builder.
@@ -21,15 +20,15 @@ We recommend to checkout the [Nuxt modules author guide](https://nuxt.com/docs/g
21
20
  ## Requirements
22
21
 
23
22
  For a user to use a module generated from module-builder, it's recommended they have:
24
- - Node.js >= 16.x. _Latest Node LTS preferred_
25
- - Nuxt 3 or Nuxt Bridge. _Nuxt 2 is functional but not advised_
23
+ - Node.js >= 18.x. _Latest Node LTS preferred_
24
+ - Nuxt 3+.
26
25
 
27
26
  ## Quick start
28
27
 
29
28
  Get started with our [module starter](https://github.com/nuxt/starter/tree/module):
30
29
 
31
30
  ```bash
32
- npx nuxi init -t module my-module
31
+ npm create nuxt -- -t module my-module
33
32
  ```
34
33
 
35
34
  ## Project structure
@@ -100,13 +99,18 @@ A minimum `package.json` should look like this:
100
99
  "version": "1.0.0",
101
100
  "exports": {
102
101
  ".": {
103
- "types": "./dist/types.d.ts",
104
- "import": "./dist/module.mjs",
105
- "require": "./dist/module.cjs"
102
+ "types": "./dist/types.d.mts",
103
+ "import": "./dist/module.mjs"
104
+ }
105
+ },
106
+ "main": "./dist/module.mjs",
107
+ "typesVersions": {
108
+ "*": {
109
+ ".": [
110
+ "./dist/types.d.mts"
111
+ ]
106
112
  }
107
113
  },
108
- "main": "./dist/module.cjs",
109
- "types": "./dist/types.d.ts",
110
114
  "files": [
111
115
  "dist"
112
116
  ],
@@ -114,7 +118,7 @@ A minimum `package.json` should look like this:
114
118
  "prepack": "nuxt-module-build build"
115
119
  },
116
120
  "dependencies": {
117
- "@nuxt/kit": "npm:@nuxt/kit-edge@latest"
121
+ "@nuxt/kit": "latest"
118
122
  },
119
123
  "devDependencies": {
120
124
  "@nuxt/module-builder": "latest"
@@ -142,8 +146,7 @@ Module builder generates dist files in `dist/` directory:
142
146
 
143
147
  - `module.mjs`: Module entrypoint build from `src/module`
144
148
  - `module.json`: Module meta extracted from `module.mjs` + `package.json`
145
- - `module.cjs`: ESM proxy to allow require module in CommonJS context
146
- - `types.d.ts`: Exported types in addition to shims for `nuxt.config` auto completion.
149
+ - `types.d.mts`: Exported types in addition to shims for `nuxt.config` auto completion.
147
150
  - `runtime/*`: Individually transformed files using [unjs/mkdist](https://github.com/unjs/mkdist)
148
151
  - Javascript and `.ts` files will be transformed to `.js` with extracted types on `.d.ts` file with same name
149
152
  - `.vue` files will be transformed with extracted `.d.ts` file
@@ -11,7 +11,7 @@ import { consola } from 'consola';
11
11
  import { resolvePath, findExports, findTypeExports } from 'mlly';
12
12
  import { defineCommand } from 'citty';
13
13
  import { convertCompilerOptionsFromJson } from 'typescript';
14
- import { v as version, n as name } from '../shared/module-builder.mlKecDzW.mjs';
14
+ import { v as version, n as name } from '../shared/module-builder.yvjrH2kb.mjs';
15
15
 
16
16
  const build = defineCommand({
17
17
  meta: {
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
  import { consola } from 'consola';
4
- import { v as version, d as description, n as name } from './shared/module-builder.mlKecDzW.mjs';
4
+ import { v as version, d as description, n as name } from './shared/module-builder.yvjrH2kb.mjs';
5
5
 
6
6
  const _rDefault = (r) => r && typeof r === "object" && "default" in r ? r.default : r;
7
7
  const main = defineCommand({
package/dist/index.mjs CHANGED
@@ -13,4 +13,4 @@ import 'consola';
13
13
  import 'mlly';
14
14
  import 'citty';
15
15
  import 'typescript';
16
- import './shared/module-builder.mlKecDzW.mjs';
16
+ import './shared/module-builder.yvjrH2kb.mjs';
@@ -1,5 +1,5 @@
1
1
  const name = "@nuxt/module-builder";
2
- const version = "1.0.0";
2
+ const version = "1.0.1";
3
3
  const description = "Complete solution for building Nuxt modules";
4
4
 
5
5
  export { description as d, name as n, version as v };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/module-builder",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "repository": "nuxt/module-builder",
5
5
  "description": "Complete solution for building Nuxt modules",
6
6
  "license": "MIT",
@@ -38,11 +38,11 @@
38
38
  "pkg-types": "^2.1.0",
39
39
  "tsconfck": "^3.1.5",
40
40
  "unbuild": "^3.5.0",
41
- "vue-sfc-transformer": "^0.1.4"
41
+ "vue-sfc-transformer": "^0.1.8"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@nuxt/cli": "^3.24.1",
45
- "typescript": "^5.8.2"
45
+ "typescript": "^5.8.3"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@arethetypeswrong/cli": "^0.17.4",
@@ -54,12 +54,12 @@
54
54
  "changelogen": "^0.6.1",
55
55
  "eslint": "^9.24.0",
56
56
  "installed-check": "^9.3.0",
57
- "knip": "^5.46.5",
57
+ "knip": "^5.47.0",
58
58
  "nuxt": "^3.16.2",
59
59
  "pkg-pr-new": "^0.0.42",
60
60
  "publint": "^0.3.10",
61
61
  "tinyexec": "^1.0.1",
62
- "typescript": "~5.8.2",
62
+ "typescript": "~5.8.3",
63
63
  "vitest": "^3.1.1",
64
64
  "vue": "^3.5.13",
65
65
  "vue-tsc": "^2.2.8"
@@ -68,7 +68,7 @@
68
68
  "@nuxt/kit": "^3.16.2",
69
69
  "@nuxt/module-builder": "workspace:*",
70
70
  "@nuxt/schema": "^3.16.2",
71
- "typescript": "~5.8.2",
71
+ "typescript": "~5.8.3",
72
72
  "vue": "^3.5.13",
73
73
  "vue-tsc": "^2.2.8"
74
74
  },