MCPcopy Create free account
hub / github.com/nodejs/node-gyp / list

Function list

lib/list.js:6–23  ·  view source on GitHub ↗
(gyp, args)

Source from the content-addressed store, hash-verified

4const log = require('./log')
5
6async function list (gyp, args) {
7 const devDir = gyp.devDir
8 log.verbose('list', 'using node-gyp dir:', devDir)
9
10 let versions = []
11 try {
12 const dir = await fs.readdir(devDir)
13 if (Array.isArray(dir)) {
14 versions = dir.filter((v) => v !== 'current')
15 }
16 } catch (err) {
17 if (err && err.code !== 'ENOENT') {
18 throw err
19 }
20 }
21
22 return versions
23}
24
25module.exports = list
26module.exports.usage = 'Prints a listing of the currently installed node development files'

Callers 15

CheckNodeFunction · 0.85
ExpandVariablesFunction · 0.85
FlattenToListMethod · 0.85
ProcessListFiltersInDictFunction · 0.85
ExecLinkWrapperMethod · 0.85
ExecMidlWrapperMethod · 0.85
DeepDependencyTargetsFunction · 0.85
__repr__Method · 0.85
__eq__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…