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

Array.prototype.at polyfill works inconsistent with spec. #1318

Closed
stonechoe opened this issue Jan 3, 2024 · 1 comment
Closed

Array.prototype.at polyfill works inconsistent with spec. #1318

stonechoe opened this issue Jan 3, 2024 · 1 comment
Labels

Comments

@stonechoe
Copy link
Contributor

The following code works different in node 15 and 16:

 const at = require('core-js-pure/actual/array/at');
at({ length: BigInt("-10") }, 0)
Running node v16.20.2 (npm v8.19.4)
TypeError: Cannot convert a BigInt value to a number
Running node v15.14.0 (npm v7.7.6)
undefined
@zloirock
Copy link
Owner

zloirock commented Jan 3, 2024

It's an interesting case, thanks. I'm pretty sure that some other similar edge cases are not good with bigints at least since they were written before bigints were added to the standard -)

@zloirock zloirock closed this as completed Jan 3, 2024
@zloirock zloirock added the bug label Jan 23, 2024
Vylpes pushed a commit to Vylpes/Droplet that referenced this issue Feb 5, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [core-js](https://github.com/zloirock/core-js) | dependencies | patch | [`3.35.0` -> `3.35.1`](https://renovatebot.com/diffs/npm/core-js/3.35.0/3.35.1) |

---

### Release Notes

<details>
<summary>zloirock/core-js (core-js)</summary>

### [`v3.35.1`](https://github.com/zloirock/core-js/blob/HEAD/CHANGELOG.md#3351---20240121)

[Compare Source](zloirock/core-js@v3.35.0...v3.35.1)

-   Fixed internal `ToLength` operation with bigints, [#&#8203;1318](zloirock/core-js#1318)
-   Removed significant redundant code from `String#split` polyfill
-   Fixed setting names of methods with symbol keys in some old engines
-   Minor fix of prototype methods export logic in the pure version
-   Compat data improvements:
    -   [`Iterator` helpers proposal](https://github.com/tc39/proposal-iterator-helpers) methods marked as supported from V8 ~ Chrome 122
    -   Note that V8 ~ Chrome 122 add [`Set` methods](https://github.com/tc39/proposal-set-methods), but they have [a bug](https://bugs.chromium.org/p/v8/issues/detail?id=14559) [similar to Safari](https://bugs.webkit.org/show_bug.cgi?id=267494)
    -   `self` marked as fixed from Bun 1.0.22
    -   [`SuppressedError` and `Symbol.{ dispose , asyncDispose }`](https://github.com/tc39/proposal-explicit-resource-management) marked as [supported from Bun 1.0.23](https://bun.sh/blog/bun-v1.0.23#resource-management-is-now-supported)
    -   Added Oculus Quest Browser 31 compat data mapping
    -   Updated Electron 29 and added Electron 30 compat data mapping

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/Droplet/pulls/260
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants