Skip to content

Commit 8d67ee2

Browse files
committed
feat(migrate): replace lodash.shuffle
1 parent 9417b14 commit 8d67ee2

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

packages/sync-actions/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"dependencies": {
2626
"fast-equals": "^2.0.0",
2727
"jsondiffpatch": "^0.4.0",
28-
"lodash.shuffle": "^4.2.0",
2928
"lodash.sortby": "^4.7.0",
3029
"lodash.uniqwith": "^4.5.0"
3130
},

packages/sync-actions/test/product-sync-prices.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import shuffle from 'lodash.shuffle'
21
import productsSyncFn from '../src/products'
32

43
/* eslint-disable max-len */
@@ -552,7 +551,9 @@ describe('Actions', () => {
552551
}
553552

554553
beforeEach(() => {
555-
now.masterVariant.prices = shuffle(now.masterVariant.prices)
554+
now.masterVariant.prices = now.masterVariant.prices.sort(
555+
() => Math.random() - 0.5
556+
)
556557
actions = productsSync.buildActions(now, before)
557558
})
558559

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6906,11 +6906,6 @@ lodash.mergewith@^4.6.2:
69066906
resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55"
69076907
integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==
69086908

6909-
lodash.shuffle@^4.2.0:
6910-
version "4.2.0"
6911-
resolved "https://registry.yarnpkg.com/lodash.shuffle/-/lodash.shuffle-4.2.0.tgz#145b5053cf875f6f5c2a33f48b6e9948c6ec7b4b"
6912-
integrity sha512-V/rTAABKLFjoecTZjKSv+A1ZomG8hZg8hlgeG6wwQVD9AGv+10zqqSf6mFq2tVA703Zd5R0YhSuSlXA+E/Ei+Q==
6913-
69146909
lodash.snakecase@^4.1.1:
69156910
version "4.1.1"
69166911
resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d"

0 commit comments

Comments
 (0)