create-gasket-app 7.3.12 → 7.4.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/lib/internal.d.ts CHANGED
@@ -99,7 +99,7 @@ export function chooseTestPlugins(context: PartialCreateContext, prompt: CreateP
99
99
  export function promptForTestPlugin(
100
100
  prompt: CreatePrompt,
101
101
  message: string,
102
- choices: { name: string; value: string; }[]
102
+ isDefault: boolean
103
103
  ): Promise<string | null>;
104
104
  export function allowExtantOverwriting(context: PartialCreateContext, prompt: CreatePrompt): Promise<void>;
105
105
  export function globalPrompts(params: { context: PartialCreateContext }): Promise<void>;
@@ -62,7 +62,8 @@ async function chooseTestPlugins(context, prompt) {
62
62
  const knownTestPlugins = {
63
63
  unit: {
64
64
  jest: '@gasket/plugin-jest',
65
- mocha: '@gasket/plugin-mocha'
65
+ mocha: '@gasket/plugin-mocha',
66
+ vitest: '@gasket/plugin-vitest'
66
67
  },
67
68
  integration: {
68
69
  cypress: '@gasket/plugin-cypress'
@@ -72,19 +73,33 @@ async function chooseTestPlugins(context, prompt) {
72
73
  const testTypes = ['unit', 'integration'];
73
74
  const testPlugins = [];
74
75
 
76
+ const testPromptOptions = {
77
+ unit: {
78
+ name: 'Vitest',
79
+ plugin: '@gasket/plugin-vitest',
80
+ isDefault: true
81
+ },
82
+ integration: {
83
+ name: 'Cypress',
84
+ plugin: '@gasket/plugin-cypress',
85
+ isDefault: false
86
+ }
87
+ };
88
+
75
89
  if (!('testPlugins' in context)) {
76
90
  for (const type of testTypes) {
77
91
  if (type + 'TestSuite' in context) {
78
92
  const testSuite = knownTestPlugins[type][context[type + 'TestSuite']];
79
93
  if (testSuite) testPlugins.push(testSuite);
80
94
  } else {
95
+ const { name, isDefault, plugin: testPlugin } = testPromptOptions[type];
81
96
  const plugin = await promptForTestPlugin(
82
97
  prompt,
83
- `Choose your ${type} test suite`,
84
- Object.entries(knownTestPlugins[type]).map(([name, value]) => ({ name, value }))
98
+ `Do you want to use ${name} for ${type} testing?`,
99
+ isDefault
85
100
  );
86
101
 
87
- if (plugin) testPlugins.push(plugin);
102
+ if (plugin) testPlugins.push(testPlugin);
88
103
  }
89
104
  }
90
105
 
@@ -98,13 +113,13 @@ async function chooseTestPlugins(context, prompt) {
98
113
  *
99
114
  * @type {import('../../internal.js').promptForTestPlugin}
100
115
  */
101
- async function promptForTestPlugin(prompt, message, choices) {
116
+ async function promptForTestPlugin(prompt, message, isDefault) {
102
117
  const { testPlugin } = await prompt([
103
118
  {
104
119
  name: 'testPlugin',
105
120
  message,
106
- type: 'list',
107
- choices: [{ name: 'none', value: 'none' }, ...choices]
121
+ type: 'confirm',
122
+ default: isDefault
108
123
  }
109
124
  ]);
110
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-gasket-app",
3
- "version": "7.3.12",
3
+ "version": "7.4.0",
4
4
  "description": "starter pack for creating a gasket app",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,16 +31,16 @@
31
31
  "mkdirp": "^1.0.4",
32
32
  "ora": "^3.4.0",
33
33
  "semver": "^7.7.1",
34
- "@gasket/core": "7.4.2",
35
- "@gasket/plugin-command": "7.3.9",
36
- "@gasket/plugin-docs": "7.3.9",
34
+ "@gasket/core": "7.5.0",
35
+ "@gasket/plugin-command": "7.4.0",
36
+ "@gasket/plugin-docs": "7.4.0",
37
37
  "@gasket/plugin-docusaurus": "7.4.2",
38
38
  "@gasket/plugin-dynamic-plugins": "7.3.7",
39
- "@gasket/plugin-git": "7.3.5",
39
+ "@gasket/plugin-git": "7.4.0",
40
40
  "@gasket/plugin-logger": "7.3.4",
41
- "@gasket/plugin-metadata": "7.3.12",
42
- "@gasket/request": "7.3.6",
43
- "@gasket/utils": "7.3.5"
41
+ "@gasket/plugin-metadata": "7.4.0",
42
+ "@gasket/request": "7.4.0",
43
+ "@gasket/utils": "7.4.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@jest/globals": "^29.7.0",
@@ -56,7 +56,7 @@
56
56
  "eslint-plugin-unicorn": "^55.0.0",
57
57
  "jest": "^29.7.0",
58
58
  "typescript": "^5.8.2",
59
- "@gasket/request": "7.3.6"
59
+ "@gasket/request": "7.4.0"
60
60
  },
61
61
  "eslintConfig": {
62
62
  "extends": [