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

Feat/support bigint #135

Merged
merged 9 commits into from
Nov 29, 2021
Merged

Feat/support bigint #135

merged 9 commits into from
Nov 29, 2021

Conversation

brandonocasey
Copy link
Contributor

Support 64 bit integer values for sidx

@brandonocasey brandonocasey force-pushed the feat/support-bigint branch 2 times, most recently from a626eae to 68313ef Compare June 17, 2021 19:48
@codecov
Copy link

codecov bot commented Oct 28, 2021

Codecov Report

Merging #135 (ca64102) into main (1c6e10d) will increase coverage by 0.32%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #135      +/-   ##
==========================================
+ Coverage   92.84%   93.17%   +0.32%     
==========================================
  Files          17       17              
  Lines         657      674      +17     
  Branches      214      224      +10     
==========================================
+ Hits          610      628      +18     
+ Misses         47       46       -1     
Impacted Files Coverage Δ
src/inheritAttributes.js 97.36% <ø> (ø)
src/segment/segmentBase.js 100.00% <100.00%> (ø)
src/segment/urlType.js 100.00% <100.00%> (ø)
src/segment/durationTimeParser.js 97.82% <0.00%> (+2.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c6e10d...ca64102. Read the comment docs.

src/segment/segmentBase.js Outdated Show resolved Hide resolved
@@ -34,13 +35,33 @@ export const urlTypeToSegment = ({ baseUrl = '', source = '', range = '', indexR
if (range || indexRange) {
const rangeStr = range ? range : indexRange;
const ranges = rangeStr.split('-');
const startRange = parseInt(ranges[0], 10);
const endRange = parseInt(ranges[1], 10);
let startRange = parseInt(ranges[0], 10);
Copy link
Member

Choose a reason for hiding this comment

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

Unless I'm missing something, it seems like parseInt doesn't return a BigInt. We probably need to parse as BigInt and if it's under MAX_SAFE_INTEREGER convert it to a regular number.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@gkatsev gkatsev merged commit 50eb434 into main Nov 29, 2021
@gkatsev gkatsev deleted the feat/support-bigint branch November 29, 2021 16:52
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.

3 participants