nuxt-spec 0.2.4-alpha.4 → 0.3.0-alpha
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/LICENSE +21 -21
- package/README.md +13 -417
- package/app/app.vue +10 -10
- package/app/components/NuxtSpecApiTestComponent.vue +24 -24
- package/app/components/NuxtSpecTestComponent.vue +9 -9
- package/app/components/index.d.ts +7 -7
- package/app/components/index.ts +2 -2
- package/app/utils/vitest-utils.ts +5 -5
- package/bin/cli.js +54 -53
- package/bin/prepublish-check.js +16 -16
- package/bin/setup.js +251 -251
- package/config/index.d.ts +33 -17
- package/config/index.mjs +114 -95
- package/config/templates/pnpm-workspace.yaml.template +4 -4
- package/config/templates/vitest.config.ts.template +5 -5
- package/config/utils/merge.mjs +43 -43
- package/config/utils/warnings.mjs +33 -33
- package/nuxt.config.ts +19 -19
- package/package.json +18 -16
- package/utils/e2e.ts +131 -30
- package/utils/helpers/check-params.ts +41 -0
- package/utils/helpers/location-hint.ts +30 -0
- package/utils/index.ts +12 -12
- package/utils/screenshot/report-entry.html +8 -8
- package/utils/screenshot/report-head.html +24 -24
- package/utils/screenshot/report-tail.html +4 -4
- package/utils/screenshot/report-utils.ts +236 -216
- package/utils/screenshot.ts +172 -104
- package/utils/index.d.ts +0 -70
package/config/index.d.ts
CHANGED
|
@@ -1,17 +1,33 @@
|
|
|
1
|
-
import type { UserConfig } from 'vite'
|
|
2
|
-
import type { TestUserConfig } from 'vitest/config'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import type { UserConfig } from 'vite'
|
|
2
|
+
import type { TestUserConfig } from 'vitest/config'
|
|
3
|
+
|
|
4
|
+
/** Typed Vite configuration object for tests */
|
|
5
|
+
type ExtendedUserConfig = UserConfig & {
|
|
6
|
+
test?: TestUserConfig
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Allows fine-grained control over default Vitest `projects`.
|
|
11
|
+
*
|
|
12
|
+
* By default, everything is included.
|
|
13
|
+
* If set to `false`, `test.projects` key is not merged at all.
|
|
14
|
+
* If set to object, specific projects can be omitted by setting respective key to `false`.
|
|
15
|
+
*/
|
|
16
|
+
type ProjectsConfig = boolean | {
|
|
17
|
+
default?: boolean
|
|
18
|
+
node?: boolean
|
|
19
|
+
nuxt?: boolean
|
|
20
|
+
e2e?: boolean
|
|
21
|
+
browser?: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Prepare Vitest configuration object - user config merged with nuxt-spec defaults
|
|
26
|
+
* @param userVitestConfig - custom Vitest config passed from the user
|
|
27
|
+
* @param projects - allows fine-grained control over default `test.projects` - see `ProjectsConfig` for details
|
|
28
|
+
* @returns Promise resolving to defu-merged Vitest configuration
|
|
29
|
+
*/
|
|
30
|
+
export declare function loadVitestConfig(
|
|
31
|
+
userVitestConfig: ExtendedUserConfig,
|
|
32
|
+
projects?: ProjectsConfig,
|
|
33
|
+
): Promise<ExtendedUserConfig>
|
package/config/index.mjs
CHANGED
|
@@ -1,95 +1,114 @@
|
|
|
1
|
-
// this is the default Vitest config object
|
|
2
|
-
// based on https://nuxt.com/docs/4.x/getting-started/testing#setup
|
|
3
|
-
// `projects=false` can be used to suspend the default usage of "projects" in Vitest config
|
|
4
|
-
|
|
5
|
-
import { availableParallelism } from 'node:os'
|
|
6
|
-
import { fileURLToPath } from 'node:url'
|
|
7
|
-
import { onConsoleLog } from './utils/warnings.mjs' // filter out unnecessary logs
|
|
8
|
-
import { mergeConfig } from './utils/merge.mjs' // defu-based merge function
|
|
9
|
-
import { defineConfig } from 'vitest/config'
|
|
10
|
-
import { defineVitestProject } from '@nuxt/test-utils/config'
|
|
11
|
-
import { playwright } from '@vitest/browser-playwright'
|
|
12
|
-
import vue from '@vitejs/plugin-vue'
|
|
13
|
-
|
|
14
|
-
// absolute path so it works from nuxt-ignis package
|
|
15
|
-
const screenshotReportSetup = fileURLToPath(new URL('../utils/screenshot.ts', import.meta.url))
|
|
16
|
-
|
|
17
|
-
export async function loadVitestConfig(userVitestConfig, projects = true) {
|
|
18
|
-
const baseConfig = {
|
|
19
|
-
test: {
|
|
20
|
-
// filter-out unnecessary console logs coming from Vitest
|
|
21
|
-
// when the import is resolved, unnecessary stderr logs are also filtered-out
|
|
22
|
-
// as a side-effect
|
|
23
|
-
onConsoleLog,
|
|
24
|
-
// Vitest defaults to 5 which might be unnecessarily restrictive
|
|
25
|
-
// if the host machine can support more
|
|
26
|
-
maxConcurrency: availableParallelism() / 2,
|
|
27
|
-
},
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
1
|
+
// this is the default Vitest config object
|
|
2
|
+
// based on https://nuxt.com/docs/4.x/getting-started/testing#setup
|
|
3
|
+
// `projects=false` can be used to suspend the default usage of "projects" in Vitest config
|
|
4
|
+
|
|
5
|
+
import { availableParallelism } from 'node:os'
|
|
6
|
+
import { fileURLToPath } from 'node:url'
|
|
7
|
+
import { onConsoleLog } from './utils/warnings.mjs' // filter out unnecessary logs
|
|
8
|
+
import { mergeConfig } from './utils/merge.mjs' // defu-based merge function
|
|
9
|
+
import { defineConfig } from 'vitest/config'
|
|
10
|
+
import { defineVitestProject } from '@nuxt/test-utils/config'
|
|
11
|
+
import { playwright } from '@vitest/browser-playwright'
|
|
12
|
+
import vue from '@vitejs/plugin-vue'
|
|
13
|
+
|
|
14
|
+
// absolute path so it works from nuxt-ignis package
|
|
15
|
+
const screenshotReportSetup = fileURLToPath(new URL('../utils/screenshot.ts', import.meta.url))
|
|
16
|
+
|
|
17
|
+
export async function loadVitestConfig(userVitestConfig, projects = true) {
|
|
18
|
+
const baseConfig = {
|
|
19
|
+
test: {
|
|
20
|
+
// filter-out unnecessary console logs coming from Vitest
|
|
21
|
+
// when the import is resolved, unnecessary stderr logs are also filtered-out
|
|
22
|
+
// as a side-effect
|
|
23
|
+
onConsoleLog,
|
|
24
|
+
// Vitest defaults to 5 which might be unnecessarily restrictive
|
|
25
|
+
// if the host machine can support more
|
|
26
|
+
maxConcurrency: availableParallelism() / 2,
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// add proposed projects settings
|
|
31
|
+
// user can control the inclusion via `projects: ProjectsConfig` config object
|
|
32
|
+
// projects are included by default unless not explicitly disabled
|
|
33
|
+
if (projects !== false) {
|
|
34
|
+
baseConfig.test.projects = []
|
|
35
|
+
|
|
36
|
+
// default fallback to catch tests directly in /test folder
|
|
37
|
+
if (projects.default !== false) {
|
|
38
|
+
baseConfig.test.projects.push({
|
|
39
|
+
extends: true,
|
|
40
|
+
test: {
|
|
41
|
+
name: 'default',
|
|
42
|
+
include: ['{test,tests}/**/*.{test,spec}.ts', '!test/{browser,e2e,nuxt,unit}/**'],
|
|
43
|
+
environment: 'node',
|
|
44
|
+
},
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// proposed setup for Unit tests
|
|
49
|
+
if (projects.node !== false) {
|
|
50
|
+
baseConfig.test.projects.push({
|
|
51
|
+
extends: true,
|
|
52
|
+
test: {
|
|
53
|
+
name: 'node',
|
|
54
|
+
include: ['test/unit/**/*.{test,spec}.ts'],
|
|
55
|
+
environment: 'node',
|
|
56
|
+
},
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// proposed setup for Nuxt component tests
|
|
61
|
+
if (projects.nuxt !== false) {
|
|
62
|
+
baseConfig.test.projects.push(
|
|
63
|
+
await defineVitestProject({
|
|
64
|
+
extends: true,
|
|
65
|
+
test: {
|
|
66
|
+
name: 'nuxt',
|
|
67
|
+
include: ['test/nuxt/**/*.{test,spec}.ts'],
|
|
68
|
+
environment: 'nuxt',
|
|
69
|
+
},
|
|
70
|
+
}),
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// proposed setup for classic E2E tests (node-based, using @nuxt/test-utils)
|
|
75
|
+
if (projects.e2e !== false) {
|
|
76
|
+
baseConfig.test.projects.push({
|
|
77
|
+
extends: true,
|
|
78
|
+
test: {
|
|
79
|
+
name: 'e2e',
|
|
80
|
+
include: ['test/e2e/**/*.{test,spec}.ts'],
|
|
81
|
+
environment: 'node',
|
|
82
|
+
// create report file for visual regression testing
|
|
83
|
+
globalSetup: [screenshotReportSetup],
|
|
84
|
+
},
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// proposed setup for browser component tests (with Playwright runner)
|
|
89
|
+
if (projects.browser !== false) {
|
|
90
|
+
baseConfig.test.projects.push({
|
|
91
|
+
extends: true,
|
|
92
|
+
// vue plugin is required for proper imports resolution
|
|
93
|
+
plugins: [vue()],
|
|
94
|
+
test: {
|
|
95
|
+
name: 'browser',
|
|
96
|
+
include: ['test/browser/**/*.{test,spec}.ts'],
|
|
97
|
+
environment: 'node',
|
|
98
|
+
// only chromium browser - add others manually if needed
|
|
99
|
+
browser: {
|
|
100
|
+
provider: playwright(),
|
|
101
|
+
enabled: true,
|
|
102
|
+
headless: true,
|
|
103
|
+
instances: [{
|
|
104
|
+
browser: 'chromium',
|
|
105
|
+
viewport: { width: 1280, height: 720 },
|
|
106
|
+
}],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return mergeConfig(userVitestConfig, defineConfig(baseConfig))
|
|
114
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# settings for Nuxt & pnpm
|
|
2
|
-
|
|
3
|
-
# https://pnpm.io/settings#shamefullyhoist
|
|
4
|
-
shamefullyHoist: true
|
|
1
|
+
# settings for Nuxt & pnpm
|
|
2
|
+
|
|
3
|
+
# https://pnpm.io/settings#shamefullyhoist
|
|
4
|
+
shamefullyHoist: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadVitestConfig } from 'nuxt-spec/config'
|
|
2
|
-
|
|
3
|
-
export default loadVitestConfig({
|
|
4
|
-
// custom config here
|
|
5
|
-
})
|
|
1
|
+
import { loadVitestConfig } from 'nuxt-spec/config'
|
|
2
|
+
|
|
3
|
+
export default loadVitestConfig({
|
|
4
|
+
// custom config here
|
|
5
|
+
})
|
package/config/utils/merge.mjs
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
// custom merger function based on defu
|
|
2
|
-
// allows working with the "projects" array properly
|
|
3
|
-
// user-defined config overrides are merged by "name"
|
|
4
|
-
|
|
5
|
-
// for consistent and predictable results, passing "include" or "browser.instances"
|
|
6
|
-
// will result in OVERRIDE instead of merging with nuxt-spec defaults
|
|
7
|
-
|
|
8
|
-
import { createDefu } from 'defu'
|
|
9
|
-
|
|
10
|
-
// in real Vitest config, "name" is nested inside another "test" object
|
|
11
|
-
const getProjectName = project => project?.name ?? project?.test?.name
|
|
12
|
-
|
|
13
|
-
export const mergeConfig = createDefu((obj, key, value) => {
|
|
14
|
-
if (key === 'projects' && Array.isArray(obj[key]) && Array.isArray(value)) {
|
|
15
|
-
const defaults = obj[key]
|
|
16
|
-
const overrides = value
|
|
17
|
-
|
|
18
|
-
// override default values if user-defined config specifies them
|
|
19
|
-
obj[key] = defaults.map((defaultProject) => {
|
|
20
|
-
const override = overrides.find(o => getProjectName(o) === getProjectName(defaultProject))
|
|
21
|
-
return override ? mergeProject(override, defaultProject) : defaultProject
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
// add any user projects that don't exist in defaults
|
|
25
|
-
for (const override of overrides) {
|
|
26
|
-
if (!defaults.some(d => getProjectName(d) === getProjectName(override))) {
|
|
27
|
-
obj[key].push(override)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return true
|
|
32
|
-
}
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
// Keys where user value should fully replace the default, not merge
|
|
36
|
-
const overrideKeys = new Set(['include', 'instances'])
|
|
37
|
-
|
|
38
|
-
const mergeProject = createDefu((obj, key, value) => {
|
|
39
|
-
if (overrideKeys.has(key)) {
|
|
40
|
-
obj[key] = value
|
|
41
|
-
return true
|
|
42
|
-
}
|
|
43
|
-
})
|
|
1
|
+
// custom merger function based on defu
|
|
2
|
+
// allows working with the "projects" array properly
|
|
3
|
+
// user-defined config overrides are merged by "name"
|
|
4
|
+
|
|
5
|
+
// for consistent and predictable results, passing "include" or "browser.instances"
|
|
6
|
+
// will result in OVERRIDE instead of merging with nuxt-spec defaults
|
|
7
|
+
|
|
8
|
+
import { createDefu } from 'defu'
|
|
9
|
+
|
|
10
|
+
// in real Vitest config, "name" is nested inside another "test" object
|
|
11
|
+
const getProjectName = project => project?.name ?? project?.test?.name
|
|
12
|
+
|
|
13
|
+
export const mergeConfig = createDefu((obj, key, value) => {
|
|
14
|
+
if (key === 'projects' && Array.isArray(obj[key]) && Array.isArray(value)) {
|
|
15
|
+
const defaults = obj[key]
|
|
16
|
+
const overrides = value
|
|
17
|
+
|
|
18
|
+
// override default values if user-defined config specifies them
|
|
19
|
+
obj[key] = defaults.map((defaultProject) => {
|
|
20
|
+
const override = overrides.find(o => getProjectName(o) === getProjectName(defaultProject))
|
|
21
|
+
return override ? mergeProject(override, defaultProject) : defaultProject
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
// add any user projects that don't exist in defaults
|
|
25
|
+
for (const override of overrides) {
|
|
26
|
+
if (!defaults.some(d => getProjectName(d) === getProjectName(override))) {
|
|
27
|
+
obj[key].push(override)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return true
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
// Keys where user value should fully replace the default, not merge
|
|
36
|
+
const overrideKeys = new Set(['include', 'instances'])
|
|
37
|
+
|
|
38
|
+
const mergeProject = createDefu((obj, key, value) => {
|
|
39
|
+
if (overrideKeys.has(key)) {
|
|
40
|
+
obj[key] = value
|
|
41
|
+
return true
|
|
42
|
+
}
|
|
43
|
+
})
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
const messageFilters = [
|
|
2
|
-
// Node+Windows false positive
|
|
3
|
-
// https://github.com/nuxt/icon/issues/140
|
|
4
|
-
'Use of deprecated trailing slash pattern mapping',
|
|
5
|
-
// remove once Vue stops considering <Suspense> experimental
|
|
6
|
-
'<Suspense> is an experimental feature',
|
|
7
|
-
// merge defaults with user-defined filters from NUXT_SPEC_MESSAGE_FILTERS env variable
|
|
8
|
-
...(process.env.NUXT_SPEC_MESSAGE_FILTERS
|
|
9
|
-
? process.env.NUXT_SPEC_MESSAGE_FILTERS.split(',')
|
|
10
|
-
: []),
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
// 1) filter-out unnecessary stderr/stdout logs coming from Vitest
|
|
14
|
-
// (applied as side-effect on import)
|
|
15
|
-
|
|
16
|
-
const _stderrWrite = process.stderr.write.bind(process.stderr)
|
|
17
|
-
process.stderr.write = (chunk, ...args) => {
|
|
18
|
-
if (typeof chunk === 'string' && messageFilters.some(f => chunk.includes(f))) return true
|
|
19
|
-
return _stderrWrite(chunk, ...args)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const _stdoutWrite = process.stdout.write.bind(process.stdout)
|
|
23
|
-
process.stdout.write = (chunk, ...args) => {
|
|
24
|
-
if (typeof chunk === 'string' && messageFilters.some(f => chunk.includes(f))) return true
|
|
25
|
-
return _stdoutWrite(chunk, ...args)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// 2) filter-out unnecessary console logs coming from Vitest
|
|
29
|
-
// (used as Vitest onConsoleLog hook)
|
|
30
|
-
|
|
31
|
-
export function onConsoleLog(log) {
|
|
32
|
-
if (messageFilters.some(f => log.includes(f))) return false
|
|
33
|
-
}
|
|
1
|
+
const messageFilters = [
|
|
2
|
+
// Node+Windows false positive
|
|
3
|
+
// https://github.com/nuxt/icon/issues/140
|
|
4
|
+
'Use of deprecated trailing slash pattern mapping',
|
|
5
|
+
// remove once Vue stops considering <Suspense> experimental
|
|
6
|
+
'<Suspense> is an experimental feature',
|
|
7
|
+
// merge defaults with user-defined filters from NUXT_SPEC_MESSAGE_FILTERS env variable
|
|
8
|
+
...(process.env.NUXT_SPEC_MESSAGE_FILTERS
|
|
9
|
+
? process.env.NUXT_SPEC_MESSAGE_FILTERS.split(',')
|
|
10
|
+
: []),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
// 1) filter-out unnecessary stderr/stdout logs coming from Vitest
|
|
14
|
+
// (applied as side-effect on import)
|
|
15
|
+
|
|
16
|
+
const _stderrWrite = process.stderr.write.bind(process.stderr)
|
|
17
|
+
process.stderr.write = (chunk, ...args) => {
|
|
18
|
+
if (typeof chunk === 'string' && messageFilters.some(f => chunk.includes(f))) return true
|
|
19
|
+
return _stderrWrite(chunk, ...args)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const _stdoutWrite = process.stdout.write.bind(process.stdout)
|
|
23
|
+
process.stdout.write = (chunk, ...args) => {
|
|
24
|
+
if (typeof chunk === 'string' && messageFilters.some(f => chunk.includes(f))) return true
|
|
25
|
+
return _stdoutWrite(chunk, ...args)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 2) filter-out unnecessary console logs coming from Vitest
|
|
29
|
+
// (used as Vitest onConsoleLog hook)
|
|
30
|
+
|
|
31
|
+
export function onConsoleLog(log) {
|
|
32
|
+
if (messageFilters.some(f => log.includes(f))) return false
|
|
33
|
+
}
|
package/nuxt.config.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export default defineNuxtConfig({
|
|
2
|
-
modules: [
|
|
3
|
-
'@nuxt/eslint',
|
|
4
|
-
'@nuxt/test-utils/module',
|
|
5
|
-
],
|
|
6
|
-
|
|
7
|
-
// exclude file used for explicit exports (nuxt-spec/components) from Nuxt resolution
|
|
8
|
-
components: {
|
|
9
|
-
dirs: [{ path: '~/components', ignore: ['index.ts'] }],
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
compatibilityDate: '2026-06-01',
|
|
13
|
-
|
|
14
|
-
eslint: {
|
|
15
|
-
config: {
|
|
16
|
-
stylistic: true,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
})
|
|
1
|
+
export default defineNuxtConfig({
|
|
2
|
+
modules: [
|
|
3
|
+
'@nuxt/eslint',
|
|
4
|
+
'@nuxt/test-utils/module',
|
|
5
|
+
],
|
|
6
|
+
|
|
7
|
+
// exclude file used for explicit exports (nuxt-spec/components) from Nuxt resolution
|
|
8
|
+
components: {
|
|
9
|
+
dirs: [{ path: '~/components', ignore: ['index.ts'] }],
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
compatibilityDate: '2026-06-01',
|
|
13
|
+
|
|
14
|
+
eslint: {
|
|
15
|
+
config: {
|
|
16
|
+
stylistic: true,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-spec",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-alpha",
|
|
4
4
|
"description": "Test-pack layer for Nuxt Applications",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,6 +9,20 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"main": "./nuxt.config.ts",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"analyze": "nuxt analyze",
|
|
14
|
+
"eslint": "eslint .",
|
|
15
|
+
"typecheck": "nuxi typecheck",
|
|
16
|
+
"build": "nuxt build",
|
|
17
|
+
"dev": "nuxt dev",
|
|
18
|
+
"generate": "nuxt generate",
|
|
19
|
+
"prepublishOnly": "node bin/prepublish-check.js",
|
|
20
|
+
"preview": "nuxt preview",
|
|
21
|
+
"start": "nuxt start",
|
|
22
|
+
"test": "vitest run",
|
|
23
|
+
"test-u": "vitest run -u",
|
|
24
|
+
"test-i": "vitest"
|
|
25
|
+
},
|
|
12
26
|
"bin": {
|
|
13
27
|
"nuxt-spec": "bin/cli.js"
|
|
14
28
|
},
|
|
@@ -20,7 +34,7 @@
|
|
|
20
34
|
"default": "./config/index.mjs"
|
|
21
35
|
},
|
|
22
36
|
"./utils": {
|
|
23
|
-
"types": "./utils/index.
|
|
37
|
+
"types": "./utils/index.ts",
|
|
24
38
|
"import": "./utils/index.ts",
|
|
25
39
|
"default": "./utils/index.ts"
|
|
26
40
|
},
|
|
@@ -58,17 +72,5 @@
|
|
|
58
72
|
"vue-router": "~5.1.0",
|
|
59
73
|
"vue-tsc": "~3.3.6"
|
|
60
74
|
},
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
"eslint": "eslint .",
|
|
64
|
-
"typecheck": "nuxi typecheck",
|
|
65
|
-
"build": "pnpm test && nuxt build",
|
|
66
|
-
"dev": "nuxt dev",
|
|
67
|
-
"generate": "nuxt generate",
|
|
68
|
-
"preview": "nuxt preview",
|
|
69
|
-
"start": "nuxt start",
|
|
70
|
-
"test": "vitest run",
|
|
71
|
-
"test-u": "vitest run -u",
|
|
72
|
-
"test-i": "vitest"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
+
"packageManager": "pnpm@11.9.0"
|
|
76
|
+
}
|