MCPcopy Index your code
hub / github.com/darkreader/darkreader / getOutdated

Function getOutdated

tasks/dependencies.js:11–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9const packagePath = `${cwd}/package.json`;
10
11async function getOutdated() {
12 return /** @type {Promise<object | null>} */(new Promise((resolve, reject) => {
13 exec('npm outdated --json', {cwd}, (error, stdout) => {
14 const packages = JSON.parse(stdout.toString());
15 if (typeof packages !== 'object') {
16 log.error('Failed to check for dependencies');
17 reject();
18 return;
19 }
20 if (Object.keys(packages).length === 0) {
21 log.error('All dependencies are already up to date');
22 reject();
23 return;
24 }
25 resolve(packages);
26 });
27 }));
28}
29
30/**
31 *

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected