fsevents 1.0.15 → 1.1.1

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 (369) hide show
  1. package/fsevents.js +3 -0
  2. package/install.js +7 -0
  3. package/lib/binding/Release/node-v48-darwin-x64/fse.node +0 -0
  4. package/node_modules/abbrev/abbrev.js +0 -1
  5. package/node_modules/abbrev/package.json +32 -21
  6. package/node_modules/ansi-regex/index.js +1 -1
  7. package/node_modules/ansi-regex/package.json +61 -42
  8. package/node_modules/ansi-regex/readme.md +10 -2
  9. package/node_modules/ansi-styles/package.json +27 -19
  10. package/node_modules/aproba/README.md +33 -3
  11. package/node_modules/aproba/index.js +71 -30
  12. package/node_modules/aproba/package.json +30 -22
  13. package/node_modules/are-we-there-yet/package.json +14 -6
  14. package/node_modules/asn1/package.json +16 -8
  15. package/node_modules/assert-plus/package.json +16 -8
  16. package/node_modules/{node-uuid/LICENSE.md → asynckit/LICENSE} +1 -1
  17. package/node_modules/asynckit/README.md +233 -0
  18. package/node_modules/asynckit/bench.js +76 -0
  19. package/node_modules/asynckit/index.js +6 -0
  20. package/node_modules/asynckit/lib/abort.js +29 -0
  21. package/node_modules/asynckit/lib/async.js +34 -0
  22. package/node_modules/asynckit/lib/defer.js +26 -0
  23. package/node_modules/asynckit/lib/iterate.js +75 -0
  24. package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  25. package/node_modules/asynckit/lib/readable_parallel.js +25 -0
  26. package/node_modules/asynckit/lib/readable_serial.js +25 -0
  27. package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  28. package/node_modules/asynckit/lib/state.js +37 -0
  29. package/node_modules/asynckit/lib/streamify.js +141 -0
  30. package/node_modules/asynckit/lib/terminator.js +29 -0
  31. package/node_modules/asynckit/package.json +126 -0
  32. package/node_modules/asynckit/parallel.js +43 -0
  33. package/node_modules/asynckit/serial.js +17 -0
  34. package/node_modules/asynckit/serialOrdered.js +75 -0
  35. package/node_modules/asynckit/stream.js +21 -0
  36. package/node_modules/aws-sign2/package.json +15 -7
  37. package/node_modules/aws4/README.md +9 -0
  38. package/node_modules/aws4/aws4.js +21 -7
  39. package/node_modules/aws4/package.json +62 -54
  40. package/node_modules/balanced-match/package.json +27 -19
  41. package/node_modules/bcrypt-pbkdf/README.md +39 -0
  42. package/node_modules/bcrypt-pbkdf/index.js +556 -0
  43. package/node_modules/bcrypt-pbkdf/package.json +84 -0
  44. package/node_modules/block-stream/package.json +15 -7
  45. package/node_modules/boom/package.json +14 -6
  46. package/node_modules/brace-expansion/index.js +10 -0
  47. package/node_modules/brace-expansion/package.json +35 -27
  48. package/node_modules/buffer-shims/package.json +16 -7
  49. package/node_modules/caseless/package.json +18 -10
  50. package/node_modules/chalk/package.json +30 -22
  51. package/node_modules/code-point-at/index.js +3 -4
  52. package/node_modules/code-point-at/package.json +40 -30
  53. package/node_modules/code-point-at/readme.md +2 -4
  54. package/node_modules/combined-stream/package.json +15 -7
  55. package/node_modules/commander/package.json +16 -8
  56. package/node_modules/concat-map/package.json +30 -22
  57. package/node_modules/console-control-strings/package.json +15 -7
  58. package/node_modules/core-util-is/package.json +22 -14
  59. package/node_modules/cryptiles/package.json +14 -6
  60. package/node_modules/dashdash/CHANGES.md +364 -0
  61. package/node_modules/dashdash/LICENSE.txt +24 -0
  62. package/node_modules/dashdash/etc/dashdash.bash_completion.in +4 -3
  63. package/node_modules/dashdash/node_modules/assert-plus/package.json +16 -8
  64. package/node_modules/dashdash/package.json +33 -24
  65. package/node_modules/debug/package.json +20 -12
  66. package/node_modules/deep-extend/package.json +23 -15
  67. package/node_modules/delayed-stream/package.json +15 -7
  68. package/node_modules/delegates/package.json +14 -6
  69. package/node_modules/ecc-jsbn/package.json +17 -9
  70. package/node_modules/escape-string-regexp/package.json +20 -12
  71. package/node_modules/extend/package.json +16 -8
  72. package/node_modules/extsprintf/package.json +14 -6
  73. package/node_modules/forever-agent/package.json +15 -7
  74. package/node_modules/form-data/README.md +7 -8
  75. package/node_modules/form-data/lib/browser.js +1 -1
  76. package/node_modules/form-data/lib/form_data.js +101 -72
  77. package/node_modules/form-data/lib/populate.js +6 -5
  78. package/node_modules/form-data/package.json +68 -52
  79. package/node_modules/fs.realpath/package.json +19 -11
  80. package/node_modules/fstream/package.json +15 -7
  81. package/node_modules/fstream-ignore/package.json +15 -7
  82. package/node_modules/gauge/CHANGELOG.md +24 -0
  83. package/node_modules/gauge/README.md +4 -0
  84. package/node_modules/gauge/index.js +16 -9
  85. package/node_modules/gauge/package.json +37 -29
  86. package/node_modules/generate-function/package.json +16 -8
  87. package/node_modules/generate-object-property/package.json +14 -6
  88. package/node_modules/getpass/node_modules/assert-plus/package.json +16 -8
  89. package/node_modules/getpass/package.json +16 -8
  90. package/node_modules/glob/README.md +3 -0
  91. package/node_modules/glob/common.js +6 -1
  92. package/node_modules/glob/glob.js +23 -14
  93. package/node_modules/glob/package.json +29 -21
  94. package/node_modules/glob/sync.js +29 -11
  95. package/node_modules/graceful-fs/README.md +1 -1
  96. package/node_modules/graceful-fs/graceful-fs.js +23 -14
  97. package/node_modules/graceful-fs/package.json +35 -27
  98. package/node_modules/graceful-fs/polyfills.js +99 -21
  99. package/node_modules/graceful-readlink/package.json +14 -6
  100. package/node_modules/har-validator/package.json +16 -8
  101. package/node_modules/has-ansi/package.json +29 -21
  102. package/node_modules/has-unicode/package.json +18 -10
  103. package/node_modules/hawk/package.json +18 -10
  104. package/node_modules/hoek/package.json +14 -6
  105. package/node_modules/http-signature/package.json +14 -6
  106. package/node_modules/inflight/inflight.js +22 -12
  107. package/node_modules/inflight/package.json +28 -20
  108. package/node_modules/inherits/inherits.js +7 -1
  109. package/node_modules/inherits/package.json +41 -21
  110. package/node_modules/ini/package.json +15 -7
  111. package/node_modules/is-fullwidth-code-point/package.json +27 -19
  112. package/node_modules/is-my-json-valid/index.js +10 -0
  113. package/node_modules/is-my-json-valid/package.json +36 -20
  114. package/node_modules/is-my-json-valid/test/misc.js +24 -0
  115. package/node_modules/is-property/package.json +19 -11
  116. package/node_modules/is-typedarray/package.json +16 -8
  117. package/node_modules/isarray/package.json +28 -20
  118. package/node_modules/isstream/package.json +19 -11
  119. package/node_modules/jodid25519/package.json +18 -10
  120. package/node_modules/jsbn/index.js +8 -9
  121. package/node_modules/jsbn/package.json +30 -18
  122. package/node_modules/json-schema/lib/links.js +17 -3
  123. package/node_modules/json-schema/lib/validate.js +18 -5
  124. package/node_modules/json-schema/package.json +32 -18
  125. package/node_modules/json-stringify-safe/package.json +18 -10
  126. package/node_modules/{async/LICENSE → jsonpointer/LICENSE.md} +3 -1
  127. package/node_modules/jsonpointer/README.md +17 -10
  128. package/node_modules/jsonpointer/jsonpointer.js +73 -56
  129. package/node_modules/jsonpointer/package.json +47 -26
  130. package/node_modules/jsprim/CHANGES.md +4 -0
  131. package/node_modules/jsprim/package.json +25 -17
  132. package/node_modules/mime-db/HISTORY.md +50 -0
  133. package/node_modules/mime-db/db.json +126 -2
  134. package/node_modules/mime-db/package.json +43 -30
  135. package/node_modules/mime-types/HISTORY.md +19 -0
  136. package/node_modules/mime-types/index.js +8 -8
  137. package/node_modules/mime-types/package.json +32 -19
  138. package/node_modules/minimatch/minimatch.js +19 -20
  139. package/node_modules/minimatch/package.json +25 -17
  140. package/node_modules/minimist/package.json +24 -16
  141. package/node_modules/mkdirp/package.json +21 -13
  142. package/node_modules/ms/package.json +14 -6
  143. package/node_modules/node-pre-gyp/CHANGELOG.md +20 -0
  144. package/node_modules/node-pre-gyp/README.md +574 -0
  145. package/node_modules/node-pre-gyp/appveyor.yml +19 -9
  146. package/node_modules/node-pre-gyp/lib/install.js +31 -7
  147. package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +3 -1
  148. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +140 -0
  149. package/node_modules/node-pre-gyp/package.json +52 -48
  150. package/node_modules/nopt/package.json +19 -11
  151. package/node_modules/npmlog/CHANGELOG.md +9 -0
  152. package/node_modules/npmlog/README.md +7 -1
  153. package/node_modules/npmlog/log.js +12 -8
  154. package/node_modules/npmlog/package.json +30 -22
  155. package/node_modules/number-is-nan/package.json +39 -30
  156. package/node_modules/number-is-nan/readme.md +1 -3
  157. package/node_modules/oauth-sign/package.json +15 -7
  158. package/node_modules/object-assign/index.js +11 -4
  159. package/node_modules/object-assign/package.json +42 -30
  160. package/node_modules/object-assign/readme.md +8 -3
  161. package/node_modules/once/README.md +28 -0
  162. package/node_modules/once/once.js +21 -0
  163. package/node_modules/once/package.json +31 -20
  164. package/node_modules/path-is-absolute/index.js +5 -5
  165. package/node_modules/path-is-absolute/package.json +45 -31
  166. package/node_modules/path-is-absolute/readme.md +19 -11
  167. package/node_modules/pinkie/package.json +18 -10
  168. package/node_modules/pinkie-promise/package.json +18 -10
  169. package/node_modules/process-nextick-args/package.json +16 -8
  170. package/node_modules/punycode/LICENSE-MIT.txt +20 -0
  171. package/node_modules/punycode/README.md +176 -0
  172. package/node_modules/punycode/package.json +127 -0
  173. package/node_modules/punycode/punycode.js +533 -0
  174. package/node_modules/qs/.eslintrc +15 -15
  175. package/node_modules/qs/CHANGELOG.md +36 -0
  176. package/node_modules/qs/README.md +431 -0
  177. package/node_modules/qs/dist/qs.js +167 -67
  178. package/node_modules/qs/lib/formats.js +18 -0
  179. package/node_modules/qs/lib/index.js +6 -4
  180. package/node_modules/qs/lib/parse.js +31 -32
  181. package/node_modules/qs/lib/stringify.js +83 -20
  182. package/node_modules/qs/lib/utils.js +23 -7
  183. package/node_modules/qs/package.json +40 -30
  184. package/node_modules/qs/test/.eslintrc +10 -0
  185. package/node_modules/qs/test/index.js +2 -0
  186. package/node_modules/qs/test/parse.js +108 -47
  187. package/node_modules/qs/test/stringify.js +261 -28
  188. package/node_modules/qs/test/utils.js +13 -0
  189. package/node_modules/rc/node_modules/minimist/package.json +24 -16
  190. package/node_modules/rc/package.json +35 -23
  191. package/node_modules/readable-stream/.npmignore +1 -0
  192. package/node_modules/readable-stream/.travis.yml +2 -7
  193. package/node_modules/readable-stream/README.md +6 -2
  194. package/node_modules/readable-stream/lib/_stream_readable.js +158 -110
  195. package/node_modules/readable-stream/lib/_stream_transform.js +7 -5
  196. package/node_modules/readable-stream/lib/_stream_writable.js +35 -7
  197. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +64 -0
  198. package/node_modules/readable-stream/package.json +34 -26
  199. package/node_modules/request/CHANGELOG.md +49 -18
  200. package/node_modules/request/README.md +3 -2
  201. package/node_modules/request/index.js +2 -3
  202. package/node_modules/request/lib/auth.js +1 -1
  203. package/node_modules/request/lib/helpers.js +4 -13
  204. package/node_modules/request/lib/multipart.js +1 -1
  205. package/node_modules/request/lib/oauth.js +1 -1
  206. package/node_modules/request/lib/redirect.js +5 -1
  207. package/node_modules/request/package.json +50 -31
  208. package/node_modules/request/request.js +84 -43
  209. package/node_modules/rimraf/package.json +28 -20
  210. package/node_modules/rimraf/rimraf.js +2 -2
  211. package/node_modules/semver/README.md +4 -0
  212. package/node_modules/semver/package.json +27 -19
  213. package/node_modules/semver/semver.js +14 -5
  214. package/node_modules/set-blocking/package.json +21 -13
  215. package/node_modules/signal-exit/CHANGELOG.md +10 -0
  216. package/node_modules/signal-exit/LICENSE.txt +2 -0
  217. package/node_modules/signal-exit/index.js +9 -0
  218. package/node_modules/signal-exit/package.json +32 -24
  219. package/node_modules/signal-exit/signals.js +5 -4
  220. package/node_modules/sntp/package.json +16 -8
  221. package/node_modules/sshpk/README.md +214 -3
  222. package/node_modules/sshpk/bin/sshpk-conv +6 -0
  223. package/node_modules/sshpk/lib/certificate.js +291 -0
  224. package/node_modules/sshpk/lib/errors.js +14 -1
  225. package/node_modules/sshpk/lib/fingerprint.js +28 -7
  226. package/node_modules/sshpk/lib/formats/openssh-cert.js +289 -0
  227. package/node_modules/sshpk/lib/formats/pem.js +2 -2
  228. package/node_modules/sshpk/lib/formats/pkcs8.js +2 -7
  229. package/node_modules/sshpk/lib/formats/ssh-private.js +140 -17
  230. package/node_modules/sshpk/lib/formats/x509-pem.js +77 -0
  231. package/node_modules/sshpk/lib/formats/x509.js +484 -0
  232. package/node_modules/sshpk/lib/identity.js +277 -0
  233. package/node_modules/sshpk/lib/index.js +13 -1
  234. package/node_modules/sshpk/lib/key.js +1 -0
  235. package/node_modules/sshpk/lib/signature.js +14 -6
  236. package/node_modules/sshpk/lib/ssh-buffer.js +24 -0
  237. package/node_modules/sshpk/lib/utils.js +43 -1
  238. package/node_modules/sshpk/node_modules/assert-plus/package.json +16 -8
  239. package/node_modules/sshpk/package.json +32 -22
  240. package/node_modules/string-width/index.js +5 -0
  241. package/node_modules/string-width/package.json +49 -36
  242. package/node_modules/string-width/readme.md +4 -3
  243. package/node_modules/string_decoder/package.json +19 -11
  244. package/node_modules/stringstream/package.json +18 -10
  245. package/node_modules/strip-ansi/package.json +29 -21
  246. package/node_modules/strip-json-comments/index.js +70 -0
  247. package/node_modules/strip-json-comments/package.json +49 -43
  248. package/node_modules/strip-json-comments/readme.md +12 -28
  249. package/node_modules/supports-color/package.json +26 -18
  250. package/node_modules/tar/package.json +19 -11
  251. package/node_modules/tar-pack/README.md +4 -1
  252. package/node_modules/tar-pack/index.js +17 -12
  253. package/node_modules/tar-pack/node_modules/once/LICENSE +15 -0
  254. package/node_modules/tar-pack/node_modules/once/README.md +51 -0
  255. package/node_modules/tar-pack/node_modules/once/once.js +21 -0
  256. package/node_modules/tar-pack/node_modules/once/package.json +96 -0
  257. package/node_modules/tar-pack/node_modules/readable-stream/.npmignore +8 -0
  258. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/.travis.yml +4 -7
  259. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/LICENSE +0 -0
  260. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/README.md +2 -2
  261. package/node_modules/tar-pack/node_modules/readable-stream/doc/stream.md +2015 -0
  262. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -0
  263. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/duplex.js +0 -0
  264. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_duplex.js +0 -0
  265. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_passthrough.js +0 -0
  266. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_readable.js +164 -107
  267. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_transform.js +3 -3
  268. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_writable.js +25 -15
  269. package/node_modules/tar-pack/node_modules/readable-stream/lib/internal/streams/BufferList.js +64 -0
  270. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/package.json +50 -30
  271. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/passthrough.js +0 -0
  272. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/readable.js +4 -0
  273. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/transform.js +0 -0
  274. package/node_modules/{bl → tar-pack}/node_modules/readable-stream/writable.js +0 -0
  275. package/node_modules/tar-pack/package.json +39 -22
  276. package/node_modules/tar-pack/test/index.js +43 -1
  277. package/node_modules/tough-cookie/README.md +17 -3
  278. package/node_modules/tough-cookie/lib/cookie.js +6 -12
  279. package/node_modules/tough-cookie/package.json +50 -35
  280. package/node_modules/tunnel-agent/package.json +15 -7
  281. package/node_modules/tweetnacl/AUTHORS.md +28 -0
  282. package/node_modules/tweetnacl/CHANGELOG.md +93 -0
  283. package/node_modules/tweetnacl/LICENSE +24 -0
  284. package/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md +20 -0
  285. package/node_modules/tweetnacl/README.md +57 -61
  286. package/node_modules/tweetnacl/nacl-fast.js +22 -52
  287. package/node_modules/tweetnacl/nacl-fast.min.js +2 -2
  288. package/node_modules/tweetnacl/nacl.d.ts +98 -0
  289. package/node_modules/tweetnacl/nacl.js +21 -51
  290. package/node_modules/tweetnacl/nacl.min.js +1 -1
  291. package/node_modules/tweetnacl/package.json +47 -46
  292. package/node_modules/uid-number/package.json +15 -7
  293. package/node_modules/util-deprecate/package.json +21 -13
  294. package/node_modules/uuid/.npmignore +8 -0
  295. package/node_modules/uuid/.travis.yml +5 -0
  296. package/node_modules/uuid/AUTHORS +5 -0
  297. package/node_modules/uuid/HISTORY.md +28 -0
  298. package/node_modules/uuid/LICENSE.md +21 -0
  299. package/node_modules/uuid/README.md +132 -0
  300. package/node_modules/{node-uuid → uuid}/bin/uuid +0 -0
  301. package/node_modules/uuid/index.js +8 -0
  302. package/node_modules/uuid/lib/bytesToUuid.js +23 -0
  303. package/node_modules/uuid/lib/rng-browser.js +33 -0
  304. package/node_modules/uuid/lib/rng.js +10 -0
  305. package/node_modules/uuid/package.json +122 -0
  306. package/node_modules/uuid/test/mocha.opts +3 -0
  307. package/node_modules/uuid/test/test.js +96 -0
  308. package/node_modules/uuid/v1.js +103 -0
  309. package/node_modules/uuid/v4.js +29 -0
  310. package/node_modules/verror/package.json +14 -6
  311. package/node_modules/wide-align/package.json +19 -11
  312. package/node_modules/wrappy/package.json +17 -8
  313. package/node_modules/xtend/package.json +29 -21
  314. package/package.json +2 -2
  315. package/node_modules/async/CHANGELOG.md +0 -125
  316. package/node_modules/async/README.md +0 -1877
  317. package/node_modules/async/dist/async.js +0 -1265
  318. package/node_modules/async/dist/async.min.js +0 -2
  319. package/node_modules/async/lib/async.js +0 -1265
  320. package/node_modules/async/package.json +0 -149
  321. package/node_modules/bl/.jshintrc +0 -59
  322. package/node_modules/bl/.npmignore +0 -1
  323. package/node_modules/bl/.travis.yml +0 -13
  324. package/node_modules/bl/LICENSE.md +0 -13
  325. package/node_modules/bl/README.md +0 -200
  326. package/node_modules/bl/bl.js +0 -243
  327. package/node_modules/bl/node_modules/readable-stream/.npmignore +0 -5
  328. package/node_modules/bl/node_modules/readable-stream/.zuul.yml +0 -1
  329. package/node_modules/bl/node_modules/readable-stream/doc/stream.markdown +0 -1760
  330. package/node_modules/bl/package.json +0 -96
  331. package/node_modules/bl/test/test.js +0 -640
  332. package/node_modules/form-data/.dockerignore +0 -7
  333. package/node_modules/form-data/.editorconfig +0 -10
  334. package/node_modules/form-data/.eslintignore +0 -1
  335. package/node_modules/form-data/.eslintrc +0 -64
  336. package/node_modules/form-data/wercker.yml +0 -36
  337. package/node_modules/gauge/CHANGELOG.md~ +0 -123
  338. package/node_modules/gauge/README.md~ +0 -393
  339. package/node_modules/has-color/index.js +0 -32
  340. package/node_modules/has-color/package.json +0 -97
  341. package/node_modules/has-color/readme.md +0 -30
  342. package/node_modules/inherits/test.js +0 -25
  343. package/node_modules/jsonpointer/.travis.yml +0 -10
  344. package/node_modules/jsonpointer/test.js +0 -98
  345. package/node_modules/node-uuid/.npmignore +0 -4
  346. package/node_modules/node-uuid/README.md +0 -254
  347. package/node_modules/node-uuid/benchmark/README.md +0 -53
  348. package/node_modules/node-uuid/benchmark/bench.gnu +0 -174
  349. package/node_modules/node-uuid/benchmark/bench.sh +0 -34
  350. package/node_modules/node-uuid/benchmark/benchmark-native.c +0 -34
  351. package/node_modules/node-uuid/benchmark/benchmark.js +0 -84
  352. package/node_modules/node-uuid/bower.json +0 -23
  353. package/node_modules/node-uuid/component.json +0 -25
  354. package/node_modules/node-uuid/package.json +0 -105
  355. package/node_modules/node-uuid/test/compare_v1.js +0 -63
  356. package/node_modules/node-uuid/test/test.html +0 -17
  357. package/node_modules/node-uuid/test/test.js +0 -231
  358. package/node_modules/node-uuid/uuid.js +0 -272
  359. package/node_modules/npmlog/CHANGELOG.md~ +0 -31
  360. package/node_modules/qs/.jscs.json +0 -176
  361. package/node_modules/qs/CONTRIBUTING.md +0 -1
  362. package/node_modules/readable-stream/doc/stream.md +0 -1772
  363. package/node_modules/request/.eslintrc +0 -45
  364. package/node_modules/request/.npmignore +0 -6
  365. package/node_modules/request/.travis.yml +0 -21
  366. package/node_modules/request/CONTRIBUTING.md +0 -81
  367. package/node_modules/request/codecov.yml +0 -2
  368. package/node_modules/strip-json-comments/cli.js +0 -41
  369. package/node_modules/strip-json-comments/strip-json-comments.js +0 -73
package/fsevents.js CHANGED
@@ -6,6 +6,9 @@
6
6
  /* jshint node:true */
7
7
  'use strict';
8
8
 
9
+ if (process.platform !== 'darwin')
10
+ throw new Error('Module \'fsevents\' is not compatible with platform \'' + process.platform + '\'');
11
+
9
12
  var path = require('path');
10
13
  var binary = require('node-pre-gyp');
11
14
  var Native = require(binary.find(path.join(__dirname, 'package.json')));
package/install.js ADDED
@@ -0,0 +1,7 @@
1
+ if (process.platform === 'darwin') {
2
+ var spawn = require('child_process').spawn;
3
+ var args = ['install', '--fallback-to-build'];
4
+ var options = {stdio: 'inherit'};
5
+ var child = spawn('node-pre-gyp', args, options);
6
+ child.on('close', process.exit);
7
+ }
@@ -1,4 +1,3 @@
1
-
2
1
  module.exports = exports = abbrev.abbrev = abbrev
3
2
 
4
3
  abbrev.monkeyPatch = monkeyPatch
@@ -1,31 +1,39 @@
1
1
  {
2
2
  "_args": [
3
3
  [
4
- "abbrev@1",
4
+ {
5
+ "raw": "abbrev@1",
6
+ "scope": null,
7
+ "escapedName": "abbrev",
8
+ "name": "abbrev",
9
+ "rawSpec": "1",
10
+ "spec": ">=1.0.0 <2.0.0",
11
+ "type": "range"
12
+ },
5
13
  "/Users/eshanker/Code/fsevents/node_modules/nopt"
6
14
  ]
7
15
  ],
8
16
  "_from": "abbrev@>=1.0.0 <2.0.0",
9
- "_id": "abbrev@1.0.9",
17
+ "_id": "abbrev@1.1.0",
10
18
  "_inCache": true,
11
- "_installable": true,
12
19
  "_location": "/abbrev",
13
- "_nodeVersion": "4.4.4",
20
+ "_nodeVersion": "8.0.0-pre",
14
21
  "_npmOperationalInternal": {
15
- "host": "packages-16-east.internal.npmjs.com",
16
- "tmp": "tmp/abbrev-1.0.9.tgz_1466016055839_0.7825860097073019"
22
+ "host": "packages-12-west.internal.npmjs.com",
23
+ "tmp": "tmp/abbrev-1.1.0.tgz_1487054000015_0.9229173036292195"
17
24
  },
18
25
  "_npmUser": {
19
- "email": "i@izs.me",
20
- "name": "isaacs"
26
+ "name": "isaacs",
27
+ "email": "i@izs.me"
21
28
  },
22
- "_npmVersion": "3.9.1",
29
+ "_npmVersion": "4.3.0",
23
30
  "_phantomChildren": {},
24
31
  "_requested": {
25
- "name": "abbrev",
26
32
  "raw": "abbrev@1",
27
- "rawSpec": "1",
28
33
  "scope": null,
34
+ "escapedName": "abbrev",
35
+ "name": "abbrev",
36
+ "rawSpec": "1",
29
37
  "spec": ">=1.0.0 <2.0.0",
30
38
  "type": "range"
31
39
  },
@@ -33,14 +41,14 @@
33
41
  "/nopt",
34
42
  "/tap/nopt"
35
43
  ],
36
- "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
37
- "_shasum": "91b4792588a7738c25f35dd6f63752a2f8776135",
44
+ "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
45
+ "_shasum": "d0554c2256636e2f56e7c2e5ad183f859428d81f",
38
46
  "_shrinkwrap": null,
39
47
  "_spec": "abbrev@1",
40
48
  "_where": "/Users/eshanker/Code/fsevents/node_modules/nopt",
41
49
  "author": {
42
- "email": "i@izs.me",
43
- "name": "Isaac Z. Schlueter"
50
+ "name": "Isaac Z. Schlueter",
51
+ "email": "i@izs.me"
44
52
  },
45
53
  "bugs": {
46
54
  "url": "https://github.com/isaacs/abbrev-js/issues"
@@ -48,17 +56,17 @@
48
56
  "dependencies": {},
49
57
  "description": "Like ruby's abbrev module, but in js",
50
58
  "devDependencies": {
51
- "tap": "^5.7.2"
59
+ "tap": "^10.1"
52
60
  },
53
61
  "directories": {},
54
62
  "dist": {
55
- "shasum": "91b4792588a7738c25f35dd6f63752a2f8776135",
56
- "tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz"
63
+ "shasum": "d0554c2256636e2f56e7c2e5ad183f859428d81f",
64
+ "tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz"
57
65
  },
58
66
  "files": [
59
67
  "abbrev.js"
60
68
  ],
61
- "gitHead": "c386cd9dbb1d8d7581718c54d4ba944cc9298d6f",
69
+ "gitHead": "7136d4d95449dc44115d4f78b80ec907724f64e0",
62
70
  "homepage": "https://github.com/isaacs/abbrev-js#readme",
63
71
  "license": "ISC",
64
72
  "main": "abbrev.js",
@@ -76,7 +84,10 @@
76
84
  "url": "git+ssh://git@github.com/isaacs/abbrev-js.git"
77
85
  },
78
86
  "scripts": {
79
- "test": "tap test.js --cov"
87
+ "postpublish": "git push origin --all; git push origin --tags",
88
+ "postversion": "npm publish",
89
+ "preversion": "npm test",
90
+ "test": "tap test.js --100"
80
91
  },
81
- "version": "1.0.9"
92
+ "version": "1.1.0"
82
93
  }
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
2
  module.exports = function () {
3
- return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
3
+ return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
4
4
  };
@@ -1,27 +1,39 @@
1
1
  {
2
2
  "_args": [
3
3
  [
4
- "ansi-regex@^2.0.0",
4
+ {
5
+ "raw": "ansi-regex@^2.0.0",
6
+ "scope": null,
7
+ "escapedName": "ansi-regex",
8
+ "name": "ansi-regex",
9
+ "rawSpec": "^2.0.0",
10
+ "spec": ">=2.0.0 <3.0.0",
11
+ "type": "range"
12
+ },
5
13
  "/Users/eshanker/Code/fsevents/node_modules/strip-ansi"
6
14
  ]
7
15
  ],
8
16
  "_from": "ansi-regex@>=2.0.0 <3.0.0",
9
- "_id": "ansi-regex@2.0.0",
17
+ "_id": "ansi-regex@2.1.1",
10
18
  "_inCache": true,
11
- "_installable": true,
12
19
  "_location": "/ansi-regex",
13
- "_nodeVersion": "0.12.5",
20
+ "_nodeVersion": "0.10.32",
21
+ "_npmOperationalInternal": {
22
+ "host": "packages-18-east.internal.npmjs.com",
23
+ "tmp": "tmp/ansi-regex-2.1.1.tgz_1484363378013_0.4482989883981645"
24
+ },
14
25
  "_npmUser": {
15
- "email": "sindresorhus@gmail.com",
16
- "name": "sindresorhus"
26
+ "name": "qix",
27
+ "email": "i.am.qix@gmail.com"
17
28
  },
18
- "_npmVersion": "2.11.2",
29
+ "_npmVersion": "2.14.2",
19
30
  "_phantomChildren": {},
20
31
  "_requested": {
21
- "name": "ansi-regex",
22
32
  "raw": "ansi-regex@^2.0.0",
23
- "rawSpec": "^2.0.0",
24
33
  "scope": null,
34
+ "escapedName": "ansi-regex",
35
+ "name": "ansi-regex",
36
+ "rawSpec": "^2.0.0",
25
37
  "spec": ">=2.0.0 <3.0.0",
26
38
  "type": "range"
27
39
  },
@@ -29,28 +41,29 @@
29
41
  "/has-ansi",
30
42
  "/strip-ansi"
31
43
  ],
32
- "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz",
33
- "_shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107",
44
+ "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
45
+ "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
34
46
  "_shrinkwrap": null,
35
47
  "_spec": "ansi-regex@^2.0.0",
36
48
  "_where": "/Users/eshanker/Code/fsevents/node_modules/strip-ansi",
37
49
  "author": {
38
- "email": "sindresorhus@gmail.com",
39
50
  "name": "Sindre Sorhus",
51
+ "email": "sindresorhus@gmail.com",
40
52
  "url": "sindresorhus.com"
41
53
  },
42
54
  "bugs": {
43
- "url": "https://github.com/sindresorhus/ansi-regex/issues"
55
+ "url": "https://github.com/chalk/ansi-regex/issues"
44
56
  },
45
57
  "dependencies": {},
46
58
  "description": "Regular expression for matching ANSI escape codes",
47
59
  "devDependencies": {
48
- "mocha": "*"
60
+ "ava": "0.17.0",
61
+ "xo": "0.16.0"
49
62
  },
50
63
  "directories": {},
51
64
  "dist": {
52
- "shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107",
53
- "tarball": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz"
65
+ "shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
66
+ "tarball": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz"
54
67
  },
55
68
  "engines": {
56
69
  "node": ">=0.10.0"
@@ -58,44 +71,44 @@
58
71
  "files": [
59
72
  "index.js"
60
73
  ],
61
- "gitHead": "57c3f2941a73079fa8b081e02a522e3d29913e2f",
62
- "homepage": "https://github.com/sindresorhus/ansi-regex",
74
+ "gitHead": "7c908e7b4eb6cd82bfe1295e33fdf6d166c7ed85",
75
+ "homepage": "https://github.com/chalk/ansi-regex#readme",
63
76
  "keywords": [
64
- "256",
65
77
  "ansi",
66
- "cli",
78
+ "styles",
67
79
  "color",
68
- "colors",
69
80
  "colour",
70
- "command-line",
81
+ "colors",
82
+ "terminal",
71
83
  "console",
84
+ "cli",
85
+ "string",
86
+ "tty",
72
87
  "escape",
73
- "find",
74
88
  "formatting",
75
- "match",
76
- "pattern",
77
- "re",
78
- "regex",
79
- "regexp",
80
89
  "rgb",
90
+ "256",
81
91
  "shell",
82
- "string",
83
- "styles",
84
- "terminal",
85
- "test",
92
+ "xterm",
93
+ "command-line",
86
94
  "text",
87
- "tty",
88
- "xterm"
95
+ "regex",
96
+ "regexp",
97
+ "re",
98
+ "match",
99
+ "test",
100
+ "find",
101
+ "pattern"
89
102
  ],
90
103
  "license": "MIT",
91
104
  "maintainers": [
92
105
  {
93
- "name": "sindresorhus",
94
- "email": "sindresorhus@gmail.com"
106
+ "name": "qix",
107
+ "email": "i.am.qix@gmail.com"
95
108
  },
96
109
  {
97
- "name": "jbnicolai",
98
- "email": "jappelman@xebia.com"
110
+ "name": "sindresorhus",
111
+ "email": "sindresorhus@gmail.com"
99
112
  }
100
113
  ],
101
114
  "name": "ansi-regex",
@@ -103,11 +116,17 @@
103
116
  "readme": "ERROR: No README data found!",
104
117
  "repository": {
105
118
  "type": "git",
106
- "url": "git+https://github.com/sindresorhus/ansi-regex.git"
119
+ "url": "git+https://github.com/chalk/ansi-regex.git"
107
120
  },
108
121
  "scripts": {
109
- "test": "mocha test/test.js",
110
- "view-supported": "node test/viewCodes.js"
122
+ "test": "xo && ava --verbose",
123
+ "view-supported": "node fixtures/view-codes.js"
111
124
  },
112
- "version": "2.0.0"
125
+ "version": "2.1.1",
126
+ "xo": {
127
+ "rules": {
128
+ "guard-for-in": 0,
129
+ "no-loop-func": 0
130
+ }
131
+ }
113
132
  }
@@ -1,4 +1,4 @@
1
- # ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex)
1
+ # ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
2
2
 
3
3
  > Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
4
4
 
@@ -13,7 +13,7 @@ $ npm install --save ansi-regex
13
13
  ## Usage
14
14
 
15
15
  ```js
16
- var ansiRegex = require('ansi-regex');
16
+ const ansiRegex = require('ansi-regex');
17
17
 
18
18
  ansiRegex().test('\u001b[4mcake\u001b[0m');
19
19
  //=> true
@@ -25,6 +25,14 @@ ansiRegex().test('cake');
25
25
  //=> ['\u001b[4m', '\u001b[0m']
26
26
  ```
27
27
 
28
+ ## FAQ
29
+
30
+ ### Why do you test for codes not in the ECMA 48 standard?
31
+
32
+ Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
33
+
34
+ On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
35
+
28
36
 
29
37
  ## License
30
38
 
@@ -1,14 +1,21 @@
1
1
  {
2
2
  "_args": [
3
3
  [
4
- "ansi-styles@^2.2.1",
4
+ {
5
+ "raw": "ansi-styles@^2.2.1",
6
+ "scope": null,
7
+ "escapedName": "ansi-styles",
8
+ "name": "ansi-styles",
9
+ "rawSpec": "^2.2.1",
10
+ "spec": ">=2.2.1 <3.0.0",
11
+ "type": "range"
12
+ },
5
13
  "/Users/eshanker/Code/fsevents/node_modules/chalk"
6
14
  ]
7
15
  ],
8
16
  "_from": "ansi-styles@>=2.2.1 <3.0.0",
9
17
  "_id": "ansi-styles@2.2.1",
10
18
  "_inCache": true,
11
- "_installable": true,
12
19
  "_location": "/ansi-styles",
13
20
  "_nodeVersion": "4.3.0",
14
21
  "_npmOperationalInternal": {
@@ -16,16 +23,17 @@
16
23
  "tmp": "tmp/ansi-styles-2.2.1.tgz_1459197317833_0.9694824463222176"
17
24
  },
18
25
  "_npmUser": {
19
- "email": "sindresorhus@gmail.com",
20
- "name": "sindresorhus"
26
+ "name": "sindresorhus",
27
+ "email": "sindresorhus@gmail.com"
21
28
  },
22
29
  "_npmVersion": "3.8.3",
23
30
  "_phantomChildren": {},
24
31
  "_requested": {
25
- "name": "ansi-styles",
26
32
  "raw": "ansi-styles@^2.2.1",
27
- "rawSpec": "^2.2.1",
28
33
  "scope": null,
34
+ "escapedName": "ansi-styles",
35
+ "name": "ansi-styles",
36
+ "rawSpec": "^2.2.1",
29
37
  "spec": ">=2.2.1 <3.0.0",
30
38
  "type": "range"
31
39
  },
@@ -38,8 +46,8 @@
38
46
  "_spec": "ansi-styles@^2.2.1",
39
47
  "_where": "/Users/eshanker/Code/fsevents/node_modules/chalk",
40
48
  "author": {
41
- "email": "sindresorhus@gmail.com",
42
49
  "name": "Sindre Sorhus",
50
+ "email": "sindresorhus@gmail.com",
43
51
  "url": "sindresorhus.com"
44
52
  },
45
53
  "bugs": {
@@ -64,26 +72,26 @@
64
72
  "gitHead": "95c59b23be760108b6530ca1c89477c21b258032",
65
73
  "homepage": "https://github.com/chalk/ansi-styles#readme",
66
74
  "keywords": [
67
- "256",
68
75
  "ansi",
69
- "cli",
76
+ "styles",
70
77
  "color",
71
- "colors",
72
78
  "colour",
73
- "command-line",
79
+ "colors",
80
+ "terminal",
74
81
  "console",
82
+ "cli",
83
+ "string",
84
+ "tty",
75
85
  "escape",
76
86
  "formatting",
77
- "log",
78
- "logging",
79
87
  "rgb",
88
+ "256",
80
89
  "shell",
81
- "string",
82
- "styles",
83
- "terminal",
84
- "text",
85
- "tty",
86
- "xterm"
90
+ "xterm",
91
+ "log",
92
+ "logging",
93
+ "command-line",
94
+ "text"
87
95
  ],
88
96
  "license": "MIT",
89
97
  "maintainers": [
@@ -29,7 +29,8 @@ N | typeof == number
29
29
  F | typeof == function
30
30
  O | typeof == object and not type A and not type E
31
31
  B | typeof == boolean
32
- E | instanceof Error OR null
32
+ E | instanceof Error OR null **(special: see below)**
33
+ Z | == null
33
34
 
34
35
  Validation failures throw one of three exception types, distinguished by a
35
36
  `code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
@@ -37,8 +38,37 @@ Validation failures throw one of three exception types, distinguished by a
37
38
  If you pass in an invalid type then it will throw with a code of
38
39
  `EUNKNOWNTYPE`.
39
40
 
40
- If an error argument is found and is not null then the remaining arguments
41
- will not be validated.
41
+ If an **error** argument is found and is not null then the remaining
42
+ arguments are optional. That is, if you say `ESO` then that's like using a
43
+ non-magical `E` in: `E|ESO|ZSO`.
44
+
45
+ ### But I have optional arguments?!
46
+
47
+ You can provide more than one signature by separating them with pipes `|`.
48
+ If any signature matches the arguments then they'll be considered valid.
49
+
50
+ So for example, say you wanted to write a signature for
51
+ `fs.createWriteStream`. The docs for it describe it thusly:
52
+
53
+ ```
54
+ fs.createWriteStream(path[, options])
55
+ ```
56
+
57
+ This would be a signature of `SO|S`. That is, a string and and object, or
58
+ just a string.
59
+
60
+ Now, if you read the full `fs` docs, you'll see that actually path can ALSO
61
+ be a buffer. And options can be a string, that is:
62
+ ```
63
+ path <String> | <Buffer>
64
+ options <String> | <Object>
65
+ ```
66
+
67
+ To reproduce this you have to fully enumerate all of the possible
68
+ combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
69
+ awkwardness is a feature: It reminds you of the complexity you're adding to
70
+ your API when you do this sort of thing.
71
+
42
72
 
43
73
  ### Why this exists
44
74
 
@@ -1,36 +1,64 @@
1
1
  'use strict'
2
2
 
3
3
  function isArguments (thingy) {
4
- return typeof thingy === 'object' && thingy.hasOwnProperty('callee')
4
+ return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
5
5
  }
6
6
 
7
7
  var types = {
8
- '*': ['any', function () { return true }],
9
- A: ['array', function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }],
10
- S: ['string', function (thingy) { return typeof thingy === 'string' }],
11
- N: ['number', function (thingy) { return typeof thingy === 'number' }],
12
- F: ['function', function (thingy) { return typeof thingy === 'function' }],
13
- O: ['object', function (thingy) { return typeof thingy === 'object' && !types.A[1](thingy) && !types.E[1](thingy) }],
14
- B: ['boolean', function (thingy) { return typeof thingy === 'boolean' }],
15
- E: ['error', function (thingy) { return thingy instanceof Error }]
16
- }
17
-
18
- var validate = module.exports = function (schema, args) {
19
- if (!schema) throw missingRequiredArg(0, 'schema')
8
+ '*': {label: 'any', check: function () { return true }},
9
+ A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
10
+ S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
11
+ N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
12
+ F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
13
+ O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
14
+ B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
15
+ E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
16
+ Z: {label: 'null', check: function (thingy) { return thingy == null }}
17
+ }
18
+
19
+ var validate = module.exports = function (rawSchemas, args) {
20
+ if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
21
+ if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
20
22
  if (!args) throw missingRequiredArg(1, 'args')
21
- if (!types.S[1](schema)) throw invalidType(0, 'string', schema)
22
- if (!types.A[1](args)) throw invalidType(1, 'array', args)
23
- for (var ii = 0; ii < schema.length; ++ii) {
24
- var type = schema[ii]
25
- if (!types[type]) throw unknownType(ii, type)
26
- var typeLabel = types[type][0]
27
- var typeCheck = types[type][1]
28
- if (type === 'E' && args[ii] == null) continue
29
- if (args[ii] == null) throw missingRequiredArg(ii)
30
- if (!typeCheck(args[ii])) throw invalidType(ii, typeLabel, args[ii])
31
- if (type === 'E') return
23
+ if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
24
+ if (!types.A.check(args)) throw invalidType(1, ['array'], args)
25
+ var schemas = rawSchemas.split('|')
26
+ var arity = {}
27
+ function addSchema (schema) {
28
+ var group = arity[schema.length] = arity[schema.length] || []
29
+ if (group.indexOf(schema) === -1) group.push(schema)
30
+ }
31
+ schemas.forEach(function (schema) {
32
+ for (var ii = 0; ii < schema.length; ++ii) {
33
+ var type = schema[ii]
34
+ if (!types[type]) throw unknownType(ii, type)
35
+ }
36
+ if (/E.*E/.test(schema)) throw moreThanOneError(schema)
37
+ addSchema(schema)
38
+ if (/E/.test(schema)) {
39
+ addSchema(schema.replace(/E.*$/, 'E'))
40
+ addSchema(schema.replace(/E/, 'Z'))
41
+ if (schema.length === 1) addSchema('')
42
+ }
43
+ })
44
+ var matching = arity[args.length]
45
+ if (!matching) {
46
+ throw wrongNumberOfArgs(Object.keys(arity), args.length)
47
+ }
48
+ for (var ii = 0; ii < args.length; ++ii) {
49
+ var newMatching = matching.filter(function (schema) {
50
+ var type = schema[ii]
51
+ var typeCheck = types[type].check
52
+ return typeCheck(args[ii])
53
+ })
54
+ if (!newMatching.length) {
55
+ var labels = matching.map(function (schema) {
56
+ return types[schema[ii]].label
57
+ }).filter(function (schema) { return schema != null })
58
+ throw invalidType(ii, labels, args[ii])
59
+ }
60
+ matching = newMatching
32
61
  }
33
- if (schema.length < args.length) throw tooManyArgs(schema.length, args.length)
34
62
  }
35
63
 
36
64
  function missingRequiredArg (num) {
@@ -41,17 +69,30 @@ function unknownType (num, type) {
41
69
  return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
42
70
  }
43
71
 
44
- function invalidType (num, expectedType, value) {
72
+ function invalidType (num, expectedTypes, value) {
45
73
  var valueType
46
74
  Object.keys(types).forEach(function (typeCode) {
47
- if (types[typeCode][1](value)) valueType = types[typeCode][0]
75
+ if (types[typeCode].check(value)) valueType = types[typeCode].label
48
76
  })
49
77
  return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
50
- expectedType + ' but got ' + valueType)
78
+ englishList(expectedTypes) + ' but got ' + valueType)
79
+ }
80
+
81
+ function englishList (list) {
82
+ return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
83
+ }
84
+
85
+ function wrongNumberOfArgs (expected, got) {
86
+ var english = englishList(expected)
87
+ var args = expected.every(function (ex) { return ex.length === 1 })
88
+ ? 'argument'
89
+ : 'arguments'
90
+ return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
51
91
  }
52
92
 
53
- function tooManyArgs (expected, got) {
54
- return newException('ETOOMANYARGS', 'Too many arguments, expected ' + expected + ' and got ' + got)
93
+ function moreThanOneError (schema) {
94
+ return newException('ETOOMANYERRORTYPES',
95
+ 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
55
96
  }
56
97
 
57
98
  function newException (code, msg) {