fsevents 1.2.4 → 1.2.9

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.

Files changed (181) hide show
  1. package/.travis.yml +2 -3
  2. package/fsevents.cc +14 -26
  3. package/node_modules/abbrev/package.json +3 -4
  4. package/node_modules/ansi-regex/package.json +2 -2
  5. package/node_modules/aproba/package.json +2 -2
  6. package/node_modules/are-we-there-yet/CHANGES.md +6 -0
  7. package/node_modules/are-we-there-yet/package.json +14 -14
  8. package/node_modules/are-we-there-yet/tracker-stream.js +1 -0
  9. package/node_modules/balanced-match/package.json +2 -2
  10. package/node_modules/brace-expansion/package.json +2 -2
  11. package/node_modules/chownr/chownr.js +74 -38
  12. package/node_modules/chownr/package.json +17 -14
  13. package/node_modules/code-point-at/package.json +2 -2
  14. package/node_modules/concat-map/package.json +2 -2
  15. package/node_modules/console-control-strings/package.json +2 -2
  16. package/node_modules/core-util-is/package.json +2 -2
  17. package/node_modules/debug/CHANGELOG.md +34 -1
  18. package/node_modules/debug/README.md +206 -63
  19. package/node_modules/debug/dist/debug.js +912 -0
  20. package/node_modules/debug/package.json +41 -27
  21. package/node_modules/debug/src/browser.js +185 -106
  22. package/node_modules/debug/src/common.js +266 -0
  23. package/node_modules/debug/src/index.js +4 -4
  24. package/node_modules/debug/src/node.js +174 -165
  25. package/node_modules/deep-extend/CHANGELOG.md +8 -0
  26. package/node_modules/deep-extend/README.md +0 -2
  27. package/node_modules/deep-extend/package.json +20 -18
  28. package/node_modules/delegates/package.json +2 -2
  29. package/node_modules/detect-libc/package.json +2 -2
  30. package/node_modules/fs-minipass/package.json +2 -2
  31. package/node_modules/fs.realpath/package.json +2 -2
  32. package/node_modules/gauge/package.json +2 -2
  33. package/node_modules/glob/package.json +13 -13
  34. package/node_modules/has-unicode/package.json +2 -2
  35. package/node_modules/iconv-lite/Changelog.md +16 -0
  36. package/node_modules/iconv-lite/encodings/sbcs-codec.js +2 -2
  37. package/node_modules/iconv-lite/encodings/sbcs-data.js +5 -0
  38. package/node_modules/iconv-lite/lib/extend-node.js +1 -1
  39. package/node_modules/iconv-lite/lib/index.d.ts +2 -2
  40. package/node_modules/iconv-lite/package.json +14 -14
  41. package/node_modules/ignore-walk/package.json +2 -2
  42. package/node_modules/inflight/package.json +2 -2
  43. package/node_modules/inherits/package.json +3 -5
  44. package/node_modules/ini/package.json +2 -2
  45. package/node_modules/is-fullwidth-code-point/package.json +2 -2
  46. package/node_modules/isarray/package.json +2 -2
  47. package/node_modules/minimatch/package.json +2 -2
  48. package/node_modules/minimist/package.json +2 -2
  49. package/node_modules/minipass/LICENSE +15 -0
  50. package/node_modules/minipass/README.md +81 -3
  51. package/node_modules/minipass/index.js +77 -6
  52. package/node_modules/minipass/package.json +14 -14
  53. package/node_modules/minizlib/index.js +66 -95
  54. package/node_modules/minizlib/package.json +13 -13
  55. package/node_modules/mkdirp/package.json +2 -3
  56. package/node_modules/ms/index.js +28 -18
  57. package/node_modules/ms/package.json +17 -17
  58. package/node_modules/ms/readme.md +17 -8
  59. package/node_modules/needle/.npmignore +6 -0
  60. package/node_modules/needle/README.md +3 -3
  61. package/node_modules/needle/examples/multipart-stream.js +1 -1
  62. package/node_modules/needle/lib/auth.js +1 -1
  63. package/node_modules/needle/lib/cookies.js +12 -10
  64. package/node_modules/needle/lib/multipart.js +1 -1
  65. package/node_modules/needle/lib/needle.js +18 -6
  66. package/node_modules/needle/package-lock.json +395 -0
  67. package/node_modules/needle/package.json +21 -21
  68. package/node_modules/needle/test/basic_auth_spec.js +1 -1
  69. package/node_modules/needle/test/cookies_spec.js +2 -2
  70. package/node_modules/needle/test/errors_spec.js +4 -4
  71. package/node_modules/needle/test/keys/ssl.cert +21 -0
  72. package/node_modules/needle/test/keys/ssl.key +27 -0
  73. package/node_modules/needle/test/long_string_spec.js +1 -1
  74. package/node_modules/needle/test/output_spec.js +1 -1
  75. package/node_modules/needle/test/post_data_spec.js +20 -20
  76. package/node_modules/needle/test/proxy_spec.js +1 -1
  77. package/node_modules/needle/test/url_spec.js +11 -3
  78. package/node_modules/needle/test/utils/test.js +1 -1
  79. package/node_modules/node-pre-gyp/CHANGELOG.md +23 -0
  80. package/node_modules/node-pre-gyp/README.md +44 -12
  81. package/node_modules/node-pre-gyp/appveyor.yml +0 -2
  82. package/node_modules/node-pre-gyp/lib/build.js +1 -1
  83. package/node_modules/node-pre-gyp/lib/install.js +42 -8
  84. package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +1 -1
  85. package/node_modules/node-pre-gyp/lib/pre-binding.js +5 -5
  86. package/node_modules/node-pre-gyp/lib/rebuild.js +1 -1
  87. package/node_modules/node-pre-gyp/lib/reinstall.js +1 -1
  88. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +96 -0
  89. package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +5 -2
  90. package/node_modules/node-pre-gyp/lib/util/napi.js +70 -22
  91. package/node_modules/node-pre-gyp/lib/util/versioning.js +7 -6
  92. package/node_modules/node-pre-gyp/package.json +19 -17
  93. package/node_modules/nopt/package.json +2 -2
  94. package/node_modules/npm-bundled/LICENSE +15 -0
  95. package/node_modules/npm-bundled/README.md +2 -0
  96. package/node_modules/npm-bundled/index.js +16 -2
  97. package/node_modules/npm-bundled/package.json +13 -13
  98. package/node_modules/npm-packlist/index.js +43 -13
  99. package/node_modules/npm-packlist/package.json +13 -13
  100. package/node_modules/npmlog/package.json +2 -2
  101. package/node_modules/number-is-nan/package.json +2 -2
  102. package/node_modules/object-assign/package.json +2 -2
  103. package/node_modules/once/package.json +2 -2
  104. package/node_modules/os-homedir/package.json +2 -2
  105. package/node_modules/os-tmpdir/package.json +2 -2
  106. package/node_modules/osenv/package.json +2 -2
  107. package/node_modules/path-is-absolute/package.json +2 -2
  108. package/node_modules/process-nextick-args/package.json +2 -2
  109. package/node_modules/rc/node_modules/minimist/package.json +2 -2
  110. package/node_modules/rc/package.json +17 -16
  111. package/node_modules/readable-stream/package.json +2 -2
  112. package/node_modules/rimraf/package.json +17 -14
  113. package/node_modules/safe-buffer/index.d.ts +187 -0
  114. package/node_modules/safe-buffer/package.json +15 -15
  115. package/node_modules/safer-buffer/package.json +2 -2
  116. package/node_modules/sax/package.json +2 -2
  117. package/node_modules/semver/CHANGELOG.md +39 -0
  118. package/node_modules/semver/README.md +31 -8
  119. package/node_modules/semver/bin/semver +92 -75
  120. package/node_modules/semver/package.json +20 -14
  121. package/node_modules/semver/semver.js +922 -763
  122. package/node_modules/set-blocking/package.json +2 -2
  123. package/node_modules/signal-exit/package.json +2 -2
  124. package/node_modules/string-width/package.json +2 -2
  125. package/node_modules/string_decoder/package.json +2 -2
  126. package/node_modules/strip-ansi/package.json +2 -2
  127. package/node_modules/strip-json-comments/package.json +2 -2
  128. package/node_modules/tar/README.md +7 -2
  129. package/node_modules/tar/lib/header.js +20 -4
  130. package/node_modules/tar/lib/mode-fix.js +14 -0
  131. package/node_modules/tar/lib/pack.js +1 -0
  132. package/node_modules/tar/lib/parse.js +2 -1
  133. package/node_modules/tar/lib/unpack.js +67 -6
  134. package/node_modules/tar/lib/write-entry.js +25 -6
  135. package/node_modules/tar/package.json +20 -20
  136. package/node_modules/util-deprecate/package.json +2 -2
  137. package/node_modules/wide-align/package.json +14 -14
  138. package/node_modules/wrappy/package.json +2 -2
  139. package/node_modules/yallist/iterator.js +5 -5
  140. package/node_modules/yallist/package.json +13 -13
  141. package/node_modules/yallist/yallist.js +2 -2
  142. package/package.json +6 -9
  143. package/src/async.cc +2 -2
  144. package/src/constants.cc +20 -20
  145. package/src/thread.cc +5 -6
  146. package/build/.target.mk +0 -55
  147. package/build/Makefile +0 -352
  148. package/build/Release/.deps/Release/.node.d +0 -1
  149. package/build/Release/.deps/Release/fse.node.d +0 -1
  150. package/build/Release/.deps/Release/obj.target/action_after_build.stamp.d +0 -1
  151. package/build/Release/.deps/Release/obj.target/fse/fsevents.o.d +0 -67
  152. package/build/Release/.deps/Users/eshanker/Code/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node.d +0 -1
  153. package/build/Release/.node +0 -0
  154. package/build/Release/fse.node +0 -0
  155. package/build/Release/obj.target/action_after_build.stamp +0 -0
  156. package/build/Release/obj.target/fse/fsevents.o +0 -0
  157. package/build/action_after_build.target.mk +0 -32
  158. package/build/binding.Makefile +0 -6
  159. package/build/fse.target.mk +0 -184
  160. package/build/gyp-mac-tool +0 -611
  161. package/lib/binding/Release/node-v11-darwin-x64/fse.node +0 -0
  162. package/lib/binding/Release/node-v46-darwin-x64/fse.node +0 -0
  163. package/lib/binding/Release/node-v47-darwin-x64/fse.node +0 -0
  164. package/lib/binding/Release/node-v48-darwin-x64/fse.node +0 -0
  165. package/lib/binding/Release/node-v57-darwin-x64/fse.node +0 -0
  166. package/lib/binding/Release/node-v64-darwin-x64/fse.node +0 -0
  167. package/node_modules/are-we-there-yet/CHANGES.md~ +0 -27
  168. package/node_modules/debug/.coveralls.yml +0 -1
  169. package/node_modules/debug/.eslintrc +0 -11
  170. package/node_modules/debug/.npmignore +0 -9
  171. package/node_modules/debug/.travis.yml +0 -14
  172. package/node_modules/debug/Makefile +0 -50
  173. package/node_modules/debug/component.json +0 -19
  174. package/node_modules/debug/karma.conf.js +0 -70
  175. package/node_modules/debug/node.js +0 -1
  176. package/node_modules/debug/src/debug.js +0 -202
  177. package/node_modules/debug/src/inspector-log.js +0 -15
  178. package/node_modules/iconv-lite/.travis.yml +0 -23
  179. package/node_modules/safe-buffer/.travis.yml +0 -7
  180. package/node_modules/safe-buffer/test.js +0 -101
  181. package/src/locking.cc +0 -27
package/.travis.yml CHANGED
@@ -5,14 +5,13 @@ env:
5
5
  - secure: "gve1nkeKkwFEG1VAT3i+JwYyAdF0gKXwKx0uxbkBTsmm2M+0MDusohQdFLoEIkSIFktXBIDefoa7iGpLKRfG2VsZLpwJgnvnD0HqbnuR+k+W+bu7BHt4CAaR6GTllsDCjyq9zNyhUThzSnf2WNIpOEF5kHspZlbGfawURuUJH/U="
6
6
  - secure: "jqVpmWxxBVXu2X8+XJMpKH0cooc2EKz9xKL2znBfYdNafJORSXcFAVbjCX5mZmVDcgIMwDtm2+gIG4P73hzJ2e3S+y2Z9ROJGyXHa3AxUTvXHQsxqzH8coHHqB8vTvfr0t2O5aKfpvpICpSea39r0hzNoMv6Ie5SwBdqj1YY9K0="
7
7
  matrix:
8
+ - NODE_VERSION="v12"
9
+ - NODE_VERSION="v11"
8
10
  - NODE_VERSION="v10"
9
11
  - NODE_VERSION="v9"
10
12
  - NODE_VERSION="v8"
11
13
  - NODE_VERSION="v7"
12
14
  - NODE_VERSION="v6"
13
- - NODE_VERSION="v5"
14
- - NODE_VERSION="v4"
15
- - NODE_VERSION="v0.10"
16
15
 
17
16
  before_install:
18
17
 
package/fsevents.cc CHANGED
@@ -6,7 +6,6 @@
6
6
  #include "nan.h"
7
7
  #include "uv.h"
8
8
  #include "v8.h"
9
- #include "pthread.h"
10
9
  #include "CoreFoundation/CoreFoundation.h"
11
10
  #include "CoreServices/CoreServices.h"
12
11
  #include <iostream>
@@ -19,13 +18,7 @@ namespace fse {
19
18
  explicit FSEvents(const char *path);
20
19
  ~FSEvents();
21
20
 
22
- // locking.cc
23
- bool lockStarted;
24
- pthread_mutex_t lockmutex;
25
- void lockingStart();
26
- void lock();
27
- void unlock();
28
- void lockingStop();
21
+ uv_mutex_t mutex;
29
22
 
30
23
  // async.cc
31
24
  uv_async_t async;
@@ -34,10 +27,10 @@ namespace fse {
34
27
  void asyncStop();
35
28
 
36
29
  // thread.cc
37
- pthread_t thread;
30
+ uv_thread_t thread;
38
31
  CFRunLoopRef threadloop;
39
32
  void threadStart();
40
- static void *threadRun(void *ctx);
33
+ static void threadRun(void *ctx);
41
34
  void threadStop();
42
35
 
43
36
  // methods.cc - internal
@@ -47,7 +40,7 @@ namespace fse {
47
40
  // Common
48
41
  CFArrayRef paths;
49
42
  std::vector<fse_event*> events;
50
- static void Initialize(v8::Handle<v8::Object> exports);
43
+ static void Initialize(v8::Local<v8::Object> exports);
51
44
 
52
45
  // methods.cc - exposed
53
46
  static NAN_METHOD(New);
@@ -60,41 +53,36 @@ namespace fse {
60
53
  using namespace fse;
61
54
 
62
55
  FSEvents::FSEvents(const char *path)
63
- : async_resource("fsevents:FSEvents"), lockStarted(false) {
56
+ : async_resource("fsevents:FSEvents") {
64
57
  CFStringRef dirs[] = { CFStringCreateWithCString(NULL, path, kCFStringEncodingUTF8) };
65
58
  paths = CFArrayCreate(NULL, (const void **)&dirs, 1, NULL);
66
59
  threadloop = NULL;
67
- lockingStart();
60
+ if (uv_mutex_init(&mutex)) abort();
68
61
  }
69
62
  FSEvents::~FSEvents() {
70
- lockingStop();
71
-
72
63
  CFRelease(paths);
64
+ uv_mutex_destroy(&mutex);
73
65
  }
74
66
 
75
67
  #ifndef kFSEventStreamEventFlagItemCreated
76
68
  #define kFSEventStreamEventFlagItemCreated 0x00000010
77
69
  #endif
78
70
 
79
- #include "src/locking.cc"
80
71
  #include "src/async.cc"
81
72
  #include "src/thread.cc"
82
73
  #include "src/constants.cc"
83
74
  #include "src/methods.cc"
84
75
 
85
- void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
76
+ void FSEvents::Initialize(v8::Local<v8::Object> exports) {
77
+ v8::Isolate* isolate = exports->GetIsolate();
78
+ v8::Local<v8::Context> context = isolate->GetCurrentContext();
86
79
  v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(FSEvents::New);
87
80
  tpl->SetClassName(Nan::New<v8::String>("FSEvents").ToLocalChecked());
88
81
  tpl->InstanceTemplate()->SetInternalFieldCount(1);
89
- tpl->PrototypeTemplate()->Set(
90
- Nan::New<v8::String>("start").ToLocalChecked(),
91
- Nan::New<v8::FunctionTemplate>(FSEvents::Start));
92
- tpl->PrototypeTemplate()->Set(
93
- Nan::New<v8::String>("stop").ToLocalChecked(),
94
- Nan::New<v8::FunctionTemplate>(FSEvents::Stop));
95
- exports->Set(Nan::New<v8::String>("Constants").ToLocalChecked(), Constants());
96
- exports->Set(Nan::New<v8::String>("FSEvents").ToLocalChecked(),
97
- tpl->GetFunction());
82
+ Nan::SetPrototypeTemplate(tpl, "start", Nan::New<v8::FunctionTemplate>(FSEvents::Start));
83
+ Nan::SetPrototypeTemplate(tpl, "stop", Nan::New<v8::FunctionTemplate>(FSEvents::Stop));
84
+ Nan::Set(exports, Nan::New<v8::String>("Constants").ToLocalChecked(), Constants());
85
+ Nan::Set(exports, Nan::New<v8::String>("FSEvents").ToLocalChecked(), tpl->GetFunction(context).ToLocalChecked());
98
86
  }
99
87
 
100
88
  NODE_MODULE(fse, FSEvents::Initialize)
@@ -2,7 +2,7 @@
2
2
  "_args": [
3
3
  [
4
4
  "abbrev@1.1.1",
5
- "/Users/eshanker/Code/fsevents"
5
+ "/Users/pipobscure/fsevents"
6
6
  ]
7
7
  ],
8
8
  "_from": "abbrev@1.1.1",
@@ -22,12 +22,11 @@
22
22
  "fetchSpec": "1.1.1"
23
23
  },
24
24
  "_requiredBy": [
25
- "/nopt",
26
- "/tap/nopt"
25
+ "/nopt"
27
26
  ],
28
27
  "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
29
28
  "_spec": "1.1.1",
30
- "_where": "/Users/eshanker/Code/fsevents",
29
+ "_where": "/Users/pipobscure/fsevents",
31
30
  "author": {
32
31
  "name": "Isaac Z. Schlueter",
33
32
  "email": "i@izs.me"
@@ -2,7 +2,7 @@
2
2
  "_args": [
3
3
  [
4
4
  "ansi-regex@2.1.1",
5
- "/Users/eshanker/Code/fsevents"
5
+ "/Users/pipobscure/fsevents"
6
6
  ]
7
7
  ],
8
8
  "_from": "ansi-regex@2.1.1",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
28
28
  "_spec": "2.1.1",
29
- "_where": "/Users/eshanker/Code/fsevents",
29
+ "_where": "/Users/pipobscure/fsevents",
30
30
  "author": {
31
31
  "name": "Sindre Sorhus",
32
32
  "email": "sindresorhus@gmail.com",
@@ -2,7 +2,7 @@
2
2
  "_args": [
3
3
  [
4
4
  "aproba@1.2.0",
5
- "/Users/eshanker/Code/fsevents"
5
+ "/Users/pipobscure/fsevents"
6
6
  ]
7
7
  ],
8
8
  "_from": "aproba@1.2.0",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
28
28
  "_spec": "1.2.0",
29
- "_where": "/Users/eshanker/Code/fsevents",
29
+ "_where": "/Users/pipobscure/fsevents",
30
30
  "author": {
31
31
  "name": "Rebecca Turner",
32
32
  "email": "me@re-becca.org"
@@ -1,5 +1,11 @@
1
1
  Hi, figured we could actually use a changelog now:
2
2
 
3
+ ## 1.1.5 2018-05-24
4
+
5
+ * [#92](https://github.com/iarna/are-we-there-yet/pull/92) Fix bug where
6
+ `finish` would throw errors when including `TrackerStream` objects in
7
+ `TrackerGroup` collections. (@brianloveswords)
8
+
3
9
  ## 1.1.4 2017-04-21
4
10
 
5
11
  * Fix typo in package.json
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "_args": [
3
3
  [
4
- "are-we-there-yet@1.1.4",
5
- "/Users/eshanker/Code/fsevents"
4
+ "are-we-there-yet@1.1.5",
5
+ "/Users/pipobscure/fsevents"
6
6
  ]
7
7
  ],
8
- "_from": "are-we-there-yet@1.1.4",
9
- "_id": "are-we-there-yet@1.1.4",
8
+ "_from": "are-we-there-yet@1.1.5",
9
+ "_id": "are-we-there-yet@1.1.5",
10
10
  "_inBundle": false,
11
- "_integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=",
11
+ "_integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
12
12
  "_location": "/are-we-there-yet",
13
13
  "_phantomChildren": {},
14
14
  "_requested": {
15
15
  "type": "version",
16
16
  "registry": true,
17
- "raw": "are-we-there-yet@1.1.4",
17
+ "raw": "are-we-there-yet@1.1.5",
18
18
  "name": "are-we-there-yet",
19
19
  "escapedName": "are-we-there-yet",
20
- "rawSpec": "1.1.4",
20
+ "rawSpec": "1.1.5",
21
21
  "saveSpec": null,
22
- "fetchSpec": "1.1.4"
22
+ "fetchSpec": "1.1.5"
23
23
  },
24
24
  "_requiredBy": [
25
25
  "/npmlog"
26
26
  ],
27
- "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz",
28
- "_spec": "1.1.4",
29
- "_where": "/Users/eshanker/Code/fsevents",
27
+ "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
28
+ "_spec": "1.1.5",
29
+ "_where": "/Users/pipobscure/fsevents",
30
30
  "author": {
31
31
  "name": "Rebecca Turner",
32
32
  "url": "http://re-becca.org"
@@ -40,8 +40,8 @@
40
40
  },
41
41
  "description": "Keep track of the overall completion of many disparate processes",
42
42
  "devDependencies": {
43
- "standard": "^6.0.8",
44
- "tap": "^5.7.0"
43
+ "standard": "^11.0.1",
44
+ "tap": "^12.0.1"
45
45
  },
46
46
  "files": [
47
47
  "index.js",
@@ -62,5 +62,5 @@
62
62
  "scripts": {
63
63
  "test": "standard && tap test/*.js"
64
64
  },
65
- "version": "1.1.4"
65
+ "version": "1.1.5"
66
66
  }
@@ -33,3 +33,4 @@ TrackerStream.prototype._flush = function (cb) {
33
33
  delegate(TrackerStream.prototype, 'tracker')
34
34
  .method('completed')
35
35
  .method('addWork')
36
+ .method('finish')
@@ -2,7 +2,7 @@
2
2
  "_args": [
3
3
  [
4
4
  "balanced-match@1.0.0",
5
- "/Users/eshanker/Code/fsevents"
5
+ "/Users/pipobscure/fsevents"
6
6
  ]
7
7
  ],
8
8
  "_from": "balanced-match@1.0.0",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
28
28
  "_spec": "1.0.0",
29
- "_where": "/Users/eshanker/Code/fsevents",
29
+ "_where": "/Users/pipobscure/fsevents",
30
30
  "author": {
31
31
  "name": "Julian Gruber",
32
32
  "email": "mail@juliangruber.com",
@@ -2,7 +2,7 @@
2
2
  "_args": [
3
3
  [
4
4
  "brace-expansion@1.1.11",
5
- "/Users/eshanker/Code/fsevents"
5
+ "/Users/pipobscure/fsevents"
6
6
  ]
7
7
  ],
8
8
  "_from": "brace-expansion@1.1.11",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
28
28
  "_spec": "1.1.11",
29
- "_where": "/Users/eshanker/Code/fsevents",
29
+ "_where": "/Users/pipobscure/fsevents",
30
30
  "author": {
31
31
  "name": "Julian Gruber",
32
32
  "email": "mail@juliangruber.com",
@@ -1,52 +1,88 @@
1
- module.exports = chownr
2
- chownr.sync = chownrSync
1
+ 'use strict'
2
+ const fs = require('fs')
3
+ const path = require('path')
4
+
5
+ /* istanbul ignore next */
6
+ const LCHOWN = fs.lchown ? 'lchown' : 'chown'
7
+ /* istanbul ignore next */
8
+ const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync'
9
+
10
+ // fs.readdir could only accept an options object as of node v6
11
+ const nodeVersion = process.version
12
+ let readdir = (path, options, cb) => fs.readdir(path, options, cb)
13
+ let readdirSync = (path, options) => fs.readdirSync(path, options)
14
+ /* istanbul ignore next */
15
+ if (/^v4\./.test(nodeVersion))
16
+ readdir = (path, options, cb) => fs.readdir(path, cb)
17
+
18
+ const chownrKid = (p, child, uid, gid, cb) => {
19
+ if (typeof child === 'string')
20
+ return fs.lstat(path.resolve(p, child), (er, stats) => {
21
+ if (er)
22
+ return cb(er)
23
+ stats.name = child
24
+ chownrKid(p, stats, uid, gid, cb)
25
+ })
3
26
 
4
- var fs = require("fs")
5
- , path = require("path")
6
-
7
- function chownr (p, uid, gid, cb) {
8
- fs.readdir(p, function (er, children) {
9
- // any error other than ENOTDIR means it's not readable, or
10
- // doesn't exist. give up.
11
- if (er && er.code !== "ENOTDIR") return cb(er)
12
- if (er || !children.length) return fs.chown(p, uid, gid, cb)
13
-
14
- var len = children.length
15
- , errState = null
16
- children.forEach(function (child) {
17
- var pathChild = path.resolve(p, child);
18
- fs.lstat(pathChild, function(er, stats) {
19
- if (er)
20
- return cb(er)
21
- if (!stats.isSymbolicLink())
22
- chownr(pathChild, uid, gid, then)
23
- else
24
- then()
25
- })
27
+ if (child.isDirectory()) {
28
+ chownr(path.resolve(p, child.name), uid, gid, er => {
29
+ if (er)
30
+ return cb(er)
31
+ fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb)
26
32
  })
27
- function then (er) {
33
+ } else
34
+ fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb)
35
+ }
36
+
37
+
38
+ const chownr = (p, uid, gid, cb) => {
39
+ readdir(p, { withFileTypes: true }, (er, children) => {
40
+ // any error other than ENOTDIR or ENOTSUP means it's not readable,
41
+ // or doesn't exist. give up.
42
+ if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
43
+ return cb(er)
44
+ if (er || !children.length) return fs[LCHOWN](p, uid, gid, cb)
45
+
46
+ let len = children.length
47
+ let errState = null
48
+ const then = er => {
28
49
  if (errState) return
29
50
  if (er) return cb(errState = er)
30
- if (-- len === 0) return fs.chown(p, uid, gid, cb)
51
+ if (-- len === 0) return fs[LCHOWN](p, uid, gid, cb)
31
52
  }
53
+
54
+ children.forEach(child => chownrKid(p, child, uid, gid, then))
32
55
  })
33
56
  }
34
57
 
35
- function chownrSync (p, uid, gid) {
36
- var children
58
+ const chownrKidSync = (p, child, uid, gid) => {
59
+ if (typeof child === 'string') {
60
+ const stats = fs.lstatSync(path.resolve(p, child))
61
+ stats.name = child
62
+ child = stats
63
+ }
64
+
65
+ if (child.isDirectory())
66
+ chownrSync(path.resolve(p, child.name), uid, gid)
67
+
68
+ fs[LCHOWNSYNC](path.resolve(p, child.name), uid, gid)
69
+ }
70
+
71
+ const chownrSync = (p, uid, gid) => {
72
+ let children
37
73
  try {
38
- children = fs.readdirSync(p)
74
+ children = readdirSync(p, { withFileTypes: true })
39
75
  } catch (er) {
40
- if (er && er.code === "ENOTDIR") return fs.chownSync(p, uid, gid)
76
+ if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP')
77
+ return fs[LCHOWNSYNC](p, uid, gid)
41
78
  throw er
42
79
  }
43
- if (!children.length) return fs.chownSync(p, uid, gid)
44
80
 
45
- children.forEach(function (child) {
46
- var pathChild = path.resolve(p, child)
47
- var stats = fs.lstatSync(pathChild)
48
- if (!stats.isSymbolicLink())
49
- chownrSync(pathChild, uid, gid)
50
- })
51
- return fs.chownSync(p, uid, gid)
81
+ if (children.length)
82
+ children.forEach(child => chownrKidSync(p, child, uid, gid))
83
+
84
+ return fs[LCHOWNSYNC](p, uid, gid)
52
85
  }
86
+
87
+ module.exports = chownr
88
+ chownr.sync = chownrSync
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "_args": [
3
3
  [
4
- "chownr@1.0.1",
5
- "/Users/eshanker/Code/fsevents"
4
+ "chownr@1.1.1",
5
+ "/Users/pipobscure/fsevents"
6
6
  ]
7
7
  ],
8
- "_from": "chownr@1.0.1",
9
- "_id": "chownr@1.0.1",
8
+ "_from": "chownr@1.1.1",
9
+ "_id": "chownr@1.1.1",
10
10
  "_inBundle": false,
11
- "_integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=",
11
+ "_integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==",
12
12
  "_location": "/chownr",
13
13
  "_phantomChildren": {},
14
14
  "_requested": {
15
15
  "type": "version",
16
16
  "registry": true,
17
- "raw": "chownr@1.0.1",
17
+ "raw": "chownr@1.1.1",
18
18
  "name": "chownr",
19
19
  "escapedName": "chownr",
20
- "rawSpec": "1.0.1",
20
+ "rawSpec": "1.1.1",
21
21
  "saveSpec": null,
22
- "fetchSpec": "1.0.1"
22
+ "fetchSpec": "1.1.1"
23
23
  },
24
24
  "_requiredBy": [
25
25
  "/tar"
26
26
  ],
27
- "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz",
28
- "_spec": "1.0.1",
29
- "_where": "/Users/eshanker/Code/fsevents",
27
+ "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
28
+ "_spec": "1.1.1",
29
+ "_where": "/Users/pipobscure/fsevents",
30
30
  "author": {
31
31
  "name": "Isaac Z. Schlueter",
32
32
  "email": "i@izs.me",
@@ -39,7 +39,7 @@
39
39
  "devDependencies": {
40
40
  "mkdirp": "0.3",
41
41
  "rimraf": "",
42
- "tap": "^1.2.0"
42
+ "tap": "^12.0.1"
43
43
  },
44
44
  "files": [
45
45
  "chownr.js"
@@ -53,7 +53,10 @@
53
53
  "url": "git://github.com/isaacs/chownr.git"
54
54
  },
55
55
  "scripts": {
56
- "test": "tap test/*.js"
56
+ "postpublish": "git push origin --all; git push origin --tags",
57
+ "postversion": "npm publish",
58
+ "preversion": "npm test",
59
+ "test": "tap test/*.js --cov"
57
60
  },
58
- "version": "1.0.1"
61
+ "version": "1.1.1"
59
62
  }
@@ -2,7 +2,7 @@
2
2
  "_args": [
3
3
  [
4
4
  "code-point-at@1.1.0",
5
- "/Users/eshanker/Code/fsevents"
5
+ "/Users/pipobscure/fsevents"
6
6
  ]
7
7
  ],
8
8
  "_from": "code-point-at@1.1.0",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
28
28
  "_spec": "1.1.0",
29
- "_where": "/Users/eshanker/Code/fsevents",
29
+ "_where": "/Users/pipobscure/fsevents",
30
30
  "author": {
31
31
  "name": "Sindre Sorhus",
32
32
  "email": "sindresorhus@gmail.com",
@@ -2,7 +2,7 @@
2
2
  "_args": [
3
3
  [
4
4
  "concat-map@0.0.1",
5
- "/Users/eshanker/Code/fsevents"
5
+ "/Users/pipobscure/fsevents"
6
6
  ]
7
7
  ],
8
8
  "_from": "concat-map@0.0.1",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
28
28
  "_spec": "0.0.1",
29
- "_where": "/Users/eshanker/Code/fsevents",
29
+ "_where": "/Users/pipobscure/fsevents",
30
30
  "author": {
31
31
  "name": "James Halliday",
32
32
  "email": "mail@substack.net",
@@ -2,7 +2,7 @@
2
2
  "_args": [
3
3
  [
4
4
  "console-control-strings@1.1.0",
5
- "/Users/eshanker/Code/fsevents"
5
+ "/Users/pipobscure/fsevents"
6
6
  ]
7
7
  ],
8
8
  "_from": "console-control-strings@1.1.0",
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "_resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
29
29
  "_spec": "1.1.0",
30
- "_where": "/Users/eshanker/Code/fsevents",
30
+ "_where": "/Users/pipobscure/fsevents",
31
31
  "author": {
32
32
  "name": "Rebecca Turner",
33
33
  "email": "me@re-becca.org",
@@ -2,7 +2,7 @@
2
2
  "_args": [
3
3
  [
4
4
  "core-util-is@1.0.2",
5
- "/Users/eshanker/Code/fsevents"
5
+ "/Users/pipobscure/fsevents"
6
6
  ]
7
7
  ],
8
8
  "_from": "core-util-is@1.0.2",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
28
28
  "_spec": "1.0.2",
29
- "_where": "/Users/eshanker/Code/fsevents",
29
+ "_where": "/Users/pipobscure/fsevents",
30
30
  "author": {
31
31
  "name": "Isaac Z. Schlueter",
32
32
  "email": "i@izs.me",
@@ -1,4 +1,37 @@
1
1
 
2
+ 3.1.0 / 2017-09-26
3
+ ==================
4
+
5
+ * Add `DEBUG_HIDE_DATE` env var (#486)
6
+ * Remove ReDoS regexp in %o formatter (#504)
7
+ * Remove "component" from package.json
8
+ * Remove `component.json`
9
+ * Ignore package-lock.json
10
+ * Examples: fix colors printout
11
+ * Fix: browser detection
12
+ * Fix: spelling mistake (#496, @EdwardBetts)
13
+
14
+ 3.0.1 / 2017-08-24
15
+ ==================
16
+
17
+ * Fix: Disable colors in Edge and Internet Explorer (#489)
18
+
19
+ 3.0.0 / 2017-08-08
20
+ ==================
21
+
22
+ * Breaking: Remove DEBUG_FD (#406)
23
+ * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
24
+ * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
25
+ * Addition: document `enabled` flag (#465)
26
+ * Addition: add 256 colors mode (#481)
27
+ * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
28
+ * Update: component: update "ms" to v2.0.0
29
+ * Update: separate the Node and Browser tests in Travis-CI
30
+ * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
31
+ * Update: separate Node.js and web browser examples for organization
32
+ * Update: update "browserify" to v14.4.0
33
+ * Fix: fix Readme typo (#473)
34
+
2
35
  2.6.9 / 2017-09-22
3
36
  ==================
4
37
 
@@ -27,7 +60,7 @@
27
60
  2.6.4 / 2017-04-20
28
61
  ==================
29
62
 
30
- * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
63
+ * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
31
64
  * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
32
65
  * Misc: update "ms" to v0.7.3 (@tootallnate)
33
66