@modernpoacher/deps 2.2.8 → 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.
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.2.8",
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",