nock 9.0.27 → 9.0.28

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.
package/README.md CHANGED
@@ -1086,6 +1086,8 @@ nock.recorder.rec();
1086
1086
 
1087
1087
  Recording relies on intercepting real requests and answers and then persisting them for later use.
1088
1088
 
1089
+ In order to stop recording you should call `nock.restore()` and recording will stop.
1090
+
1089
1091
  **ATTENTION!:** when recording is enabled, nock does no validation.
1090
1092
 
1091
1093
  ## `dont_print` option
@@ -159,6 +159,16 @@ function RequestOverrider(req, options, interceptors, remove, cb) {
159
159
  }
160
160
  };
161
161
 
162
+ req.flushHeaders = function() {
163
+ debug('req.flushHeaders');
164
+ if (!aborted && !ended) {
165
+ end(cb);
166
+ }
167
+ if (aborted) {
168
+ emitError(new Error('Request aborted'));
169
+ }
170
+ };
171
+
162
172
  req.abort = function() {
163
173
  if (aborted) {
164
174
  return;
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"nock","description":"HTTP Server mocking for Node.js","tags":["Mock","HTTP","testing","isolation"],"version":"9.0.27","author":"Pedro Teixeira <pedro.teixeira@gmail.com>","contributors":[{"name":"Bin Chang","url":"https://github.com/BinChang"},{"name":"Roman Hotsiy","url":"https://github.com/RomanGotsiy"},{"name":"Jeffrey Jagoda","url":"https://github.com/jagoda"},{"name":"Hidenari Nozaki","url":"https://github.com/ghiden"},{"name":"Ken Sheedlo","url":"https://github.com/ksheedlo"},{"name":"Douglas Eggleton","url":"https://github.com/douglaseggleton"},{"name":"José F. Romaniello","url":"https://github.com/jfromaniello"},{"name":"Benjamin Urban","url":"https://github.com/benurb"},{"name":"Justin","url":"https://github.com/justincy"},{"name":"Brett Porter"},{"name":"Matt Olson"},{"name":"Rémy HUBSCHER"},{"name":"Roly Fentanes"},{"name":"Alexander Simmerl"},{"name":"Pedro Teixeira"},{"name":"Nuno Job"},{"name":"Ian Young"},{"name":"nilsbunger"},{"name":"bacchusrx","email":"bacchusrx@eightstar.ca"},{"name":"Fabiano França"},{"name":"Sascha Drews"},{"name":"Mike Swift"},{"name":"James Herdman"},{"name":"David Björklund"},{"name":"Andrew Kramolisch"},{"name":"Balazs Nagy"},{"name":"Brian J Brennan"},{"name":"Attila Incze"},{"name":"Mac Angell"},{"name":"Tom Hosford"},{"name":"Aurélien Thieriot"},{"name":"Alex Zylman"},{"name":"Celestino Gomes","email":"contact@tinogomes.com"},{"name":"David Rousselie"},{"name":"spenceralger"},{"name":"Ivan Erceg","url":"https://github.com/ierceg","email":"ivan@softwaremarbles.com"},{"name":"Keith Laban","url":"https://github.com/kelaban","email":"kelaban17@gmail.com"},{"name":"Rui Marinho","url":"https://github.com/ruimarinho","email":"ruipmarinho@gmail.com"},{"name":"David Pate","url":"https://github.com/DavidTPate","email":"davidtpate@gmail.com"},{"name":"Matt Oakes","url":"https://github.com/matto1990"},{"name":"Ian Walker-Sperber","url":"https://github.com/ianwsperber"}],"repository":{"type":"git","url":"https://github.com/node-nock/nock.git"},"bugs":{"url":"http://github.com/node-nock/nock/issues"},"engines":["node >= 4.0"],"main":"./index","dependencies":{"chai":">=1.9.2 <4.0.0","debug":"^2.2.0","deep-equal":"^1.0.0","json-stringify-safe":"^5.0.1","lodash":"~4.17.2","mkdirp":"^0.5.0","propagate":"0.4.0","qs":"^6.0.2","semver":"^5.3.0"},"devDependencies":{"async":"^2.1.1","aws-sdk":"^2.0.15","browserify":"^13.0.0","coveralls":"^2.11.2","eslint":"^3.19.0","glob":"^7.1.1","hyperquest":"^1.3.0","isomorphic-fetch":"^2.2.0","istanbul":"^0.4.2","markdown-toc":"^0.13.0","needle":"^1.0.0","node-static":"^0.7.7","nyc":"^10.0.0","request":"2.71.0","request-promise":"^2.0.1","restify":"^4.0.4","restler":"3.4.0","rimraf":"^2.3.2","semver":"^5.3.0","superagent":"^3.5.0","tap":"^10.0.0","zombie":"^5.0.1","semantic-release":"^8.2.0"},"scripts":{"unit":"tap --harmony ./tests/test_*.js","preintegration":"./tests/bin/install_sub_deps versioned","integration":"tap --harmony ./tests/versioned/*/*.tap.js","test":"npm run lint && npm run unit && npm run integration","coverage":"nyc tap --harmony ./tests/test_*.js","coveralls":"cat ./coverage/lcov.info | coveralls","lint":"eslint '**/*.js'","toc":"markdown-toc -i README.md","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"nyc":{"reporter":["lcov","text-summary"],"exclude":["tests/test_*.js"]},"license":"MIT"}
1
+ {"name":"nock","description":"HTTP Server mocking for Node.js","tags":["Mock","HTTP","testing","isolation"],"version":"9.0.28","author":"Pedro Teixeira <pedro.teixeira@gmail.com>","contributors":[{"name":"Bin Chang","url":"https://github.com/BinChang"},{"name":"Roman Hotsiy","url":"https://github.com/RomanGotsiy"},{"name":"Jeffrey Jagoda","url":"https://github.com/jagoda"},{"name":"Hidenari Nozaki","url":"https://github.com/ghiden"},{"name":"Ken Sheedlo","url":"https://github.com/ksheedlo"},{"name":"Douglas Eggleton","url":"https://github.com/douglaseggleton"},{"name":"José F. Romaniello","url":"https://github.com/jfromaniello"},{"name":"Benjamin Urban","url":"https://github.com/benurb"},{"name":"Justin","url":"https://github.com/justincy"},{"name":"Brett Porter"},{"name":"Matt Olson"},{"name":"Rémy HUBSCHER"},{"name":"Roly Fentanes"},{"name":"Alexander Simmerl"},{"name":"Pedro Teixeira"},{"name":"Nuno Job"},{"name":"Ian Young"},{"name":"nilsbunger"},{"name":"bacchusrx","email":"bacchusrx@eightstar.ca"},{"name":"Fabiano França"},{"name":"Sascha Drews"},{"name":"Mike Swift"},{"name":"James Herdman"},{"name":"David Björklund"},{"name":"Andrew Kramolisch"},{"name":"Balazs Nagy"},{"name":"Brian J Brennan"},{"name":"Attila Incze"},{"name":"Mac Angell"},{"name":"Tom Hosford"},{"name":"Aurélien Thieriot"},{"name":"Alex Zylman"},{"name":"Celestino Gomes","email":"contact@tinogomes.com"},{"name":"David Rousselie"},{"name":"spenceralger"},{"name":"Ivan Erceg","url":"https://github.com/ierceg","email":"ivan@softwaremarbles.com"},{"name":"Keith Laban","url":"https://github.com/kelaban","email":"kelaban17@gmail.com"},{"name":"Rui Marinho","url":"https://github.com/ruimarinho","email":"ruipmarinho@gmail.com"},{"name":"David Pate","url":"https://github.com/DavidTPate","email":"davidtpate@gmail.com"},{"name":"Matt Oakes","url":"https://github.com/matto1990"},{"name":"Ian Walker-Sperber","url":"https://github.com/ianwsperber"}],"repository":{"type":"git","url":"https://github.com/node-nock/nock.git"},"bugs":{"url":"http://github.com/node-nock/nock/issues"},"engines":["node >= 4.0"],"main":"./index","dependencies":{"chai":">=1.9.2 <4.0.0","debug":"^2.2.0","deep-equal":"^1.0.0","json-stringify-safe":"^5.0.1","lodash":"~4.17.2","mkdirp":"^0.5.0","propagate":"0.4.0","qs":"^6.0.2","semver":"^5.3.0"},"devDependencies":{"async":"^2.1.1","aws-sdk":"^2.0.15","browserify":"^13.0.0","coveralls":"^2.11.2","eslint":"^3.19.0","glob":"^7.1.1","hyperquest":"^1.3.0","isomorphic-fetch":"^2.2.0","istanbul":"^0.4.2","markdown-toc":"^0.13.0","needle":"^1.0.0","node-static":"^0.7.7","nyc":"^10.0.0","request":"2.71.0","request-promise":"^2.0.1","restify":"^4.0.4","restler":"3.4.0","rimraf":"^2.3.2","semver":"^5.3.0","superagent":"^3.5.0","tap":"^10.0.0","zombie":"^5.0.1","semantic-release":"^8.2.0"},"scripts":{"unit":"tap --harmony ./tests/test_*.js","preintegration":"./tests/bin/install_sub_deps versioned","integration":"tap --harmony ./tests/versioned/*/*.tap.js","test":"npm run lint && npm run unit && npm run integration","coverage":"nyc tap --harmony ./tests/test_*.js","coveralls":"cat ./coverage/lcov.info | coveralls","lint":"eslint '**/*.js'","toc":"markdown-toc -i README.md","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"nyc":{"reporter":["lcov","text-summary"],"exclude":["tests/test_*.js"]},"license":"MIT"}