node-datachannel 0.2.2 → 0.3.0
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/.editorconfig +12 -0
- package/.eslintignore +2 -0
- package/.eslintrc.js +8 -0
- package/.github/FUNDING.yml +2 -0
- package/.github/workflows/build-linux.yml +5 -3
- package/.github/workflows/build-mac.yml +1 -1
- package/.github/workflows/build-win.yml +4 -10
- package/.prettierrc.js +7 -0
- package/CMakeLists.txt +8 -2
- package/README.md +4 -4
- package/lib/datachannel-stream.js +97 -0
- package/lib/index.d.ts +60 -53
- package/lib/index.js +5 -2
- package/node_modules/decompress-response/index.d.ts +14 -21
- package/node_modules/decompress-response/index.js +34 -16
- package/node_modules/decompress-response/license +1 -1
- package/node_modules/decompress-response/package.json +23 -17
- package/node_modules/decompress-response/readme.md +2 -6
- package/node_modules/detect-libc/README.md +124 -42
- package/node_modules/detect-libc/index.d.ts +11 -0
- package/node_modules/detect-libc/lib/detect-libc.js +166 -80
- package/node_modules/detect-libc/lib/process.js +16 -0
- package/node_modules/detect-libc/package.json +20 -19
- package/node_modules/{semver → lru-cache}/LICENSE +0 -0
- package/node_modules/lru-cache/README.md +166 -0
- package/node_modules/lru-cache/index.js +334 -0
- package/node_modules/lru-cache/node_modules/yallist/LICENSE +15 -0
- package/node_modules/lru-cache/node_modules/yallist/README.md +204 -0
- package/node_modules/lru-cache/node_modules/yallist/iterator.js +8 -0
- package/node_modules/lru-cache/node_modules/yallist/package.json +65 -0
- package/node_modules/lru-cache/node_modules/yallist/yallist.js +426 -0
- package/node_modules/lru-cache/package.json +75 -0
- package/node_modules/mimic-response/index.d.ts +2 -2
- package/node_modules/mimic-response/index.js +41 -2
- package/node_modules/mimic-response/package.json +17 -17
- package/node_modules/mimic-response/readme.md +22 -1
- package/node_modules/minimist/index.js +6 -2
- package/node_modules/minimist/package.json +10 -10
- package/node_modules/minimist/readme.markdown +4 -1
- package/node_modules/minimist/test/proto.js +16 -0
- package/node_modules/node-abi/.circleci/config.yml +63 -0
- package/node_modules/node-abi/.releaserc.json +9 -0
- package/node_modules/node-abi/abi_registry.json +45 -3
- package/node_modules/node-abi/index.js +5 -2
- package/node_modules/node-abi/node_modules/semver/CHANGELOG.md +111 -0
- package/node_modules/node-abi/node_modules/semver/LICENSE +15 -0
- package/node_modules/{semver → node-abi/node_modules/semver}/README.md +180 -26
- package/node_modules/node-abi/node_modules/semver/bin/semver.js +173 -0
- package/node_modules/node-abi/node_modules/semver/classes/comparator.js +135 -0
- package/node_modules/node-abi/node_modules/semver/classes/index.js +5 -0
- package/node_modules/node-abi/node_modules/semver/classes/range.js +510 -0
- package/node_modules/node-abi/node_modules/semver/classes/semver.js +287 -0
- package/node_modules/node-abi/node_modules/semver/functions/clean.js +6 -0
- package/node_modules/node-abi/node_modules/semver/functions/cmp.js +48 -0
- package/node_modules/node-abi/node_modules/semver/functions/coerce.js +51 -0
- package/node_modules/node-abi/node_modules/semver/functions/compare-build.js +7 -0
- package/node_modules/node-abi/node_modules/semver/functions/compare-loose.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/compare.js +5 -0
- package/node_modules/node-abi/node_modules/semver/functions/diff.js +23 -0
- package/node_modules/node-abi/node_modules/semver/functions/eq.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/gt.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/gte.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/inc.js +15 -0
- package/node_modules/node-abi/node_modules/semver/functions/lt.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/lte.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/major.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/minor.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/neq.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/parse.js +33 -0
- package/node_modules/node-abi/node_modules/semver/functions/patch.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/prerelease.js +6 -0
- package/node_modules/node-abi/node_modules/semver/functions/rcompare.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/rsort.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/satisfies.js +10 -0
- package/node_modules/node-abi/node_modules/semver/functions/sort.js +3 -0
- package/node_modules/node-abi/node_modules/semver/functions/valid.js +6 -0
- package/node_modules/node-abi/node_modules/semver/index.js +48 -0
- package/node_modules/node-abi/node_modules/semver/internal/constants.js +17 -0
- package/node_modules/node-abi/node_modules/semver/internal/debug.js +9 -0
- package/node_modules/node-abi/node_modules/semver/internal/identifiers.js +23 -0
- package/node_modules/node-abi/node_modules/semver/internal/parse-options.js +11 -0
- package/node_modules/node-abi/node_modules/semver/internal/re.js +182 -0
- package/node_modules/{semver → node-abi/node_modules/semver}/package.json +32 -23
- package/node_modules/node-abi/node_modules/semver/preload.js +2 -0
- package/node_modules/{semver → node-abi/node_modules/semver}/range.bnf +0 -0
- package/node_modules/node-abi/node_modules/semver/ranges/gtr.js +4 -0
- package/node_modules/node-abi/node_modules/semver/ranges/intersects.js +7 -0
- package/node_modules/node-abi/node_modules/semver/ranges/ltr.js +4 -0
- package/node_modules/node-abi/node_modules/semver/ranges/max-satisfying.js +25 -0
- package/node_modules/node-abi/node_modules/semver/ranges/min-satisfying.js +24 -0
- package/node_modules/node-abi/node_modules/semver/ranges/min-version.js +60 -0
- package/node_modules/node-abi/node_modules/semver/ranges/outside.js +80 -0
- package/node_modules/node-abi/node_modules/semver/ranges/simplify.js +44 -0
- package/node_modules/node-abi/node_modules/semver/ranges/subset.js +222 -0
- package/node_modules/node-abi/node_modules/semver/ranges/to-comparators.js +8 -0
- package/node_modules/node-abi/node_modules/semver/ranges/valid.js +11 -0
- package/node_modules/node-abi/package.json +21 -17
- package/node_modules/node-abi/test/index.js +7 -15
- package/node_modules/prebuild-install/CHANGELOG.md +24 -7
- package/node_modules/prebuild-install/README.md +24 -4
- package/node_modules/prebuild-install/asset.js +10 -10
- package/node_modules/prebuild-install/bin.js +13 -13
- package/node_modules/prebuild-install/download.js +22 -22
- package/node_modules/prebuild-install/log.js +4 -4
- package/node_modules/prebuild-install/package.json +18 -19
- package/node_modules/prebuild-install/proxy.js +10 -10
- package/node_modules/prebuild-install/rc.js +12 -12
- package/node_modules/prebuild-install/util.js +14 -14
- package/node_modules/simple-get/.github/dependabot.yml +15 -0
- package/node_modules/simple-get/.github/workflows/ci.yml +23 -0
- package/node_modules/simple-get/README.md +17 -3
- package/node_modules/simple-get/index.js +9 -0
- package/node_modules/simple-get/package.json +27 -13
- package/package.json +15 -6
- package/src/data-channel-wrapper.cpp +56 -22
- package/src/data-channel-wrapper.h +3 -0
- package/src/media-audio-wrapper.cpp +7 -7
- package/src/media-track-wrapper.cpp +40 -21
- package/src/media-track-wrapper.h +2 -0
- package/src/media-video-wrapper.cpp +5 -5
- package/src/peer-connection-wrapper.cpp +48 -27
- package/src/peer-connection-wrapper.h +2 -0
- package/test/connectivity.js +6 -6
- package/test/test.js +46 -1
- package/node_modules/detect-libc/.npmignore +0 -7
- package/node_modules/detect-libc/bin/detect-libc.js +0 -18
- package/node_modules/node-abi/.travis.yml +0 -17
- package/node_modules/semver/CHANGELOG.md +0 -39
- package/node_modules/semver/bin/semver +0 -160
- package/node_modules/semver/semver.js +0 -1483
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_args": [
|
|
3
|
+
[
|
|
4
|
+
"lru-cache@6.0.0",
|
|
5
|
+
"/home/runner/work/node-datachannel/node-datachannel"
|
|
6
|
+
]
|
|
7
|
+
],
|
|
8
|
+
"_from": "lru-cache@6.0.0",
|
|
9
|
+
"_id": "lru-cache@6.0.0",
|
|
10
|
+
"_inBundle": false,
|
|
11
|
+
"_integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
|
12
|
+
"_location": "/lru-cache",
|
|
13
|
+
"_phantomChildren": {},
|
|
14
|
+
"_requested": {
|
|
15
|
+
"type": "version",
|
|
16
|
+
"registry": true,
|
|
17
|
+
"raw": "lru-cache@6.0.0",
|
|
18
|
+
"name": "lru-cache",
|
|
19
|
+
"escapedName": "lru-cache",
|
|
20
|
+
"rawSpec": "6.0.0",
|
|
21
|
+
"saveSpec": null,
|
|
22
|
+
"fetchSpec": "6.0.0"
|
|
23
|
+
},
|
|
24
|
+
"_requiredBy": [
|
|
25
|
+
"/@typescript-eslint/eslint-plugin/semver",
|
|
26
|
+
"/@typescript-eslint/typescript-estree/semver",
|
|
27
|
+
"/jest-snapshot/semver",
|
|
28
|
+
"/node-abi/semver"
|
|
29
|
+
],
|
|
30
|
+
"_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
|
31
|
+
"_spec": "6.0.0",
|
|
32
|
+
"_where": "/home/runner/work/node-datachannel/node-datachannel",
|
|
33
|
+
"author": {
|
|
34
|
+
"name": "Isaac Z. Schlueter",
|
|
35
|
+
"email": "i@izs.me"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/isaacs/node-lru-cache/issues"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"yallist": "^4.0.0"
|
|
42
|
+
},
|
|
43
|
+
"description": "A cache object that deletes the least-recently-used items.",
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"benchmark": "^2.1.4",
|
|
46
|
+
"tap": "^14.10.7"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=10"
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
"index.js"
|
|
53
|
+
],
|
|
54
|
+
"homepage": "https://github.com/isaacs/node-lru-cache#readme",
|
|
55
|
+
"keywords": [
|
|
56
|
+
"mru",
|
|
57
|
+
"lru",
|
|
58
|
+
"cache"
|
|
59
|
+
],
|
|
60
|
+
"license": "ISC",
|
|
61
|
+
"main": "index.js",
|
|
62
|
+
"name": "lru-cache",
|
|
63
|
+
"repository": {
|
|
64
|
+
"type": "git",
|
|
65
|
+
"url": "git://github.com/isaacs/node-lru-cache.git"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"postversion": "npm publish",
|
|
69
|
+
"prepublishOnly": "git push origin --follow-tags",
|
|
70
|
+
"preversion": "npm test",
|
|
71
|
+
"snap": "tap",
|
|
72
|
+
"test": "tap"
|
|
73
|
+
},
|
|
74
|
+
"version": "6.0.0"
|
|
75
|
+
}
|
|
@@ -10,8 +10,8 @@ Makes `toStream` include the properties from `fromStream`.
|
|
|
10
10
|
@return The same object as `toStream`.
|
|
11
11
|
*/
|
|
12
12
|
declare function mimicResponse<T extends NodeJS.ReadableStream>(
|
|
13
|
-
fromStream: IncomingMessage,
|
|
13
|
+
fromStream: IncomingMessage, // eslint-disable-line @typescript-eslint/prefer-readonly-parameter-types
|
|
14
14
|
toStream: T,
|
|
15
|
-
):
|
|
15
|
+
): T & IncomingMessage;
|
|
16
16
|
|
|
17
17
|
export = mimicResponse;
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
const knownProperties = [
|
|
7
7
|
'aborted',
|
|
8
8
|
'complete',
|
|
9
|
-
'destroy',
|
|
10
9
|
'headers',
|
|
11
10
|
'httpVersion',
|
|
12
11
|
'httpVersionMinor',
|
|
@@ -23,16 +22,56 @@ const knownProperties = [
|
|
|
23
22
|
];
|
|
24
23
|
|
|
25
24
|
module.exports = (fromStream, toStream) => {
|
|
25
|
+
if (toStream._readableState.autoDestroy) {
|
|
26
|
+
throw new Error('The second stream must have the `autoDestroy` option set to `false`');
|
|
27
|
+
}
|
|
28
|
+
|
|
26
29
|
const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties));
|
|
27
30
|
|
|
31
|
+
const properties = {};
|
|
32
|
+
|
|
28
33
|
for (const property of fromProperties) {
|
|
29
34
|
// Don't overwrite existing properties.
|
|
30
35
|
if (property in toStream) {
|
|
31
36
|
continue;
|
|
32
37
|
}
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
properties[property] = {
|
|
40
|
+
get() {
|
|
41
|
+
const value = fromStream[property];
|
|
42
|
+
const isFunction = typeof value === 'function';
|
|
43
|
+
|
|
44
|
+
return isFunction ? value.bind(fromStream) : value;
|
|
45
|
+
},
|
|
46
|
+
set(value) {
|
|
47
|
+
fromStream[property] = value;
|
|
48
|
+
},
|
|
49
|
+
enumerable: true,
|
|
50
|
+
configurable: false
|
|
51
|
+
};
|
|
35
52
|
}
|
|
36
53
|
|
|
54
|
+
Object.defineProperties(toStream, properties);
|
|
55
|
+
|
|
56
|
+
fromStream.once('aborted', () => {
|
|
57
|
+
toStream.destroy();
|
|
58
|
+
|
|
59
|
+
toStream.emit('aborted');
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
fromStream.once('close', () => {
|
|
63
|
+
if (fromStream.complete) {
|
|
64
|
+
if (toStream.readable) {
|
|
65
|
+
toStream.once('end', () => {
|
|
66
|
+
toStream.emit('close');
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
toStream.emit('close');
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
toStream.emit('close');
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
37
76
|
return toStream;
|
|
38
77
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_args": [
|
|
3
3
|
[
|
|
4
|
-
"mimic-response@
|
|
4
|
+
"mimic-response@3.1.0",
|
|
5
5
|
"/home/runner/work/node-datachannel/node-datachannel"
|
|
6
6
|
]
|
|
7
7
|
],
|
|
8
|
-
"_from": "mimic-response@
|
|
9
|
-
"_id": "mimic-response@
|
|
8
|
+
"_from": "mimic-response@3.1.0",
|
|
9
|
+
"_id": "mimic-response@3.1.0",
|
|
10
10
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512-
|
|
11
|
+
"_integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
|
|
12
12
|
"_location": "/mimic-response",
|
|
13
13
|
"_phantomChildren": {},
|
|
14
14
|
"_requested": {
|
|
15
15
|
"type": "version",
|
|
16
16
|
"registry": true,
|
|
17
|
-
"raw": "mimic-response@
|
|
17
|
+
"raw": "mimic-response@3.1.0",
|
|
18
18
|
"name": "mimic-response",
|
|
19
19
|
"escapedName": "mimic-response",
|
|
20
|
-
"rawSpec": "
|
|
20
|
+
"rawSpec": "3.1.0",
|
|
21
21
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "
|
|
22
|
+
"fetchSpec": "3.1.0"
|
|
23
23
|
},
|
|
24
24
|
"_requiredBy": [
|
|
25
25
|
"/decompress-response"
|
|
26
26
|
],
|
|
27
|
-
"_resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-
|
|
28
|
-
"_spec": "
|
|
27
|
+
"_resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
|
|
28
|
+
"_spec": "3.1.0",
|
|
29
29
|
"_where": "/home/runner/work/node-datachannel/node-datachannel",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Sindre Sorhus",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
},
|
|
38
38
|
"description": "Mimic a Node.js HTTP response stream",
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@
|
|
41
|
-
"
|
|
42
|
-
"ava": "^1.1.0",
|
|
40
|
+
"@types/node": "^14.0.1",
|
|
41
|
+
"ava": "^2.4.0",
|
|
43
42
|
"create-test-server": "^2.4.0",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
43
|
+
"p-event": "^4.1.0",
|
|
44
|
+
"pify": "^5.0.0",
|
|
45
|
+
"tsd": "^0.11.0",
|
|
46
|
+
"xo": "^0.30.0"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
|
-
"node": ">=
|
|
49
|
+
"node": ">=10"
|
|
50
50
|
},
|
|
51
51
|
"files": [
|
|
52
52
|
"index.d.ts",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"scripts": {
|
|
74
74
|
"test": "xo && ava && tsd"
|
|
75
75
|
},
|
|
76
|
-
"version": "
|
|
76
|
+
"version": "3.1.0"
|
|
77
77
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# mimic-response [](https://travis-ci.com/sindresorhus/mimic-response)
|
|
2
2
|
|
|
3
3
|
> Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
|
|
4
4
|
|
|
@@ -27,6 +27,27 @@ console.log(myStream.statusCode);
|
|
|
27
27
|
|
|
28
28
|
### mimicResponse(from, to)
|
|
29
29
|
|
|
30
|
+
**Note #1:** The `from.destroy(error)` function is not proxied. You have to call it manually:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
const stream = require('stream');
|
|
34
|
+
const mimicResponse = require('mimic-response');
|
|
35
|
+
|
|
36
|
+
const responseStream = getHttpResponseStream();
|
|
37
|
+
|
|
38
|
+
const myStream = new stream.PassThrough({
|
|
39
|
+
destroy(error, callback) {
|
|
40
|
+
responseStream.destroy();
|
|
41
|
+
|
|
42
|
+
callback(error);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
myStream.destroy();
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Please note that `myStream` and `responseStream` never throws. The error is passed to the request instead.
|
|
50
|
+
|
|
30
51
|
#### from
|
|
31
52
|
|
|
32
53
|
Type: `Stream`
|
|
@@ -70,7 +70,7 @@ module.exports = function (args, opts) {
|
|
|
70
70
|
var o = obj;
|
|
71
71
|
for (var i = 0; i < keys.length-1; i++) {
|
|
72
72
|
var key = keys[i];
|
|
73
|
-
if (key
|
|
73
|
+
if (isConstructorOrProto(o, key)) return;
|
|
74
74
|
if (o[key] === undefined) o[key] = {};
|
|
75
75
|
if (o[key] === Object.prototype || o[key] === Number.prototype
|
|
76
76
|
|| o[key] === String.prototype) o[key] = {};
|
|
@@ -79,7 +79,7 @@ module.exports = function (args, opts) {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
var key = keys[keys.length - 1];
|
|
82
|
-
if (key
|
|
82
|
+
if (isConstructorOrProto(o, key)) return;
|
|
83
83
|
if (o === Object.prototype || o === Number.prototype
|
|
84
84
|
|| o === String.prototype) o = {};
|
|
85
85
|
if (o === Array.prototype) o = [];
|
|
@@ -243,3 +243,7 @@ function isNumber (x) {
|
|
|
243
243
|
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
|
|
247
|
+
function isConstructorOrProto (obj, key) {
|
|
248
|
+
return key === 'constructor' && typeof obj[key] === 'function' || key === '__proto__';
|
|
249
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_args": [
|
|
3
3
|
[
|
|
4
|
-
"minimist@1.2.
|
|
4
|
+
"minimist@1.2.6",
|
|
5
5
|
"/home/runner/work/node-datachannel/node-datachannel"
|
|
6
6
|
]
|
|
7
7
|
],
|
|
8
|
-
"_from": "minimist@1.2.
|
|
9
|
-
"_id": "minimist@1.2.
|
|
8
|
+
"_from": "minimist@1.2.6",
|
|
9
|
+
"_id": "minimist@1.2.6",
|
|
10
10
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512-
|
|
11
|
+
"_integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
|
12
12
|
"_location": "/minimist",
|
|
13
13
|
"_phantomChildren": {},
|
|
14
14
|
"_requested": {
|
|
15
15
|
"type": "version",
|
|
16
16
|
"registry": true,
|
|
17
|
-
"raw": "minimist@1.2.
|
|
17
|
+
"raw": "minimist@1.2.6",
|
|
18
18
|
"name": "minimist",
|
|
19
19
|
"escapedName": "minimist",
|
|
20
|
-
"rawSpec": "1.2.
|
|
20
|
+
"rawSpec": "1.2.6",
|
|
21
21
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "1.2.
|
|
22
|
+
"fetchSpec": "1.2.6"
|
|
23
23
|
},
|
|
24
24
|
"_requiredBy": [
|
|
25
25
|
"/json5",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"/prebuild-install",
|
|
29
29
|
"/rc"
|
|
30
30
|
],
|
|
31
|
-
"_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.
|
|
32
|
-
"_spec": "1.2.
|
|
31
|
+
"_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
|
32
|
+
"_spec": "1.2.6",
|
|
33
33
|
"_where": "/home/runner/work/node-datachannel/node-datachannel",
|
|
34
34
|
"author": {
|
|
35
35
|
"name": "James Halliday",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"opera/12"
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
|
-
"version": "1.2.
|
|
79
|
+
"version": "1.2.6"
|
|
80
80
|
}
|
|
@@ -34,7 +34,10 @@ $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
|
|
|
34
34
|
Previous versions had a prototype pollution bug that could cause privilege
|
|
35
35
|
escalation in some circumstances when handling untrusted user input.
|
|
36
36
|
|
|
37
|
-
Please use version 1.2.
|
|
37
|
+
Please use version 1.2.6 or later:
|
|
38
|
+
|
|
39
|
+
* https://security.snyk.io/vuln/SNYK-JS-MINIMIST-2429795 (version <=1.2.5)
|
|
40
|
+
* https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 (version <=1.2.3)
|
|
38
41
|
|
|
39
42
|
# methods
|
|
40
43
|
|
|
@@ -42,3 +42,19 @@ test('proto pollution (constructor)', function (t) {
|
|
|
42
42
|
t.equal(argv.y, undefined);
|
|
43
43
|
t.end();
|
|
44
44
|
});
|
|
45
|
+
|
|
46
|
+
test('proto pollution (constructor function)', function (t) {
|
|
47
|
+
var argv = parse(['--_.concat.constructor.prototype.y', '123']);
|
|
48
|
+
function fnToBeTested() {}
|
|
49
|
+
t.equal(fnToBeTested.y, undefined);
|
|
50
|
+
t.equal(argv.y, undefined);
|
|
51
|
+
t.end();
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// powered by snyk - https://github.com/backstage/backstage/issues/10343
|
|
55
|
+
test('proto pollution (constructor function) snyk', function (t) {
|
|
56
|
+
var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' '));
|
|
57
|
+
t.equal((function(){}).foo, undefined);
|
|
58
|
+
t.equal(argv.y, undefined);
|
|
59
|
+
t.end();
|
|
60
|
+
})
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
step-restore-cache: &step-restore-cache
|
|
2
|
+
restore_cache:
|
|
3
|
+
keys:
|
|
4
|
+
- v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
|
|
5
|
+
- v1-dependencies-{{ arch }}
|
|
6
|
+
|
|
7
|
+
steps-test: &steps-test
|
|
8
|
+
steps:
|
|
9
|
+
- checkout
|
|
10
|
+
- *step-restore-cache
|
|
11
|
+
- run: yarn --frozen-lockfile
|
|
12
|
+
- save_cache:
|
|
13
|
+
paths:
|
|
14
|
+
- node_modules
|
|
15
|
+
key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
|
|
16
|
+
- run: yarn test
|
|
17
|
+
|
|
18
|
+
version: 2.1
|
|
19
|
+
jobs:
|
|
20
|
+
test-linux-10:
|
|
21
|
+
docker:
|
|
22
|
+
- image: circleci/node:10
|
|
23
|
+
<<: *steps-test
|
|
24
|
+
test-linux-12:
|
|
25
|
+
docker:
|
|
26
|
+
- image: circleci/node:12
|
|
27
|
+
<<: *steps-test
|
|
28
|
+
test-linux-14:
|
|
29
|
+
docker:
|
|
30
|
+
- image: circleci/node:14
|
|
31
|
+
<<: *steps-test
|
|
32
|
+
test-linux-16:
|
|
33
|
+
docker:
|
|
34
|
+
- image: circleci/node:16
|
|
35
|
+
<<: *steps-test
|
|
36
|
+
|
|
37
|
+
release:
|
|
38
|
+
docker:
|
|
39
|
+
- image: circleci/node:14.15
|
|
40
|
+
steps:
|
|
41
|
+
- checkout
|
|
42
|
+
- *step-restore-cache
|
|
43
|
+
- run: yarn --frozen-lockfile
|
|
44
|
+
- run: npx semantic-release@17.4.5
|
|
45
|
+
workflows:
|
|
46
|
+
version: 2
|
|
47
|
+
test_and_release:
|
|
48
|
+
# Run test jobs first, release only when all the test jobs are successful
|
|
49
|
+
jobs:
|
|
50
|
+
- test-linux-10
|
|
51
|
+
- test-linux-12
|
|
52
|
+
- test-linux-14
|
|
53
|
+
- test-linux-16
|
|
54
|
+
- release:
|
|
55
|
+
requires:
|
|
56
|
+
- test-linux-10
|
|
57
|
+
- test-linux-12
|
|
58
|
+
- test-linux-14
|
|
59
|
+
- test-linux-16
|
|
60
|
+
filters:
|
|
61
|
+
branches:
|
|
62
|
+
only:
|
|
63
|
+
- main
|
|
@@ -50,6 +50,13 @@
|
|
|
50
50
|
"future": false,
|
|
51
51
|
"abi": "93"
|
|
52
52
|
},
|
|
53
|
+
{
|
|
54
|
+
"runtime": "node",
|
|
55
|
+
"target": "17.0.0",
|
|
56
|
+
"lts": false,
|
|
57
|
+
"future": false,
|
|
58
|
+
"abi": "102"
|
|
59
|
+
},
|
|
53
60
|
{
|
|
54
61
|
"abi": "70",
|
|
55
62
|
"future": false,
|
|
@@ -125,20 +132,55 @@
|
|
|
125
132
|
"future": false,
|
|
126
133
|
"lts": false,
|
|
127
134
|
"runtime": "electron",
|
|
128
|
-
"target": "
|
|
135
|
+
"target": "13.0.0-beta.2"
|
|
129
136
|
},
|
|
130
137
|
{
|
|
131
138
|
"abi": "89",
|
|
132
139
|
"future": false,
|
|
133
140
|
"lts": false,
|
|
134
141
|
"runtime": "electron",
|
|
135
|
-
"target": "
|
|
142
|
+
"target": "15.0.0-alpha.1"
|
|
136
143
|
},
|
|
137
144
|
{
|
|
138
145
|
"abi": "89",
|
|
146
|
+
"future": false,
|
|
147
|
+
"lts": false,
|
|
148
|
+
"runtime": "electron",
|
|
149
|
+
"target": "14.0.0-beta.1"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"abi": "97",
|
|
153
|
+
"future": false,
|
|
154
|
+
"lts": false,
|
|
155
|
+
"runtime": "electron",
|
|
156
|
+
"target": "14.0.2"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"abi": "98",
|
|
160
|
+
"future": false,
|
|
161
|
+
"lts": false,
|
|
162
|
+
"runtime": "electron",
|
|
163
|
+
"target": "15.0.0-beta.7"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"abi": "99",
|
|
167
|
+
"future": false,
|
|
168
|
+
"lts": false,
|
|
169
|
+
"runtime": "electron",
|
|
170
|
+
"target": "16.0.0-alpha.1"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"abi": "101",
|
|
174
|
+
"future": false,
|
|
175
|
+
"lts": false,
|
|
176
|
+
"runtime": "electron",
|
|
177
|
+
"target": "17.0.0-alpha.1"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"abi": "103",
|
|
139
181
|
"future": true,
|
|
140
182
|
"lts": false,
|
|
141
183
|
"runtime": "electron",
|
|
142
|
-
"target": "
|
|
184
|
+
"target": "18.0.0-alpha.1"
|
|
143
185
|
}
|
|
144
186
|
]
|
|
@@ -24,12 +24,15 @@ function getAbi (target, runtime) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
var abi
|
|
27
|
+
var lastTarget
|
|
27
28
|
|
|
28
29
|
for (var i = 0; i < allTargets.length; i++) {
|
|
29
30
|
var t = allTargets[i]
|
|
30
31
|
if (t.runtime !== runtime) continue
|
|
31
|
-
if (semver.lte(t.target, target)
|
|
32
|
-
|
|
32
|
+
if (semver.lte(t.target, target) && (!lastTarget || semver.gte(t.target, lastTarget))) {
|
|
33
|
+
abi = t.abi
|
|
34
|
+
lastTarget = t.target
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
if (abi && semver.lt(target, getNextTarget(runtime))) return abi
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# changes log
|
|
2
|
+
|
|
3
|
+
## 7.3.0
|
|
4
|
+
|
|
5
|
+
* Add `subset(r1, r2)` method to determine if `r1` range is entirely
|
|
6
|
+
contained by `r2` range.
|
|
7
|
+
|
|
8
|
+
## 7.2.3
|
|
9
|
+
|
|
10
|
+
* Fix handling of `includePrelease` mode where version ranges like `1.0.0 -
|
|
11
|
+
2.0.0` would include `3.0.0-pre` and not `1.0.0-pre`.
|
|
12
|
+
|
|
13
|
+
## 7.2.2
|
|
14
|
+
|
|
15
|
+
* Fix bug where `2.0.0-pre` would be included in `^1.0.0` if
|
|
16
|
+
`includePrerelease` was set to true.
|
|
17
|
+
|
|
18
|
+
## 7.2.0
|
|
19
|
+
|
|
20
|
+
* Add `simplifyRange` method to attempt to generate a more human-readable
|
|
21
|
+
range expression that is equivalent to a supplied range, for a given set
|
|
22
|
+
of versions.
|
|
23
|
+
|
|
24
|
+
## 7.1.2
|
|
25
|
+
|
|
26
|
+
* Remove fancy lazy-loading logic, as it was causing problems for webpack
|
|
27
|
+
users.
|
|
28
|
+
|
|
29
|
+
## 7.1.0
|
|
30
|
+
|
|
31
|
+
* Add `require('semver/preload')` to load the entire module without using
|
|
32
|
+
lazy getter methods.
|
|
33
|
+
|
|
34
|
+
## 7.0.0
|
|
35
|
+
|
|
36
|
+
* Refactor module into separate files for better tree-shaking
|
|
37
|
+
* Drop support for very old node versions, use const/let, `=>` functions,
|
|
38
|
+
and classes.
|
|
39
|
+
|
|
40
|
+
## 6.3.0
|
|
41
|
+
|
|
42
|
+
* Expose the token enum on the exports
|
|
43
|
+
|
|
44
|
+
## 6.2.0
|
|
45
|
+
|
|
46
|
+
* Coerce numbers to strings when passed to semver.coerce()
|
|
47
|
+
* Add `rtl` option to coerce from right to left
|
|
48
|
+
|
|
49
|
+
## 6.1.3
|
|
50
|
+
|
|
51
|
+
* Handle X-ranges properly in includePrerelease mode
|
|
52
|
+
|
|
53
|
+
## 6.1.2
|
|
54
|
+
|
|
55
|
+
* Do not throw when testing invalid version strings
|
|
56
|
+
|
|
57
|
+
## 6.1.1
|
|
58
|
+
|
|
59
|
+
* Add options support for semver.coerce()
|
|
60
|
+
* Handle undefined version passed to Range.test
|
|
61
|
+
|
|
62
|
+
## 6.1.0
|
|
63
|
+
|
|
64
|
+
* Add semver.compareBuild function
|
|
65
|
+
* Support `*` in semver.intersects
|
|
66
|
+
|
|
67
|
+
## 6.0
|
|
68
|
+
|
|
69
|
+
* Fix `intersects` logic.
|
|
70
|
+
|
|
71
|
+
This is technically a bug fix, but since it is also a change to behavior
|
|
72
|
+
that may require users updating their code, it is marked as a major
|
|
73
|
+
version increment.
|
|
74
|
+
|
|
75
|
+
## 5.7
|
|
76
|
+
|
|
77
|
+
* Add `minVersion` method
|
|
78
|
+
|
|
79
|
+
## 5.6
|
|
80
|
+
|
|
81
|
+
* Move boolean `loose` param to an options object, with
|
|
82
|
+
backwards-compatibility protection.
|
|
83
|
+
* Add ability to opt out of special prerelease version handling with
|
|
84
|
+
the `includePrerelease` option flag.
|
|
85
|
+
|
|
86
|
+
## 5.5
|
|
87
|
+
|
|
88
|
+
* Add version coercion capabilities
|
|
89
|
+
|
|
90
|
+
## 5.4
|
|
91
|
+
|
|
92
|
+
* Add intersection checking
|
|
93
|
+
|
|
94
|
+
## 5.3
|
|
95
|
+
|
|
96
|
+
* Add `minSatisfying` method
|
|
97
|
+
|
|
98
|
+
## 5.2
|
|
99
|
+
|
|
100
|
+
* Add `prerelease(v)` that returns prerelease components
|
|
101
|
+
|
|
102
|
+
## 5.1
|
|
103
|
+
|
|
104
|
+
* Add Backus-Naur for ranges
|
|
105
|
+
* Remove excessively cute inspection methods
|
|
106
|
+
|
|
107
|
+
## 5.0
|
|
108
|
+
|
|
109
|
+
* Remove AMD/Browserified build artifacts
|
|
110
|
+
* Fix ltr and gtr when using the `*` range
|
|
111
|
+
* Fix for range `*` with a prerelease identifier
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
The ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
15
|
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|