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.
- package/node_modules/ansi-styles/index.js +72 -6
- package/node_modules/ansi-styles/package.json +19 -12
- package/node_modules/ansi-styles/readme.md +36 -8
- package/node_modules/are-we-there-yet/CHANGES.md +19 -0
- package/node_modules/are-we-there-yet/README.md +12 -2
- package/node_modules/are-we-there-yet/index.js +4 -132
- package/node_modules/are-we-there-yet/package.json +18 -13
- package/node_modules/are-we-there-yet/test/lib/test-event.js +29 -0
- package/node_modules/are-we-there-yet/test/tracker.js +44 -43
- package/node_modules/are-we-there-yet/test/trackergroup.js +73 -64
- package/node_modules/are-we-there-yet/test/trackerstream.js +26 -40
- package/node_modules/are-we-there-yet/tracker-base.js +11 -0
- package/node_modules/are-we-there-yet/tracker-group.js +107 -0
- package/node_modules/are-we-there-yet/tracker-stream.js +35 -0
- package/node_modules/are-we-there-yet/tracker.js +30 -0
- package/node_modules/asn1/package.json +1 -2
- package/node_modules/assert-plus/package.json +1 -3
- package/node_modules/async/package.json +1 -1
- package/node_modules/aws4/.npmignore +2 -1
- package/node_modules/aws4/README.md +4 -0
- package/node_modules/aws4/aws4.js +8 -3
- package/node_modules/aws4/node_modules/lru-cache/.npmignore +3 -0
- package/node_modules/aws4/node_modules/lru-cache/.travis.yml +3 -4
- package/node_modules/aws4/node_modules/lru-cache/README.md +29 -24
- package/node_modules/aws4/node_modules/lru-cache/benchmarks/insertion-time.js +32 -0
- package/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js +333 -199
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/LICENSE +15 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/README.md +60 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/map.js +9 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/package.json +59 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/pseudomap.js +113 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/test/basic.js +86 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.npmignore +4 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.travis.yml +7 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/CONTRIBUTING.md +4 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/LICENSE +15 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/README.md +204 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/package.json +59 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/test/basic.js +188 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/yallist.js +360 -0
- package/node_modules/aws4/node_modules/lru-cache/package.json +16 -12
- package/node_modules/aws4/node_modules/lru-cache/test/basic.js +270 -146
- package/node_modules/aws4/node_modules/lru-cache/test/foreach.js +39 -25
- package/node_modules/aws4/node_modules/lru-cache/test/inspect.js +54 -0
- package/node_modules/aws4/node_modules/lru-cache/test/no-symbol.js +3 -0
- package/node_modules/aws4/node_modules/lru-cache/test/serialize.js +115 -104
- package/node_modules/aws4/package.json +17 -14
- package/node_modules/bl/bl.js +9 -3
- package/node_modules/bl/package.json +12 -12
- package/node_modules/bl/test/test.js +14 -0
- package/node_modules/color-convert/README.md +62 -0
- package/node_modules/color-convert/conversions.js +594 -0
- package/node_modules/color-convert/css-keywords.js +151 -0
- package/node_modules/color-convert/index.js +75 -0
- package/node_modules/color-convert/package.json +92 -0
- package/node_modules/color-convert/route.js +98 -0
- package/node_modules/dashdash/lib/dashdash.js +1 -1
- package/node_modules/dashdash/node_modules/assert-plus/AUTHORS +6 -0
- package/node_modules/dashdash/node_modules/assert-plus/CHANGES.md +14 -0
- package/node_modules/dashdash/node_modules/assert-plus/README.md +162 -0
- package/node_modules/dashdash/node_modules/assert-plus/assert.js +211 -0
- package/node_modules/dashdash/node_modules/assert-plus/package.json +89 -0
- package/node_modules/dashdash/package.json +19 -12
- package/node_modules/ecc-jsbn/package.json +1 -2
- package/node_modules/escape-string-regexp/package.json +15 -11
- package/node_modules/extsprintf/package.json +2 -3
- package/node_modules/form-data/.dockerignore +7 -0
- package/node_modules/form-data/.editorconfig +10 -0
- package/node_modules/form-data/.eslintignore +1 -0
- package/node_modules/form-data/.eslintrc +64 -0
- package/node_modules/form-data/{Readme.md → README.md} +9 -1
- package/node_modules/form-data/lib/browser.js +2 -1
- package/node_modules/form-data/lib/form_data.js +172 -135
- package/node_modules/form-data/lib/populate.js +9 -0
- package/node_modules/form-data/package.json +35 -16
- package/node_modules/form-data/wercker.yml +36 -0
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/index.js +1 -1
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +14 -10
- package/node_modules/gauge/README.md +1 -1
- package/node_modules/gauge/package.json +18 -14
- package/node_modules/gauge/progress-bar.js +2 -2
- package/node_modules/http-signature/package.json +1 -2
- package/node_modules/is-my-json-valid/README.md +2 -2
- package/node_modules/is-my-json-valid/index.js +15 -6
- package/node_modules/is-my-json-valid/package.json +11 -7
- package/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json +36 -0
- package/node_modules/is-my-json-valid/test/misc.js +18 -0
- package/node_modules/is-typedarray/package.json +1 -2
- package/node_modules/isarray/.npmignore +1 -0
- package/node_modules/isarray/.travis.yml +4 -0
- package/node_modules/isarray/Makefile +6 -0
- package/node_modules/isarray/README.md +6 -0
- package/node_modules/isarray/index.js +3 -1
- package/node_modules/isarray/package.json +28 -10
- package/node_modules/isarray/test.js +20 -0
- package/node_modules/jodid25519/package.json +1 -2
- package/node_modules/jsbn/package.json +1 -2
- package/node_modules/json-schema/package.json +1 -1
- package/node_modules/jsprim/package.json +1 -2
- package/node_modules/lodash.pad/LICENSE +17 -16
- package/node_modules/lodash.pad/README.md +2 -2
- package/node_modules/lodash.pad/index.js +3 -94
- package/node_modules/lodash.pad/package.json +12 -12
- package/node_modules/lodash.padend/LICENSE +23 -0
- package/node_modules/lodash.padend/README.md +18 -0
- package/node_modules/lodash.padend/index.js +285 -0
- package/node_modules/lodash.padend/package.json +91 -0
- package/node_modules/lodash.padstart/LICENSE +23 -0
- package/node_modules/lodash.padstart/README.md +18 -0
- package/node_modules/lodash.padstart/index.js +285 -0
- package/node_modules/lodash.padstart/package.json +91 -0
- package/node_modules/lodash.repeat/LICENSE +17 -16
- package/node_modules/lodash.repeat/README.md +2 -2
- package/node_modules/lodash.repeat/index.js +3 -94
- package/node_modules/lodash.repeat/package.json +14 -13
- package/node_modules/lodash.tostring/LICENSE +23 -0
- package/node_modules/lodash.tostring/README.md +18 -0
- package/node_modules/lodash.tostring/index.js +164 -0
- package/node_modules/lodash.tostring/package.json +91 -0
- package/node_modules/mime-db/HISTORY.md +14 -0
- package/node_modules/mime-db/db.json +26 -3
- package/node_modules/mime-db/package.json +23 -18
- package/node_modules/mime-types/HISTORY.md +8 -0
- package/node_modules/mime-types/README.md +1 -1
- package/node_modules/mime-types/package.json +21 -16
- package/node_modules/node-pre-gyp/CHANGELOG.md +11 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +44 -4
- package/node_modules/node-pre-gyp/package.json +16 -16
- package/node_modules/npmlog/.nyc_output/64996.json +1 -0
- package/node_modules/npmlog/.nyc_output/64998.json +1 -0
- package/node_modules/npmlog/.nyc_output/65000.json +1 -0
- package/node_modules/npmlog/log.js +3 -2
- package/node_modules/npmlog/package.json +15 -11
- package/node_modules/npmlog/test/progress.js +25 -8
- package/node_modules/once/package.json +1 -1
- package/node_modules/qs/package.json +1 -2
- package/node_modules/readable-stream/.travis.yml +18 -16
- package/node_modules/readable-stream/README.md +1 -1
- package/node_modules/readable-stream/doc/stream.markdown +435 -405
- package/node_modules/readable-stream/lib/_stream_duplex.js +13 -20
- package/node_modules/readable-stream/lib/_stream_passthrough.js +3 -4
- package/node_modules/readable-stream/lib/_stream_readable.js +110 -205
- package/node_modules/readable-stream/lib/_stream_transform.js +21 -38
- package/node_modules/readable-stream/lib/_stream_writable.js +108 -121
- package/node_modules/readable-stream/package.json +19 -15
- package/node_modules/request/package.json +1 -2
- package/node_modules/rimraf/node_modules/glob/README.md +6 -0
- package/node_modules/rimraf/node_modules/glob/common.js +12 -3
- package/node_modules/rimraf/node_modules/glob/glob.js +20 -3
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +1 -1
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +14 -10
- package/node_modules/rimraf/node_modules/glob/package.json +15 -11
- package/node_modules/rimraf/node_modules/glob/sync.js +8 -1
- package/node_modules/rimraf/package.json +14 -10
- package/node_modules/semver/package.json +1 -2
- package/node_modules/sshpk/lib/formats/rfc4253.js +2 -1
- package/node_modules/sshpk/package.json +13 -10
- package/node_modules/strip-ansi/package.json +21 -16
- package/node_modules/strip-ansi/readme.md +5 -5
- package/node_modules/tough-cookie/lib/cookie.js +2 -2
- package/node_modules/tough-cookie/package.json +13 -9
- package/node_modules/tweetnacl/CHANGELOG.md +53 -0
- package/node_modules/tweetnacl/COPYING.txt +9 -0
- package/node_modules/tweetnacl/README.md +14 -40
- package/node_modules/tweetnacl/nacl-fast.js +21 -51
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -2
- package/node_modules/tweetnacl/nacl.js +21 -51
- package/node_modules/tweetnacl/nacl.min.js +1 -1
- package/node_modules/tweetnacl/package.json +28 -38
- package/node_modules/verror/package.json +2 -3
- package/package.json +2 -2
- package/node_modules/aws4/example.js +0 -372
- package/node_modules/aws4/node_modules/lru-cache/test/memory-leak.js +0 -51
- package/node_modules/isarray/build/build.js +0 -209
- package/node_modules/lodash._basetostring/LICENSE +0 -22
- package/node_modules/lodash._basetostring/README.md +0 -20
- package/node_modules/lodash._basetostring/index.js +0 -22
- package/node_modules/lodash._basetostring/package.json +0 -99
- package/node_modules/lodash._createpadding/LICENSE +0 -22
- package/node_modules/lodash._createpadding/README.md +0 -20
- package/node_modules/lodash._createpadding/index.js +0 -37
- package/node_modules/lodash._createpadding/package.json +0 -101
- package/node_modules/lodash._root/LICENSE +0 -22
- package/node_modules/lodash._root/README.md +0 -18
- package/node_modules/lodash._root/index.js +0 -53
- package/node_modules/lodash._root/package.json +0 -77
- package/node_modules/lodash.padleft/LICENSE.txt +0 -22
- package/node_modules/lodash.padleft/README.md +0 -20
- package/node_modules/lodash.padleft/index.js +0 -50
- package/node_modules/lodash.padleft/package.json +0 -107
- package/node_modules/lodash.padright/LICENSE.txt +0 -22
- package/node_modules/lodash.padright/README.md +0 -20
- package/node_modules/lodash.padright/index.js +0 -50
- 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.
|
3
|
+
"_id": "strip-ansi@3.0.1",
|
4
4
|
"_location": "/strip-ansi",
|
5
|
-
"_nodeVersion": "0.12.
|
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": "
|
8
|
-
"name": "
|
11
|
+
"email": "jappelman@xebia.com",
|
12
|
+
"name": "jbnicolai"
|
9
13
|
},
|
10
|
-
"_npmVersion": "2.11.
|
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.
|
16
|
-
"_shasum": "
|
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/
|
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": "
|
35
|
+
"ava": "*",
|
36
|
+
"xo": "*"
|
32
37
|
},
|
33
38
|
"directories": {},
|
34
39
|
"dist": {
|
35
|
-
"shasum": "
|
36
|
-
"tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.
|
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": "
|
45
|
-
"homepage": "https://github.com/
|
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/
|
91
|
+
"url": "git+https://github.com/chalk/strip-ansi.git"
|
87
92
|
},
|
88
93
|
"scripts": {
|
89
|
-
"test": "
|
94
|
+
"test": "xo && ava"
|
90
95
|
},
|
91
|
-
"version": "3.0.
|
96
|
+
"version": "3.0.1"
|
92
97
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# strip-ansi [](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/
|
26
|
-
- [has-ansi](https://github.com/
|
27
|
-
- [ansi-regex](https://github.com/
|
28
|
-
- [chalk](https://github.com/
|
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*(
|
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*)?(
|
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.
|
3
|
+
"_id": "tough-cookie@2.2.2",
|
4
4
|
"_location": "/tough-cookie",
|
5
|
-
"_nodeVersion": "
|
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": "
|
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.
|
16
|
-
"_shasum": "
|
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": "
|
54
|
-
"tarball": "http://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.
|
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": "
|
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.
|
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
|
[
|
8
8
|
](https://travis-ci.org/dchest/tweetnacl-js)
|
9
9
|
|
10
|
-
|
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
|
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
|
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
|
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 `
|
378
|
+
To run headless browser tests with `tape-run` (powered by Electron):
|
409
379
|
|
410
|
-
$ npm run
|
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
|
-
|
2161
|
-
|
2162
|
-
nacl.util
|
2163
|
-
|
2164
|
-
|
2165
|
-
|
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 (
|
2391
|
-
//
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2397
|
-
|
2398
|
-
|
2399
|
-
|
2400
|
-
|
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 : (
|
2388
|
+
})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));
|