Skip to content

Commit

Permalink
Use merge-error-cause
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jun 5, 2022
1 parent 3856223 commit 0ff125b
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 291 deletions.
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"json-ptr": "^3.1.0",
"junk": "^4.0.0",
"map-obj": "^5.0.1",
"merge-error-cause": "^1.0.0",
"moize": "^6.1.1",
"normalize-exception": "^1.0.1",
"nvexeca": "^8.0.0",
Expand Down
53 changes: 0 additions & 53 deletions src/error/merge/aggregate.js

This file was deleted.

52 changes: 0 additions & 52 deletions src/error/merge/create.js

This file was deleted.

65 changes: 0 additions & 65 deletions src/error/merge/main.js

This file was deleted.

40 changes: 0 additions & 40 deletions src/error/merge/message.js

This file was deleted.

38 changes: 0 additions & 38 deletions src/error/merge/props.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/error/merge/set.js

This file was deleted.

31 changes: 0 additions & 31 deletions src/error/merge/stack.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/error/modern.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// eslint-disable-next-line n/file-extension-in-import, import/no-unassigned-import
import 'error-cause/auto'
import errorType from 'error-type'
import mergeErrorCause from 'merge-error-cause'

import { mergeErrorCause } from './merge/main.js'
import { allowErrorTypes } from './types.js'

// Create error types by passing an array of error names.
Expand Down
3 changes: 1 addition & 2 deletions src/error/types.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import mergeErrorCause from 'merge-error-cause'
import normalizeException from 'normalize-exception'

import { mergeErrorCause } from './merge/main.js'

// Ensure an error is among a specific set of error types.
// Otherwise, assign a default error type (`errorTypes[0]`).
export const allowErrorTypes = function (error, ErrorTypes) {
Expand Down

0 comments on commit 0ff125b

Please sign in to comment.