Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed numeric separator #491

Merged
merged 2 commits into from
Jan 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build/replacements.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ const internalValidatorsRequireRelativeUtil = ["require\\('internal/util'\\)", "

const internalValidatorsRequireUtilTypes = ["require\\('internal/util/types'\\)", "require('../ours/util').types"]

const internalValidatorsNumericSeparator = ['4_294_967_295', '4294967295']

const streamIndexIsUint8Array = [
"Stream._isUint8Array = require\\('internal/util/types'\\).isUint8Array;",
`
Expand Down Expand Up @@ -253,7 +255,8 @@ export const replacements = {
internalValidatorsRequireRelativeUtil,
internalValidatorsRequireUtilTypes,
internalValidatorsNoRequireSignals,
internalValidatorsNoCoalesceAssignment
internalValidatorsNoCoalesceAssignment,
internalValidatorsNumericSeparator
],
'lib/stream.js': [
streamIndexIsUint8Array,
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const validateUint32 = hideStackFrames((value, name, positive = false) => {
}
const min = positive ? 1 : 0
// 2 ** 32 === 4294967296
const max = 4_294_967_295
const max = 4294967295
if (value < min || value > max) {
throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value)
}
Expand Down