Skip to content

Commit 4c51d71

Browse files
committed
move ArrayBuffer.prototype.transfer and friends to stable ES
1 parent 582e4e1 commit 4c51d71

30 files changed

+144
-75
lines changed

CHANGELOG.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
## Changelog
22
##### Unreleased
3-
- [`Promise.try` proposal](https://github.com/tc39/proposal-promise-try) has been resurrected and [moved to stage 2](https://github.com/tc39/proposal-promise-try/issues/15), Febrary 2024 TC39 meeting
4-
- Fixed regression in `Set#intersection` feature detection
5-
- Fixed a missed check in `Array#{ indexOf, lastIndexOf, includes }`, [#1325](https://github.com/zloirock/core-js/issues/1325), thanks [**@minseok-choe**](https://github.com/minseok-choe)
6-
- Fixed a missed check in `Array#{ reduce, reduceRight }`, [#1327](https://github.com/zloirock/core-js/issues/1327), thanks [**@minseok-choe**](https://github.com/minseok-choe)
3+
- [`ArrayBuffer.prototype.transfer` and friends proposal](https://github.com/tc39/proposal-arraybuffer-transfer):
4+
- Built-ins:
5+
- `ArrayBuffer.prototype.detached`
6+
- `ArrayBuffer.prototype.transfer`
7+
- `ArrayBuffer.prototype.transferToFixedLength`
8+
- Moved to stable ES, [Febrary 2024 TC39 meeting](https://twitter.com/ljharb/status/1755025758219841987)
9+
- Added `es.` namespace modules, `/es/` and `/stable/` namespaces entries
10+
- [`Promise.try` proposal](https://github.com/tc39/proposal-promise-try) has been resurrected and moved to stage 2, [Febrary 2024 TC39 meeting](https://github.com/tc39/proposal-promise-try/issues/15)
11+
- Fixed regression in `Set.prototype.intersection` feature detection
12+
- Fixed a missed check in `Array.prototype.{ indexOf, lastIndexOf, includes }`, [#1325](https://github.com/zloirock/core-js/issues/1325), thanks [**@minseok-choe**](https://github.com/minseok-choe)
13+
- Fixed a missed check in `Array.prototype.{ reduce, reduceRight }`, [#1327](https://github.com/zloirock/core-js/issues/1327), thanks [**@minseok-choe**](https://github.com/minseok-choe)
714
- Fixed `Array.from` and some other methods with proxy targets, [#1322](https://github.com/zloirock/core-js/issues/1322), thanks [**@minseok-choe**](https://github.com/minseok-choe)
815
- Dropped context workaround from collection static methods entries since with current methods semantic it's no longer required
916
- Added instance methods polyfills to entries of collections static methods that produce collection instances
10-
- Added missed `Date#toJSON` to `JSON.stringify` entries dependencies
17+
- Added missed `Date.prototype.toJSON` to `JSON.stringify` entries dependencies
1118
- Added debugging info in some missed cases
1219
- Compat data improvements:
13-
- [`{ Map, Object }.groupBy`](https://github.com/tc39/proposal-array-grouping), [`Promise.withResolvers`](https://github.com/tc39/proposal-promise-with-resolvers), [`ArrayBuffer#transfer` and friends](https://github.com/tc39/proposal-arraybuffer-transfer) marked as supported from [Safari 17.4](https://developer.apple.com/documentation/safari-release-notes/safari-17_4-release-notes#JavaScript)
20+
- [`{ Map, Object }.groupBy`](https://github.com/tc39/proposal-array-grouping), [`Promise.withResolvers`](https://github.com/tc39/proposal-promise-with-resolvers), [`ArrayBuffer.prototype.transfer` and friends](https://github.com/tc39/proposal-arraybuffer-transfer) marked as supported from [Safari 17.4](https://developer.apple.com/documentation/safari-release-notes/safari-17_4-release-notes#JavaScript)
1421
- [New `Set` methods](https://github.com/tc39/proposal-set-methods) [fixed](https://bugs.chromium.org/p/v8/issues/detail?id=14559#c4) and marked as supported from V8 ~ Chrome 123
1522
- Added [Deno 1.40](https://deno.com/blog/v1.40) compat data mapping
1623
- Updated Electron 30 compat data mapping
1724

1825
##### [3.35.1 - 2024.01.21](https://github.com/zloirock/core-js/releases/tag/v3.35.1)
1926
- Fixed internal `ToLength` operation with bigints, [#1318](https://github.com/zloirock/core-js/issues/1318)
20-
- Removed significant redundant code from `String#split` polyfill
27+
- Removed significant redundant code from `String.prototype.split` polyfill
2128
- Fixed setting names of methods with symbol keys in some old engines
2229
- Minor fix of prototype methods export logic in the pure version
2330
- Compat data improvements:

packages/core-js-compat/src/data.mjs

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,24 @@ export const data = {
440440
rhino: '1.7.13',
441441
safari: '12.1',
442442
},
443+
'es.array-buffer.detached': {
444+
bun: '1.0.19',
445+
chrome: '114',
446+
firefox: '122',
447+
safari: '17.4',
448+
},
449+
'es.array-buffer.transfer': {
450+
bun: '1.0.19',
451+
chrome: '114',
452+
firefox: '122',
453+
safari: '17.4',
454+
},
455+
'es.array-buffer.transfer-to-fixed-length': {
456+
bun: '1.0.19',
457+
chrome: '114',
458+
firefox: '122',
459+
safari: '17.4',
460+
},
443461
// TODO: Remove this module from `core-js@4` since it's replaced to module below
444462
'es.data-view': null,
445463
'es.data-view.constructor': {
@@ -1950,24 +1968,12 @@ export const data = {
19501968
},
19511969
// TODO: Remove from `core-js@4`
19521970
'esnext.array.with': null,
1953-
'esnext.array-buffer.detached': {
1954-
bun: '1.0.19',
1955-
chrome: '114',
1956-
firefox: '122',
1957-
safari: '17.4',
1958-
},
1959-
'esnext.array-buffer.transfer': {
1960-
bun: '1.0.19',
1961-
chrome: '114',
1962-
firefox: '122',
1963-
safari: '17.4',
1964-
},
1965-
'esnext.array-buffer.transfer-to-fixed-length': {
1966-
bun: '1.0.19',
1967-
chrome: '114',
1968-
firefox: '122',
1969-
safari: '17.4',
1970-
},
1971+
// TODO: Remove from `core-js@4`
1972+
'esnext.array-buffer.detached': null,
1973+
// TODO: Remove from `core-js@4`
1974+
'esnext.array-buffer.transfer': null,
1975+
// TODO: Remove from `core-js@4`
1976+
'esnext.array-buffer.transfer-to-fixed-length': null,
19711977
'esnext.async-disposable-stack.constructor': {
19721978
},
19731979
'esnext.async-iterator.constructor': {
@@ -2687,6 +2693,9 @@ export const renamed = new Map([
26872693
['esnext.array.to-sorted', 'es.array.to-sorted'],
26882694
['esnext.array.to-spliced', 'es.array.to-spliced'],
26892695
['esnext.array.with', 'es.array.with'],
2696+
['esnext.array-buffer.detached', 'es.array-buffer.detached'],
2697+
['esnext.array-buffer.transfer', 'es.array-buffer.transfer'],
2698+
['esnext.array-buffer.transfer-to-fixed-length', 'es.array-buffer.transfer-to-fixed-length'],
26902699
['esnext.aggregate-error', 'es.aggregate-error'],
26912700
['esnext.global-this', 'es.global-this'],
26922701
['esnext.map.group-by', 'es.map.group-by'],

packages/core-js-compat/src/modules-by-versions.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,9 @@ export default {
232232
'esnext.uint8-array.to-base64',
233233
'esnext.uint8-array.to-hex',
234234
],
235+
3.36: [
236+
'es.array-buffer.detached',
237+
'es.array-buffer.transfer',
238+
'es.array-buffer.transfer-to-fixed-length',
239+
],
235240
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// empty
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// empty
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// empty
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
'use strict';
2-
require('../../stable/array-buffer');
2+
var parent = require('../../stable/array-buffer/detached');
33
require('../../modules/esnext.array-buffer.detached');
4+
5+
module.exports = parent;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
'use strict';
2-
require('../../stable/array-buffer');
2+
var parent = require('../../stable/array-buffer/transfer-to-fixed-length');
33
require('../../modules/esnext.array-buffer.transfer-to-fixed-length');
4+
5+
module.exports = parent;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
'use strict';
2-
require('../../stable/array-buffer');
2+
var parent = require('../../stable/array-buffer/transfer');
33
require('../../modules/esnext.array-buffer.transfer');
4+
5+
module.exports = parent;

packages/core-js/es/array-buffer/constructor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
'use strict';
22
require('../../modules/es.array-buffer.constructor');
33
require('../../modules/es.array-buffer.slice');
4+
require('../../modules/es.array-buffer.detached');
5+
require('../../modules/es.array-buffer.transfer');
6+
require('../../modules/es.array-buffer.transfer-to-fixed-length');
47
require('../../modules/es.object.to-string');
58
var path = require('../../internals/path');
69

0 commit comments

Comments
 (0)