Skip to content

Commit b4ee8b2

Browse files
authored
Merge pull request #1608 from xkabylgSICKAG/export-node-fetch-abort-error-for-instance-of-checks
feat: add reexports for AbortError and FetchError from node-fetch to aid instanceof checks
2 parents d7ae2f0 + e74b6b8 commit b4ee8b2

File tree

3 files changed

+13
-35
lines changed

3 files changed

+13
-35
lines changed

package-lock.json

Lines changed: 9 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"dependencies": {
5757
"@types/js-yaml": "^4.0.1",
5858
"@types/node": "^20.3.1",
59-
"@types/node-fetch": "^2.6.3",
59+
"@types/node-fetch": "^2.6.9",
6060
"@types/stream-buffers": "^3.0.3",
6161
"@types/tar": "^6.1.1",
6262
"@types/underscore": "^1.8.9",

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ export * from './patch';
1515
export * from './metrics';
1616
export * from './object';
1717
export { ConfigOptions, User, Cluster, Context } from './config_types';
18+
19+
// Export AbortError and FetchError so that instanceof checks in user code will definitely use the same instances
20+
export { AbortError, FetchError } from 'node-fetch';

0 commit comments

Comments
 (0)