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

bigint: use native bigint instead of big-integer #7

Merged
merged 4 commits into from
Apr 16, 2024
Merged

Conversation

Fang-
Copy link
Member

@Fang- Fang- commented Mar 26, 2024

To make it easier for our libraries to be used together, we are doing a pass over them, standardizing on using native bigint for big numbers. Nock-js already uses these. This library should follow.

This commit updates all aura-js library code to use native bigints, and removed the big-integer dependency altogether.

Not included is a version number bump. Since this changes the kinds of numbers we expose/ingest, this is a breaking API change.

To make it easier for our libraries to be used together, we are doing a
pass over them, standardizing on using native bigint for big numbers.
Nock-js already uses these. This library should follow.

This commit updates all aura-js library code to use native bigints, and
removed the big-integer dependency altogether.
@Fang- Fang- requested a review from arthyn March 26, 2024 16:23
Copy link

github-actions bot commented Mar 26, 2024

size-limit report 📦

Path Size
dist/aura.cjs.production.min.js 5.08 KB (-6.8% 🔽)
dist/aura.esm.js 5.04 KB (-11.09% 🔽)

A fair chunk of the stuff it's throwing errors on right now is made
worse by its suggestions. We could tweak it until it's good, but, not
very many people working on this repo right now, and we can always
police egregious style mishaps in PR review.
Copy link
Contributor

@arthyn arthyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

const UV_PAIRS: [string, BigInteger][] = [
['0v16i', bigInt(1234)],
const UV_PAIRS: [string, bigint][] = [
['0v16i', 1234n], //TODO 1234n
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the TODO for?

@arthyn
Copy link
Contributor

arthyn commented Apr 16, 2024

increment version!

@Fang- Fang- merged commit ec62e73 into master Apr 16, 2024
7 checks passed
@Fang- Fang- deleted the m/native-bigint branch April 16, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants