fsevents 1.0.1 → 1.0.2

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 (87) hide show
  1. package/node_modules/node-pre-gyp/CHANGELOG.md +4 -0
  2. package/node_modules/node-pre-gyp/README.md +1 -1
  3. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +4 -0
  4. package/node_modules/node-pre-gyp/lib/util/versioning.js +16 -0
  5. package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
  6. package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
  7. package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/package.json +1 -1
  8. package/node_modules/node-pre-gyp/node_modules/rc/lib/utils.js +5 -3
  9. package/node_modules/node-pre-gyp/node_modules/rc/package.json +7 -8
  10. package/node_modules/node-pre-gyp/node_modules/rc/test/nested-env-vars.js +1 -0
  11. package/node_modules/node-pre-gyp/node_modules/request/.npmignore +3 -0
  12. package/node_modules/node-pre-gyp/node_modules/request/CHANGELOG.md +6 -0
  13. package/node_modules/node-pre-gyp/node_modules/request/README.md +2 -2
  14. package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
  15. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/README.md +1 -1
  16. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.js +10 -4
  17. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.min.js +3 -3
  18. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/timers.js +9 -3
  19. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/package.json +7 -7
  20. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json +1 -1
  21. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json +1 -2
  22. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/package.json +2 -1
  23. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +2 -1
  24. package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +2 -7
  25. package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +1 -6
  26. package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json +2 -1
  27. package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/package.json +2 -1
  28. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/package.json +2 -1
  29. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/README.md +12 -6
  30. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/lib/cookie.js +32 -12
  31. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +2 -2
  32. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/package.json +35 -12
  33. package/node_modules/node-pre-gyp/node_modules/request/package.json +7 -7
  34. package/node_modules/node-pre-gyp/node_modules/request/request.js +6 -3
  35. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +1 -1
  36. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +3 -2
  37. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +1 -0
  38. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +9 -9
  39. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +12 -16
  40. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/package.json +10 -11
  41. package/node_modules/node-pre-gyp/node_modules/semver/package.json +2 -1
  42. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/inherits/package.json +1 -1
  43. package/node_modules/node-pre-gyp/node_modules/tar/package.json +2 -1
  44. package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/inherits/package.json +1 -1
  45. package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
  46. package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/package.json +1 -1
  47. package/node_modules/node-pre-gyp/package.json +8 -9
  48. package/package.json +2 -2
  49. package/node_modules/node-pre-gyp/node_modules/request/disabled.appveyor.yml +0 -36
  50. package/node_modules/node-pre-gyp/node_modules/request/examples/README.md +0 -115
  51. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/.editorconfig +0 -12
  52. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/.jshintrc +0 -70
  53. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/.npmignore +0 -4
  54. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/.travis.yml +0 -9
  55. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/LICENSE +0 -74
  56. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +0 -293
  57. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/public-suffix.txt +0 -10309
  58. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/api_test.js +0 -372
  59. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/cookie_jar_test.js +0 -468
  60. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/cookie_sorting_test.js +0 -156
  61. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/cookie_to_json_test.js +0 -164
  62. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/cookie_to_string_test.js +0 -162
  63. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/date_test.js +0 -79
  64. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/domain_and_path_test.js +0 -201
  65. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/ietf_data/dates/bsd-examples.json +0 -168
  66. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/ietf_data/dates/examples.json +0 -48
  67. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/ietf_data/parser.json +0 -1959
  68. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/ietf_test.js +0 -105
  69. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/jar_serialization_test.js +0 -348
  70. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/lifetime_test.js +0 -97
  71. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/parsing_test.js +0 -294
  72. package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/regression_test.js +0 -143
  73. package/node_modules/node-pre-gyp/node_modules/request/release.sh +0 -45
  74. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js +0 -1159
  75. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml +0 -3
  76. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +0 -32
  77. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +0 -1075
  78. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +0 -182
  79. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +0 -9
  80. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +0 -10
  81. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +0 -24
  82. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +0 -15
  83. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +0 -16
  84. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +0 -10
  85. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +0 -13
  86. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +0 -7
  87. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +0 -50
@@ -1,294 +0,0 @@
1
- /*!
2
- * Copyright (c) 2015, Salesforce.com, Inc.
3
- * All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions are met:
7
- *
8
- * 1. Redistributions of source code must retain the above copyright notice,
9
- * this list of conditions and the following disclaimer.
10
- *
11
- * 2. Redistributions in binary form must reproduce the above copyright notice,
12
- * this list of conditions and the following disclaimer in the documentation
13
- * and/or other materials provided with the distribution.
14
- *
15
- * 3. Neither the name of Salesforce.com nor the names of its contributors may
16
- * be used to endorse or promote products derived from this software without
17
- * specific prior written permission.
18
- *
19
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
- * POSSIBILITY OF SUCH DAMAGE.
30
- */
31
-
32
- 'use strict';
33
- var vows = require('vows');
34
- var assert = require('assert');
35
- var tough = require('../lib/cookie');
36
- var Cookie = tough.Cookie;
37
-
38
- vows
39
- .describe('Parsing')
40
- .addBatch({
41
- "simple": {
42
- topic: function() {
43
- return Cookie.parse('a=bcd') || null;
44
- },
45
- "parsed": function(c) { assert.ok(c) },
46
- "key": function(c) { assert.equal(c.key, 'a') },
47
- "value": function(c) { assert.equal(c.value, 'bcd') },
48
- "no path": function(c) { assert.equal(c.path, null) },
49
- "no domain": function(c) { assert.equal(c.domain, null) },
50
- "no extensions": function(c) { assert.ok(!c.extensions) }
51
- },
52
- "with expiry": {
53
- topic: function() {
54
- return Cookie.parse('a=bcd; Expires=Tue, 18 Oct 2011 07:05:03 GMT') || null;
55
- },
56
- "parsed": function(c) { assert.ok(c) },
57
- "key": function(c) { assert.equal(c.key, 'a') },
58
- "value": function(c) { assert.equal(c.value, 'bcd') },
59
- "has expires": function(c) {
60
- assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be');
61
- assert.equal(c.expires.getTime(), 1318921503000);
62
- }
63
- },
64
- "with expiry and path": {
65
- topic: function() {
66
- return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc') || null;
67
- },
68
- "parsed": function(c) { assert.ok(c) },
69
- "key": function(c) { assert.equal(c.key, 'abc') },
70
- "value": function(c) { assert.equal(c.value, '"xyzzy!"') },
71
- "has expires": function(c) {
72
- assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be');
73
- assert.equal(c.expires.getTime(), 1318921503000);
74
- },
75
- "has path": function(c) { assert.equal(c.path, '/aBc'); },
76
- "no httponly or secure": function(c) {
77
- assert.ok(!c.httpOnly);
78
- assert.ok(!c.secure);
79
- }
80
- },
81
- "with everything": {
82
- topic: function() {
83
- return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc; Domain=example.com; Secure; HTTPOnly; Max-Age=1234; Foo=Bar; Baz') || null;
84
- },
85
- "parsed": function(c) { assert.ok(c) },
86
- "key": function(c) { assert.equal(c.key, 'abc') },
87
- "value": function(c) { assert.equal(c.value, '"xyzzy!"') },
88
- "has expires": function(c) {
89
- assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be');
90
- assert.equal(c.expires.getTime(), 1318921503000);
91
- },
92
- "has path": function(c) { assert.equal(c.path, '/aBc'); },
93
- "has domain": function(c) { assert.equal(c.domain, 'example.com'); },
94
- "has httponly": function(c) { assert.equal(c.httpOnly, true); },
95
- "has secure": function(c) { assert.equal(c.secure, true); },
96
- "has max-age": function(c) { assert.equal(c.maxAge, 1234); },
97
- "has extensions": function(c) {
98
- assert.ok(c.extensions);
99
- assert.equal(c.extensions[0], 'Foo=Bar');
100
- assert.equal(c.extensions[1], 'Baz');
101
- }
102
- },
103
- "invalid expires": function() {
104
- var c = Cookie.parse("a=b; Expires=xyzzy");
105
- assert.ok(c);
106
- assert.equal(c.expires, Infinity);
107
- },
108
- "zero max-age": function() {
109
- var c = Cookie.parse("a=b; Max-Age=0");
110
- assert.ok(c);
111
- assert.equal(c.maxAge, 0);
112
- },
113
- "negative max-age": function() {
114
- var c = Cookie.parse("a=b; Max-Age=-1");
115
- assert.ok(c);
116
- assert.equal(c.maxAge, -1);
117
- },
118
- "empty domain": function() {
119
- var c = Cookie.parse("a=b; domain=");
120
- assert.ok(c);
121
- assert.equal(c.domain, null);
122
- },
123
- "dot domain": function() {
124
- var c = Cookie.parse("a=b; domain=.");
125
- assert.ok(c);
126
- assert.equal(c.domain, null);
127
- },
128
- "uppercase domain": function() {
129
- var c = Cookie.parse("a=b; domain=EXAMPLE.COM");
130
- assert.ok(c);
131
- assert.equal(c.domain, 'example.com');
132
- },
133
- "trailing dot in domain": {
134
- topic: function() {
135
- return Cookie.parse("a=b; Domain=example.com.", true) || null;
136
- },
137
- "has the domain": function(c) { assert.equal(c.domain,"example.com.") },
138
- "but doesn't validate": function(c) { assert.equal(c.validate(),false) }
139
- },
140
- "empty path": function() {
141
- var c = Cookie.parse("a=b; path=");
142
- assert.ok(c);
143
- assert.equal(c.path, null);
144
- },
145
- "no-slash path": function() {
146
- var c = Cookie.parse("a=b; path=xyzzy");
147
- assert.ok(c);
148
- assert.equal(c.path, null);
149
- },
150
- "trailing semi-colons after path": {
151
- topic: function () {
152
- return [
153
- "a=b; path=/;",
154
- "c=d;;;;"
155
- ];
156
- },
157
- "strips semi-colons": function (t) {
158
- var c1 = Cookie.parse(t[0]);
159
- var c2 = Cookie.parse(t[1]);
160
- assert.ok(c1);
161
- assert.ok(c2);
162
- assert.equal(c1.path, '/');
163
- }
164
- },
165
- "secure-with-value": function() {
166
- var c = Cookie.parse("a=b; Secure=xyzzy");
167
- assert.ok(c);
168
- assert.equal(c.secure, true);
169
- },
170
- "httponly-with-value": function() {
171
- var c = Cookie.parse("a=b; HttpOnly=xyzzy");
172
- assert.ok(c);
173
- assert.equal(c.httpOnly, true);
174
- },
175
- "garbage": {
176
- topic: function() {
177
- return Cookie.parse("\x08", true) || null;
178
- },
179
- "doesn't parse": function(c) { assert.equal(c,null) }
180
- },
181
- "public suffix domain": {
182
- topic: function() {
183
- return Cookie.parse("a=b; domain=kyoto.jp", true) || null;
184
- },
185
- "parses fine": function(c) {
186
- assert.ok(c);
187
- assert.equal(c.domain, 'kyoto.jp');
188
- },
189
- "but fails validation": function(c) {
190
- assert.ok(c);
191
- assert.ok(!c.validate());
192
- }
193
- },
194
- "public suffix foonet.net": {
195
- "top level": {
196
- topic: function() {
197
- return Cookie.parse("a=b; domain=foonet.net") || null;
198
- },
199
- "parses and is valid": function(c) {
200
- assert.ok(c);
201
- assert.equal(c.domain, 'foonet.net');
202
- assert.ok(c.validate());
203
- }
204
- },
205
- "www": {
206
- topic: function() {
207
- return Cookie.parse("a=b; domain=www.foonet.net") || null;
208
- },
209
- "parses and is valid": function(c) {
210
- assert.ok(c);
211
- assert.equal(c.domain, 'www.foonet.net');
212
- assert.ok(c.validate());
213
- }
214
- },
215
- "with a dot": {
216
- topic: function() {
217
- return Cookie.parse("a=b; domain=.foonet.net") || null;
218
- },
219
- "parses and is valid": function(c) {
220
- assert.ok(c);
221
- assert.equal(c.domain, 'foonet.net');
222
- assert.ok(c.validate());
223
- }
224
- }
225
- },
226
- "Ironically, Google 'GAPS' cookie has very little whitespace": {
227
- topic: function() {
228
- return Cookie.parse("GAPS=1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-;Path=/;Expires=Thu, 17-Apr-2014 02:12:29 GMT;Secure;HttpOnly");
229
- },
230
- "parsed": function(c) { assert.ok(c) },
231
- "key": function(c) { assert.equal(c.key, 'GAPS') },
232
- "value": function(c) { assert.equal(c.value, '1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-') },
233
- "path": function(c) {
234
- assert.notEqual(c.path, '/;Expires'); // BUG
235
- assert.equal(c.path, '/');
236
- },
237
- "expires": function(c) {
238
- assert.notEqual(c.expires, Infinity);
239
- assert.equal(c.expires.getTime(), 1397700749000);
240
- },
241
- "secure": function(c) { assert.ok(c.secure) },
242
- "httponly": function(c) { assert.ok(c.httpOnly) }
243
- },
244
- "lots of equal signs": {
245
- topic: function() {
246
- return Cookie.parse("queryPref=b=c&d=e; Path=/f=g; Expires=Thu, 17 Apr 2014 02:12:29 GMT; HttpOnly");
247
- },
248
- "parsed": function(c) { assert.ok(c) },
249
- "key": function(c) { assert.equal(c.key, 'queryPref') },
250
- "value": function(c) { assert.equal(c.value, 'b=c&d=e') },
251
- "path": function(c) {
252
- assert.equal(c.path, '/f=g');
253
- },
254
- "expires": function(c) {
255
- assert.notEqual(c.expires, Infinity);
256
- assert.equal(c.expires.getTime(), 1397700749000);
257
- },
258
- "httponly": function(c) { assert.ok(c.httpOnly) }
259
- },
260
- "spaces in value": {
261
- topic: function() {
262
- return Cookie.parse('a=one two three',false) || null;
263
- },
264
- "parsed": function(c) { assert.ok(c) },
265
- "key": function(c) { assert.equal(c.key, 'a') },
266
- "value": function(c) { assert.equal(c.value, 'one two three') },
267
- "no path": function(c) { assert.equal(c.path, null) },
268
- "no domain": function(c) { assert.equal(c.domain, null) },
269
- "no extensions": function(c) { assert.ok(!c.extensions) }
270
- },
271
- "quoted spaces in value": {
272
- topic: function() {
273
- return Cookie.parse('a="one two three"',false) || null;
274
- },
275
- "parsed": function(c) { assert.ok(c) },
276
- "key": function(c) { assert.equal(c.key, 'a') },
277
- "value": function(c) { assert.equal(c.value, '"one two three"') },
278
- "no path": function(c) { assert.equal(c.path, null) },
279
- "no domain": function(c) { assert.equal(c.domain, null) },
280
- "no extensions": function(c) { assert.ok(!c.extensions) }
281
- },
282
- "non-ASCII in value": {
283
- topic: function() {
284
- return Cookie.parse('farbe=weiß',false) || null;
285
- },
286
- "parsed": function(c) { assert.ok(c) },
287
- "key": function(c) { assert.equal(c.key, 'farbe') },
288
- "value": function(c) { assert.equal(c.value, 'weiß') },
289
- "no path": function(c) { assert.equal(c.path, null) },
290
- "no domain": function(c) { assert.equal(c.domain, null) },
291
- "no extensions": function(c) { assert.ok(!c.extensions) }
292
- }
293
- })
294
- .export(module);
@@ -1,143 +0,0 @@
1
- /*!
2
- * Copyright (c) 2015, Salesforce.com, Inc.
3
- * All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions are met:
7
- *
8
- * 1. Redistributions of source code must retain the above copyright notice,
9
- * this list of conditions and the following disclaimer.
10
- *
11
- * 2. Redistributions in binary form must reproduce the above copyright notice,
12
- * this list of conditions and the following disclaimer in the documentation
13
- * and/or other materials provided with the distribution.
14
- *
15
- * 3. Neither the name of Salesforce.com nor the names of its contributors may
16
- * be used to endorse or promote products derived from this software without
17
- * specific prior written permission.
18
- *
19
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
- * POSSIBILITY OF SUCH DAMAGE.
30
- */
31
-
32
- 'use strict';
33
- var vows = require('vows');
34
- var assert = require('assert');
35
- var async = require('async');
36
- var tough = require('../lib/cookie');
37
- var Cookie = tough.Cookie;
38
- var CookieJar = tough.CookieJar;
39
-
40
- var atNow = Date.now();
41
-
42
- function at(offset) {
43
- return {now: new Date(atNow + offset)};
44
- }
45
-
46
- vows
47
- .describe('Regression tests')
48
- .addBatch({
49
- "Issue 1": {
50
- topic: function () {
51
- var cj = new CookieJar();
52
- cj.setCookie('hello=world; path=/some/path/', 'http://domain/some/path/file', function (err, cookie) {
53
- this.callback(err, {cj: cj, cookie: cookie});
54
- }.bind(this));
55
- },
56
- "stored a cookie": function (t) {
57
- assert.ok(t.cookie);
58
- },
59
- "getting it back": {
60
- topic: function (t) {
61
- t.cj.getCookies('http://domain/some/path/file', function (err, cookies) {
62
- this.callback(err, {cj: t.cj, cookies: cookies || []});
63
- }.bind(this));
64
- },
65
- "got one cookie": function (t) {
66
- assert.lengthOf(t.cookies, 1);
67
- },
68
- "it's the right one": function (t) {
69
- var c = t.cookies[0];
70
- assert.equal(c.key, 'hello');
71
- assert.equal(c.value, 'world');
72
- }
73
- }
74
- }
75
- })
76
- .addBatch({
77
- "trailing semi-colon set into cj": {
78
- topic: function () {
79
- var cb = this.callback;
80
- var cj = new CookieJar();
81
- var ex = 'http://www.example.com';
82
- var tasks = [];
83
- tasks.push(function (next) {
84
- cj.setCookie('broken_path=testme; path=/;', ex, at(-1), next);
85
- });
86
- tasks.push(function (next) {
87
- cj.setCookie('b=2; Path=/;;;;', ex, at(-1), next);
88
- });
89
- async.parallel(tasks, function (err, cookies) {
90
- cb(null, {
91
- cj: cj,
92
- cookies: cookies
93
- });
94
- });
95
- },
96
- "check number of cookies": function (t) {
97
- assert.lengthOf(t.cookies, 2, "didn't set");
98
- },
99
- "check *broken_path* was set properly": function (t) {
100
- assert.equal(t.cookies[0].key, "broken_path");
101
- assert.equal(t.cookies[0].value, "testme");
102
- assert.equal(t.cookies[0].path, "/");
103
- },
104
- "check *b* was set properly": function (t) {
105
- assert.equal(t.cookies[1].key, "b");
106
- assert.equal(t.cookies[1].value, "2");
107
- assert.equal(t.cookies[1].path, "/");
108
- },
109
- "retrieve the cookie": {
110
- topic: function (t) {
111
- var cb = this.callback;
112
- t.cj.getCookies('http://www.example.com', {}, function (err, cookies) {
113
- t.cookies = cookies;
114
- cb(err, t);
115
- });
116
- },
117
- "get the cookie": function (t) {
118
- assert.lengthOf(t.cookies, 2);
119
- assert.equal(t.cookies[0].key, 'broken_path');
120
- assert.equal(t.cookies[0].value, 'testme');
121
- assert.equal(t.cookies[1].key, "b");
122
- assert.equal(t.cookies[1].value, "2");
123
- assert.equal(t.cookies[1].path, "/");
124
- }
125
- }
126
- }
127
- })
128
- .addBatch({
129
- "tough-cookie throws exception on malformed URI (GH-32)": {
130
- topic: function () {
131
- var url = "http://www.example.com/?test=100%";
132
- var cj = new CookieJar();
133
-
134
- cj.setCookieSync("Test=Test", url);
135
-
136
- return cj.getCookieStringSync(url);
137
- },
138
- "cookies are set": function (cookieStr) {
139
- assert.strictEqual(cookieStr, "Test=Test");
140
- }
141
- }
142
- })
143
- .export(module);
@@ -1,45 +0,0 @@
1
- #!/bin/sh
2
-
3
- if [ -z "`which github-changes`" ]; then
4
- # specify version because github-changes "is under heavy development. Things
5
- # may break between releases" until 0.1.0
6
- echo "First, do: [sudo] npm install -g github-changes@0.0.14"
7
- exit 1
8
- fi
9
-
10
- if [ -d .git/refs/remotes/upstream ]; then
11
- remote=upstream
12
- else
13
- remote=origin
14
- fi
15
-
16
- # Increment v2.x.y -> v2.x+1.0
17
- npm version minor || exit 1
18
-
19
- # Generate changelog from pull requests
20
- github-changes -o request -r request \
21
- --auth --verbose \
22
- --file CHANGELOG.md \
23
- --only-pulls --use-commit-body \
24
- --date-format '(YYYY/MM/DD)' \
25
- || exit 1
26
-
27
- # Since the tag for the new version hasn't been pushed yet, any changes in it
28
- # will be marked as "upcoming"
29
- version="$(grep '"version"' package.json | cut -d'"' -f4)"
30
- sed -i -e "s/^### upcoming/### v$version/" CHANGELOG.md
31
-
32
- # This may fail if no changelog updates
33
- # TODO: would this ever actually happen? handle it better?
34
- git add CHANGELOG.md; git commit -m 'Update changelog'
35
-
36
- # Publish the new version to npm
37
- npm publish || exit 1
38
-
39
- # Increment v2.x.0 -> v2.x.1
40
- # For rationale, see:
41
- # https://github.com/request/oauth-sign/issues/10#issuecomment-58917018
42
- npm version patch || exit 1
43
-
44
- # Push back to the main repo
45
- git push $remote master --tags || exit 1