create-typescript-app 2.73.0 → 2.74.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.
@@ -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
- return { addons: [
192
- blockGitignore({ removals: [
193
- "/coverage*",
194
- "coverage*/",
195
- "coverage/"
196
- ] }),
197
- blockRemoveDependencies({ dependencies: [
198
- "@vitest/coverage-istanbul",
199
- "eslint-plugin-jest",
200
- "eslint-plugin-mocha",
201
- "eslint-plugin-vitest",
202
- "jest mocha"
203
- ] }),
204
- blockRemoveFiles({ files: [
205
- ".mocha*",
206
- "jest.config.*",
207
- "vitest.config.{c,j,m}*"
208
- ] }),
209
- blockRemoveWorkflows({ workflows: ["test"] })
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.73.0",
3
+ "version": "2.74.0",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",
@@ -90,7 +90,7 @@
90
90
  "console-fail-test": "0.9.0",
91
91
  "cspell": "10.3.3",
92
92
  "eslint": "10.12.0",
93
- "eslint-plugin-jsdoc": "65.0.1",
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",