@nuxt/module-builder 0.8.1 → 0.8.3

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.
@@ -9,7 +9,7 @@ import { createRegExp, anyOf } from 'magic-regexp';
9
9
  import { consola } from 'consola';
10
10
  import { resolvePath, findExports } from 'mlly';
11
11
  import { defineCommand } from 'citty';
12
- import { n as name, v as version } from '../shared/module-builder.78aa584a.mjs';
12
+ import { n as name, v as version } from '../shared/module-builder.7cb47969.mjs';
13
13
 
14
14
  const build = defineCommand({
15
15
  meta: {
@@ -168,7 +168,7 @@ async function writeTypes(distDir, isStub) {
168
168
  const moduleImports = [];
169
169
  const schemaImports = [];
170
170
  const moduleExports = [];
171
- const hasTypeExport = (name2) => isStub || moduleReExports.find((exp) => exp.names.includes(name2));
171
+ const hasTypeExport = (name2) => isStub || moduleReExports.find((exp) => exp.names?.includes(name2));
172
172
  if (!hasTypeExport("ModuleOptions")) {
173
173
  schemaImports.push("NuxtModule");
174
174
  moduleImports.push("default as Module");
@@ -179,12 +179,8 @@ async function writeTypes(distDir, isStub) {
179
179
  schemaShims.push(" interface NuxtHooks extends ModuleHooks {}");
180
180
  }
181
181
  if (hasTypeExport("ModuleRuntimeHooks")) {
182
- const runtimeHooksInterfaces = [];
183
- if (hasTypeExport("ModuleRuntimeHooks")) {
184
- runtimeHooksInterfaces.push("ModuleRuntimeHooks");
185
- }
186
- moduleImports.push(...runtimeHooksInterfaces);
187
- appShims.push(` interface RuntimeNuxtHooks extends ${runtimeHooksInterfaces.join(", ")} {}`);
182
+ moduleImports.push("ModuleRuntimeHooks");
183
+ appShims.push(` interface RuntimeNuxtHooks extends ModuleRuntimeHooks {}`);
188
184
  }
189
185
  if (hasTypeExport("ModuleRuntimeConfig")) {
190
186
  moduleImports.push("ModuleRuntimeConfig");
@@ -22,6 +22,7 @@ const prepare = defineCommand({
22
22
  const cwd = resolve(context.args.cwd || context.args.rootDir || ".");
23
23
  return runCommand("prepare", [cwd], {
24
24
  overrides: {
25
+ compatibilityDate: "2024-04-03",
25
26
  typescript: {
26
27
  builder: "shared"
27
28
  },
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 { n as name, d as description, v as version } from './shared/module-builder.78aa584a.mjs';
4
+ import { n as name, d as description, v as version } from './shared/module-builder.7cb47969.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
@@ -11,4 +11,4 @@ import 'magic-regexp';
11
11
  import 'consola';
12
12
  import 'mlly';
13
13
  import 'citty';
14
- import './shared/module-builder.78aa584a.mjs';
14
+ import './shared/module-builder.7cb47969.mjs';
@@ -1,5 +1,5 @@
1
1
  const name = "@nuxt/module-builder";
2
- const version = "0.8.1";
2
+ const version = "0.8.3";
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": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "repository": "nuxt/module-builder",
5
5
  "description": "Complete solution for building Nuxt modules",
6
6
  "license": "MIT",
@@ -26,34 +26,34 @@
26
26
  "magic-regexp": "^0.8.0",
27
27
  "mlly": "^1.7.1",
28
28
  "pathe": "^1.1.2",
29
- "pkg-types": "^1.1.1",
29
+ "pkg-types": "^1.1.3",
30
30
  "tsconfck": "^3.1.1",
31
31
  "unbuild": "^2.0.0"
32
32
  },
33
33
  "peerDependencies": {
34
- "@nuxt/kit": "^3.12.2",
34
+ "@nuxt/kit": "^3.12.4",
35
35
  "nuxi": "^3.12.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@nuxt/eslint-config": "^0.3.13",
39
- "@nuxt/kit": "^3.12.2",
40
- "@nuxt/schema": "^3.12.2",
41
- "@types/node": "^20.14.9",
42
- "@vitest/coverage-v8": "^1.6.0",
38
+ "@nuxt/eslint-config": "^0.5.0",
39
+ "@nuxt/kit": "^3.12.4",
40
+ "@nuxt/schema": "^3.12.4",
41
+ "@types/node": "^20.14.15",
42
+ "@vitest/coverage-v8": "^2.0.5",
43
43
  "changelogen": "^0.5.5",
44
- "eslint": "^9.5.0",
44
+ "eslint": "^9.9.0",
45
45
  "jiti": "^1.21.6",
46
46
  "nuxi": "^3.12.0",
47
- "nuxt": "^3.12.2",
48
- "typescript": "^5.5.2",
49
- "vitest": "^1.6.0",
50
- "vue": "^3.4.31",
51
- "vue-tsc": "^2.0.22"
47
+ "nuxt": "^3.12.4",
48
+ "typescript": "^5.5.4",
49
+ "vitest": "^2.0.5",
50
+ "vue": "^3.4.37",
51
+ "vue-tsc": "^2.0.29"
52
52
  },
53
53
  "resolutions": {
54
- "@nuxt/kit": "^3.12.2",
55
- "@nuxt/schema": "^3.12.2",
56
- "vue": "^3.4.31"
54
+ "@nuxt/kit": "^3.12.4",
55
+ "@nuxt/schema": "^3.12.4",
56
+ "vue": "^3.4.37"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "unbuild",