nuxt-spec 0.3.1-alpha.1 → 0.3.1-alpha.2

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 CHANGED
@@ -6,9 +6,9 @@ import {
6
6
  pathExists, promptUser, removeFromJsonFile, showMessage,
7
7
  updateConfigFile, updateJsonFile, updateTextFile,
8
8
  } from 'elrh-cosca'
9
- import { getPlaywrightInstallCmd } from './helpers/commands'
9
+ import { getPlaywrightInstallCmd } from './helpers/commands.js'
10
10
 
11
- const TARGET_VERSION = '0.3.1-alpha.1'
11
+ const TARGET_VERSION = '0.3.1-alpha.2'
12
12
 
13
13
  /**
14
14
  * CLI tool to scaffold necessary adjustments in project folder.
@@ -114,7 +114,7 @@ export async function specSetup(autoRun = false) {
114
114
  if (pathExists('pnpm-workspace.yaml')) {
115
115
  await updateTextFile('pnpm-workspace.yaml', ['shamefully-hoist: true'], isAutoRun, 'This will adjust \'pnpm-workspace.yaml\' file in your project. Continue?')
116
116
  } else {
117
- await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/${TARGET_VERSION}/config/templates/pnpm-workspace.yaml.template`,
117
+ await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v${TARGET_VERSION}/config/templates/pnpm-workspace.yaml.template`,
118
118
  'pnpm-workspace.yaml', isAutoRun, 'This will add \'pnpm-workspace.yaml\' file for your project. Continue?')
119
119
  }
120
120
  } catch (error) {
@@ -124,7 +124,7 @@ export async function specSetup(autoRun = false) {
124
124
 
125
125
  // 4) create vitest.config.ts
126
126
  try {
127
- await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/${TARGET_VERSION}/config/templates/vitest.config.ts.template`,
127
+ await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v${TARGET_VERSION}/config/templates/vitest.config.ts.template`,
128
128
  'vitest.config.ts', isAutoRun, 'This will create a new \'vitest.config.ts\' file for your project. Continue?')
129
129
  } catch (error) {
130
130
  console.error('Error setting up \'vitest.config.ts\':\n', error.message)
@@ -133,7 +133,7 @@ export async function specSetup(autoRun = false) {
133
133
  // 5) create .nuxtrc to prevent @nuxt/test-utils setup from running automatically on first start
134
134
  if (!pathExists('.nuxtrc')) {
135
135
  try {
136
- await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/${TARGET_VERSION}/.nuxtrc`, '.nuxtrc', isAutoRun, 'This will create a \'.nuxtrc\' file to prevent @nuxt/test-utils setup from running automatically when dev server starts. Continue?')
136
+ await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v${TARGET_VERSION}/.nuxtrc`, '.nuxtrc', isAutoRun, 'This will create a \'.nuxtrc\' file to prevent @nuxt/test-utils setup from running automatically when dev server starts. Continue?')
137
137
  } catch (error) {
138
138
  console.error('Error creating \'.nuxtrc\':\n', error.message)
139
139
  }
@@ -154,31 +154,31 @@ export async function specSetup(autoRun = false) {
154
154
  const createSampleTests = isAutoRun || await promptUser('Do you want to create sample tests in \'/test\' folder?')
155
155
  if (createSampleTests) {
156
156
  try {
157
- await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/${TARGET_VERSION}/test/browser/vitest-browser.test.ts`,
157
+ await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v${TARGET_VERSION}/test/browser/vitest-browser.test.ts`,
158
158
  'test/browser/vitest-browser.test.ts', true)
159
159
  } catch (error) {
160
160
  console.error('Error setting up \'vitest-browser.test.ts\':\n', error.message)
161
161
  }
162
162
  try {
163
- await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/${TARGET_VERSION}/test/e2e/nuxt-e2e.test.ts`,
163
+ await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v${TARGET_VERSION}/test/e2e/nuxt-e2e.test.ts`,
164
164
  'test/e2e/nuxt-e2e.test.ts', true)
165
165
  } catch (error) {
166
166
  console.error('Error setting up \'nuxt-e2e.test.ts\':\n', error.message)
167
167
  }
168
168
  try {
169
- await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/${TARGET_VERSION}/test/e2e/nuxt-visual.test.ts`,
169
+ await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v${TARGET_VERSION}/test/e2e/nuxt-visual.test.ts`,
170
170
  'test/e2e/nuxt-visual.test.ts', true)
171
171
  } catch (error) {
172
172
  console.error('Error setting up \'nuxt-visual.test.ts\':\n', error.message)
173
173
  }
174
174
  try {
175
- await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/${TARGET_VERSION}/test/nuxt/nuxt-unit.test.ts`,
175
+ await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v${TARGET_VERSION}/test/nuxt/nuxt-unit.test.ts`,
176
176
  'test/nuxt/nuxt-unit.test.ts', true)
177
177
  } catch (error) {
178
178
  console.error('Error setting up \'nuxt-unit.test.ts\':\n', error.message)
179
179
  }
180
180
  try {
181
- await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/${TARGET_VERSION}/test/unit/vitest-unit.test.ts`,
181
+ await createFileFromWebTemplate(`https://raw.githubusercontent.com/AloisSeckar/nuxt-spec/refs/tags/v${TARGET_VERSION}/test/unit/vitest-unit.test.ts`,
182
182
  'test/unit/vitest-unit.test.ts', true)
183
183
  } catch (error) {
184
184
  console.error('Error setting up \'vitest-unit.test.ts\':\n', error.message)
package/bin/update.js CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  import { execSync } from 'node:child_process'
4
4
  import { getPackageManager, hasJsonKey, promptUser, showMessage } from 'elrh-cosca'
5
- import { getPlaywrightInstallCmd, getUpdateCmd } from './helpers/commands'
5
+ import { getPlaywrightInstallCmd, getUpdateCmd } from './helpers/commands.js'
6
6
 
7
- const TARGET_VERSION = '0.3.1-alpha.1'
7
+ const TARGET_VERSION = '0.3.1-alpha.2'
8
8
 
9
9
  /**
10
10
  * CLI tool to update existing `nuxt-spec` installation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-spec",
3
- "version": "0.3.1-alpha.1",
3
+ "version": "0.3.1-alpha.2",
4
4
  "description": "Test-pack layer for Nuxt Applications",
5
5
  "repository": {
6
6
  "type": "git",