Agoric / nat

Ensures that a number is within the natural numbers (0, 1, 2...) or throws a RangeError
Apache License 2.0
5 stars 4 forks source link

BREAKING CHANGE: Require Nat() to be a BigInt #112

Closed katelynsills closed 4 years ago

katelynsills commented 4 years ago

This PR changes Nat to use BigInts instead of numbers.

To be followed immediately by a new release of Nat with the major version bumped (from 2.0.1 to 3.0.0)

Note: This PR depends on #111. ESLint is failing because the older versions do not know about 'bigint' as a type.

katelynsills commented 4 years ago

Even with the new versions of ESlint, one linting error still remains:

/Users/katelynsills/code/Nat/test/test.js
  7:16  error  Parsing error: Identifier directly after number

I can't figure it out. Seems to stay with the same line number regardless of content as I add or delete lines, which is bizarre.

erights commented 4 years ago

7:16 error Parsing error: Identifier directly after number

From the error message, I'd guess that this version of eslint doesn't yet know the new bigint literal syntax. Note that bigint is still a stage 4 proposal, rather than an official part of the language, so you may need a switch or version upgrade to get eslint to recognize it.

I can't figure it out. Seems to stay with the same line number regardless of content as I add or delete lines, which is bizarre.

That I have no clue about.

katelynsills commented 4 years ago

Ok, it took some special ESLint settings, but everything seems to be in place now, and all tests (integration, unit tests) and linting pass