From 590bde3206a46914065c2790a1a84a6028d69c3a Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Fri, 17 Feb 2023 18:27:01 +0700 Subject: [PATCH] fix wrong export in `/(stable|actual/full)/instance/unshift` entries, close #1207 --- CHANGELOG.md | 2 +- packages/core-js/actual/instance/unshift.js | 2 +- packages/core-js/full/instance/unshift.js | 2 +- packages/core-js/stable/instance/unshift.js | 2 +- tests/entries/unit.mjs | 4 +++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88b31e33bc00..d89c602b1c93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Changelog ##### Unreleased -- Nothing +- Fixed wrong export in `/(stable|actual/full)/instance/unshift` entries ##### [3.28.0 - 2023.02.14](https://github.com/zloirock/core-js/releases/tag/v3.28.0) **I highly recommend reading this: [So, what's next?](https://github.com/zloirock/core-js/blob/master/docs/2023-02-14-so-whats-next.md)** diff --git a/packages/core-js/actual/instance/unshift.js b/packages/core-js/actual/instance/unshift.js index 360f6b658300..e07c9009b5f4 100644 --- a/packages/core-js/actual/instance/unshift.js +++ b/packages/core-js/actual/instance/unshift.js @@ -1,3 +1,3 @@ -var parent = require('../../stable/instance/push'); +var parent = require('../../stable/instance/unshift'); module.exports = parent; diff --git a/packages/core-js/full/instance/unshift.js b/packages/core-js/full/instance/unshift.js index f2b1b1585bc2..fe105ac94479 100644 --- a/packages/core-js/full/instance/unshift.js +++ b/packages/core-js/full/instance/unshift.js @@ -1,3 +1,3 @@ -var parent = require('../../actual/instance/push'); +var parent = require('../../actual/instance/unshift'); module.exports = parent; diff --git a/packages/core-js/stable/instance/unshift.js b/packages/core-js/stable/instance/unshift.js index c1d3a2e5bad9..360c9b67ff93 100644 --- a/packages/core-js/stable/instance/unshift.js +++ b/packages/core-js/stable/instance/unshift.js @@ -1,3 +1,3 @@ -var parent = require('../../es/instance/push'); +var parent = require('../../es/instance/unshift'); module.exports = parent; diff --git a/tests/entries/unit.mjs b/tests/entries/unit.mjs index b3c96500dff3..6bc9d37efcad 100644 --- a/tests/entries/unit.mjs +++ b/tests/entries/unit.mjs @@ -592,7 +592,9 @@ for (PATH of ['core-js-pure', 'core-js']) { ok(typeof instanceUnshift == 'function'); ok(instanceUnshift({}) === undefined); ok(typeof instanceUnshift([]) == 'function'); - ok(instanceUnshift([]).call([1], 8) === 2); + const instanceUnshiftTestArray = [1]; + ok(instanceUnshift([]).call(instanceUnshiftTestArray, 8)); + ok(instanceUnshiftTestArray[0] === 8); const instanceValues = load(NS, 'instance/values'); ok(typeof instanceValues == 'function');