From 3723a12a062d3fd35d073f2108da45467337c792 Mon Sep 17 00:00:00 2001 From: Nacho Lopez Date: Tue, 21 Jun 2022 10:20:12 +0200 Subject: [PATCH] remove unsupported polyfills. --- package.json | 4 +--- src/expectSaga/index.js | 4 +--- src/expectSaga/matchers/helpers.js | 3 +-- src/testSaga/index.js | 3 +-- src/utils/Map.js | 4 ---- yarn.lock | 4 ---- 6 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 src/utils/Map.js diff --git a/package.json b/package.json index 4de64125..d3682213 100644 --- a/package.json +++ b/package.json @@ -78,11 +78,9 @@ "rimraf": "^2.5.4" }, "dependencies": { - "core-js": "^2.4.1", "fsm-iterator": "^1.1.0", "lodash.isequal": "^4.5.0", - "lodash.ismatch": "^4.4.0", - "object-assign": "^4.1.0" + "lodash.ismatch": "^4.4.0" }, "peerDependencies": { "redux-saga": "^1.0.1", diff --git a/src/expectSaga/index.js b/src/expectSaga/index.js index 4041ff29..d0e735b4 100644 --- a/src/expectSaga/index.js +++ b/src/expectSaga/index.js @@ -3,9 +3,7 @@ import { runSaga, stdChannel } from 'redux-saga'; import * as is from '@redux-saga/is'; import * as effects from 'redux-saga/effects'; -import assign from 'object-assign'; import { splitAt } from '../utils/array'; -import Map from '../utils/Map'; import ArraySet from '../utils/ArraySet'; import { warn } from '../utils/logging'; import { delay, schedule } from '../utils/async'; @@ -588,7 +586,7 @@ export default function expectSaga( let dispatchableAction; if (typeof delayTime === 'number') { - dispatchableAction = assign({}, action, { + dispatchableAction = Object.assign({}, action, { _delayTime: delayTime, }); diff --git a/src/expectSaga/matchers/helpers.js b/src/expectSaga/matchers/helpers.js index 65c83ed6..b4c21bbe 100644 --- a/src/expectSaga/matchers/helpers.js +++ b/src/expectSaga/matchers/helpers.js @@ -1,5 +1,4 @@ // @flow -import assign from 'object-assign'; const PARTIAL_MATCH = '@@redux-saga-test-plan/partial-matcher'; @@ -11,7 +10,7 @@ export function wrapEffectCreator(effectCreator: Function): Function { export function like(providerKey: string, defaults?: Object = {}): Function { return function effectMatcher(effect: Object): Object { - return assign({}, defaults, { + return Object.assign({}, defaults, { effect, providerKey, [PARTIAL_MATCH]: true, diff --git a/src/testSaga/index.js b/src/testSaga/index.js index d86cab32..907165e6 100644 --- a/src/testSaga/index.js +++ b/src/testSaga/index.js @@ -1,6 +1,5 @@ // @flow import isEqual from 'lodash.isequal'; -import assign from 'object-assign'; import * as effects from 'redux-saga/effects'; @@ -167,7 +166,7 @@ export default function testSaga(saga: Function, ...sagaArgs: Array): Api { value, done, }: IteratorResult<*, *>): ApiWithEffectsTesters { - const newApi = assign({}, api, { + const newApi = Object.assign({}, api, { actionChannel: effectsTestersCreators.actionChannel(value), all: effectsTestersCreators.all(value), apply: effectsTestersCreators.apply(value), diff --git a/src/utils/Map.js b/src/utils/Map.js deleted file mode 100644 index 469d3046..00000000 --- a/src/utils/Map.js +++ /dev/null @@ -1,4 +0,0 @@ -// @flow -export default (typeof Map !== 'undefined' - ? Map - : require('core-js/library/es6/map')); diff --git a/yarn.lock b/yarn.lock index 4150947c..1ca27cdf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2006,10 +2006,6 @@ core-js-compat@^3.6.2: browserslist "^4.8.5" semver "7.0.0" -core-js@^2.4.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" - core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"