From a3d51ed5196d9dd6fdc304e0898f6bef0c27da75 Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Wed, 14 Feb 2024 14:59:53 +0700 Subject: [PATCH] fix dependencies loading for modules from `ArrayBuffer.prototype.transfer` and friends proposal --- CHANGELOG.md | 1 + packages/core-js-compat/src/data.mjs | 20 +++++++++---------- packages/core-js/es/array-buffer/index.js | 1 + .../array-buffer/transfer-to-fixed-length.js | 1 + packages/core-js/es/array-buffer/transfer.js | 1 + 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72ce2ef1fc3a..62ce80656ab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - 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) - 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) - 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) +- Fixed dependencies loading for modules from `ArrayBuffer.prototype.transfer` and friends proposal in some specific cases in IE10- - Dropped context workaround from collection static methods entries since with current methods semantic it's no longer required - Added instance methods polyfills to entries of collections static methods that produce collection instances - Added missed `Date.prototype.toJSON` to `JSON.stringify` entries dependencies diff --git a/packages/core-js-compat/src/data.mjs b/packages/core-js-compat/src/data.mjs index ed90dd28ac22..14a950cc0eab 100644 --- a/packages/core-js-compat/src/data.mjs +++ b/packages/core-js-compat/src/data.mjs @@ -440,6 +440,16 @@ export const data = { rhino: '1.7.13', safari: '12.1', }, + // TODO: Remove this module from `core-js@4` since it's replaced to module below + 'es.data-view': null, + 'es.data-view.constructor': { + chrome: '26', + firefox: '15', + hermes: '0.1', + ie: '10', + rhino: '1.7.13', + safari: '7.1', + }, 'es.array-buffer.detached': { bun: '1.0.19', chrome: '114', @@ -458,16 +468,6 @@ export const data = { firefox: '122', safari: '17.4', }, - // TODO: Remove this module from `core-js@4` since it's replaced to module below - 'es.data-view': null, - 'es.data-view.constructor': { - chrome: '26', - firefox: '15', - hermes: '0.1', - ie: '10', - rhino: '1.7.13', - safari: '7.1', - }, 'es.date.get-year': { chrome: '1', firefox: '1', diff --git a/packages/core-js/es/array-buffer/index.js b/packages/core-js/es/array-buffer/index.js index 7525db2db9a9..f66c7f7bf42f 100644 --- a/packages/core-js/es/array-buffer/index.js +++ b/packages/core-js/es/array-buffer/index.js @@ -2,6 +2,7 @@ require('../../modules/es.array-buffer.constructor'); require('../../modules/es.array-buffer.is-view'); require('../../modules/es.array-buffer.slice'); +require('../../modules/es.data-view'); require('../../modules/es.array-buffer.detached'); require('../../modules/es.array-buffer.transfer'); require('../../modules/es.array-buffer.transfer-to-fixed-length'); diff --git a/packages/core-js/es/array-buffer/transfer-to-fixed-length.js b/packages/core-js/es/array-buffer/transfer-to-fixed-length.js index e7bcba790bb0..21d43404a67f 100644 --- a/packages/core-js/es/array-buffer/transfer-to-fixed-length.js +++ b/packages/core-js/es/array-buffer/transfer-to-fixed-length.js @@ -1,4 +1,5 @@ 'use strict'; require('../../modules/es.array-buffer.constructor'); require('../../modules/es.array-buffer.slice'); +require('../../modules/es.data-view'); require('../../modules/es.array-buffer.transfer-to-fixed-length'); diff --git a/packages/core-js/es/array-buffer/transfer.js b/packages/core-js/es/array-buffer/transfer.js index 2f63e7ffb94c..f7198e03846f 100644 --- a/packages/core-js/es/array-buffer/transfer.js +++ b/packages/core-js/es/array-buffer/transfer.js @@ -1,4 +1,5 @@ 'use strict'; require('../../modules/es.array-buffer.constructor'); require('../../modules/es.array-buffer.slice'); +require('../../modules/es.data-view'); require('../../modules/es.array-buffer.transfer');