rman 0.26.0 → 0.27.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 sqbjs
3
+ Copyright (c) 2020 Panates
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/cjs/cli.js CHANGED
@@ -36,7 +36,7 @@ async function runCli(options) {
36
36
  .help('help').alias('help', 'h')
37
37
  .showHelpOnFail(false, 'Run with --help for available options')
38
38
  .fail((msg, err) => {
39
- if (!err.logged) {
39
+ if (!err?.logged) {
40
40
  const text = (msg
41
41
  ? msg + '\n\n' + chalk_1.default.whiteBright('Run with --help for available options')
42
42
  : (err ? err.message : ''));
@@ -37,6 +37,13 @@ class Repository extends package_js_1.Package {
37
37
  ...pkg.json.peerDependencies,
38
38
  ...pkg.json.optionalDependencies
39
39
  };
40
+ const configDeps = this.config.packages?.[pkg.name]?.dependencies;
41
+ if (configDeps) {
42
+ if (Array.isArray(configDeps))
43
+ configDeps.forEach(x => o[x] = o[x] || '*');
44
+ else
45
+ Object.assign(o, configDeps);
46
+ }
40
47
  const dependencies = [];
41
48
  for (const k of Object.keys(o)) {
42
49
  const p = this.getPackage(k);
package/esm/cli.js CHANGED
@@ -30,7 +30,7 @@ export async function runCli(options) {
30
30
  .help('help').alias('help', 'h')
31
31
  .showHelpOnFail(false, 'Run with --help for available options')
32
32
  .fail((msg, err) => {
33
- if (!err.logged) {
33
+ if (!err?.logged) {
34
34
  const text = (msg
35
35
  ? msg + '\n\n' + chalk.whiteBright('Run with --help for available options')
36
36
  : (err ? err.message : ''));
@@ -31,6 +31,13 @@ export class Repository extends Package {
31
31
  ...pkg.json.peerDependencies,
32
32
  ...pkg.json.optionalDependencies
33
33
  };
34
+ const configDeps = this.config.packages?.[pkg.name]?.dependencies;
35
+ if (configDeps) {
36
+ if (Array.isArray(configDeps))
37
+ configDeps.forEach(x => o[x] = o[x] || '*');
38
+ else
39
+ Object.assign(o, configDeps);
40
+ }
34
41
  const dependencies = [];
35
42
  for (const k of Object.keys(o)) {
36
43
  const p = this.getPackage(k);
@@ -16,7 +16,7 @@ export interface RunPathOptions {
16
16
  */
17
17
  readonly execPath?: string;
18
18
  }
19
- export declare type ProcessEnv = Record<string, string | undefined>;
19
+ export type ProcessEnv = Record<string, string | undefined>;
20
20
  export interface EnvOptions {
21
21
  /**
22
22
  The working directory.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rman",
3
3
  "description": "Monorepo repository manager",
4
- "version": "0.26.0",
4
+ "version": "0.27.0",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "contributors": [
@@ -23,17 +23,18 @@
23
23
  "rman": "bin/rman.mjs"
24
24
  },
25
25
  "type": "module",
26
- "main": "cjs/index.js",
27
- "module": "esm/index.js",
28
26
  "types": "esm/index.d.ts",
29
27
  "exports": {
30
- ".": "./cjs/index.js",
28
+ ".": {
29
+ "require": "./cjs/index.js",
30
+ "default": "./esm/index.js"
31
+ },
31
32
  "./cjs": "./cjs/index.js",
32
33
  "./esm": "./esm/index.js"
33
34
  },
34
35
  "dependencies": {
35
36
  "@netlify/parse-npm-script": "^0.1.2",
36
- "chalk": "^5.1.2",
37
+ "chalk": "^5.2.0",
37
38
  "easy-table": "^1.2.0",
38
39
  "envinfo": "^7.8.1",
39
40
  "fast-glob": "^3.2.12",
@@ -41,47 +42,47 @@
41
42
  "ini": "^3.0.1",
42
43
  "is-ci": "^3.0.1",
43
44
  "js-yaml": "^4.1.0",
44
- "npmlog": "^6.0.2",
45
+ "npmlog": "^7.0.1",
45
46
  "path-key": "^4.0.0",
46
- "power-tasks": "^1.5.0",
47
+ "power-tasks": "^1.6.1",
47
48
  "putil-merge": "^3.9.0",
48
49
  "putil-varhelpers": "^1.6.4",
49
50
  "semver": "^7.3.8",
50
51
  "signal-exit": "^3.0.7",
51
52
  "strict-typed-events": "^2.3.1",
52
53
  "strip-color": "^0.1.0",
53
- "yargs": "^17.6.0"
54
+ "yargs": "^17.6.2"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@babel/eslint-parser": "^7.19.1",
57
58
  "@types/envinfo": "^7.8.1",
58
59
  "@types/ini": "^1.3.31",
59
60
  "@types/is-ci": "^3.0.0",
60
- "@types/jest": "^29.1.2",
61
+ "@types/jest": "^29.2.4",
61
62
  "@types/js-yaml": "^4.0.5",
62
- "@types/node": "^18.8.4",
63
+ "@types/node": "^18.11.18",
63
64
  "@types/npmlog": "^4.1.4",
64
- "@types/semver": "^7.3.12",
65
+ "@types/semver": "^7.3.13",
65
66
  "@types/signal-exit": "^3.0.1",
66
67
  "@types/strip-color": "^0.1.0",
67
- "@types/yargs": "^17.0.13",
68
- "@typescript-eslint/eslint-plugin": "^5.40.0",
69
- "@typescript-eslint/parser": "^5.40.0",
70
- "eslint": "8.25.0",
68
+ "@types/yargs": "^17.0.17",
69
+ "@typescript-eslint/eslint-plugin": "^5.47.1",
70
+ "@typescript-eslint/parser": "^5.47.1",
71
+ "eslint": "^8.30.0",
71
72
  "eslint-config-google": "^0.14.0",
72
73
  "eslint-plugin-import": "^2.26.0",
73
74
  "eslint-plugin-security": "^1.5.0",
74
75
  "eslint-plugin-simple-import-sort": "^8.0.0",
75
76
  "eslint-plugin-unused-imports": "^2.0.0",
76
- "jest": "^29.1.2",
77
- "prettier": "^2.7.1",
77
+ "jest": "^29.3.1",
78
+ "prettier": "^2.8.1",
78
79
  "ts-cleanup": "^0.2.5",
79
- "ts-gems": "^2.2.1",
80
+ "ts-gems": "^2.3.0",
80
81
  "ts-jest": "^29.0.3",
81
- "ts-loader": "^9.4.1",
82
+ "ts-loader": "^9.4.2",
82
83
  "ts-node": "^10.9.1",
83
- "tsconfig-paths": "^4.1.0",
84
- "typescript": "^4.8.4"
84
+ "tsconfig-paths": "^4.1.1",
85
+ "typescript": "^4.9.4"
85
86
  },
86
87
  "engines": {
87
88
  "node": ">=14.0",