MCPcopy Create free account
hub / github.com/taye/interact.js / getPackageJsons

Function getPackageJsons

scripts/utils.js:93–101  ·  view source on GitHub ↗
(packages = getPackages())

Source from the content-addressed store, hash-verified

91}
92
93async function getPackageJsons(packages = getPackages()) {
94 return Promise.all(
95 (await packages).map(async (p) => {
96 const jsonPath = path.resolve(p, 'package.json')
97 const pkg = JSON.parse((await fs.promises.readFile(jsonPath)).toString())
98 return [jsonPath, pkg]
99 }),
100 )
101}
102
103function shouldIgnoreImport(sourceValue) {
104 return !/^(\.{1-2}|(@interactjs))[\\/]/.test(sourceValue)

Callers 1

checkDepsFunction · 0.85

Calls 1

getPackagesFunction · 0.85

Tested by

no test coverage detected