mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
Mimic, replace or work around removed npm utils.
This commit is contained in:
parent
e447a6fade
commit
78e64ffea8
4 changed files with 24 additions and 7 deletions
|
@ -94,8 +94,21 @@ var npm = require("npm/lib/npm.js")
|
|||
, path = require("path")
|
||||
, asyncMap = require("slide").asyncMap
|
||||
, semver = require("semver")
|
||||
, readJson = require("npm/lib/utils/read-json.js")
|
||||
, log = require("npm/lib/utils/log.js")
|
||||
, log = require("log4js").getLogger('pluginfw')
|
||||
|
||||
function readJson(file, callback) {
|
||||
fs.readFile(file, function(er, buf) {
|
||||
if(er) {
|
||||
callback(er);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
callback( null, JSON.parse(buf.toString()) )
|
||||
} catch(er) {
|
||||
callback(er)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = readInstalled
|
||||
|
||||
|
@ -274,7 +287,7 @@ function findUnmet (obj) {
|
|||
}
|
||||
|
||||
})
|
||||
log.verbose([obj._id], "returning")
|
||||
log.debug([obj._id], "returning")
|
||||
return obj
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue