global-agent 4.1.1 → 4.1.2

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/package.json CHANGED
@@ -5,10 +5,8 @@
5
5
  "url": "https://gajus.com"
6
6
  },
7
7
  "dependencies": {
8
- "es6-error": "^4.1.1",
9
8
  "globalthis": "^1.0.2",
10
9
  "matcher": "^4.0.0",
11
- "omit-undefined": "^1.0.1",
12
10
  "semver": "^7.3.5",
13
11
  "serialize-error": "^8.1.0"
14
12
  },
@@ -71,5 +69,5 @@
71
69
  "create-readme": "gitdown ./.README/README.md --output-file ./README.md"
72
70
  },
73
71
  "typings": "./dist/src/index.d.ts",
74
- "version": "4.1.1"
72
+ "version": "4.1.2"
75
73
  }
package/src/errors.ts CHANGED
@@ -1,6 +1,4 @@
1
- import ExtendableError from 'es6-error';
2
-
3
- export class UnexpectedStateError extends ExtendableError {
1
+ export class UnexpectedStateError extends Error {
4
2
  public code: string;
5
3
 
6
4
  public constructor (message: string, code: string = 'UNEXPECTED_STATE_ERROR') {
@@ -1,8 +1,5 @@
1
1
  import http from 'http';
2
2
  import https from 'https';
3
- import {
4
- omitUndefined,
5
- } from 'omit-undefined';
6
3
  import semverGte from 'semver/functions/gte';
7
4
  import {
8
5
  logger,
@@ -56,7 +53,7 @@ const createConfiguration = (configurationInput: ProxyAgentConfigurationInputTyp
56
53
 
57
54
  return {
58
55
  ...defaultConfiguration,
59
- ...omitUndefined(configurationInput),
56
+ ...Object.fromEntries(Object.entries(configurationInput).filter(([, v]) => v !== undefined)),
60
57
  };
61
58
  };
62
59