node-semvers 0.5.0 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/constants.js +1 -1
- package/{index.js → lib/index.js} +7 -7
- package/package.json +18 -16
- package/bin/cache.js +0 -21
package/lib/constants.js
CHANGED
|
@@ -3,5 +3,5 @@ var path = require('path');
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
CACHE_DIRECTORY: path.resolve(path.join(__dirname, '..', '.cache')),
|
|
5
5
|
DISTS_URL: 'https://nodejs.org/dist/index.json',
|
|
6
|
-
SCHEDULES_URL: 'https://
|
|
6
|
+
SCHEDULES_URL: 'https://cdn.jsdelivr.net/gh/nodejs/Release@main/schedule.json',
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var semver = require('semver');
|
|
2
2
|
var Cache = require('fetch-json-cache');
|
|
3
3
|
|
|
4
|
-
var constants = require('./
|
|
5
|
-
var keyFunctions = require('./
|
|
6
|
-
var lineFunctions = require('./
|
|
7
|
-
var normalizeSchedule = require('./
|
|
8
|
-
var normalizeVersion = require('./
|
|
9
|
-
var match = require('./
|
|
10
|
-
var parseExpression = require('./
|
|
4
|
+
var constants = require('./constants');
|
|
5
|
+
var keyFunctions = require('./keyFunctions');
|
|
6
|
+
var lineFunctions = require('./lineFunctions');
|
|
7
|
+
var normalizeSchedule = require('./normalizeSchedule');
|
|
8
|
+
var normalizeVersion = require('./normalizeVersion');
|
|
9
|
+
var match = require('./match');
|
|
10
|
+
var parseExpression = require('./parseExpression');
|
|
11
11
|
|
|
12
12
|
function NodeVersions(versions, schedule) {
|
|
13
13
|
if (!versions) throw new Error('Missing option: versions');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-semvers",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "Utilities for managing versions of node including looking up codenames",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node",
|
|
@@ -17,10 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"author": "Kevin Malakoff <kmalakoff@gmail.com> (https://github.com/kmalakoff)",
|
|
20
|
-
"main": "index.js",
|
|
20
|
+
"main": "lib/index.js",
|
|
21
21
|
"bin": {
|
|
22
22
|
"nsv": "./bin/node-semvers.js"
|
|
23
23
|
},
|
|
24
|
+
"files": [
|
|
25
|
+
"lib"
|
|
26
|
+
],
|
|
24
27
|
"scripts": {
|
|
25
28
|
"format": "prettier --write .",
|
|
26
29
|
"postinstall": "node bin/cache.js",
|
|
@@ -30,29 +33,28 @@
|
|
|
30
33
|
},
|
|
31
34
|
"dependencies": {
|
|
32
35
|
"exit": "^0.1.2",
|
|
33
|
-
"fetch-json-cache": "^0.1.
|
|
36
|
+
"fetch-json-cache": "^0.1.10",
|
|
34
37
|
"getopts-compat": "^2.2.5",
|
|
35
38
|
"isarray": "^2.0.5",
|
|
36
39
|
"semver": "^5.7.1"
|
|
37
40
|
},
|
|
38
41
|
"devDependencies": {
|
|
39
|
-
"
|
|
42
|
+
"@typescript-eslint/parser": "^5.30.0",
|
|
40
43
|
"cr": "^0.1.0",
|
|
41
|
-
"cross-spawn-cb": "^0.
|
|
42
|
-
"depcheck": "^1.4.
|
|
43
|
-
"dis-dat": "^0.1.
|
|
44
|
-
"eslint": "^
|
|
45
|
-
"eslint-config-prettier": "^
|
|
46
|
-
"eslint-config-standard": "^
|
|
47
|
-
"eslint-plugin-import": "^2.
|
|
48
|
-
"eslint-plugin-
|
|
49
|
-
"eslint-plugin-promise": "^
|
|
50
|
-
"eslint-plugin-standard": "^4.0.1",
|
|
44
|
+
"cross-spawn-cb": "^0.5.9",
|
|
45
|
+
"depcheck": "^1.4.3",
|
|
46
|
+
"dis-dat": "^0.1.6",
|
|
47
|
+
"eslint": "^8.18.0",
|
|
48
|
+
"eslint-config-prettier": "^8.5.0",
|
|
49
|
+
"eslint-config-standard": "^17.0.0",
|
|
50
|
+
"eslint-plugin-import": "^2.26.0",
|
|
51
|
+
"eslint-plugin-n": "^15.2.3",
|
|
52
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
51
53
|
"mocha-compat": "^3.5.5",
|
|
52
|
-
"prettier": "^2.
|
|
54
|
+
"prettier": "^2.7.1",
|
|
53
55
|
"rimraf": "^2.7.1"
|
|
54
56
|
},
|
|
55
57
|
"engines": {
|
|
56
|
-
"node": ">=0.
|
|
58
|
+
"node": ">=0.8"
|
|
57
59
|
}
|
|
58
60
|
}
|
package/bin/cache.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
var Cache = require('fetch-json-cache');
|
|
4
|
-
var exit = require('exit');
|
|
5
|
-
var constants = require('../lib/constants');
|
|
6
|
-
|
|
7
|
-
var cache = new Cache(constants.CACHE_DIRECTORY);
|
|
8
|
-
|
|
9
|
-
function cacheJSON(callback) {
|
|
10
|
-
cache.get(constants.DISTS_URL, { force: true }, function (err) {
|
|
11
|
-
err ? callback(err) : cache.get(constants.SCHEDULES_URL, { force: true }, callback);
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
cacheJSON(function (err) {
|
|
16
|
-
if (err) {
|
|
17
|
-
console.log('Failed to cache dists and schedules. Error: ' + err.message);
|
|
18
|
-
return exit(err.code || -1);
|
|
19
|
-
}
|
|
20
|
-
exit(0);
|
|
21
|
-
});
|