@modernpoacher/deps 2.2.7 → 2.2.9

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/bin/bash/deps.sh CHANGED
@@ -102,7 +102,7 @@ function execute {
102
102
  TOP=$PWD
103
103
 
104
104
  echo
105
- echo -e "\033[0;32mStarting \`deps\` ...\033[0m" # "Starting ..."
105
+ echo -e "\033[0;32mStarting\033[0m deps \033[0;32m...\033[0m" # "Starting ..."
106
106
 
107
107
  for flag in "$@";
108
108
  do
package/bin/bash/head.sh CHANGED
@@ -162,7 +162,7 @@ function execute {
162
162
  TOP=$PWD
163
163
 
164
164
  echo
165
- echo -e "\033[0;32mStarting \`deps-head\` ...\033[0m" # "Starting ..."
165
+ echo -e "\033[0;32mStarting\033[0m deps-head \033[0;32m...\033[0m" # "Starting ..."
166
166
 
167
167
  for flag in "$@";
168
168
  do
package/bin/bash/push.sh CHANGED
@@ -87,7 +87,7 @@ function execute {
87
87
  TOP=$PWD
88
88
 
89
89
  echo
90
- echo -e "\033[0;32mStarting \`deps-push\` ...\033[0m" # "Starting ..."
90
+ echo -e "\033[0;32mStarting\033[0m deps-push \033[0;32m...\033[0m" # "Starting ..."
91
91
 
92
92
  for flag in "$@";
93
93
  do
package/bin/bash/wipe.sh CHANGED
@@ -88,7 +88,7 @@ function execute {
88
88
  TOP=$PWD
89
89
 
90
90
  echo
91
- echo -e "\033[0;32mStarting \`deps-wipe\` ...\033[0m" # "Starting ..."
91
+ echo -e "\033[0;32mStarting\033[0m deps-wipe \033[0;32m...\033[0m" # "Starting ..."
92
92
 
93
93
  for flag in "$@";
94
94
  do
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  resolve,
17
17
  join,
18
- relative,
18
+ // relative,
19
19
  normalize
20
20
  } from 'node:path'
21
21
 
@@ -63,7 +63,7 @@ export const tidy = (v) => v.replace(/\n{2,}}/gm, String.fromCharCode(10)).trim(
63
63
 
64
64
  export const trim = (v) => v.split(String.fromCharCode(10)).map((v) => v.trimEnd()).join(String.fromCharCode(10)).trim()
65
65
 
66
- const toRelativePath = (to) => relative(process.cwd(), to) // const toRelativePath = relative.bind(null, process.cwd())
66
+ // const toRelativePath = (to) => relative(process.cwd(), to) // const toRelativePath = relative.bind(null, process.cwd())
67
67
 
68
68
  const getRmrfCommands = PLATFORM === 'win32'
69
69
  ? () => tidy(`
@@ -170,13 +170,15 @@ async function getDepsRcJson (directory = DIRECTORY) {
170
170
  async function hasPackage (directory = DIRECTORY) {
171
171
  log('hasPackage')
172
172
 
173
+ log(`Directory is "${directory}"`)
174
+
173
175
  try {
174
176
  await access(getPackageJsonPath(directory), constants.R_OK)
175
177
 
176
- log(`Package at "${toRelativePath(getPackageJsonPath(directory))}"`)
178
+ log('Package at "package.json"')
177
179
  return true
178
180
  } catch {
179
- log(`No package at "${toRelativePath(getPackageJsonPath(directory))}"`)
181
+ log('No package at "package.json"')
180
182
  return false
181
183
  }
182
184
  }
@@ -194,10 +196,12 @@ async function getPackage (directory = DIRECTORY) {
194
196
  async function hasConfiguration (directory = DIRECTORY) {
195
197
  log('hasConfiguration')
196
198
 
199
+ log(`Directory is "${directory}"`)
200
+
197
201
  try {
198
202
  await access(getDepsRcPath(directory), constants.R_OK)
199
203
 
200
- log(`Configuration at "${toRelativePath(getDepsRcPath(directory))}"`)
204
+ log('Configuration at ".depsrc"')
201
205
  return true
202
206
  } catch (e) {
203
207
  const {
@@ -210,7 +214,7 @@ async function hasConfiguration (directory = DIRECTORY) {
210
214
  try {
211
215
  await access(getDepsRcJsonPath(directory), constants.R_OK)
212
216
 
213
- log(`Configuration at "${toRelativePath(getDepsRcJsonPath(directory))}"`)
217
+ log('Configuration at ".depsrc.json"')
214
218
  return true
215
219
  } catch (e) {
216
220
  const {
@@ -224,7 +228,7 @@ async function hasConfiguration (directory = DIRECTORY) {
224
228
  }
225
229
  }
226
230
 
227
- log(`No configuration at "${toRelativePath(getDepsRcPath(directory))}" or "${toRelativePath(getDepsRcJsonPath(directory))}"`)
231
+ log('No configuration at ".depsrc" nor ".depsrc.json"') // at "${toRelativePath(getDepsRcPath(directory))}" or "${toRelativePath(getDepsRcJsonPath(directory))}"`)
228
232
  return false
229
233
  }
230
234
 
package/bin/deps.sh CHANGED
@@ -5,9 +5,9 @@
5
5
  DIR="$(realpath "$(dirname "$(readlink -f "$0")")")"
6
6
  BIN="$DIR"
7
7
 
8
- source "$DIR/common.sh"
8
+ source "$BIN/common.sh"
9
9
 
10
- source_home "$DIR"
10
+ source_home "$BIN"
11
11
 
12
12
  # echo SSH auth sock is $SSH_AUTH_SOCK
13
13
  # echo Home is $HOME
@@ -16,4 +16,4 @@ source_home "$DIR"
16
16
  # echo DIR is $DIR
17
17
  # echo BIN is $BIN
18
18
 
19
- node "$DIR/deps.mjs" "$@"
19
+ node "$BIN/deps.mjs" "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.2.7",
3
+ "version": "2.2.9",
4
4
  "description": "Update NPM package dependencies from the command line",
5
5
  "keywords": [
6
6
  "deps",
@@ -53,11 +53,11 @@
53
53
  "deps-wipe": "bin/deps/wipe.sh"
54
54
  },
55
55
  "dependencies": {
56
- "commander": "^12.1.0",
57
- "debug": "^4.3.7",
56
+ "commander": "^13.0.0",
57
+ "debug": "^4.4.0",
58
58
  "glob": "^11.0.0",
59
59
  "strip-ansi": "^7.1.0",
60
- "supports-color": "^9.4.0"
60
+ "supports-color": "^10.0.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@babel/core": "^7.26.0",
@@ -70,7 +70,7 @@
70
70
  "eslint": "8.57.1",
71
71
  "eslint-config-standard": "^17.1.0",
72
72
  "husky": "^9.1.7",
73
- "mocha": "^10.8.2"
73
+ "mocha": "^11.0.1"
74
74
  },
75
75
  "imports": {
76
76
  "#deps/bin": "./bin/index.mjs",