@nxtedition/nxt-undici 2.0.40 → 2.0.42

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/lib/index.js CHANGED
@@ -130,6 +130,7 @@ export async function request(url, opts) {
130
130
  url,
131
131
  method,
132
132
  body: opts.body,
133
+ query: opts.query,
133
134
  headers,
134
135
  origin: url.origin,
135
136
  path: url.path ?? (url.search ? `${url.pathname}${url.search ?? ''}` : url.pathname),
package/lib/readable.js CHANGED
@@ -134,12 +134,15 @@ export class BodyReadable extends Readable {
134
134
  }
135
135
 
136
136
  push(chunk) {
137
- this[kReadLength] += chunk.length
137
+ if (chunk != null) {
138
+ this[kReadLength] += chunk.length
139
+ }
138
140
 
139
141
  if (this[kConsume] && chunk !== null) {
140
142
  consumePush(this[kConsume], chunk)
141
143
  return this[kReading] ? super.push(chunk) : true
142
144
  }
145
+
143
146
  return super.push(chunk)
144
147
  }
145
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/nxt-undici",
3
- "version": "2.0.40",
3
+ "version": "2.0.42",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "main": "lib/index.js",