braid-http 1.3.12 → 1.3.13

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.
@@ -116,22 +116,11 @@ function braidify_http (http) {
116
116
  // ***************************
117
117
 
118
118
  var normal_fetch,
119
- AbortController,
120
- Headers,
121
119
  is_nodejs = typeof window === 'undefined'
122
120
 
123
121
  if (is_nodejs) {
124
122
  // Nodejs
125
-
126
- // Note that reconnect logic doesn't work in node-fetch, because it
127
- // doesn't call the .catch() handler when the stream fails.
128
- //
129
- // See https://github.com/node-fetch/node-fetch/issues/753
130
-
131
- normal_fetch = require('node-fetch')
132
- AbortController = require('abort-controller')
133
- Headers = normal_fetch.Headers
134
- var to_whatwg_stream = require('web-streams-node').toWebReadableStream
123
+ normal_fetch = fetch
135
124
  } else {
136
125
  // Web Browser
137
126
  normal_fetch = window.fetch
@@ -418,9 +407,6 @@ async function braid_fetch (url, params = {}) {
418
407
 
419
408
  // Parse a stream of versions from the incoming bytes
420
409
  async function handle_fetch_stream (stream, cb, on_bytes) {
421
- if (is_nodejs)
422
- stream = to_whatwg_stream(stream)
423
-
424
410
  // Set up a reader
425
411
  var reader = stream.getReader(),
426
412
  parser = subscription_parser(cb)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"