@maz-ui/upgrade 5.2.0 → 5.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/README.md CHANGED
@@ -405,7 +405,9 @@ transformDeps(`{ "dependencies": { "maz-ui": "^4.9.3" } }`)
405
405
  // → `{ "dependencies": { "maz-ui": "^5.0.0" } }`
406
406
 
407
407
  // Compose at the file level (extension-aware orchestration):
408
- transformFile('nuxt.config.ts', source, { groups: ['imports', 'config'] })
408
+ transformFile('nuxt.config.ts', source, {
409
+ groups: ['imports', 'config']
410
+ })
409
411
  // Pass no options to apply ALL_GROUPS.
410
412
  transformFile('app.vue', source)
411
413
  ```
package/dist/cli.mjs CHANGED
@@ -57,7 +57,13 @@ function parseArgs(argv) {
57
57
  printHelp();
58
58
  process.exit(1);
59
59
  }
60
- return { dryRun, groups, roots, gitignore, install };
60
+ return {
61
+ dryRun,
62
+ groups,
63
+ roots,
64
+ gitignore,
65
+ install
66
+ };
61
67
  }
62
68
  function parseGroups(value) {
63
69
  const parts = value.split(",").map((p) => p.trim()).filter(Boolean);
@@ -259,7 +265,17 @@ async function processSourceFiles(opts, cwd, packageJsonFiles) {
259
265
  reportAndWrite(file, after, opts, cwd);
260
266
  }
261
267
  }
262
- return { scanned, changed, needsUtilsDep, needsValibotDep, radiusFiles, avatarSizeFiles, badgeSizeFiles, iconLegacyFiles, distImportFiles };
268
+ return {
269
+ scanned,
270
+ changed,
271
+ needsUtilsDep,
272
+ needsValibotDep,
273
+ radiusFiles,
274
+ avatarSizeFiles,
275
+ badgeSizeFiles,
276
+ iconLegacyFiles,
277
+ distImportFiles
278
+ };
263
279
  }
264
280
  function processPackageJsonFiles(files, opts, cwd, deps) {
265
281
  let scanned = 0;
package/dist/index.mjs CHANGED
@@ -275,8 +275,16 @@ function shouldBump(name, range) {
275
275
  return false;
276
276
  if (PROTECTED_PREFIX.test(range))
277
277
  return false;
278
- if (["latest", "next", "beta", "alpha", "canary", "*"].includes(range))
278
+ if ([
279
+ "latest",
280
+ "next",
281
+ "beta",
282
+ "alpha",
283
+ "canary",
284
+ "*"
285
+ ].includes(range)) {
279
286
  return false;
287
+ }
280
288
  return range !== TARGET_VERSION;
281
289
  }
282
290
  function detectIndent(content) {
@@ -354,7 +362,13 @@ function transformDeps(content, options = {}) {
354
362
  const trailingNewline = content.endsWith("\n") ? "\n" : "";
355
363
  return JSON.stringify(pkg, null, indent) + trailingNewline;
356
364
  }
357
- const ALL_GROUPS = ["imports", "props", "css", "config", "deps"];
365
+ const ALL_GROUPS = [
366
+ "imports",
367
+ "props",
368
+ "css",
369
+ "config",
370
+ "deps"
371
+ ];
358
372
  const STYLESHEET_EXTENSION = /\.(?:css|scss|sass|less|styl|stylus|pcss|postcss)$/;
359
373
  function getFileKind(filename) {
360
374
  if (filename.endsWith(".vue"))
@@ -368,14 +382,46 @@ function getFileKind(filename) {
368
382
  return void 0;
369
383
  }
370
384
  const PIPELINE = [
371
- { group: "imports", kinds: ["vue", "script"], transform: transformImports },
372
- { group: "imports", kinds: ["stylesheet"], transform: transformStyleImports },
373
- { group: "props", kinds: ["vue"], transform: transformProps },
374
- { group: "css", kinds: ["stylesheet"], transform: transformClassNames },
375
- { group: "css", kinds: ["vue", "stylesheet", "script"], transform: transformCssVars },
376
- { group: "css", kinds: ["vue", "stylesheet", "script"], transform: transformHslVar },
377
- { group: "config", kinds: ["vue", "script"], transform: transformConfig },
378
- { group: "config", kinds: ["vue", "script"], transform: transformPresetColors },
385
+ {
386
+ group: "imports",
387
+ kinds: ["vue", "script"],
388
+ transform: transformImports
389
+ },
390
+ {
391
+ group: "imports",
392
+ kinds: ["stylesheet"],
393
+ transform: transformStyleImports
394
+ },
395
+ {
396
+ group: "props",
397
+ kinds: ["vue"],
398
+ transform: transformProps
399
+ },
400
+ {
401
+ group: "css",
402
+ kinds: ["stylesheet"],
403
+ transform: transformClassNames
404
+ },
405
+ {
406
+ group: "css",
407
+ kinds: ["vue", "stylesheet", "script"],
408
+ transform: transformCssVars
409
+ },
410
+ {
411
+ group: "css",
412
+ kinds: ["vue", "stylesheet", "script"],
413
+ transform: transformHslVar
414
+ },
415
+ {
416
+ group: "config",
417
+ kinds: ["vue", "script"],
418
+ transform: transformConfig
419
+ },
420
+ {
421
+ group: "config",
422
+ kinds: ["vue", "script"],
423
+ transform: transformPresetColors
424
+ },
379
425
  {
380
426
  group: "deps",
381
427
  kinds: ["packageJson"],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/upgrade",
3
3
  "type": "module",
4
- "version": "5.2.0",
4
+ "version": "5.3.0",
5
5
  "description": "Automated source rewrites for migrating a project from Maz-UI v4 to v5.",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -38,21 +38,21 @@
38
38
  "dist"
39
39
  ],
40
40
  "engines": {
41
- "node": ">=22.12.0"
41
+ "node": "^22.23.4 || ^24.22.1 || >=26.12.1"
42
42
  },
43
43
  "dependencies": {
44
- "@maz-ui/node": "^5.2.0",
44
+ "@maz-ui/node": "^5.3.0",
45
45
  "globby": "^16.2.4"
46
46
  },
47
47
  "devDependencies": {
48
- "@maz-ui/eslint-config": "^5.0.0",
49
- "@types/node": "^22.20.5",
50
- "@vitest/coverage-v8": "^5.0.5",
48
+ "@maz-ui/eslint-config": "^5.3.0",
49
+ "@types/node": "^26.6.6",
50
+ "@vitest/coverage-v8": "^5.1.0",
51
51
  "cross-env": "^10.1.0",
52
- "eslint": "^10.13.0",
52
+ "eslint": "^10.14.0",
53
53
  "typescript": "^6.0.3",
54
54
  "unbuild": "^3.6.1",
55
- "vitest": "5.0.5"
55
+ "vitest": "5.1.0"
56
56
  },
57
57
  "lint-staged": {
58
58
  "*.{js,ts,mjs,mts,cjs,md,yml,json}": "cross-env NODE_ENV=production eslint --fix"