Skip to content

Commit

Permalink
Start adding bugsUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jun 5, 2022
1 parent 29d647a commit 6eafdfb
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/error/main.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import { createRequire } from 'module'

import { modernErrors } from './modern/main.js'

// TODO: replace with JSON imports after dropping support for Node <16.14.0
const {
bugs: { url: bugsUrl },
} = createRequire(import.meta.url)('../../../package.json')

const {
PluginError,
UserCodeError,
UserError,
LimitError,
StopError,
onError,
} = modernErrors([
'PluginError',
'UserCodeError',
'UserError',
'LimitError',
'StopError',
])
} = modernErrors(
['PluginError', 'UserCodeError', 'UserError', 'LimitError', 'StopError'],
{ bugsUrl },
)

export {
// Bug in a plugin (reporter|runner)
Expand Down

0 comments on commit 6eafdfb

Please sign in to comment.