MCPcopy Index your code
hub / github.com/ampproject/amphtml / updateDeps

Function updateDeps

build-system/common/update-packages.js:185–197  ·  view source on GitHub ↗

* Checks if all packages are current, and if not, runs `npm install`.

()

Source from the content-addressed store, hash-verified

183 * Checks if all packages are current, and if not, runs `npm install`.
184 */
185function updateDeps() {
186 const results = checkDependencies.sync({
187 verbose: true,
188 log: () => {},
189 error: console.log,
190 });
191 if (results.depsWereOk) {
192 log('All packages in', cyan('node_modules'), 'are up to date.');
193 } else {
194 log('Running', cyan('npm install') + '...');
195 execOrDie('npm install');
196 }
197}
198
199/**
200 * This function updates repo root packages.

Callers 1

updatePackagesFunction · 0.85

Calls 4

cyanFunction · 0.85
execOrDieFunction · 0.85
syncMethod · 0.80
logFunction · 0.70

Tested by

no test coverage detected