@reliverse/dler 1.7.80 → 1.7.82

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.
@@ -10,32 +10,26 @@ declare const _default: import("@reliverse/rempts").Command<{
10
10
  "dev-only": {
11
11
  type: "boolean";
12
12
  description: string;
13
- default: false;
14
13
  };
15
14
  "prod-only": {
16
15
  type: "boolean";
17
16
  description: string;
18
- default: false;
19
17
  };
20
18
  "peer-only": {
21
19
  type: "boolean";
22
20
  description: string;
23
- default: false;
24
21
  };
25
22
  "optional-only": {
26
23
  type: "boolean";
27
24
  description: string;
28
- default: false;
29
25
  };
30
26
  "catalogs-only": {
31
27
  type: "boolean";
32
28
  description: string;
33
- default: false;
34
29
  };
35
30
  "dry-run": {
36
31
  type: "boolean";
37
32
  description: string;
38
- default: false;
39
33
  };
40
34
  concurrency: {
41
35
  type: "number";
@@ -45,7 +39,6 @@ declare const _default: import("@reliverse/rempts").Command<{
45
39
  "with-check-script": {
46
40
  type: "boolean";
47
41
  description: string;
48
- default: false;
49
42
  };
50
43
  linker: {
51
44
  type: "string";
@@ -53,22 +46,19 @@ declare const _default: import("@reliverse/rempts").Command<{
53
46
  allowed: string[];
54
47
  default: string;
55
48
  };
56
- "no-install": {
49
+ "with-install": {
57
50
  type: "boolean";
58
51
  description: string;
59
- default: false;
60
52
  alias: string;
61
53
  };
62
54
  global: {
63
55
  type: "boolean";
64
56
  description: string;
65
- default: false;
66
57
  alias: string;
67
58
  };
68
59
  interactive: {
69
60
  type: "boolean";
70
61
  description: string;
71
- default: false;
72
62
  };
73
63
  filter: {
74
64
  type: "array";
@@ -77,7 +67,6 @@ declare const _default: import("@reliverse/rempts").Command<{
77
67
  "update-catalogs": {
78
68
  type: "boolean";
79
69
  description: string;
80
- default: false;
81
70
  };
82
71
  }>;
83
72
  export default _default;
@@ -348,33 +348,27 @@ export default defineCommand({
348
348
  },
349
349
  "dev-only": {
350
350
  type: "boolean",
351
- description: "Update only devDependencies",
352
- default: false
351
+ description: "Update only devDependencies"
353
352
  },
354
353
  "prod-only": {
355
354
  type: "boolean",
356
- description: "Update only dependencies (production)",
357
- default: false
355
+ description: "Update only dependencies (production)"
358
356
  },
359
357
  "peer-only": {
360
358
  type: "boolean",
361
- description: "Update only peerDependencies",
362
- default: false
359
+ description: "Update only peerDependencies"
363
360
  },
364
361
  "optional-only": {
365
362
  type: "boolean",
366
- description: "Update only optionalDependencies",
367
- default: false
363
+ description: "Update only optionalDependencies"
368
364
  },
369
365
  "catalogs-only": {
370
366
  type: "boolean",
371
- description: "Update only catalog dependencies",
372
- default: false
367
+ description: "Update only catalog dependencies"
373
368
  },
374
369
  "dry-run": {
375
370
  type: "boolean",
376
- description: "Show what would be updated without making changes",
377
- default: false
371
+ description: "Show what would be updated without making changes"
378
372
  },
379
373
  concurrency: {
380
374
  type: "number",
@@ -383,8 +377,7 @@ export default defineCommand({
383
377
  },
384
378
  "with-check-script": {
385
379
  type: "boolean",
386
- description: "Run `bun check` after updating (exclusive for bun environment at the moment)",
387
- default: false
380
+ description: "Run `bun check` after updating (exclusive for bun environment at the moment)"
388
381
  },
389
382
  linker: {
390
383
  type: "string",
@@ -392,22 +385,19 @@ export default defineCommand({
392
385
  allowed: ["isolated", "hoisted"],
393
386
  default: "hoisted"
394
387
  },
395
- "no-install": {
388
+ "with-install": {
396
389
  type: "boolean",
397
- description: "Skip the install step after updating dependencies",
398
- default: false,
399
- alias: "no-i"
390
+ description: "Run the install step after updating dependencies",
391
+ alias: "with-i"
400
392
  },
401
393
  global: {
402
394
  type: "boolean",
403
395
  description: "Update global packages instead of local dependencies",
404
- default: false,
405
396
  alias: "g"
406
397
  },
407
398
  interactive: {
408
399
  type: "boolean",
409
- description: "Interactively select which dependencies to update",
410
- default: false
400
+ description: "Interactively select which dependencies to update"
411
401
  },
412
402
  filter: {
413
403
  type: "array",
@@ -415,8 +405,7 @@ export default defineCommand({
415
405
  },
416
406
  "update-catalogs": {
417
407
  type: "boolean",
418
- description: "Update catalog dependencies to latest versions",
419
- default: false
408
+ description: "Update catalog dependencies to latest versions"
420
409
  }
421
410
  }),
422
411
  async run({ args }) {
@@ -706,21 +695,24 @@ export default defineCommand({
706
695
  for (const update of toUpdate) {
707
696
  const dep = update.package;
708
697
  const newVersion = `^${update.latestVersion}`;
709
- const location = update.location;
710
- if (location === "dependencies" && dependencies[dep]) {
698
+ if (dependencies[dep]) {
711
699
  if (!updatedPackageJson.dependencies) updatedPackageJson.dependencies = {};
712
700
  updatedPackageJson.dependencies[dep] = newVersion;
713
- } else if (location === "devDependencies" && devDependencies[dep]) {
701
+ }
702
+ if (devDependencies[dep]) {
714
703
  if (!updatedPackageJson.devDependencies) updatedPackageJson.devDependencies = {};
715
704
  updatedPackageJson.devDependencies[dep] = newVersion;
716
- } else if (location === "peerDependencies" && peerDependencies[dep]) {
705
+ }
706
+ if (peerDependencies[dep]) {
717
707
  if (!updatedPackageJson.peerDependencies) updatedPackageJson.peerDependencies = {};
718
708
  updatedPackageJson.peerDependencies[dep] = newVersion;
719
- } else if (location === "optionalDependencies" && optionalDependencies[dep]) {
709
+ }
710
+ if (optionalDependencies[dep]) {
720
711
  if (!updatedPackageJson.optionalDependencies)
721
712
  updatedPackageJson.optionalDependencies = {};
722
713
  updatedPackageJson.optionalDependencies[dep] = newVersion;
723
- } else if (location === "catalog" && catalog[dep]) {
714
+ }
715
+ if (catalog[dep]) {
724
716
  if (!updatedPackageJson.workspaces) updatedPackageJson.workspaces = {};
725
717
  if (!updatedPackageJson.workspaces.catalog)
726
718
  updatedPackageJson.workspaces.catalog = {};
@@ -728,9 +720,9 @@ export default defineCommand({
728
720
  if (updatedPackageJson.catalog) {
729
721
  updatedPackageJson.catalog[dep] = newVersion;
730
722
  }
731
- } else if (location?.startsWith("catalogs.")) {
732
- const catalogName = location.split(".")[1];
733
- if (catalogName) {
723
+ }
724
+ Object.keys(catalogs).forEach((catalogName) => {
725
+ if (catalogs[catalogName][dep]) {
734
726
  if (!updatedPackageJson.workspaces)
735
727
  updatedPackageJson.workspaces = {};
736
728
  if (!updatedPackageJson.workspaces.catalogs)
@@ -743,7 +735,7 @@ export default defineCommand({
743
735
  updatedPackageJson.catalogs[catalogName][dep] = newVersion;
744
736
  }
745
737
  }
746
- }
738
+ });
747
739
  }
748
740
  await fs.writeFile(
749
741
  packageJsonPath,
@@ -751,12 +743,12 @@ export default defineCommand({
751
743
  "utf8"
752
744
  );
753
745
  relinka("success", `Updated ${toUpdate.length} dependencies in package.json`);
754
- if (args["no-install"]) {
746
+ if (args["with-install"] !== true) {
755
747
  const packageManager2 = await detectPackageManager(process.cwd());
756
748
  const installCommand = packageManager2 ? `${packageManager2.command} install` : "your package manager's install command";
757
749
  relinka(
758
750
  "info",
759
- `Skipped install step due to --no-install flag. Run '${installCommand}' to apply the changes.`
751
+ `Skipped install step. Use --with-install flag to run '${installCommand}' after updating.`
760
752
  );
761
753
  return;
762
754
  }
@@ -1,5 +1,5 @@
1
1
  import { endPrompt, startPrompt } from "@reliverse/rempts";
2
- const version = "1.7.80";
2
+ const version = "1.7.82";
3
3
  export async function showStartPrompt(isDev) {
4
4
  await startPrompt({
5
5
  titleColor: "inverse",
@@ -82,13 +82,6 @@ async function ensureTsconfigIncludes(tsconfigPath) {
82
82
  if (!tsconfig.include) {
83
83
  tsconfig.include = [];
84
84
  }
85
- const requiredInclude = ".config/**/*.ts";
86
- const hasConfigInclude = tsconfig.include.includes(requiredInclude);
87
- if (!hasConfigInclude) {
88
- tsconfig.include.push(requiredInclude);
89
- await fs.writeFile(tsconfigPath, JSON.stringify(tsconfig, null, 2), "utf8");
90
- relinka("success", `Added ".config/**/*.ts" to tsconfig.json includes`);
91
- }
92
85
  } catch (error) {
93
86
  relinka(
94
87
  "warn",
package/package.json CHANGED
@@ -37,12 +37,12 @@
37
37
  "pretty-ms": "^9.2.0",
38
38
  "registry-auth-token": "^5.1.0",
39
39
  "registry-url": "^7.2.0",
40
- "rollup": "^4.46.1",
40
+ "rollup": "^4.46.2",
41
41
  "rollup-plugin-dts": "^6.2.1",
42
42
  "scule": "^1.3.0",
43
43
  "semver": "^7.7.2",
44
44
  "shebang-command": "^2.0.0",
45
- "strip-json-comments": "^5.0.2",
45
+ "strip-json-comments": "^5.0.3",
46
46
  "tinyglobby": "^0.2.14",
47
47
  "ts-morph": "^26.0.0",
48
48
  "untyped": "^2.0.0"
@@ -52,7 +52,7 @@
52
52
  "license": "MIT",
53
53
  "name": "@reliverse/dler",
54
54
  "type": "module",
55
- "version": "1.7.80",
55
+ "version": "1.7.82",
56
56
  "keywords": [
57
57
  "reliverse",
58
58
  "cli",