Skip to content

Commit

Permalink
Remove depurar & mkdirp in favor of debug & native mkdir
Browse files Browse the repository at this point in the history
  • Loading branch information
kvz committed Apr 4, 2024
1 parent a7e0134 commit f0caed2
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 76 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"budo": "11.8.4",
"chai": "4",
"cross-env": "7.0.3",
"depurar": "0.3.0",
"es6-promise": "4.2.8",
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -85,7 +84,6 @@
"indent-string": "2.1.0",
"js-yaml": "4.1.0",
"lodash": "4.17.21",
"mkdirp": "1.0.4",
"mocha": "10.4.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.2.5",
Expand All @@ -99,5 +97,8 @@
"node": ">= 10",
"yarn": "4.0.1"
},
"readmeFilename": "README.md"
"readmeFilename": "README.md",
"dependencies": {
"debug": "^4.3.4"
}
}
8 changes: 4 additions & 4 deletions src/_util/util.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const globby = require('globby')
const path = require('path')
const fs = require('fs')
const fsPromises = fs.promises
const async = require('async')
const YAML = require('js-yaml')
const mkdirp = require('mkdirp')
const debug = require('depurar')('locutus')
const debug = require('debug')('locutus:utils')
const indentString = require('indent-string')
const _ = require('lodash')
const esprima = require('esprima')
Expand Down Expand Up @@ -301,7 +301,7 @@ class Util {

buf += `{% codeblock lang:javascript %}${params.code}{% endcodeblock %}`

mkdirp(path.dirname(funcPath)).then(
fsPromises.mkdir(path.dirname(funcPath), { recursive: true }).then(
function () {
fs.writeFile(funcPath, buf, 'utf-8', cb)
},
Expand Down Expand Up @@ -447,7 +447,7 @@ class Util {
const code = codez.join('\n')

// Write to disk
mkdirp(testdir).then(
fsPromises.mkdir(testdir, { recursive: true }).then(
function () {
debug('writing: ' + testpath)
fs.writeFile(testpath, code, 'utf-8', cb)
Expand Down
100 changes: 31 additions & 69 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -733,13 +733,6 @@ __metadata:
languageName: node
linkType: hard

"app-root-path@npm:1.3.0":
version: 1.3.0
resolution: "app-root-path@npm:1.3.0"
checksum: 411570c07e471f57ac7add012e35864323effcde478e0125ce768f2821294e9f61de3e039e4ad7656c028fa2aa3eb57664b01265da23a25200872acb16df97c0
languageName: node
linkType: hard

"aproba@npm:^1.0.3":
version: 1.1.1
resolution: "aproba@npm:1.1.1"
Expand Down Expand Up @@ -2560,18 +2553,6 @@ __metadata:
languageName: node
linkType: hard

"concat-stream@npm:, concat-stream@npm:^2.0.0":
version: 2.0.0
resolution: "concat-stream@npm:2.0.0"
dependencies:
buffer-from: "npm:^1.0.0"
inherits: "npm:^2.0.3"
readable-stream: "npm:^3.0.2"
typedarray: "npm:^0.0.6"
checksum: 250e576d0617e7c58e1c4b2dd6fe69560f316d2c962a409f9f3aac794018499ddb31948b1e4296f217008e124cd5d526432097745157fe504b5d9f3dc469eadb
languageName: node
linkType: hard

"concat-stream@npm:^1.5.0":
version: 1.5.2
resolution: "concat-stream@npm:1.5.2"
Expand All @@ -2595,6 +2576,18 @@ __metadata:
languageName: node
linkType: hard

"concat-stream@npm:^2.0.0":
version: 2.0.0
resolution: "concat-stream@npm:2.0.0"
dependencies:
buffer-from: "npm:^1.0.0"
inherits: "npm:^2.0.3"
readable-stream: "npm:^3.0.2"
typedarray: "npm:^0.0.6"
checksum: 250e576d0617e7c58e1c4b2dd6fe69560f316d2c962a409f9f3aac794018499ddb31948b1e4296f217008e124cd5d526432097745157fe504b5d9f3dc469eadb
languageName: node
linkType: hard

"connect-pushstate@npm:^1.1.0":
version: 1.1.0
resolution: "connect-pushstate@npm:1.1.0"
Expand Down Expand Up @@ -2671,18 +2664,6 @@ __metadata:
languageName: node
linkType: hard

"crc-32@npm:0.4.1":
version: 0.4.1
resolution: "crc-32@npm:0.4.1"
dependencies:
concat-stream: "npm:"
exit-on-epipe: "npm:"
bin:
crc32: ./bin/crc32.njs
checksum: 4d2c24a8ec7f3e7874255dd0fdaf4ff182862d693beaab68e9dfb77af54c4ac5d9d969997495cbed7959d379f1f29dca82b70d11e539f97dcce4d0a31ee976d0
languageName: node
linkType: hard

"create-ecdh@npm:^4.0.0":
version: 4.0.0
resolution: "create-ecdh@npm:4.0.0"
Expand Down Expand Up @@ -2857,15 +2838,6 @@ __metadata:
languageName: node
linkType: hard

"debug@npm:2.2.0, debug@npm:^2.2.0, debug@npm:~2.2.0":
version: 2.2.0
resolution: "debug@npm:2.2.0"
dependencies:
ms: "npm:0.7.1"
checksum: 19387e1b6da7757297c2ea835f16f0df2d325687a311fdd57e43851190492fe770b991fc5ca1b8b53b007bf3126acd14ed75f2f1eef864ceb49a6bb8177988f7
languageName: node
linkType: hard

"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.0.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4":
version: 4.3.4
resolution: "debug@npm:4.3.4"
Expand All @@ -2878,6 +2850,15 @@ __metadata:
languageName: node
linkType: hard

"debug@npm:^2.2.0, debug@npm:~2.2.0":
version: 2.2.0
resolution: "debug@npm:2.2.0"
dependencies:
ms: "npm:0.7.1"
checksum: 19387e1b6da7757297c2ea835f16f0df2d325687a311fdd57e43851190492fe770b991fc5ca1b8b53b007bf3126acd14ed75f2f1eef864ceb49a6bb8177988f7
languageName: node
linkType: hard

"debug@npm:^2.6.8, debug@npm:^2.6.9":
version: 2.6.9
resolution: "debug@npm:2.6.9"
Expand Down Expand Up @@ -3041,17 +3022,6 @@ __metadata:
languageName: node
linkType: hard

"depurar@npm:0.3.0":
version: 0.3.0
resolution: "depurar@npm:0.3.0"
dependencies:
app-root-path: "npm:1.3.0"
crc-32: "npm:0.4.1"
debug: "npm:2.2.0"
checksum: 661fde563f77e0866dc9e59c3503a3e65b3c7549997728c92af9bd1415f59f91a56e21baa2670f4fee218f921800c1925392bdaff9ede121d7f3cd91201d88db
languageName: node
linkType: hard

"dequal@npm:^2.0.0":
version: 2.0.3
resolution: "dequal@npm:2.0.3"
Expand Down Expand Up @@ -3853,13 +3823,6 @@ __metadata:
languageName: node
linkType: hard

"exit-on-epipe@npm:":
version: 1.0.1
resolution: "exit-on-epipe@npm:1.0.1"
checksum: b180aa277aec5bef2609b34e5876061f421a1f81bf343beb213c4d60b382ddcb6b83012833f0ba329d6bc38042685c8d89b1c52ea495b9b6327948ea80627398
languageName: node
linkType: hard

"expand-brackets@npm:^0.1.4":
version: 0.1.5
resolution: "expand-brackets@npm:0.1.5"
Expand Down Expand Up @@ -6001,7 +5964,7 @@ __metadata:
budo: "npm:11.8.4"
chai: "npm:4"
cross-env: "npm:7.0.3"
depurar: "npm:0.3.0"
debug: "npm:^4.3.4"
es6-promise: "npm:4.2.8"
eslint: "npm:8.57.0"
eslint-config-prettier: "npm:^9.1.0"
Expand All @@ -6016,7 +5979,6 @@ __metadata:
indent-string: "npm:2.1.0"
js-yaml: "npm:4.1.0"
lodash: "npm:4.17.21"
mkdirp: "npm:1.0.4"
mocha: "npm:10.4.0"
npm-run-all: "npm:^4.1.5"
prettier: "npm:^3.2.5"
Expand Down Expand Up @@ -6729,15 +6691,6 @@ __metadata:
languageName: node
linkType: hard

"mkdirp@npm:1.0.4, mkdirp@npm:^1.0.3":
version: 1.0.4
resolution: "mkdirp@npm:1.0.4"
bin:
mkdirp: bin/cmd.js
checksum: d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2
languageName: node
linkType: hard

"mkdirp@npm:>=0.5 0, mkdirp@npm:^0.5.1, mkdirp@npm:~0.5.1":
version: 0.5.1
resolution: "mkdirp@npm:0.5.1"
Expand All @@ -6749,6 +6702,15 @@ __metadata:
languageName: node
linkType: hard

"mkdirp@npm:^1.0.3":
version: 1.0.4
resolution: "mkdirp@npm:1.0.4"
bin:
mkdirp: bin/cmd.js
checksum: d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2
languageName: node
linkType: hard

"mocha@npm:10.4.0":
version: 10.4.0
resolution: "mocha@npm:10.4.0"
Expand Down

0 comments on commit f0caed2

Please sign in to comment.