@e-mc/request 0.8.2 → 0.8.3

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.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -37,7 +37,7 @@ const kStatusOn = Symbol('statusOn');
37
37
  const kHeadersOn = Symbol('headersOn');
38
38
  const PLATFORM_WIN32 = process.platform === 'win32';
39
39
  const SUPPORT_NODEJS20 = module_1.default.supported(20);
40
- const SUPPORT_ABORTSIGNAL = module_1.default.supported(15, 4);
40
+ const SUPPORT_ABORTSIGNAL = module_1.default.supported(15, 3) || module_1.default.supported(14, 17, 0, true);
41
41
  const HTTP = {
42
42
  HOST: {},
43
43
  HEADERS: {},
@@ -1826,7 +1826,7 @@ class Request extends module_1.default {
1826
1826
  async get(uri, options = {}) {
1827
1827
  const opts = (typeof options === 'string' ? { format: options, encoding: 'utf-8' } : options);
1828
1828
  if (this.readExpect === 'string') {
1829
- opts.encoding = (0, types_1.getEncoding)(opts?.encoding);
1829
+ opts.encoding = (0, types_1.getEncoding)(opts.encoding);
1830
1830
  }
1831
1831
  return new Promise((resolve, reject) => {
1832
1832
  const { silent = this[kSingleton], pipeTo } = opts;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/request",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "Request constructor for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/anpham6/e-mc.git",
12
+ "url": "git+https://github.com/anpham6/e-mc.git",
13
13
  "directory": "src/request"
14
14
  },
15
15
  "keywords": [
@@ -20,8 +20,8 @@
20
20
  "license": "BSD 3-Clause",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/module": "0.8.2",
24
- "@e-mc/types": "0.8.2",
23
+ "@e-mc/module": "0.8.3",
24
+ "@e-mc/types": "0.8.3",
25
25
  "combined-stream": "^1.0.8",
26
26
  "js-yaml": "^4.1.0",
27
27
  "picomatch": "^3.0.1",