Skip to content

Commit

Permalink
fix: remove dependency on node builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
tjenkinson committed May 5, 2023
1 parent f4d4f86 commit e18d94d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion classes/semver.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SemVer {
version = version.version
}
} else if (typeof version !== 'string') {
throw new TypeError(`Invalid Version: ${require('util').inspect(version)}`)
throw new TypeError(`Invalid Version: ${version}`)
}

if (version.length > MAX_LENGTH) {
Expand Down
2 changes: 1 addition & 1 deletion test/functions/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ t.test('throw errors if asked to', t => {
parse([], null, true)
}, {
name: 'TypeError',
message: 'Invalid Version: []',
message: 'Invalid Version: ',
})
t.end()
})
Expand Down

0 comments on commit e18d94d

Please sign in to comment.