feat: add Int64 support - #13674
Conversation
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown_pkg_readmes
status: na
- task: lint_markdown_docs
status: na
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
| actual = new Uint64( 1234 ); | ||
| expected = '<Uint64>'; | ||
| t.strictEqual( compareValues( actual, expected ), null, 'returns expected value' ); | ||
| if ( HAS_BIGINTS ) { |
There was a problem hiding this comment.
You moved everything under a big int check. Why is this necessary now if it wasn't before?
There was a problem hiding this comment.
Because they do need BigInt support to correctly work. createAnnotation converts Uint64 to BigInt and compareValues parses BigInt from annotated entries. I just forgot to add the guard in my earlier work.
There was a problem hiding this comment.
Not any more. I added support in createAnnotation for environments in which the primitive value is serialized to a number, not a BigInt. You just needed to add a small if clause.
There was a problem hiding this comment.
So in those cases, the annotation should look like <Int64> [ '1234' ]?
There was a problem hiding this comment.
No, I don't believe so. I believe I normalized it so that an n is always appended. The key being #.valueOf. In older envs, it returns a number. That gets serialized to 1234. We append an n.
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Int64Int64 support
Resolves none.
Description
This pull request:
Int64)Related Issues
No.
Questions
compareValuesthat needs further review. I marked them withTODOcomments in the test files.Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
N/A.
@stdlib-js/reviewers