Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-08-26 21:20:59 +0300
committerGar <gar+gh@danger.computer>2021-08-26 21:20:59 +0300
commite63a942c685233fa546788981ed9c144220d50e1 (patch)
tree4115e9ae913ad1b688c35711418a528184c9b337 /node_modules/@npmcli/fs/lib/fs.js
parent7af36bb9f8e5c9facaa8deb114b76368841fbc66 (diff)
cacache@15.3.0
* feat: introduce @npmcli/fs for tmp dir methods
Diffstat (limited to 'node_modules/@npmcli/fs/lib/fs.js')
-rw-r--r--node_modules/@npmcli/fs/lib/fs.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/node_modules/@npmcli/fs/lib/fs.js b/node_modules/@npmcli/fs/lib/fs.js
new file mode 100644
index 000000000..29e5fb573
--- /dev/null
+++ b/node_modules/@npmcli/fs/lib/fs.js
@@ -0,0 +1,8 @@
+const fs = require('fs')
+const promisify = require('@gar/promisify')
+
+// this module returns the core fs module wrapped in a proxy that promisifies
+// method calls within the getter. we keep it in a separate module so that the
+// overridden methods have a consistent way to get to promisified fs methods
+// without creating a circular dependency
+module.exports = promisify(fs)