fsevents 1.2.2 → 1.2.7
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.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/.travis.yml +2 -1
- package/fsevents.cc +9 -22
- package/node_modules/abbrev/package.json +1 -1
- package/node_modules/ansi-regex/package.json +1 -1
- package/node_modules/aproba/package.json +1 -1
- package/node_modules/are-we-there-yet/CHANGES.md +6 -0
- package/node_modules/are-we-there-yet/package.json +8 -8
- package/node_modules/are-we-there-yet/tracker-stream.js +1 -0
- package/node_modules/balanced-match/package.json +1 -1
- package/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/chownr/chownr.js +74 -38
- package/node_modules/chownr/package.json +16 -13
- package/node_modules/code-point-at/package.json +1 -1
- package/node_modules/concat-map/package.json +1 -1
- package/node_modules/console-control-strings/package.json +1 -1
- package/node_modules/core-util-is/package.json +1 -1
- package/node_modules/debug/package.json +1 -1
- package/node_modules/deep-extend/CHANGELOG.md +28 -3
- package/node_modules/deep-extend/LICENSE +1 -1
- package/node_modules/deep-extend/README.md +2 -1
- package/node_modules/deep-extend/lib/deep-extend.js +11 -5
- package/node_modules/deep-extend/package.json +20 -21
- package/node_modules/delegates/package.json +1 -1
- package/node_modules/detect-libc/package.json +1 -1
- package/node_modules/fs-minipass/package.json +1 -1
- package/node_modules/fs.realpath/package.json +1 -1
- package/node_modules/gauge/package.json +1 -1
- package/node_modules/glob/package.json +12 -12
- package/node_modules/has-unicode/package.json +1 -1
- package/node_modules/iconv-lite/Changelog.md +16 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +2 -2
- package/node_modules/iconv-lite/encodings/sbcs-data.js +5 -0
- package/node_modules/iconv-lite/lib/extend-node.js +1 -1
- package/node_modules/iconv-lite/lib/index.d.ts +2 -2
- package/node_modules/iconv-lite/package.json +8 -8
- package/node_modules/ignore-walk/package.json +1 -1
- package/node_modules/inflight/package.json +1 -1
- package/node_modules/inherits/package.json +1 -1
- package/node_modules/ini/package.json +1 -1
- package/node_modules/is-fullwidth-code-point/package.json +1 -1
- package/node_modules/isarray/package.json +1 -1
- package/node_modules/minimatch/package.json +1 -1
- package/node_modules/minimist/package.json +1 -1
- package/node_modules/minipass/LICENSE +15 -0
- package/node_modules/minipass/README.md +81 -3
- package/node_modules/minipass/index.js +77 -6
- package/node_modules/minipass/package.json +13 -13
- package/node_modules/minizlib/index.js +66 -95
- package/node_modules/minizlib/package.json +12 -12
- package/node_modules/mkdirp/package.json +1 -1
- package/node_modules/ms/package.json +1 -1
- package/node_modules/needle/README.md +2 -1
- package/node_modules/needle/lib/cookies.js +12 -10
- package/node_modules/needle/lib/needle.js +16 -4
- package/node_modules/needle/note.xml +7 -0
- package/node_modules/needle/note.xml.1 +7 -0
- package/node_modules/needle/package.json +13 -13
- package/node_modules/needle/test/errors_spec.js +4 -4
- package/node_modules/needle/test/long_string_spec.js +1 -1
- package/node_modules/needle/test/url_spec.js +11 -3
- package/node_modules/node-pre-gyp/CHANGELOG.md +24 -3
- package/node_modules/node-pre-gyp/README.md +15 -18
- package/node_modules/node-pre-gyp/appveyor.yml +2 -9
- package/node_modules/node-pre-gyp/contributing.md +2 -2
- package/node_modules/node-pre-gyp/lib/install.js +29 -7
- package/node_modules/node-pre-gyp/lib/package.js +5 -2
- package/node_modules/node-pre-gyp/lib/reinstall.js +1 -1
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +100 -0
- package/node_modules/node-pre-gyp/package.json +13 -14
- package/node_modules/nopt/package.json +1 -1
- package/node_modules/npm-bundled/LICENSE +15 -0
- package/node_modules/npm-bundled/README.md +2 -0
- package/node_modules/npm-bundled/index.js +3 -1
- package/node_modules/npm-bundled/package.json +7 -7
- package/node_modules/npm-packlist/index.js +16 -7
- package/node_modules/npm-packlist/package.json +7 -7
- package/node_modules/npmlog/package.json +1 -1
- package/node_modules/number-is-nan/package.json +1 -1
- package/node_modules/object-assign/package.json +1 -1
- package/node_modules/once/package.json +1 -1
- package/node_modules/os-homedir/package.json +1 -1
- package/node_modules/os-tmpdir/package.json +1 -1
- package/node_modules/osenv/package.json +1 -1
- package/node_modules/path-is-absolute/package.json +1 -1
- package/node_modules/process-nextick-args/package.json +1 -1
- package/node_modules/rc/node_modules/minimist/package.json +1 -1
- package/node_modules/rc/package.json +12 -12
- package/node_modules/readable-stream/package.json +1 -1
- package/node_modules/rimraf/package.json +11 -8
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/package.json +9 -9
- package/node_modules/safer-buffer/package.json +6 -6
- package/node_modules/sax/package.json +1 -1
- package/node_modules/semver/README.md +17 -6
- package/node_modules/semver/bin/semver +14 -4
- package/node_modules/semver/package.json +7 -7
- package/node_modules/semver/semver.js +132 -104
- package/node_modules/set-blocking/package.json +1 -1
- package/node_modules/signal-exit/package.json +1 -1
- package/node_modules/string-width/package.json +1 -1
- package/node_modules/string_decoder/package.json +1 -1
- package/node_modules/strip-ansi/package.json +1 -1
- package/node_modules/strip-json-comments/package.json +1 -1
- package/node_modules/tar/README.md +7 -2
- package/node_modules/tar/lib/header.js +20 -4
- package/node_modules/tar/lib/mode-fix.js +14 -0
- package/node_modules/tar/lib/pack.js +1 -0
- package/node_modules/tar/lib/parse.js +2 -1
- package/node_modules/tar/lib/unpack.js +67 -6
- package/node_modules/tar/lib/write-entry.js +25 -6
- package/node_modules/tar/package.json +14 -14
- package/node_modules/util-deprecate/package.json +1 -1
- package/node_modules/wide-align/package.json +8 -8
- package/node_modules/wrappy/package.json +1 -1
- package/node_modules/yallist/iterator.js +5 -5
- package/node_modules/yallist/package.json +7 -7
- package/node_modules/yallist/yallist.js +2 -2
- package/package.json +3 -3
- package/src/async.cc +2 -2
- package/src/methods.cc +9 -7
- package/src/thread.cc +5 -6
- package/.npmignore +0 -1
- package/build/.target.mk +0 -53
- package/build/Makefile +0 -352
- package/build/Release/.deps/Release/.node.d +0 -1
- package/build/Release/.deps/Release/fse.node.d +0 -1
- package/build/Release/.deps/Release/obj.target/action_after_build.stamp.d +0 -1
- package/build/Release/.deps/Release/obj.target/fse/fsevents.o.d +0 -65
- package/build/Release/.deps/Users/eshanker/Code/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node.d +0 -1
- package/build/Release/.node +0 -0
- package/build/Release/fse.node +0 -0
- package/build/Release/obj.target/action_after_build.stamp +0 -0
- package/build/Release/obj.target/fse/fsevents.o +0 -0
- package/build/action_after_build.target.mk +0 -32
- package/build/binding.Makefile +0 -6
- package/build/fse.target.mk +0 -179
- package/build/gyp-mac-tool +0 -611
- package/build/stage/v1.1.2/fse-v1.1.2-node-v48-darwin-x64.tar.gz +0 -0
- package/lib/binding/Release/node-v11-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v46-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v47-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v48-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v57-darwin-x64/fse.node +0 -0
- package/node_modules/are-we-there-yet/CHANGES.md~ +0 -27
- package/node_modules/iconv-lite/.travis.yml +0 -23
- package/node_modules/rc/.npmignore +0 -3
- package/node_modules/safe-buffer/.travis.yml +0 -7
- package/node_modules/safe-buffer/test.js +0 -101
- package/src/locking.cc +0 -27
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
22
22
|
"_shasum": "fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b",
|
23
23
|
"_spec": "detect-libc@^1.0.2",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/node-pre-gyp",
|
25
25
|
"author": {
|
26
26
|
"name": "Lovell Fuller",
|
27
27
|
"email": "npm@lovell.info"
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
|
22
22
|
"_shasum": "06c277218454ec288df77ada54a03b8702aacb9d",
|
23
23
|
"_spec": "fs-minipass@^1.2.5",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/tar",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
22
22
|
"_shasum": "1504ad2523158caa40db4a2787cb01411994ea4f",
|
23
23
|
"_spec": "fs.realpath@^1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/glob",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
|
22
22
|
"_shasum": "2c03405c7538c39d7eb37b317022e325fb018bf7",
|
23
23
|
"_spec": "gauge@~2.7.3",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/npmlog",
|
25
25
|
"author": {
|
26
26
|
"name": "Rebecca Turner",
|
27
27
|
"email": "me@re-becca.org"
|
@@ -1,27 +1,27 @@
|
|
1
1
|
{
|
2
|
-
"_from": "glob@^7.
|
3
|
-
"_id": "glob@7.1.
|
2
|
+
"_from": "glob@^7.1.3",
|
3
|
+
"_id": "glob@7.1.3",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
6
6
|
"_location": "/glob",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
9
9
|
"type": "range",
|
10
10
|
"registry": true,
|
11
|
-
"raw": "glob@^7.
|
11
|
+
"raw": "glob@^7.1.3",
|
12
12
|
"name": "glob",
|
13
13
|
"escapedName": "glob",
|
14
|
-
"rawSpec": "^7.
|
14
|
+
"rawSpec": "^7.1.3",
|
15
15
|
"saveSpec": null,
|
16
|
-
"fetchSpec": "^7.
|
16
|
+
"fetchSpec": "^7.1.3"
|
17
17
|
},
|
18
18
|
"_requiredBy": [
|
19
19
|
"/rimraf"
|
20
20
|
],
|
21
|
-
"_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.
|
22
|
-
"_shasum": "
|
23
|
-
"_spec": "glob@^7.
|
24
|
-
"_where": "/Users/
|
21
|
+
"_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
22
|
+
"_shasum": "3960832d3f1574108342dafd3a67b332c0969df1",
|
23
|
+
"_spec": "glob@^7.1.3",
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/rimraf",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -44,7 +44,7 @@
|
|
44
44
|
"devDependencies": {
|
45
45
|
"mkdirp": "0",
|
46
46
|
"rimraf": "^2.2.8",
|
47
|
-
"tap": "^
|
47
|
+
"tap": "^12.0.1",
|
48
48
|
"tick": "0.0.6"
|
49
49
|
},
|
50
50
|
"engines": {
|
@@ -72,5 +72,5 @@
|
|
72
72
|
"test": "tap test/*.js --cov",
|
73
73
|
"test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js"
|
74
74
|
},
|
75
|
-
"version": "7.1.
|
75
|
+
"version": "7.1.3"
|
76
76
|
}
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
22
22
|
"_shasum": "e0e6fe6a28cf51138855e086d1691e771de2a8b9",
|
23
23
|
"_spec": "has-unicode@^2.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/gauge",
|
25
25
|
"author": {
|
26
26
|
"name": "Rebecca Turner",
|
27
27
|
"email": "me@re-becca.org"
|
@@ -1,3 +1,19 @@
|
|
1
|
+
# 0.4.24 / 2018-08-22
|
2
|
+
|
3
|
+
* Added MIK encoding (#196, by @Ivan-Kalatchev)
|
4
|
+
|
5
|
+
|
6
|
+
# 0.4.23 / 2018-05-07
|
7
|
+
|
8
|
+
* Fix deprecation warning in Node v10 due to the last usage of `new Buffer` (#185, by @felixbuenemann)
|
9
|
+
* Switched from NodeBuffer to Buffer in typings (#155 by @felixfbecker, #186 by @larssn)
|
10
|
+
|
11
|
+
|
12
|
+
# 0.4.22 / 2018-05-05
|
13
|
+
|
14
|
+
* Use older semver style for dependencies to be compatible with Node version 0.10 (#182, by @dougwilson)
|
15
|
+
* Fix tests to accomodate fixes in Node v10 (#182, by @dougwilson)
|
16
|
+
|
1
17
|
|
2
18
|
# 0.4.21 / 2018-04-06
|
3
19
|
|
@@ -20,10 +20,10 @@ function SBCSCodec(codecOptions, iconv) {
|
|
20
20
|
codecOptions.chars = asciiString + codecOptions.chars;
|
21
21
|
}
|
22
22
|
|
23
|
-
this.decodeBuf =
|
23
|
+
this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2');
|
24
24
|
|
25
25
|
// Encoding buffer.
|
26
|
-
var encodeBuf =
|
26
|
+
var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));
|
27
27
|
|
28
28
|
for (var i = 0; i < codecOptions.chars.length; i++)
|
29
29
|
encodeBuf[codecOptions.chars.charCodeAt(i)] = i;
|
@@ -17,6 +17,11 @@ module.exports = {
|
|
17
17
|
"chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ "
|
18
18
|
},
|
19
19
|
|
20
|
+
"mik": {
|
21
|
+
"type": "_sbcs",
|
22
|
+
"chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
|
23
|
+
},
|
24
|
+
|
20
25
|
// Aliases of generated encodings.
|
21
26
|
"ascii8bit": "ascii",
|
22
27
|
"usascii": "ascii",
|
@@ -10,7 +10,7 @@ module.exports = function (iconv) {
|
|
10
10
|
// Node authors rewrote Buffer internals to make it compatible with
|
11
11
|
// Uint8Array and we cannot patch key functions since then.
|
12
12
|
// Note: this does use older Buffer API on a purpose
|
13
|
-
iconv.supportsNodeEncodingsExtension = !(new Buffer(0) instanceof Uint8Array);
|
13
|
+
iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array);
|
14
14
|
|
15
15
|
iconv.extendNodeEncodings = function extendNodeEncodings() {
|
16
16
|
if (original) return;
|
@@ -6,9 +6,9 @@
|
|
6
6
|
*--------------------------------------------------------------------------------------------*/
|
7
7
|
|
8
8
|
declare module 'iconv-lite' {
|
9
|
-
export function decode(buffer:
|
9
|
+
export function decode(buffer: Buffer, encoding: string, options?: Options): string;
|
10
10
|
|
11
|
-
export function encode(content: string, encoding: string, options?: Options):
|
11
|
+
export function encode(content: string, encoding: string, options?: Options): Buffer;
|
12
12
|
|
13
13
|
export function encodingExists(encoding: string): boolean;
|
14
14
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "iconv-lite@^0.4.4",
|
3
|
-
"_id": "iconv-lite@0.4.
|
3
|
+
"_id": "iconv-lite@0.4.24",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
6
6
|
"_location": "/iconv-lite",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -18,10 +18,10 @@
|
|
18
18
|
"_requiredBy": [
|
19
19
|
"/needle"
|
20
20
|
],
|
21
|
-
"_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.
|
22
|
-
"_shasum": "
|
21
|
+
"_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
22
|
+
"_shasum": "2022b4b25fbddc21d2f524974a474aafe733908b",
|
23
23
|
"_spec": "iconv-lite@^0.4.4",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/needle",
|
25
25
|
"author": {
|
26
26
|
"name": "Alexander Shtuchkin",
|
27
27
|
"email": "ashtuchkin@gmail.com"
|
@@ -35,7 +35,7 @@
|
|
35
35
|
},
|
36
36
|
"bundleDependencies": false,
|
37
37
|
"dependencies": {
|
38
|
-
"safer-buffer": "
|
38
|
+
"safer-buffer": ">= 2.1.2 < 3"
|
39
39
|
},
|
40
40
|
"deprecated": false,
|
41
41
|
"description": "Convert character encodings in pure javascript.",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"iconv": "*",
|
46
46
|
"istanbul": "*",
|
47
47
|
"mocha": "^3.1.0",
|
48
|
-
"request": "~2.
|
48
|
+
"request": "~2.87.0",
|
49
49
|
"semver": "*",
|
50
50
|
"unorm": "*"
|
51
51
|
},
|
@@ -72,5 +72,5 @@
|
|
72
72
|
"test": "mocha --reporter spec --grep ."
|
73
73
|
},
|
74
74
|
"typings": "./lib/index.d.ts",
|
75
|
-
"version": "0.4.
|
75
|
+
"version": "0.4.24"
|
76
76
|
}
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz",
|
22
22
|
"_shasum": "a83e62e7d272ac0e3b551aaa82831a19b69f82f8",
|
23
23
|
"_spec": "ignore-walk@^3.0.1",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/npm-packlist",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
22
22
|
"_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9",
|
23
23
|
"_spec": "inflight@^1.0.4",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/glob",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
25
25
|
"_shasum": "633c2c83e3da42a502f52466022480f4208261de",
|
26
26
|
"_spec": "inherits@~2.0.3",
|
27
|
-
"_where": "/Users/
|
27
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/readable-stream",
|
28
28
|
"browser": "./inherits_browser.js",
|
29
29
|
"bugs": {
|
30
30
|
"url": "https://github.com/isaacs/inherits/issues"
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
22
22
|
"_shasum": "eee25f56db1c9ec6085e0c22778083f596abf927",
|
23
23
|
"_spec": "ini@~1.3.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/rc",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
22
22
|
"_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb",
|
23
23
|
"_spec": "is-fullwidth-code-point@^1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/string-width",
|
25
25
|
"author": {
|
26
26
|
"name": "Sindre Sorhus",
|
27
27
|
"email": "sindresorhus@gmail.com",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
22
22
|
"_shasum": "bb935d48582cba168c06834957a54a3e07124f11",
|
23
23
|
"_spec": "isarray@~1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/readable-stream",
|
25
25
|
"author": {
|
26
26
|
"name": "Julian Gruber",
|
27
27
|
"email": "mail@juliangruber.com",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
23
23
|
"_shasum": "5166e286457f03306064be5497e8dbb0c3d32083",
|
24
24
|
"_spec": "minimatch@^3.0.4",
|
25
|
-
"_where": "/Users/
|
25
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/ignore-walk",
|
26
26
|
"author": {
|
27
27
|
"name": "Isaac Z. Schlueter",
|
28
28
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
22
22
|
"_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
|
23
23
|
"_spec": "minimist@0.0.8",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/mkdirp",
|
25
25
|
"author": {
|
26
26
|
"name": "James Halliday",
|
27
27
|
"email": "mail@substack.net",
|
@@ -0,0 +1,15 @@
|
|
1
|
+
The ISC License
|
2
|
+
|
3
|
+
Copyright (c) npm, Inc. 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.
|
@@ -15,9 +15,7 @@ cases where PassThrough is a good idea.
|
|
15
15
|
There is a `read()` method, but it's much more efficient to consume
|
16
16
|
data from this stream via `'data'` events or by calling `pipe()` into
|
17
17
|
some other stream. Calling `read()` requires the buffer to be
|
18
|
-
flattened in some cases, which requires copying memory.
|
19
|
-
`read()` always returns Buffers, even if an `encoding` option is
|
20
|
-
specified.
|
18
|
+
flattened in some cases, which requires copying memory.
|
21
19
|
|
22
20
|
There is also no `unpipe()` method. Once you start piping, there is
|
23
21
|
no stopping it!
|
@@ -44,3 +42,83 @@ mp.write('foo')
|
|
44
42
|
mp.pipe(someOtherStream)
|
45
43
|
mp.end('bar')
|
46
44
|
```
|
45
|
+
|
46
|
+
### collecting
|
47
|
+
|
48
|
+
```js
|
49
|
+
mp.collect().then(all => {
|
50
|
+
// all is an array of all the data emitted
|
51
|
+
// encoding is supported in this case, so
|
52
|
+
// so the result will be a collection of strings if
|
53
|
+
// an encoding is specified, or buffers/objects if not.
|
54
|
+
//
|
55
|
+
// In an async function, you may do
|
56
|
+
// const data = await stream.collect()
|
57
|
+
})
|
58
|
+
```
|
59
|
+
|
60
|
+
### iteration
|
61
|
+
|
62
|
+
You can iterate over streams synchronously or asynchronously in
|
63
|
+
platforms that support it.
|
64
|
+
|
65
|
+
Synchronous iteration will end when the currently available data is
|
66
|
+
consumed, even if the `end` event has not been reached. In string and
|
67
|
+
buffer mode, the data is concatenated, so unless multiple writes are
|
68
|
+
occurring in the same tick as the `read()`, sync iteration loops will
|
69
|
+
generally only have a single iteration.
|
70
|
+
|
71
|
+
To consume chunks in this way exactly as they have been written, with
|
72
|
+
no flattening, create the stream with the `{ objectMode: true }`
|
73
|
+
option.
|
74
|
+
|
75
|
+
```js
|
76
|
+
const mp = new Minipass({ objectMode: true })
|
77
|
+
mp.write('a')
|
78
|
+
mp.write('b')
|
79
|
+
for (let letter of mp) {
|
80
|
+
console.log(letter) // a, b
|
81
|
+
}
|
82
|
+
mp.write('c')
|
83
|
+
mp.write('d')
|
84
|
+
for (let letter of mp) {
|
85
|
+
console.log(letter) // c, d
|
86
|
+
}
|
87
|
+
mp.write('e')
|
88
|
+
mp.end()
|
89
|
+
for (let letter of mp) {
|
90
|
+
console.log(letter) // e
|
91
|
+
}
|
92
|
+
for (let letter of mp) {
|
93
|
+
console.log(letter) // nothing
|
94
|
+
}
|
95
|
+
```
|
96
|
+
|
97
|
+
Asynchronous iteration will continue until the end event is reached,
|
98
|
+
consuming all of the data.
|
99
|
+
|
100
|
+
```js
|
101
|
+
const mp = new Minipass({ encoding: 'utf8' })
|
102
|
+
|
103
|
+
// some source of some data
|
104
|
+
let i = 5
|
105
|
+
const inter = setInterval(() => {
|
106
|
+
if (i --> 0)
|
107
|
+
mp.write(Buffer.from('foo\n', 'utf8'))
|
108
|
+
else {
|
109
|
+
mp.end()
|
110
|
+
clearInterval(inter)
|
111
|
+
}
|
112
|
+
}, 100)
|
113
|
+
|
114
|
+
// consume the data with asynchronous iteration
|
115
|
+
async function consume () {
|
116
|
+
for await (let chunk of mp) {
|
117
|
+
console.log(chunk)
|
118
|
+
}
|
119
|
+
return 'ok'
|
120
|
+
}
|
121
|
+
|
122
|
+
consume().then(res => console.log(res))
|
123
|
+
// logs `foo\n` 5 times, and then `ok`
|
124
|
+
```
|
@@ -7,6 +7,9 @@ const EMITTED_END = Symbol('emittedEnd')
|
|
7
7
|
const CLOSED = Symbol('closed')
|
8
8
|
const READ = Symbol('read')
|
9
9
|
const FLUSH = Symbol('flush')
|
10
|
+
const doIter = process.env._MP_NO_ITERATOR_SYMBOLS_ !== '1'
|
11
|
+
const ASYNCITERATOR = doIter && Symbol.asyncIterator || Symbol('asyncIterator not implemented')
|
12
|
+
const ITERATOR = doIter && Symbol.iterator || Symbol('iterator not implemented')
|
10
13
|
const FLUSHCHUNK = Symbol('flushChunk')
|
11
14
|
const SD = require('string_decoder').StringDecoder
|
12
15
|
const ENCODING = Symbol('encoding')
|
@@ -27,7 +30,7 @@ if (!B.alloc) {
|
|
27
30
|
B = require('safe-buffer').Buffer
|
28
31
|
}
|
29
32
|
|
30
|
-
class MiniPass extends EE {
|
33
|
+
module.exports = class MiniPass extends EE {
|
31
34
|
constructor (options) {
|
32
35
|
super()
|
33
36
|
this[FLOWING] = false
|
@@ -234,8 +237,11 @@ class MiniPass extends EE {
|
|
234
237
|
try {
|
235
238
|
return super.on(ev, fn)
|
236
239
|
} finally {
|
237
|
-
if (ev === 'data' && !this.pipes.length && !this.flowing)
|
240
|
+
if (ev === 'data' && !this.pipes.length && !this.flowing)
|
238
241
|
this[RESUME]()
|
242
|
+
else if (ev === 'end' && this[EMITTED_END]) {
|
243
|
+
super.emit('end')
|
244
|
+
this.removeAllListeners('end')
|
239
245
|
}
|
240
246
|
}
|
241
247
|
}
|
@@ -262,6 +268,12 @@ class MiniPass extends EE {
|
|
262
268
|
if (this.pipes.length)
|
263
269
|
this.pipes.forEach(p => p.dest.write(data) || this.pause())
|
264
270
|
} else if (ev === 'end') {
|
271
|
+
if (this[EMITTED_END] === true)
|
272
|
+
return
|
273
|
+
|
274
|
+
this[EMITTED_END] = true
|
275
|
+
this.readable = false
|
276
|
+
|
265
277
|
if (this[DECODER]) {
|
266
278
|
data = this[DECODER].end()
|
267
279
|
if (data) {
|
@@ -269,13 +281,12 @@ class MiniPass extends EE {
|
|
269
281
|
super.emit('data', data)
|
270
282
|
}
|
271
283
|
}
|
284
|
+
|
272
285
|
this.pipes.forEach(p => {
|
273
286
|
p.dest.removeListener('drain', p.ondrain)
|
274
287
|
if (!p.opts || p.opts.end !== false)
|
275
288
|
p.dest.end()
|
276
289
|
})
|
277
|
-
this[EMITTED_END] = true
|
278
|
-
this.readable = false
|
279
290
|
} else if (ev === 'close') {
|
280
291
|
this[CLOSED] = true
|
281
292
|
// don't emit close before 'end' and 'finish'
|
@@ -297,8 +308,68 @@ class MiniPass extends EE {
|
|
297
308
|
} finally {
|
298
309
|
if (ev !== 'end')
|
299
310
|
this[MAYBE_EMIT_END]()
|
311
|
+
else
|
312
|
+
this.removeAllListeners('end')
|
300
313
|
}
|
301
314
|
}
|
302
|
-
}
|
303
315
|
|
304
|
-
|
316
|
+
// const all = await stream.collect()
|
317
|
+
collect () {
|
318
|
+
return new Promise((resolve, reject) => {
|
319
|
+
const buf = []
|
320
|
+
this.on('data', c => buf.push(c))
|
321
|
+
this.on('end', () => resolve(buf))
|
322
|
+
this.on('error', reject)
|
323
|
+
})
|
324
|
+
}
|
325
|
+
|
326
|
+
// for await (let chunk of stream)
|
327
|
+
[ASYNCITERATOR] () {
|
328
|
+
const next = () => {
|
329
|
+
const res = this.read()
|
330
|
+
if (res !== null)
|
331
|
+
return Promise.resolve({ done: false, value: res })
|
332
|
+
|
333
|
+
if (this[EOF])
|
334
|
+
return Promise.resolve({ done: true })
|
335
|
+
|
336
|
+
let resolve = null
|
337
|
+
let reject = null
|
338
|
+
const onerr = er => {
|
339
|
+
this.removeListener('data', ondata)
|
340
|
+
this.removeListener('end', onend)
|
341
|
+
reject(er)
|
342
|
+
}
|
343
|
+
const ondata = value => {
|
344
|
+
this.removeListener('error', onerr)
|
345
|
+
this.removeListener('end', onend)
|
346
|
+
this.pause()
|
347
|
+
resolve({ value: value, done: !!this[EOF] })
|
348
|
+
}
|
349
|
+
const onend = () => {
|
350
|
+
this.removeListener('error', onerr)
|
351
|
+
this.removeListener('data', ondata)
|
352
|
+
resolve({ done: true })
|
353
|
+
}
|
354
|
+
return new Promise((res, rej) => {
|
355
|
+
reject = rej
|
356
|
+
resolve = res
|
357
|
+
this.once('error', onerr)
|
358
|
+
this.once('end', onend)
|
359
|
+
this.once('data', ondata)
|
360
|
+
})
|
361
|
+
}
|
362
|
+
|
363
|
+
return { next }
|
364
|
+
}
|
365
|
+
|
366
|
+
// for (let chunk of stream)
|
367
|
+
[ITERATOR] () {
|
368
|
+
const next = () => {
|
369
|
+
const value = this.read()
|
370
|
+
const done = value === null
|
371
|
+
return { value, done }
|
372
|
+
}
|
373
|
+
return { next }
|
374
|
+
}
|
375
|
+
}
|
@@ -1,29 +1,29 @@
|
|
1
1
|
{
|
2
|
-
"_from": "minipass@^2.
|
3
|
-
"_id": "minipass@2.
|
2
|
+
"_from": "minipass@^2.3.4",
|
3
|
+
"_id": "minipass@2.3.5",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
|
6
6
|
"_location": "/minipass",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
9
9
|
"type": "range",
|
10
10
|
"registry": true,
|
11
|
-
"raw": "minipass@^2.
|
11
|
+
"raw": "minipass@^2.3.4",
|
12
12
|
"name": "minipass",
|
13
13
|
"escapedName": "minipass",
|
14
|
-
"rawSpec": "^2.
|
14
|
+
"rawSpec": "^2.3.4",
|
15
15
|
"saveSpec": null,
|
16
|
-
"fetchSpec": "^2.
|
16
|
+
"fetchSpec": "^2.3.4"
|
17
17
|
},
|
18
18
|
"_requiredBy": [
|
19
19
|
"/fs-minipass",
|
20
20
|
"/minizlib",
|
21
21
|
"/tar"
|
22
22
|
],
|
23
|
-
"_resolved": "https://registry.npmjs.org/minipass/-/minipass-2.
|
24
|
-
"_shasum": "
|
25
|
-
"_spec": "minipass@^2.
|
26
|
-
"_where": "/Users/
|
23
|
+
"_resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
|
24
|
+
"_shasum": "cacebe492022497f656b0f0f51e2682a9ed2d848",
|
25
|
+
"_spec": "minipass@^2.3.4",
|
26
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/tar",
|
27
27
|
"author": {
|
28
28
|
"name": "Isaac Z. Schlueter",
|
29
29
|
"email": "i@izs.me",
|
@@ -34,14 +34,14 @@
|
|
34
34
|
},
|
35
35
|
"bundleDependencies": false,
|
36
36
|
"dependencies": {
|
37
|
-
"safe-buffer": "^5.1.
|
37
|
+
"safe-buffer": "^5.1.2",
|
38
38
|
"yallist": "^3.0.0"
|
39
39
|
},
|
40
40
|
"deprecated": false,
|
41
41
|
"description": "minimal implementation of a PassThrough stream",
|
42
42
|
"devDependencies": {
|
43
43
|
"end-of-stream": "^1.4.0",
|
44
|
-
"tap": "^
|
44
|
+
"tap": "^12.0.1",
|
45
45
|
"through2": "^2.0.3"
|
46
46
|
},
|
47
47
|
"files": [
|
@@ -65,5 +65,5 @@
|
|
65
65
|
"preversion": "npm test",
|
66
66
|
"test": "tap test/*.js --100"
|
67
67
|
},
|
68
|
-
"version": "2.
|
68
|
+
"version": "2.3.5"
|
69
69
|
}
|