fsevents 1.0.8 → 1.0.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 (194) hide show
  1. package/node_modules/ansi-styles/index.js +72 -6
  2. package/node_modules/ansi-styles/package.json +19 -12
  3. package/node_modules/ansi-styles/readme.md +36 -8
  4. package/node_modules/are-we-there-yet/CHANGES.md +19 -0
  5. package/node_modules/are-we-there-yet/README.md +12 -2
  6. package/node_modules/are-we-there-yet/index.js +4 -132
  7. package/node_modules/are-we-there-yet/package.json +18 -13
  8. package/node_modules/are-we-there-yet/test/lib/test-event.js +29 -0
  9. package/node_modules/are-we-there-yet/test/tracker.js +44 -43
  10. package/node_modules/are-we-there-yet/test/trackergroup.js +73 -64
  11. package/node_modules/are-we-there-yet/test/trackerstream.js +26 -40
  12. package/node_modules/are-we-there-yet/tracker-base.js +11 -0
  13. package/node_modules/are-we-there-yet/tracker-group.js +107 -0
  14. package/node_modules/are-we-there-yet/tracker-stream.js +35 -0
  15. package/node_modules/are-we-there-yet/tracker.js +30 -0
  16. package/node_modules/asn1/package.json +1 -2
  17. package/node_modules/assert-plus/package.json +1 -3
  18. package/node_modules/async/package.json +1 -1
  19. package/node_modules/aws4/.npmignore +2 -1
  20. package/node_modules/aws4/README.md +4 -0
  21. package/node_modules/aws4/aws4.js +8 -3
  22. package/node_modules/aws4/node_modules/lru-cache/.npmignore +3 -0
  23. package/node_modules/aws4/node_modules/lru-cache/.travis.yml +3 -4
  24. package/node_modules/aws4/node_modules/lru-cache/README.md +29 -24
  25. package/node_modules/aws4/node_modules/lru-cache/benchmarks/insertion-time.js +32 -0
  26. package/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js +333 -199
  27. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/LICENSE +15 -0
  28. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/README.md +60 -0
  29. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/map.js +9 -0
  30. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/package.json +59 -0
  31. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/pseudomap.js +113 -0
  32. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/test/basic.js +86 -0
  33. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.npmignore +4 -0
  34. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.travis.yml +7 -0
  35. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/CONTRIBUTING.md +4 -0
  36. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/LICENSE +15 -0
  37. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/README.md +204 -0
  38. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/package.json +59 -0
  39. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/test/basic.js +188 -0
  40. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/yallist.js +360 -0
  41. package/node_modules/aws4/node_modules/lru-cache/package.json +16 -12
  42. package/node_modules/aws4/node_modules/lru-cache/test/basic.js +270 -146
  43. package/node_modules/aws4/node_modules/lru-cache/test/foreach.js +39 -25
  44. package/node_modules/aws4/node_modules/lru-cache/test/inspect.js +54 -0
  45. package/node_modules/aws4/node_modules/lru-cache/test/no-symbol.js +3 -0
  46. package/node_modules/aws4/node_modules/lru-cache/test/serialize.js +115 -104
  47. package/node_modules/aws4/package.json +17 -14
  48. package/node_modules/bl/bl.js +9 -3
  49. package/node_modules/bl/package.json +12 -12
  50. package/node_modules/bl/test/test.js +14 -0
  51. package/node_modules/color-convert/README.md +62 -0
  52. package/node_modules/color-convert/conversions.js +594 -0
  53. package/node_modules/color-convert/css-keywords.js +151 -0
  54. package/node_modules/color-convert/index.js +75 -0
  55. package/node_modules/color-convert/package.json +92 -0
  56. package/node_modules/color-convert/route.js +98 -0
  57. package/node_modules/dashdash/lib/dashdash.js +1 -1
  58. package/node_modules/dashdash/node_modules/assert-plus/AUTHORS +6 -0
  59. package/node_modules/dashdash/node_modules/assert-plus/CHANGES.md +14 -0
  60. package/node_modules/dashdash/node_modules/assert-plus/README.md +162 -0
  61. package/node_modules/dashdash/node_modules/assert-plus/assert.js +211 -0
  62. package/node_modules/dashdash/node_modules/assert-plus/package.json +89 -0
  63. package/node_modules/dashdash/package.json +19 -12
  64. package/node_modules/ecc-jsbn/package.json +1 -2
  65. package/node_modules/escape-string-regexp/package.json +15 -11
  66. package/node_modules/extsprintf/package.json +2 -3
  67. package/node_modules/form-data/.dockerignore +7 -0
  68. package/node_modules/form-data/.editorconfig +10 -0
  69. package/node_modules/form-data/.eslintignore +1 -0
  70. package/node_modules/form-data/.eslintrc +64 -0
  71. package/node_modules/form-data/{Readme.md → README.md} +9 -1
  72. package/node_modules/form-data/lib/browser.js +2 -1
  73. package/node_modules/form-data/lib/form_data.js +172 -135
  74. package/node_modules/form-data/lib/populate.js +9 -0
  75. package/node_modules/form-data/package.json +35 -16
  76. package/node_modules/form-data/wercker.yml +36 -0
  77. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/index.js +1 -1
  78. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +14 -10
  79. package/node_modules/gauge/README.md +1 -1
  80. package/node_modules/gauge/package.json +18 -14
  81. package/node_modules/gauge/progress-bar.js +2 -2
  82. package/node_modules/http-signature/package.json +1 -2
  83. package/node_modules/is-my-json-valid/README.md +2 -2
  84. package/node_modules/is-my-json-valid/index.js +15 -6
  85. package/node_modules/is-my-json-valid/package.json +11 -7
  86. package/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json +36 -0
  87. package/node_modules/is-my-json-valid/test/misc.js +18 -0
  88. package/node_modules/is-typedarray/package.json +1 -2
  89. package/node_modules/isarray/.npmignore +1 -0
  90. package/node_modules/isarray/.travis.yml +4 -0
  91. package/node_modules/isarray/Makefile +6 -0
  92. package/node_modules/isarray/README.md +6 -0
  93. package/node_modules/isarray/index.js +3 -1
  94. package/node_modules/isarray/package.json +28 -10
  95. package/node_modules/isarray/test.js +20 -0
  96. package/node_modules/jodid25519/package.json +1 -2
  97. package/node_modules/jsbn/package.json +1 -2
  98. package/node_modules/json-schema/package.json +1 -1
  99. package/node_modules/jsprim/package.json +1 -2
  100. package/node_modules/lodash.pad/LICENSE +17 -16
  101. package/node_modules/lodash.pad/README.md +2 -2
  102. package/node_modules/lodash.pad/index.js +3 -94
  103. package/node_modules/lodash.pad/package.json +12 -12
  104. package/node_modules/lodash.padend/LICENSE +23 -0
  105. package/node_modules/lodash.padend/README.md +18 -0
  106. package/node_modules/lodash.padend/index.js +285 -0
  107. package/node_modules/lodash.padend/package.json +91 -0
  108. package/node_modules/lodash.padstart/LICENSE +23 -0
  109. package/node_modules/lodash.padstart/README.md +18 -0
  110. package/node_modules/lodash.padstart/index.js +285 -0
  111. package/node_modules/lodash.padstart/package.json +91 -0
  112. package/node_modules/lodash.repeat/LICENSE +17 -16
  113. package/node_modules/lodash.repeat/README.md +2 -2
  114. package/node_modules/lodash.repeat/index.js +3 -94
  115. package/node_modules/lodash.repeat/package.json +14 -13
  116. package/node_modules/lodash.tostring/LICENSE +23 -0
  117. package/node_modules/lodash.tostring/README.md +18 -0
  118. package/node_modules/lodash.tostring/index.js +164 -0
  119. package/node_modules/lodash.tostring/package.json +91 -0
  120. package/node_modules/mime-db/HISTORY.md +14 -0
  121. package/node_modules/mime-db/db.json +26 -3
  122. package/node_modules/mime-db/package.json +23 -18
  123. package/node_modules/mime-types/HISTORY.md +8 -0
  124. package/node_modules/mime-types/README.md +1 -1
  125. package/node_modules/mime-types/package.json +21 -16
  126. package/node_modules/node-pre-gyp/CHANGELOG.md +11 -0
  127. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +44 -4
  128. package/node_modules/node-pre-gyp/package.json +16 -16
  129. package/node_modules/npmlog/.nyc_output/64996.json +1 -0
  130. package/node_modules/npmlog/.nyc_output/64998.json +1 -0
  131. package/node_modules/npmlog/.nyc_output/65000.json +1 -0
  132. package/node_modules/npmlog/log.js +3 -2
  133. package/node_modules/npmlog/package.json +15 -11
  134. package/node_modules/npmlog/test/progress.js +25 -8
  135. package/node_modules/once/package.json +1 -1
  136. package/node_modules/qs/package.json +1 -2
  137. package/node_modules/readable-stream/.travis.yml +18 -16
  138. package/node_modules/readable-stream/README.md +1 -1
  139. package/node_modules/readable-stream/doc/stream.markdown +435 -405
  140. package/node_modules/readable-stream/lib/_stream_duplex.js +13 -20
  141. package/node_modules/readable-stream/lib/_stream_passthrough.js +3 -4
  142. package/node_modules/readable-stream/lib/_stream_readable.js +110 -205
  143. package/node_modules/readable-stream/lib/_stream_transform.js +21 -38
  144. package/node_modules/readable-stream/lib/_stream_writable.js +108 -121
  145. package/node_modules/readable-stream/package.json +19 -15
  146. package/node_modules/request/package.json +1 -2
  147. package/node_modules/rimraf/node_modules/glob/README.md +6 -0
  148. package/node_modules/rimraf/node_modules/glob/common.js +12 -3
  149. package/node_modules/rimraf/node_modules/glob/glob.js +20 -3
  150. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +1 -1
  151. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +14 -10
  152. package/node_modules/rimraf/node_modules/glob/package.json +15 -11
  153. package/node_modules/rimraf/node_modules/glob/sync.js +8 -1
  154. package/node_modules/rimraf/package.json +14 -10
  155. package/node_modules/semver/package.json +1 -2
  156. package/node_modules/sshpk/lib/formats/rfc4253.js +2 -1
  157. package/node_modules/sshpk/package.json +13 -10
  158. package/node_modules/strip-ansi/package.json +21 -16
  159. package/node_modules/strip-ansi/readme.md +5 -5
  160. package/node_modules/tough-cookie/lib/cookie.js +2 -2
  161. package/node_modules/tough-cookie/package.json +13 -9
  162. package/node_modules/tweetnacl/CHANGELOG.md +53 -0
  163. package/node_modules/tweetnacl/COPYING.txt +9 -0
  164. package/node_modules/tweetnacl/README.md +14 -40
  165. package/node_modules/tweetnacl/nacl-fast.js +21 -51
  166. package/node_modules/tweetnacl/nacl-fast.min.js +2 -2
  167. package/node_modules/tweetnacl/nacl.js +21 -51
  168. package/node_modules/tweetnacl/nacl.min.js +1 -1
  169. package/node_modules/tweetnacl/package.json +28 -38
  170. package/node_modules/verror/package.json +2 -3
  171. package/package.json +2 -2
  172. package/node_modules/aws4/example.js +0 -372
  173. package/node_modules/aws4/node_modules/lru-cache/test/memory-leak.js +0 -51
  174. package/node_modules/isarray/build/build.js +0 -209
  175. package/node_modules/lodash._basetostring/LICENSE +0 -22
  176. package/node_modules/lodash._basetostring/README.md +0 -20
  177. package/node_modules/lodash._basetostring/index.js +0 -22
  178. package/node_modules/lodash._basetostring/package.json +0 -99
  179. package/node_modules/lodash._createpadding/LICENSE +0 -22
  180. package/node_modules/lodash._createpadding/README.md +0 -20
  181. package/node_modules/lodash._createpadding/index.js +0 -37
  182. package/node_modules/lodash._createpadding/package.json +0 -101
  183. package/node_modules/lodash._root/LICENSE +0 -22
  184. package/node_modules/lodash._root/README.md +0 -18
  185. package/node_modules/lodash._root/index.js +0 -53
  186. package/node_modules/lodash._root/package.json +0 -77
  187. package/node_modules/lodash.padleft/LICENSE.txt +0 -22
  188. package/node_modules/lodash.padleft/README.md +0 -20
  189. package/node_modules/lodash.padleft/index.js +0 -50
  190. package/node_modules/lodash.padleft/package.json +0 -107
  191. package/node_modules/lodash.padright/LICENSE.txt +0 -22
  192. package/node_modules/lodash.padright/README.md +0 -20
  193. package/node_modules/lodash.padright/index.js +0 -50
  194. package/node_modules/lodash.padright/package.json +0 -107
@@ -1,19 +1,23 @@
1
1
  {
2
2
  "_from": "strip-ansi@^3.0.0",
3
- "_id": "strip-ansi@3.0.0",
3
+ "_id": "strip-ansi@3.0.1",
4
4
  "_location": "/strip-ansi",
5
- "_nodeVersion": "0.12.5",
5
+ "_nodeVersion": "0.12.7",
6
+ "_npmOperationalInternal": {
7
+ "host": "packages-9-west.internal.npmjs.com",
8
+ "tmp": "tmp/strip-ansi-3.0.1.tgz_1456057278183_0.28958667791448534"
9
+ },
6
10
  "_npmUser": {
7
- "email": "sindresorhus@gmail.com",
8
- "name": "sindresorhus"
11
+ "email": "jappelman@xebia.com",
12
+ "name": "jbnicolai"
9
13
  },
10
- "_npmVersion": "2.11.2",
14
+ "_npmVersion": "2.11.3",
11
15
  "_phantomChildren": {},
12
16
  "_requiredBy": [
13
17
  "/chalk"
14
18
  ],
15
- "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz",
16
- "_shasum": "7510b665567ca914ccb5d7e072763ac968be3724",
19
+ "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
20
+ "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
17
21
  "_shrinkwrap": null,
18
22
  "author": {
19
23
  "email": "sindresorhus@gmail.com",
@@ -21,19 +25,20 @@
21
25
  "url": "sindresorhus.com"
22
26
  },
23
27
  "bugs": {
24
- "url": "https://github.com/sindresorhus/strip-ansi/issues"
28
+ "url": "https://github.com/chalk/strip-ansi/issues"
25
29
  },
26
30
  "dependencies": {
27
31
  "ansi-regex": "^2.0.0"
28
32
  },
29
33
  "description": "Strip ANSI escape codes",
30
34
  "devDependencies": {
31
- "ava": "0.0.4"
35
+ "ava": "*",
36
+ "xo": "*"
32
37
  },
33
38
  "directories": {},
34
39
  "dist": {
35
- "shasum": "7510b665567ca914ccb5d7e072763ac968be3724",
36
- "tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz"
40
+ "shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
41
+ "tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz"
37
42
  },
38
43
  "engines": {
39
44
  "node": ">=0.10.0"
@@ -41,8 +46,8 @@
41
46
  "files": [
42
47
  "index.js"
43
48
  ],
44
- "gitHead": "3f05b9810e1438f946e2eb84ee854cc00b972e9e",
45
- "homepage": "https://github.com/sindresorhus/strip-ansi",
49
+ "gitHead": "8270705c704956da865623e564eba4875c3ea17f",
50
+ "homepage": "https://github.com/chalk/strip-ansi",
46
51
  "keywords": [
47
52
  "256",
48
53
  "ansi",
@@ -83,10 +88,10 @@
83
88
  "readme": "ERROR: No README data found!",
84
89
  "repository": {
85
90
  "type": "git",
86
- "url": "git+https://github.com/sindresorhus/strip-ansi.git"
91
+ "url": "git+https://github.com/chalk/strip-ansi.git"
87
92
  },
88
93
  "scripts": {
89
- "test": "node test.js"
94
+ "test": "xo && ava"
90
95
  },
91
- "version": "3.0.0"
96
+ "version": "3.0.1"
92
97
  }
@@ -1,4 +1,4 @@
1
- # strip-ansi [![Build Status](https://travis-ci.org/sindresorhus/strip-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-ansi)
1
+ # strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
2
2
 
3
3
  > Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
4
4
 
@@ -22,10 +22,10 @@ stripAnsi('\u001b[4mcake\u001b[0m');
22
22
 
23
23
  ## Related
24
24
 
25
- - [strip-ansi-cli](https://github.com/sindresorhus/strip-ansi-cli) - CLI for this module
26
- - [has-ansi](https://github.com/sindresorhus/has-ansi) - Check if a string has ANSI escape codes
27
- - [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes
28
- - [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right
25
+ - [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
26
+ - [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
27
+ - [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
28
+ - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
29
29
 
30
30
 
31
31
  ## License
@@ -58,11 +58,11 @@ var CONTROL_CHARS = /[\x00-\x1F]/;
58
58
  // (see: https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60)
59
59
  // '=' and ';' are attribute/values separators
60
60
  // (see: https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L64)
61
- var COOKIE_PAIR = /^(([^=;]+))\s*=\s*(("?)[^\n\r\0]*\3)/
61
+ var COOKIE_PAIR = /^(([^=;]+))\s*=\s*([^\n\r\0]*)/;
62
62
 
63
63
  // Used to parse non-RFC-compliant cookies like '=abc' when given the `loose`
64
64
  // option in Cookie.parse:
65
- var LOOSE_COOKIE_PAIR = /^((?:=)?([^=;]*)\s*=\s*)?(("?)[^\n\r\0]*\3)/;
65
+ var LOOSE_COOKIE_PAIR = /^((?:=)?([^=;]*)\s*=\s*)?([^\n\r\0]*)/;
66
66
 
67
67
  // RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"'
68
68
  // Note ';' is \x3B
@@ -1,19 +1,23 @@
1
1
  {
2
2
  "_from": "tough-cookie@~2.2.0",
3
- "_id": "tough-cookie@2.2.1",
3
+ "_id": "tough-cookie@2.2.2",
4
4
  "_location": "/tough-cookie",
5
- "_nodeVersion": "0.12.5",
5
+ "_nodeVersion": "5.1.1",
6
+ "_npmOperationalInternal": {
7
+ "host": "packages-13-west.internal.npmjs.com",
8
+ "tmp": "tmp/tough-cookie-2.2.2.tgz_1457564639182_0.5129188685677946"
9
+ },
6
10
  "_npmUser": {
7
11
  "email": "jstash@gmail.com",
8
12
  "name": "jstash"
9
13
  },
10
- "_npmVersion": "2.11.2",
14
+ "_npmVersion": "3.3.12",
11
15
  "_phantomChildren": {},
12
16
  "_requiredBy": [
13
17
  "/request"
14
18
  ],
15
- "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.1.tgz",
16
- "_shasum": "3b0516b799e70e8164436a1446e7e5877fda118e",
19
+ "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz",
20
+ "_shasum": "c83a1830f4e5ef0b93ef2a3488e724f8de016ac7",
17
21
  "_shrinkwrap": null,
18
22
  "author": {
19
23
  "email": "jstashewsky@salesforce.com",
@@ -50,8 +54,8 @@
50
54
  },
51
55
  "directories": {},
52
56
  "dist": {
53
- "shasum": "3b0516b799e70e8164436a1446e7e5877fda118e",
54
- "tarball": "http://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.1.tgz"
57
+ "shasum": "c83a1830f4e5ef0b93ef2a3488e724f8de016ac7",
58
+ "tarball": "http://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz"
55
59
  },
56
60
  "engines": {
57
61
  "node": ">=0.10.0"
@@ -59,7 +63,7 @@
59
63
  "files": [
60
64
  "lib"
61
65
  ],
62
- "gitHead": "f1055655ea56c85bd384aaf7d5b740b916700b6f",
66
+ "gitHead": "cc46628c4d7d2e8c372ecba29293ca8a207ec192",
63
67
  "homepage": "https://github.com/SalesforceEng/tough-cookie",
64
68
  "keywords": [
65
69
  "HTTP",
@@ -94,5 +98,5 @@
94
98
  "suffixup": "curl -o public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat && ./generate-pubsuffix.js",
95
99
  "test": "vows test/*_test.js"
96
100
  },
97
- "version": "2.2.1"
101
+ "version": "2.2.2"
98
102
  }
@@ -2,6 +2,59 @@ TweetNaCl.js Changelog
2
2
  ======================
3
3
 
4
4
 
5
+ v0.14.1
6
+ -------
7
+
8
+ No code changes, just tweaked packaging and added COPYING.txt.
9
+
10
+
11
+ v0.14.0
12
+ -------
13
+
14
+ * **Breaking change!** All functions from `nacl.util` have been removed. These
15
+ functions are no longer available:
16
+
17
+ nacl.util.decodeUTF8
18
+ nacl.util.encodeUTF8
19
+ nacl.util.decodeBase64
20
+ nacl.util.encodeBase64
21
+
22
+ If want to continue using them, you can include
23
+ <https://github.com/dchest/tweetnacl-util-js> package:
24
+
25
+ <script src="nacl.min.js"></script>
26
+ <script src="nacl-util.min.js"></script>
27
+
28
+ or
29
+
30
+ var nacl = require('tweetnacl');
31
+ nacl.util = require('tweetnacl-util');
32
+
33
+ However it is recommended to use better packages that have wider
34
+ compatibility and better performance. Functions from `nacl.util` were never
35
+ intended to be robust solution for string conversion and were included for
36
+ convenience: cryptography library is not the right place for them.
37
+
38
+ Currently calling these functions will throw error pointing to
39
+ `tweetnacl-util-js` (in the next version this error message will be removed).
40
+
41
+ * Improved detection of available random number generators, making it possible
42
+ to use `nacl.randomBytes` and related functions in Web Workers without
43
+ changes.
44
+
45
+ * Changes to testing (see README).
46
+
47
+
48
+ v0.13.3
49
+ -------
50
+
51
+ No code changes.
52
+
53
+ * Reverted license field in package.json to "Public domain".
54
+
55
+ * Fixed typo in README.
56
+
57
+
5
58
  v0.13.2
6
59
  -------
7
60
 
@@ -0,0 +1,9 @@
1
+ Public Domain
2
+
3
+ The person who associated a work with this deed has dedicated the work to the
4
+ public domain by waiving all of his or her rights to the work worldwide under
5
+ copyright law, including all related and neighboring rights, to the extent
6
+ allowed by law.
7
+
8
+ You can copy, modify, distribute and perform the work, even for commercial
9
+ purposes, all without asking permission.
@@ -7,7 +7,7 @@ to JavaScript for modern browsers and Node.js. Public domain.
7
7
  [![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master)
8
8
  ](https://travis-ci.org/dchest/tweetnacl-js)
9
9
 
10
- [Demo](https://dchest.github.io/tweetnacl-js/)
10
+ Demo: <https://tweetnacl.js.org>
11
11
 
12
12
  **:warning: Beta version. The library is stable and API is frozen, however
13
13
  it has not been independently reviewed. If you can help reviewing it, please
@@ -26,7 +26,6 @@ Documentation
26
26
  * [Hashing](#hashing)
27
27
  * [Random bytes generation](#random-bytes-generation)
28
28
  * [Constant-time comparison](#constant-time-comparison)
29
- * [Utilities](#utilities)
30
29
  * [Examples](#examples)
31
30
  * [System requirements](#system-requirements)
32
31
  * [Development and testing](#development-and-testing)
@@ -70,7 +69,8 @@ Usage
70
69
  ------
71
70
 
72
71
  All API functions accept and return bytes as `Uint8Array`s. If you need to
73
- encode or decode strings, use functions from `nacl.util` namespace.
72
+ encode or decode strings, use functions from <https://github.com/dchest/tweetnacl-util-js>
73
+ or one of the more robust codec packages.
74
74
 
75
75
  ### Public-key authenticated encryption (box)
76
76
 
@@ -287,12 +287,6 @@ depending on the platform it runs on:
287
287
  * `window.msCrypto.getRandomValues` (Internet Explorer 11)
288
288
  * `crypto.randomBytes` (Node.js)
289
289
 
290
- Note that browsers are required to throw `QuotaExceededError` exception if
291
- requested `length` is more than 65536, so do not ask for more than 65536 bytes
292
- in *one call* (multiple calls to get as many bytes as you like are okay:
293
- browsers can generate infinite amount of random bytes without any bad
294
- consequences).
295
-
296
290
  If the platform doesn't provide a suitable PRNG, the following functions,
297
291
  which require random numbers, will throw exception:
298
292
 
@@ -326,30 +320,6 @@ Returns `false` if either of the arguments has zero length, or arguments have
326
320
  different lengths, or their contents differ.
327
321
 
328
322
 
329
- ### Utilities
330
-
331
- Encoding/decoding functions are provided for convenience. They are correct,
332
- however their performance and wide compatibility with uncommon runtimes is not
333
- something that is considered important compared to the simplicity and size of
334
- implementation. You can use third-party libraries if you need to.
335
-
336
- #### nacl.util.decodeUTF8(string)
337
-
338
- Decodes string and returns `Uint8Array` of bytes.
339
-
340
- #### nacl.util.encodeUTF8(array)
341
-
342
- Encodes `Uint8Array` or `Array` of bytes into string.
343
-
344
- #### nacl.util.decodeBase64(string)
345
-
346
- Decodes Base-64 encoded string and returns `Uint8Array` of bytes.
347
-
348
- #### nacl.util.encodeBase64(array)
349
-
350
- Encodes `Uint8Array` or `Array` of bytes into string using Base-64 encoding.
351
-
352
-
353
323
  System requirements
354
324
  -------------------
355
325
 
@@ -364,7 +334,7 @@ of:
364
334
 
365
335
  Other systems:
366
336
 
367
- * Node.js (we test on 0.10 and later)
337
+ * Node.js
368
338
 
369
339
 
370
340
  Development and testing
@@ -385,32 +355,36 @@ Tests use minified version, so make sure to rebuild it every time you change
385
355
 
386
356
  To run tests in Node.js:
387
357
 
388
- $ npm test
358
+ $ npm run test-node
389
359
 
390
360
  By default all tests described here work on `nacl.min.js`. To test other
391
361
  versions, set environment variable `NACL_SRC` to the file name you want to test.
392
362
  For example, the following command will test fast minified version:
393
363
 
394
- $ NACL_SRC=nacl-fast.min.js npm test
364
+ $ NACL_SRC=nacl-fast.min.js npm run test-node
395
365
 
396
366
  To run full suite of tests in Node.js, including comparing outputs of
397
367
  JavaScript port to outputs of the original C version:
398
368
 
399
- $ npm run testall
369
+ $ npm run test-node-all
400
370
 
401
371
  To prepare tests for browsers:
402
372
 
403
- $ npm run browser
373
+ $ npm run build-test-browser
404
374
 
405
375
  and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to
406
376
  run them.
407
377
 
408
- To run headless browser tests with `testling`:
378
+ To run headless browser tests with `tape-run` (powered by Electron):
409
379
 
410
- $ npm run testling
380
+ $ npm run test-browser
411
381
 
412
382
  (If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.)
413
383
 
384
+ To run tests in both Node and Electron:
385
+
386
+ $ npm test
387
+
414
388
  ### Benchmarking
415
389
 
416
390
  To run benchmarks in Node.js:
@@ -2157,39 +2157,13 @@ function cleanup(arr) {
2157
2157
  for (var i = 0; i < arr.length; i++) arr[i] = 0;
2158
2158
  }
2159
2159
 
2160
- nacl.util = {};
2161
-
2162
- nacl.util.decodeUTF8 = function(s) {
2163
- var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length);
2164
- for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);
2165
- return b;
2166
- };
2167
-
2168
- nacl.util.encodeUTF8 = function(arr) {
2169
- var i, s = [];
2170
- for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i]));
2171
- return decodeURIComponent(escape(s.join('')));
2172
- };
2173
-
2174
- nacl.util.encodeBase64 = function(arr) {
2175
- if (typeof btoa === 'undefined') {
2176
- return (new Buffer(arr)).toString('base64');
2177
- } else {
2178
- var i, s = [], len = arr.length;
2179
- for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i]));
2180
- return btoa(s.join(''));
2181
- }
2182
- };
2183
-
2184
- nacl.util.decodeBase64 = function(s) {
2185
- if (typeof atob === 'undefined') {
2186
- return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0));
2187
- } else {
2188
- var i, d = atob(s), b = new Uint8Array(d.length);
2189
- for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);
2190
- return b;
2191
- }
2192
- };
2160
+ // TODO: Completely remove this in v0.15.
2161
+ if (!nacl.util) {
2162
+ nacl.util = {};
2163
+ nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() {
2164
+ throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js');
2165
+ };
2166
+ }
2193
2167
 
2194
2168
  nacl.randomBytes = function(n) {
2195
2169
  var b = new Uint8Array(n);
@@ -2386,26 +2360,22 @@ nacl.setPRNG = function(fn) {
2386
2360
  (function() {
2387
2361
  // Initialize PRNG if environment provides CSPRNG.
2388
2362
  // If not, methods calling randombytes will throw.
2389
- var crypto;
2390
- if (typeof window !== 'undefined') {
2391
- // Browser.
2392
- if (window.crypto && window.crypto.getRandomValues) {
2393
- crypto = window.crypto; // Standard
2394
- } else if (window.msCrypto && window.msCrypto.getRandomValues) {
2395
- crypto = window.msCrypto; // Internet Explorer 11+
2396
- }
2397
- if (crypto) {
2398
- nacl.setPRNG(function(x, n) {
2399
- var i, v = new Uint8Array(n);
2400
- crypto.getRandomValues(v);
2401
- for (i = 0; i < n; i++) x[i] = v[i];
2402
- cleanup(v);
2403
- });
2404
- }
2363
+ var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null;
2364
+ if (crypto && crypto.getRandomValues) {
2365
+ // Browsers.
2366
+ var QUOTA = 65536;
2367
+ nacl.setPRNG(function(x, n) {
2368
+ var i, v = new Uint8Array(n);
2369
+ for (i = 0; i < n; i += QUOTA) {
2370
+ crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
2371
+ }
2372
+ for (i = 0; i < n; i++) x[i] = v[i];
2373
+ cleanup(v);
2374
+ });
2405
2375
  } else if (typeof require !== 'undefined') {
2406
2376
  // Node.js.
2407
2377
  crypto = require('crypto');
2408
- if (crypto) {
2378
+ if (crypto && crypto.randomBytes) {
2409
2379
  nacl.setPRNG(function(x, n) {
2410
2380
  var i, v = crypto.randomBytes(n);
2411
2381
  for (i = 0; i < n; i++) x[i] = v[i];
@@ -2415,4 +2385,4 @@ nacl.setPRNG = function(fn) {
2415
2385
  }
2416
2386
  })();
2417
2387
 
2418
- })(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {}));
2388
+ })(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));