create-typescript-app 2.73.0 → 2.74.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/blocks/blockVitest.mjs +38 -21
- package/package.json +6 -6
|
@@ -30,6 +30,15 @@ const zTest = z.object({
|
|
|
30
30
|
environment: zEnvironment,
|
|
31
31
|
exclude: zExclude
|
|
32
32
|
}).partial();
|
|
33
|
+
const testFrameworkMigrations = [{
|
|
34
|
+
name: "Jest",
|
|
35
|
+
packageName: "jest",
|
|
36
|
+
url: "https://vitest.dev/guide/migration/jest"
|
|
37
|
+
}, {
|
|
38
|
+
name: "Mocha",
|
|
39
|
+
packageName: "mocha",
|
|
40
|
+
url: "https://vitest.dev/guide/migration/mocha"
|
|
41
|
+
}];
|
|
33
42
|
function intakeFromConfig(files) {
|
|
34
43
|
const rawData = intakeFileDefineConfig(files, ["vitest.config.ts"]);
|
|
35
44
|
if (typeof rawData?.test !== "object") return;
|
|
@@ -187,27 +196,35 @@ export default defineConfig({
|
|
|
187
196
|
`) }
|
|
188
197
|
};
|
|
189
198
|
},
|
|
190
|
-
transition() {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
199
|
+
transition({ options }) {
|
|
200
|
+
const existingDependencies = {
|
|
201
|
+
...options.packageData?.dependencies,
|
|
202
|
+
...options.packageData?.devDependencies
|
|
203
|
+
};
|
|
204
|
+
const suggestions = testFrameworkMigrations.filter(({ packageName }) => packageName in existingDependencies).map(({ name, url }) => [`- manually migrate your ${name} tests to Vitest:`, ` ${url}`].join("\n"));
|
|
205
|
+
return {
|
|
206
|
+
addons: [
|
|
207
|
+
blockGitignore({ removals: [
|
|
208
|
+
"/coverage*",
|
|
209
|
+
"coverage*/",
|
|
210
|
+
"coverage/"
|
|
211
|
+
] }),
|
|
212
|
+
blockRemoveDependencies({ dependencies: [
|
|
213
|
+
"@vitest/coverage-istanbul",
|
|
214
|
+
"eslint-plugin-jest",
|
|
215
|
+
"eslint-plugin-mocha",
|
|
216
|
+
"eslint-plugin-vitest",
|
|
217
|
+
"jest mocha"
|
|
218
|
+
] }),
|
|
219
|
+
blockRemoveFiles({ files: [
|
|
220
|
+
".mocha*",
|
|
221
|
+
"jest.config.*",
|
|
222
|
+
"vitest.config.{c,j,m}*"
|
|
223
|
+
] }),
|
|
224
|
+
blockRemoveWorkflows({ workflows: ["test"] })
|
|
225
|
+
],
|
|
226
|
+
suggestions: suggestions.length ? suggestions : void 0
|
|
227
|
+
};
|
|
211
228
|
}
|
|
212
229
|
});
|
|
213
230
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-typescript-app",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.74.1",
|
|
4
4
|
"description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"all-contributors-types": "^0.1.0",
|
|
39
39
|
"bingo": "^0.13.1",
|
|
40
40
|
"bingo-fs": "^0.6.0",
|
|
41
|
-
"bingo-stratum": "^0.
|
|
41
|
+
"bingo-stratum": "^0.8.0",
|
|
42
42
|
"cached-factory": "^0.3.0",
|
|
43
43
|
"cspell-populate-words": "0.3.1",
|
|
44
44
|
"execa": "^10.0.1",
|
|
@@ -87,10 +87,10 @@
|
|
|
87
87
|
"bingo-requests": "0.5.6",
|
|
88
88
|
"bingo-stratum-testers": "0.5.14",
|
|
89
89
|
"bingo-testers": "0.8.0",
|
|
90
|
-
"console-fail-test": "0.
|
|
90
|
+
"console-fail-test": "0.10.0",
|
|
91
91
|
"cspell": "10.3.3",
|
|
92
92
|
"eslint": "10.12.0",
|
|
93
|
-
"eslint-plugin-jsdoc": "65.0
|
|
93
|
+
"eslint-plugin-jsdoc": "65.1.0",
|
|
94
94
|
"eslint-plugin-jsonc": "3.4.1",
|
|
95
95
|
"eslint-plugin-markdown-links": "0.9.1",
|
|
96
96
|
"eslint-plugin-n": "18.4.0",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"eslint-plugin-regexp": "3.3.1",
|
|
100
100
|
"eslint-plugin-yml": "3.8.1",
|
|
101
101
|
"husky": "9.1.7",
|
|
102
|
-
"knip": "6.
|
|
102
|
+
"knip": "6.40.0",
|
|
103
103
|
"lint-staged": "17.6.0",
|
|
104
104
|
"prettier-plugin-curly": "0.4.1",
|
|
105
105
|
"prettier-plugin-packagejson": "3.0.2",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"typescript-eslint": "8.71.0",
|
|
113
113
|
"vitest": "5.0.1"
|
|
114
114
|
},
|
|
115
|
-
"packageManager": "pnpm@12.
|
|
115
|
+
"packageManager": "pnpm@12.10.0",
|
|
116
116
|
"engines": {
|
|
117
117
|
"node": "^22.13.0 || ^24.11.0 || >=26.0.0"
|
|
118
118
|
}
|