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

Infinity number parsing fix #457

Merged
merged 1 commit into from
Oct 18, 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
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class TextRangeSelectorExecutor extends AbstractBlockExecutor<

context.logger.logDebug(
`Selecting lines from ${lineFrom} to ${
lineTo === Number.POSITIVE_INFINITY || lineTo >= numberOfLines
lineTo === Number.MAX_SAFE_INTEGER || lineTo >= numberOfLines
? 'the end'
: `${lineTo}`
}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class TextRangeSelectorMetaInformation extends BlockMetaInformation {
},
lineTo: {
type: PrimitiveValuetypes.Integer,
defaultValue: Number.POSITIVE_INFINITY,
defaultValue: Number.MAX_SAFE_INTEGER,
validation: greaterThanZeroValidation,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
columnIndexAsCharacters,
} from './util/column-id-util';

export const LAST_INDEX = Number.POSITIVE_INFINITY;
export const LAST_INDEX = Number.MAX_SAFE_INTEGER;

export class CellIndex {
constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class LengthConstraintMetaInformation extends ConstraintMetaInformation {
},
maxLength: {
type: PrimitiveValuetypes.Integer,
defaultValue: Number.POSITIVE_INFINITY,
defaultValue: Number.MAX_SAFE_INTEGER,
validation: nonNegativeValidation,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ export class RangeConstraintMetaInformation extends ConstraintMetaInformation {
{
lowerBound: {
type: PrimitiveValuetypes.Decimal,
defaultValue: Number.NEGATIVE_INFINITY,
defaultValue: Number.MIN_SAFE_INTEGER,
},
lowerBoundInclusive: {
type: PrimitiveValuetypes.Boolean,
defaultValue: true,
},
upperBound: {
type: PrimitiveValuetypes.Decimal,
defaultValue: Number.POSITIVE_INFINITY,
defaultValue: Number.MAX_SAFE_INTEGER,
},
upperBoundInclusive: {
type: PrimitiveValuetypes.Boolean,
Expand Down
Loading