Skip to content

fix(immutable-arraybuffer): update to recent spec#2688

Merged
erights merged 2 commits intomasterfrom
markm-tc39-26-immu-arraybuf-update-shim
Jan 13, 2025
Merged

fix(immutable-arraybuffer): update to recent spec#2688
erights merged 2 commits intomasterfrom
markm-tc39-26-immu-arraybuf-update-shim

Conversation

@erights
Copy link
Copy Markdown
Contributor

@erights erights commented Jan 12, 2025

Closes: tc39/proposal-immutable-arraybuffer#26
Refs: https://github.com/tc39/proposal-immutable-arraybuffer tc39/proposal-immutable-arraybuffer#15 tc39/proposal-immutable-arraybuffer#9 tc39/proposal-immutable-arraybuffer#16

Description

Since the last work on this immutable-arraybuffer shim, at the tc39 plenary we decided that

  • transferToImmutable should take an optional newLength parameter, to stay parallel to the other transfer* methods.
  • The sliceToImmutable method should be added.

The spec at https://github.com/tc39/proposal-immutable-arraybuffer and the Moddable XS implementation both already reflect these changes. This PR brings this shim up to date with those changes, closing tc39/proposal-immutable-arraybuffer#26

Security Considerations

none

Scaling Considerations

none

Documentation Considerations

The proposal's draft spec has already been updated.

Testing Considerations

New tests lightly test the new functionality. The code and tests may differ from the current draft spec on order of operations and errors thrown. But since these issues are purposely still open tc39/proposal-immutable-arraybuffer#16 , this divergence is not yet a big deal.

Compatibility Considerations

No more than the baseline shim already on master.

Upgrade Considerations

No production code yet depends on this shim. So, none.

@erights erights self-assigned this Jan 12, 2025
@erights erights changed the title fix(immutable-arraybuffer): tc39#26 update to recent spec fix(immutable-arraybuffer): update to recent spec Jan 12, 2025
@erights erights force-pushed the markm-tc39-26-immu-arraybuf-update-shim branch 2 times, most recently from 7bdefcc to a8bdf43 Compare January 13, 2025 06:57
@erights erights force-pushed the markm-tc39-26-immu-arraybuf-update-shim branch from a8bdf43 to 16fbf27 Compare January 13, 2025 07:28
@erights erights marked this pull request as ready for review January 13, 2025 07:40
@erights erights merged commit daa1e2b into master Jan 13, 2025
@erights erights deleted the markm-tc39-26-immu-arraybuf-update-shim branch January 13, 2025 22:20
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.

Update shim according to issue resolutions

2 participants