PHP 8.1.33
Preview: check.js Size: 659 B
//lib/node_modules/npm/node_modules/update-notifier/check.js

/* eslint-disable unicorn/no-process-exit */
'use strict';
let updateNotifier = require('.');

const options = JSON.parse(process.argv[2]);

updateNotifier = new updateNotifier.UpdateNotifier(options);

updateNotifier.checkNpm().then(update => {
	// Only update the last update check time on success
	updateNotifier.config.set('lastUpdateCheck', Date.now());

	if (update.type && update.type !== 'latest') {
		updateNotifier.config.set('update', update);
	}

	// Call process exit explicitly to terminate the child process
	// Otherwise the child process will run forever, according to the Node.js docs
	process.exit();
}).catch(() => {
	process.exit(1);
});

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
659 B lrw-r--r-- 2021-03-10 14:36:38
Edit Download
4.51 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download
1.22 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download
2.14 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download
5.71 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).