@nuxt/module-builder 1.0.0-alpha.0 → 1.0.0-alpha.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/dist/chunks/build.mjs
CHANGED
|
@@ -10,7 +10,8 @@ import { createRegExp, anyOf } from 'magic-regexp';
|
|
|
10
10
|
import { consola } from 'consola';
|
|
11
11
|
import { resolvePath, findExports } from 'mlly';
|
|
12
12
|
import { defineCommand } from 'citty';
|
|
13
|
-
import {
|
|
13
|
+
import { convertCompilerOptionsFromJson } from 'typescript';
|
|
14
|
+
import { n as name, v as version } from '../shared/module-builder.D3Pp640p.mjs';
|
|
14
15
|
|
|
15
16
|
const build = defineCommand({
|
|
16
17
|
meta: {
|
|
@@ -54,6 +55,13 @@ const build = defineCommand({
|
|
|
54
55
|
outDir: `${outDir}/runtime`,
|
|
55
56
|
addRelativeDeclarationExtensions: true,
|
|
56
57
|
ext: "js",
|
|
58
|
+
pattern: [
|
|
59
|
+
"**",
|
|
60
|
+
"!**/*.stories.{js,cts,mts,ts,jsx,tsx}",
|
|
61
|
+
// ignore storybook files
|
|
62
|
+
"!**/*.{spec,test}.{js,cts,mts,ts,jsx,tsx}"
|
|
63
|
+
// ignore tests
|
|
64
|
+
],
|
|
57
65
|
esbuild: {
|
|
58
66
|
jsxImportSource: "vue",
|
|
59
67
|
jsx: "automatic",
|
|
@@ -76,6 +84,8 @@ const build = defineCommand({
|
|
|
76
84
|
"@nuxt/kit",
|
|
77
85
|
"@nuxt/kit-nightly",
|
|
78
86
|
"@nuxt/kit-edge",
|
|
87
|
+
"#app",
|
|
88
|
+
"#app/nuxt",
|
|
79
89
|
"nuxt",
|
|
80
90
|
"nuxt-nightly",
|
|
81
91
|
"nuxt-edge",
|
|
@@ -90,11 +100,19 @@ const build = defineCommand({
|
|
|
90
100
|
});
|
|
91
101
|
},
|
|
92
102
|
async "rollup:options"(ctx, options) {
|
|
103
|
+
const [entry] = ctx.buildEntries;
|
|
104
|
+
const mergedCompilerOptions = defu({
|
|
105
|
+
noEmit: false,
|
|
106
|
+
paths: {
|
|
107
|
+
"#app/nuxt": ["./node_modules/nuxt/dist/app/nuxt"]
|
|
108
|
+
}
|
|
109
|
+
}, ctx.options.rollup.dts.compilerOptions, await loadTSCompilerOptions(entry.path));
|
|
110
|
+
ctx.options.rollup.dts.compilerOptions = convertCompilerOptionsFromJson(mergedCompilerOptions, entry.path).options;
|
|
93
111
|
options.plugins ||= [];
|
|
94
112
|
if (!Array.isArray(options.plugins))
|
|
95
113
|
options.plugins = [options.plugins];
|
|
96
|
-
const runtimeEntries = ctx.options.entries.filter((
|
|
97
|
-
const runtimeDirs = runtimeEntries.map((
|
|
114
|
+
const runtimeEntries = ctx.options.entries.filter((entry2) => entry2.builder === "mkdist");
|
|
115
|
+
const runtimeDirs = runtimeEntries.map((entry2) => basename(entry2.input));
|
|
98
116
|
const RUNTIME_RE = createRegExp(anyOf(...runtimeDirs).and(anyOf("/", "\\")));
|
|
99
117
|
options.plugins.unshift({
|
|
100
118
|
name: "nuxt-module-builder:runtime-externals",
|
|
@@ -105,10 +123,10 @@ const build = defineCommand({
|
|
|
105
123
|
if (!resolved)
|
|
106
124
|
return;
|
|
107
125
|
const normalizedId = normalize(resolved.id);
|
|
108
|
-
for (const
|
|
109
|
-
if (!normalizedId.includes(
|
|
126
|
+
for (const entry2 of runtimeEntries) {
|
|
127
|
+
if (!normalizedId.includes(entry2.input))
|
|
110
128
|
continue;
|
|
111
|
-
const distFile = await resolvePath(join(dirname(pathToFileURL(normalizedId).href.replace(
|
|
129
|
+
const distFile = await resolvePath(join(dirname(pathToFileURL(normalizedId).href.replace(entry2.input, entry2.outDir)), filename(normalizedId)));
|
|
112
130
|
if (distFile) {
|
|
113
131
|
return {
|
|
114
132
|
external: true,
|
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.
|
|
4
|
+
import { n as name, d as description, v as version } from './shared/module-builder.D3Pp640p.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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/module-builder",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.1",
|
|
4
4
|
"repository": "nuxt/module-builder",
|
|
5
5
|
"description": "Complete solution for building Nuxt modules",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,52 +19,52 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"dist"
|
|
21
21
|
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "unbuild",
|
|
24
|
-
"dev:prepare": "pnpm -r dev:prepare",
|
|
25
|
-
"example:build": "pnpm nuxt-module-build build ./example",
|
|
26
|
-
"lint": "eslint .",
|
|
27
|
-
"nuxt-module-build": "JITI_ESM_RESOLVE=1 jiti ./src/cli.ts",
|
|
28
|
-
"prepack": "pnpm build",
|
|
29
|
-
"release": "pnpm vitest run && pnpm build && changelogen --release && pnpm publish && git push --follow-tags",
|
|
30
|
-
"test": "pnpm vitest --coverage",
|
|
31
|
-
"test:types": "vue-tsc --noEmit && pnpm -r test:types"
|
|
32
|
-
},
|
|
33
|
-
"packageManager": "pnpm@9.15.0",
|
|
34
22
|
"dependencies": {
|
|
35
23
|
"citty": "^0.1.6",
|
|
36
|
-
"consola": "^3.
|
|
24
|
+
"consola": "^3.3.3",
|
|
37
25
|
"defu": "^6.1.4",
|
|
38
|
-
"jiti": "^2.4.
|
|
26
|
+
"jiti": "^2.4.2",
|
|
39
27
|
"magic-regexp": "^0.8.0",
|
|
40
28
|
"mlly": "^1.7.3",
|
|
41
|
-
"pathe": "^
|
|
42
|
-
"pkg-types": "^1.
|
|
29
|
+
"pathe": "^2.0.0",
|
|
30
|
+
"pkg-types": "^1.3.0",
|
|
43
31
|
"tsconfck": "^3.1.4",
|
|
44
|
-
"unbuild": "^3.
|
|
32
|
+
"unbuild": "^3.2.0"
|
|
45
33
|
},
|
|
46
34
|
"peerDependencies": {
|
|
47
|
-
"nuxi": "^3.
|
|
35
|
+
"nuxi": "^3.18.2",
|
|
36
|
+
"typescript": "^5.7.2"
|
|
48
37
|
},
|
|
49
38
|
"devDependencies": {
|
|
50
|
-
"@nuxt/eslint-config": "^0.7.
|
|
51
|
-
"@nuxt/schema": "^3.
|
|
52
|
-
"@types/node": "^22.10.
|
|
39
|
+
"@nuxt/eslint-config": "^0.7.4",
|
|
40
|
+
"@nuxt/schema": "^3.15.1",
|
|
41
|
+
"@types/node": "^22.10.5",
|
|
53
42
|
"@vitest/coverage-v8": "^2.1.8",
|
|
54
43
|
"changelogen": "^0.5.7",
|
|
55
|
-
"eslint": "^9.
|
|
56
|
-
"nuxi": "^3.
|
|
57
|
-
"nuxt": "^3.
|
|
58
|
-
"tinyexec": "^0.3.
|
|
59
|
-
"typescript": "~5.
|
|
44
|
+
"eslint": "^9.17.0",
|
|
45
|
+
"nuxi": "^3.18.2",
|
|
46
|
+
"nuxt": "^3.15.1",
|
|
47
|
+
"tinyexec": "^0.3.2",
|
|
48
|
+
"typescript": "~5.7.2",
|
|
60
49
|
"vitest": "^2.1.8",
|
|
61
50
|
"vue": "^3.5.13",
|
|
62
|
-
"vue-tsc": "^2.
|
|
51
|
+
"vue-tsc": "^2.2.0"
|
|
63
52
|
},
|
|
64
53
|
"resolutions": {
|
|
65
|
-
"@nuxt/kit": "^3.
|
|
66
|
-
"@nuxt/schema": "^3.
|
|
67
|
-
"typescript": "
|
|
68
|
-
"vue": "^3.5.13"
|
|
54
|
+
"@nuxt/kit": "^3.15.1",
|
|
55
|
+
"@nuxt/schema": "^3.15.1",
|
|
56
|
+
"typescript": "^5.7.2",
|
|
57
|
+
"vue": "^3.5.13",
|
|
58
|
+
"vue-tsc": "^2.2.0"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "unbuild",
|
|
62
|
+
"dev:prepare": "pnpm -r dev:prepare",
|
|
63
|
+
"example:build": "pnpm nuxt-module-build build ./example",
|
|
64
|
+
"lint": "eslint .",
|
|
65
|
+
"nuxt-module-build": "JITI_ESM_RESOLVE=1 jiti ./src/cli.ts",
|
|
66
|
+
"release": "pnpm vitest run && pnpm build && changelogen --release && pnpm publish && git push --follow-tags",
|
|
67
|
+
"test": "pnpm vitest --coverage",
|
|
68
|
+
"test:types": "vue-tsc --noEmit && pnpm -r test:types"
|
|
69
69
|
}
|
|
70
|
-
}
|
|
70
|
+
}
|