Skip to content

feat: Add missing JsTypedArray wrapper methods#5009

Merged
jedel1043 merged 4 commits intoboa-dev:mainfrom
MayankRaj435:fix/js-typed-array-missing-methods
Mar 12, 2026
Merged

feat: Add missing JsTypedArray wrapper methods#5009
jedel1043 merged 4 commits intoboa-dev:mainfrom
MayankRaj435:fix/js-typed-array-missing-methods

Conversation

@MayankRaj435
Copy link
Copy Markdown

This PR adds missing Rust wrapper methods for TypedArray in JsTypedArray and its subclasses, specifically resolving part of #3252.

Changes:

  • Added entries(), keys(), values(), @@iterator() (using values), and toString() (using Array.prototype.toString).
  • Changed visibility of entries and values in BuiltinTypedArray to pub(crate) to allow access from the wrappers.
  • Added comprehensive unit tests in jstypedarray.rs verify the new methods.

All unit tests pass.

Your Name added 2 commits March 12, 2026 11:11
Implemented entries, keys, values, @@iterator, and toString wrapper methods
on JsTypedArray and its subclasses. Added unit tests for verification.

Resolves boa-dev#3252
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 12, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 49,901 49,901 0
Ignored 2,222 2,222 0
Failed 840 840 0
Panics 0 0 0
Conformance 94.22% 94.22% 0.00%

Tested main commit: 55786cef54cbd6a8d62dbb60ee5da9a7fdeebc63
Tested PR commit: abe311f0f648b6445ca297ef0b032a875a3c439d
Compare commits: 55786ce...abe311f

@MayankRaj435
Copy link
Copy Markdown
Author

Hey @jedel1043 Can you please check this out and tell me if any change is needed?

Copy link
Copy Markdown
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Thank you. In the future we'd want to reevaluate the exact shape of the APIs because just returning JsValue is a bit painful to use, but just having the methods already brings a lot of value.

@jedel1043 jedel1043 enabled auto-merge March 12, 2026 14:59
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.47%. Comparing base (6ddc2b4) to head (abe311f).
⚠️ Report is 812 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5009       +/-   ##
===========================================
+ Coverage   47.24%   58.47%   +11.22%     
===========================================
  Files         476      559       +83     
  Lines       46892    61452    +14560     
===========================================
+ Hits        22154    35932    +13778     
- Misses      24738    25520      +782     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

auto-merge was automatically disabled March 12, 2026 16:09

Head branch was pushed to by a user without write access

@jedel1043 jedel1043 enabled auto-merge March 12, 2026 17:23
@jedel1043 jedel1043 added C-Builtins PRs and Issues related to builtins/intrinsics A-API Changes related to public APIs labels Mar 12, 2026
@jedel1043 jedel1043 added this pull request to the merge queue Mar 12, 2026
Merged via the queue into boa-dev:main with commit cf48c75 Mar 12, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-API Changes related to public APIs C-Builtins PRs and Issues related to builtins/intrinsics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants