This repository was archived by the owner on Aug 11, 2022. It is now read-only.
File tree Expand file treeCollapse file tree 4 files changed+9
-8
lines changedFilter options
+9
-8
lines changed Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
const BB = require('bluebird')
4
4
5
-
const fs = BB.promisifyAll(require('graceful-fs'))
5
+
const stat = BB.promisify(require('graceful-fs').stat)
6
6
const gentlyRm = BB.promisify(require('../../utils/gently-rm.js'))
7
7
const log = require('npmlog')
8
8
const mkdirp = BB.promisify(require('mkdirp'))
@@ -121,7 +121,7 @@ function finishModule (bundler, child, stageTo, stageFrom) {
121
121
return move(stageFrom, stageTo)
122
122
})
123
123
} else {
124
-
return fs.statAsync(stageFrom).then(() => {
124
+
return stat(stageFrom).then(() => {
125
125
const bundlerId = packageId(bundler)
126
126
if (!getTree(bundler).warnings.some((w) => {
127
127
return w.code === 'EBUNDLEOVERRIDE'
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ const BB = require('bluebird')
5
5
const createShrinkwrap = require('../shrinkwrap.js').createShrinkwrap
6
6
const deepSortObject = require('../utils/deep-sort-object.js')
7
7
const detectIndent = require('detect-indent')
8
-
const fs = BB.promisifyAll(require('graceful-fs'))
8
+
const fs = require('graceful-fs')
9
9
const iferr = require('iferr')
10
10
const log = require('npmlog')
11
11
const moduleName = require('../utils/module-name.js')
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ const BB = require('bluebird')
4
4
5
5
const chain = require('slide').chain
6
6
const detectIndent = require('detect-indent')
7
-
const fs = BB.promisifyAll(require('graceful-fs'))
7
+
const readFile = BB.promisify(require('graceful-fs').readFile)
8
8
const getRequested = require('./install/get-requested.js')
9
9
const id = require('./install/deps.js')
10
10
const iferr = require('iferr')
@@ -47,7 +47,7 @@ function shrinkwrap (args, silent, cb) {
47
47
{ Promise: BB }
48
48
).then(() => {
49
49
log.notice('', `${PKGLOCK} has been renamed to ${SHRINKWRAP}. ${SHRINKWRAP} will be used for future installations.`)
50
-
return fs.readFileAsync(path.resolve(npm.prefix, SHRINKWRAP)).then((d) => {
50
+
return readFile(path.resolve(npm.prefix, SHRINKWRAP)).then((d) => {
51
51
return JSON.parse(d)
52
52
})
53
53
}, (err) => {
@@ -211,7 +211,7 @@ function updateLockfileMetadata (pkginfo, pkgJson) {
211
211
212
212
function checkPackageFile (dir, name) {
213
213
const file = path.resolve(dir, name)
214
-
return fs.readFileAsync(
214
+
return readFile(
215
215
file, 'utf8'
216
216
).then((data) => {
217
217
return {
Original file line number Diff line number Diff line change
@@ -4,7 +4,8 @@ const BB = require('bluebird')
4
4
const assert = require('assert')
5
5
const chain = require('slide').chain
6
6
const detectIndent = require('detect-indent')
7
-
const fs = BB.promisifyAll(require('graceful-fs'))
7
+
const fs = require('graceful-fs')
8
+
const readFile = BB.promisify(require('graceful-fs').readFile)
8
9
const git = require('./utils/git.js')
9
10
const lifecycle = require('./utils/lifecycle.js')
10
11
const log = require('npmlog')
@@ -151,7 +152,7 @@ const SHRINKWRAP = 'npm-shrinkwrap.json'
151
152
const PKGLOCK = 'package-lock.json'
152
153
153
154
function readLockfile (name) {
154
-
return fs.readFileAsync(
155
+
return readFile(
155
156
path.join(npm.localPrefix, name), 'utf8'
156
157
).catch({code: 'ENOENT'}, () => null)
157
158
}
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4