1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-02 20:00:05 +02:00

update packages to latest version

This commit is contained in:
s2
2022-08-20 18:51:33 +02:00
parent 09663a35a5
commit 806ebf9a57
4513 changed files with 366205 additions and 92512 deletions

2
node_modules/latest/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,2 @@
npm-debug.log
node_modules

80
node_modules/latest/README.md generated vendored Normal file
View File

@@ -0,0 +1,80 @@
latest
======
Quickly determine the latest available version of a package in [npm](http://npmjs.org)
Useful for command line tools that want to check for available upgrades
Example
-------
Get the latest version number of `autocast`
``` js
var latest = require('latest');
latest('autocast', function(err, v) {
console.log(v);
// => "0.0.3"
});
```
Errors passed directly from npm
``` js
var latest = require('latest');
latest('i-hope-this-package-never-exists', function(err, v) {
console.error(err.message);
// => "404 Not Found: i-hope-this-package-never-exists"
});
```
### Convenience Function
Check for upgrades in an app
``` js
var latest = require('latest');
var p = require('./package.json');
latest.checkupdate(p, function(ret, message) {
console.log(message);
// => "you are running the latest version 0.0.1"
process.exit(ret);
// => 0
});
```
#### checkupdate(package-json-obj, cb(ret, message))
A convenience method that will check for newer versions of a module in npm given a
`package.json` object as the first argument.
The callback fires with a return code suitable for exiting with, and a message to print
Command Line
------------
```
$ latest latest json npm notfound
latest: 0.1.2
json: 9.0.3
npm: 2.6.0
notfound: Error: 404 Not Found: notfound
```
Install
------
npm install [-g] latest
Tests
-----
npm test
License
-------
MIT Licensed

20
node_modules/latest/bin/latest.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env node
var latest = require('../');
var packages = process.argv.slice(2);
var versions = {};
var code = 0;
packages.forEach(function(p) {
latest(p, function(err, v) {
versions[p] = err || v;
if (err)
code++;
});
});
process.on('exit', function() {
packages.forEach(function(p) {
console.log('%s: %s', p, versions[p].toString());
});
process.exit(code);
});

48
node_modules/latest/index.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
var npm = require('npm');
var util = require('util');
module.exports = latest;
module.exports.checkupdate = checkupdate;
/**
* get the latest version of a package
*/
function latest(name, cb) {
npm.load({name: name, loglevel: 'silent'}, function(err) {
if (err) return cb(err);
npm.commands.show([name, 'versions'], true, function(err, data) {
if (err) return cb(err);
var versions = data[Object.keys(data)[0]].versions;
var latest = versions[versions.length - 1];
cb(null, latest);
});
});
};
/**
* Convenience method
*
* Given a package.json style obj, determine if there are updates available
*
* Optionally, give true as a second argument to exit after writing the message
*/
function checkupdate(package, cb) {
latest(package.name, function(err, v) {
var s = '';
var ret = 0;
if (err) {
s = ">>> couldn't determine latest version";
ret = 2;
} else if (v !== package.version) {
s = util.format('>>> you are running version %s, a newer version %s is available\n',
package.version, v);
s += util.format('>>> consider updating with: [sudo] npm update -g %s',
package.name);
ret = 1;
} else {
s = util.format('you are running the latest version %s', package.version);
ret = 0;
}
cb(ret, s);
});
};

70
node_modules/latest/package.json generated vendored Normal file
View File

@@ -0,0 +1,70 @@
{
"_from": "latest@^0.2.0",
"_id": "latest@0.2.0",
"_inBundle": false,
"_integrity": "sha512-nsIM/FjwLcsKZ1KDAw5CivnM26zzMs3zGBL4SdjYXHI5tMcOWjGhFDMBKIum4WNAkZmeVw7zU1jR2H2UiKoQVA==",
"_location": "/latest",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "latest@^0.2.0",
"name": "latest",
"escapedName": "latest",
"rawSpec": "^0.2.0",
"saveSpec": null,
"fetchSpec": "^0.2.0"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/latest/-/latest-0.2.0.tgz",
"_shasum": "ea47eb8f4b2bb0cf91716efaa896c2e16237587b",
"_spec": "latest@^0.2.0",
"_where": "D:\\Projects\\minifyfromhtml",
"author": {
"name": "Dave Eddy",
"email": "dave@daveeddy.com",
"url": "http://www.daveeddy.com"
},
"bin": {
"latest": "bin/latest.js"
},
"bugs": {
"url": "https://github.com/bahamas10/node-latest/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "shama",
"url": "https://github.com/shama"
}
],
"dependencies": {
"npm": "^2.5.1"
},
"deprecated": false,
"description": "Determine the latest available version of a package in npm",
"devDependencies": {},
"engines": {
"node": "*"
},
"homepage": "https://github.com/bahamas10/node-latest#readme",
"keywords": [
"latest",
"npm",
"version",
"up-to-date"
],
"name": "latest",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/bahamas10/node-latest.git"
},
"scripts": {
"test": "node tests/test.js"
},
"version": "0.2.0"
}

7
node_modules/latest/tests/latest.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
var latest = require('../');
var p = require('../package.json');
latest.checkupdate(p, function(ret, msg) {
console.log(msg);
process.exit(ret);
});

9
node_modules/latest/tests/test.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
var latest = require('../');
var packages = ['autocast', 'ampache', 'webamp', 'npm'];
packages.forEach(function(package) {
latest(package, function(err, v) {
if (err) throw err;
console.log('>> %s %s', package, v);
});
});