@e-mc/request 0.11.17 → 0.11.19

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
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- * [View Source](https://www.unpkg.com/@e-mc/types@0.11.17/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.11.19/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { IModule, ModuleConstructor } from "./index";
@@ -209,12 +209,12 @@ instance.get("http://hostname/path/config.yml", options).then(data => {
209
209
 
210
210
  ## References
211
211
 
212
- - https://www.unpkg.com/@e-mc/types@0.11.17/lib/http.d.ts
213
- - https://www.unpkg.com/@e-mc/types@0.11.17/lib/request.d.ts
214
- - https://www.unpkg.com/@e-mc/types@0.11.17/lib/settings.d.ts
212
+ - https://www.unpkg.com/@e-mc/types@0.11.19/lib/http.d.ts
213
+ - https://www.unpkg.com/@e-mc/types@0.11.19/lib/request.d.ts
214
+ - https://www.unpkg.com/@e-mc/types@0.11.19/lib/settings.d.ts
215
215
 
216
216
  * https://www.npmjs.com/package/@types/node
217
217
 
218
218
  ## LICENSE
219
219
 
220
- BSD 3-Clause
220
+ MIT
@@ -375,7 +375,7 @@ class HttpAdapter {
375
375
  if (updating) {
376
376
  this.updateProgress(0, this.contentLength);
377
377
  }
378
- if (enabled && this.instance.readExpect === 'always' && !empty) {
378
+ if (enabled && this.instance.readExpect === 'always' && !empty || opts.throwsEmpty) {
379
379
  this.terminate("No data received");
380
380
  return;
381
381
  }
package/index.js CHANGED
@@ -1203,7 +1203,7 @@ class Request extends module_1 {
1203
1203
  const pattern = new RegExp(`^${leading}(?:=|$)`);
1204
1204
  for (let i = 0; i < opts.length; ++i) {
1205
1205
  if (pattern.test(opts[i])) {
1206
- opts.splice(i--, i);
1206
+ opts.splice(i, 1);
1207
1207
  break;
1208
1208
  }
1209
1209
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/request",
3
- "version": "0.11.17",
3
+ "version": "0.11.19",
4
4
  "description": "Request constructor for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,8 +20,8 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/module": "0.11.17",
24
- "@e-mc/types": "0.11.17",
23
+ "@e-mc/module": "0.11.19",
24
+ "@e-mc/types": "0.11.19",
25
25
  "combined-stream": "^1.0.8",
26
26
  "js-yaml": "^4.1.1",
27
27
  "picomatch": "^4.0.4",