nuxt-spec 0.3.0-alpha.2 → 0.3.0
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/bin/setup.js +9 -9
- package/package.json +4 -4
package/bin/setup.js
CHANGED
|
@@ -40,7 +40,7 @@ export async function specSetup(autoRun = false) {
|
|
|
40
40
|
// add nuxt-spec
|
|
41
41
|
try {
|
|
42
42
|
await updateJsonFile('package.json', 'dependencies', {
|
|
43
|
-
'nuxt-spec': '0.3.0
|
|
43
|
+
'nuxt-spec': '0.3.0',
|
|
44
44
|
}, isAutoRun, 'This will add \'nuxt-spec\' dependency to your \'package.json\'. Continue?')
|
|
45
45
|
} catch (error) {
|
|
46
46
|
console.error('Error adding \'nuxt-spec\' dependency:\n', error.message)
|
|
@@ -110,7 +110,7 @@ export async function specSetup(autoRun = false) {
|
|
|
110
110
|
if (pathExists('pnpm-workspace.yaml')) {
|
|
111
111
|
await updateTextFile('pnpm-workspace.yaml', ['shamefully-hoist: true'], isAutoRun, 'This will adjust \'pnpm-workspace.yaml\' file in your project. Continue?')
|
|
112
112
|
} else {
|
|
113
|
-
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0
|
|
113
|
+
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0/config/templates/pnpm-workspace.yaml.template',
|
|
114
114
|
'pnpm-workspace.yaml', isAutoRun, 'This will add \'pnpm-workspace.yaml\' file for your project. Continue?')
|
|
115
115
|
}
|
|
116
116
|
} catch (error) {
|
|
@@ -120,7 +120,7 @@ export async function specSetup(autoRun = false) {
|
|
|
120
120
|
|
|
121
121
|
// 4) create vitest.config.ts
|
|
122
122
|
try {
|
|
123
|
-
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0
|
|
123
|
+
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0/config/templates/vitest.config.ts.template',
|
|
124
124
|
'vitest.config.ts', isAutoRun, 'This will create a new \'vitest.config.ts\' file for your project. Continue?')
|
|
125
125
|
} catch (error) {
|
|
126
126
|
console.error('Error setting up \'vitest.config.ts\':\n', error.message)
|
|
@@ -129,7 +129,7 @@ export async function specSetup(autoRun = false) {
|
|
|
129
129
|
// 5) create .nuxtrc to prevent @nuxt/test-utils setup from running automatically on first start
|
|
130
130
|
if (!pathExists('.nuxtrc')) {
|
|
131
131
|
try {
|
|
132
|
-
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0
|
|
132
|
+
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0/.nuxtrc', '.nuxtrc', isAutoRun, 'This will create a \'.nuxtrc\' file to prevent @nuxt/test-utils setup from running automatically when dev server starts. Continue?')
|
|
133
133
|
} catch (error) {
|
|
134
134
|
console.error('Error creating \'.nuxtrc\':\n', error.message)
|
|
135
135
|
}
|
|
@@ -150,31 +150,31 @@ export async function specSetup(autoRun = false) {
|
|
|
150
150
|
const createSampleTests = isAutoRun || await promptUser('Do you want to create sample tests in \'/test\' folder?')
|
|
151
151
|
if (createSampleTests) {
|
|
152
152
|
try {
|
|
153
|
-
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0
|
|
153
|
+
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0/test/browser/vitest-browser.test.ts',
|
|
154
154
|
'test/browser/vitest-browser.test.ts', true)
|
|
155
155
|
} catch (error) {
|
|
156
156
|
console.error('Error setting up \'vitest-browser.test.ts\':\n', error.message)
|
|
157
157
|
}
|
|
158
158
|
try {
|
|
159
|
-
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0
|
|
159
|
+
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0/test/e2e/nuxt-e2e.test.ts',
|
|
160
160
|
'test/e2e/nuxt-e2e.test.ts', true)
|
|
161
161
|
} catch (error) {
|
|
162
162
|
console.error('Error setting up \'nuxt-e2e.test.ts\':\n', error.message)
|
|
163
163
|
}
|
|
164
164
|
try {
|
|
165
|
-
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0
|
|
165
|
+
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0/test/e2e/nuxt-visual.test.ts',
|
|
166
166
|
'test/e2e/nuxt-visual.test.ts', true)
|
|
167
167
|
} catch (error) {
|
|
168
168
|
console.error('Error setting up \'nuxt-visual.test.ts\':\n', error.message)
|
|
169
169
|
}
|
|
170
170
|
try {
|
|
171
|
-
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0
|
|
171
|
+
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0/test/nuxt/nuxt-unit.test.ts',
|
|
172
172
|
'test/nuxt/nuxt-unit.test.ts', true)
|
|
173
173
|
} catch (error) {
|
|
174
174
|
console.error('Error setting up \'nuxt-unit.test.ts\':\n', error.message)
|
|
175
175
|
}
|
|
176
176
|
try {
|
|
177
|
-
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0
|
|
177
|
+
await createFileFromWebTemplate('https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v0.3.0/test/unit/vitest-unit.test.ts',
|
|
178
178
|
'test/unit/vitest-unit.test.ts', true)
|
|
179
179
|
} catch (error) {
|
|
180
180
|
console.error('Error setting up \'vitest-unit.test.ts\':\n', error.message)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-spec",
|
|
3
|
-
"version": "0.3.0
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Test-pack layer for Nuxt Applications",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@nuxt/eslint": "~1.16.0",
|
|
56
|
-
"@nuxt/test-utils": "4.0
|
|
56
|
+
"@nuxt/test-utils": "4.1.0",
|
|
57
57
|
"@vitejs/plugin-vue": "~6.0.8",
|
|
58
58
|
"@vitest/browser": "4.1.10",
|
|
59
59
|
"@vitest/browser-playwright": "4.1.10",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"elrh-cosca": "0.3.6",
|
|
63
63
|
"fast-png": "~8.0.0",
|
|
64
64
|
"happy-dom": "~20.11.0",
|
|
65
|
-
"nuxt": "4.5.
|
|
65
|
+
"nuxt": "4.5.1",
|
|
66
66
|
"pixelmatch": "~7.2.0",
|
|
67
|
-
"playwright-core": "~1.
|
|
67
|
+
"playwright-core": "~1.62.0",
|
|
68
68
|
"typescript": "~6.0.3",
|
|
69
69
|
"vitest": "4.1.10",
|
|
70
70
|
"vitest-browser-vue": "2.1.0",
|