Replace lodash NPM package with tiny lodash modules

pull/5171/head
Viktor Baranov 3 years ago
parent 6c8f0ec8f3
commit 7dca1596b6
  1. 1
      CHANGELOG.md
  2. 4
      apps/block_scout_web/assets/js/lib/async_listing_load.js
  3. 2
      apps/block_scout_web/assets/js/lib/infinite_scroll_helpers.js
  4. 12
      apps/block_scout_web/assets/js/lib/list_morph.js
  5. 4
      apps/block_scout_web/assets/js/lib/random_access_pagination.js
  6. 6
      apps/block_scout_web/assets/js/lib/redux_helpers.js
  7. 2
      apps/block_scout_web/assets/js/lib/utils.js
  8. 2
      apps/block_scout_web/assets/js/pages/address.js
  9. 2
      apps/block_scout_web/assets/js/pages/address/coin_balances.js
  10. 2
      apps/block_scout_web/assets/js/pages/address/internal_transactions.js
  11. 2
      apps/block_scout_web/assets/js/pages/address/logs.js
  12. 2
      apps/block_scout_web/assets/js/pages/address/token_transfers.js
  13. 2
      apps/block_scout_web/assets/js/pages/address/transactions.js
  14. 2
      apps/block_scout_web/assets/js/pages/address/validations.js
  15. 12
      apps/block_scout_web/assets/js/pages/blocks.js
  16. 10
      apps/block_scout_web/assets/js/pages/chain.js
  17. 2
      apps/block_scout_web/assets/js/pages/pending_transactions.js
  18. 2
      apps/block_scout_web/assets/js/pages/search-results/search.js
  19. 2
      apps/block_scout_web/assets/js/pages/token/search.js
  20. 2
      apps/block_scout_web/assets/js/pages/token/token_transfers.js
  21. 2
      apps/block_scout_web/assets/js/pages/token_counters.js
  22. 2
      apps/block_scout_web/assets/js/pages/transaction.js
  23. 2
      apps/block_scout_web/assets/js/pages/transactions.js
  24. 2
      apps/block_scout_web/assets/js/pages/verification_form.js
  25. 185
      apps/block_scout_web/assets/package-lock.json
  26. 19
      apps/block_scout_web/assets/package.json

@ -10,6 +10,7 @@
- [#5154](https://github.com/blockscout/blockscout/pull/5154) - Fix token counters bug
### Chore
- [#5171](https://github.com/blockscout/blockscout/pull/5171) - Replace lodash NPM package with tiny lodash modules
- [#5170](https://github.com/blockscout/blockscout/pull/5170) - Token price row name fix
- [#5153](https://github.com/blockscout/blockscout/pull/5153) - Discord link instead of Gitter
- [#5142](https://github.com/blockscout/blockscout/pull/5142) - Updated some outdated npm packages

@ -1,6 +1,6 @@
import $ from 'jquery'
import map from 'lodash/map'
import merge from 'lodash/merge'
import map from 'lodash.map'
import merge from 'lodash.merge'
import URI from 'urijs'
import humps from 'humps'
import listMorph from '../lib/list_morph'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import humps from 'humps'
import { connectElements } from './redux_helpers.js'

@ -1,10 +1,10 @@
import $ from 'jquery'
import map from 'lodash/map'
import get from 'lodash/get'
import noop from 'lodash/noop'
import find from 'lodash/find'
import intersectionBy from 'lodash/intersectionBy'
import differenceBy from 'lodash/differenceBy'
import map from 'lodash.map'
import get from 'lodash.get'
import noop from 'lodash.noop'
import find from 'lodash.find'
import intersectionBy from 'lodash.intersectionby'
import differenceBy from 'lodash.differenceby'
import morph from 'nanomorph'
import { updateAllAges } from './from_now'

@ -1,6 +1,6 @@
import $ from 'jquery'
import map from 'lodash/map'
import merge from 'lodash/merge'
import map from 'lodash.map'
import merge from 'lodash.merge'
import humps from 'humps'
import URI from 'urijs'
import listMorph from '../lib/list_morph'

@ -1,7 +1,7 @@
import $ from 'jquery'
import reduce from 'lodash/reduce'
import isObject from 'lodash/isObject'
import forIn from 'lodash/forIn'
import reduce from 'lodash.reduce'
import isObject from 'lodash.isobject'
import forIn from 'lodash.forin'
import { createStore as reduxCreateStore } from 'redux'
/**

@ -1,4 +1,4 @@
import debounce from 'lodash/debounce'
import debounce from 'lodash.debounce'
export function batchChannel (func) {
let msgs = []

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import URI from 'urijs'
import humps from 'humps'
import numeral from 'numeral'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import humps from 'humps'
import socket from '../../socket'
import { connectElements } from '../../lib/redux_helpers.js'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import humps from 'humps'
import numeral from 'numeral'
import socket from '../../socket'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import humps from 'humps'
import { connectElements } from '../../lib/redux_helpers.js'
import { createAsyncLoadStore } from '../../lib/async_listing_load'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import URI from 'urijs'
import humps from 'humps'
import { subscribeChannel } from '../../socket'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import URI from 'urijs'
import humps from 'humps'
import numeral from 'numeral'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import humps from 'humps'
import socket from '../../socket'
import { connectElements } from '../../lib/redux_helpers.js'

@ -1,10 +1,10 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import last from 'lodash/last'
import min from 'lodash/min'
import max from 'lodash/max'
import keys from 'lodash/keys'
import rangeRight from 'lodash/rangeRight'
import omit from 'lodash.omit'
import last from 'lodash.last'
import min from 'lodash.min'
import max from 'lodash.max'
import keys from 'lodash.keys'
import rangeRight from 'lodash.rangeright'
import humps from 'humps'
import socket from '../socket'
import { connectElements } from '../lib/redux_helpers.js'

@ -1,9 +1,9 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import first from 'lodash/first'
import rangeRight from 'lodash/rangeRight'
import find from 'lodash/find'
import map from 'lodash/map'
import omit from 'lodash.omit'
import first from 'lodash.first'
import rangeRight from 'lodash.rangeright'
import find from 'lodash.find'
import map from 'lodash.map'
import humps from 'humps'
import numeral from 'numeral'
import socket from '../socket'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import humps from 'humps'
import numeral from 'numeral'
import socket from '../socket'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import humps from 'humps'
import { createAsyncLoadStore } from '../../lib/async_listing_load'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import humps from 'humps'
import { createAsyncLoadStore } from '../../lib/async_listing_load'
import '../address'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import URI from 'urijs'
import humps from 'humps'
import { subscribeChannel } from '../../socket'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import humps from 'humps'
import { subscribeChannel } from '../socket'
import { createStore, connectElements } from '../lib/redux_helpers.js'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import humps from 'humps'
import numeral from 'numeral'
import socket from '../socket'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import humps from 'humps'
import numeral from 'numeral'
import socket from '../socket'

@ -1,5 +1,5 @@
import $ from 'jquery'
import omit from 'lodash/omit'
import omit from 'lodash.omit'
import URI from 'urijs'
import humps from 'humps'
import { subscribeChannel } from '../socket'

@ -24,7 +24,24 @@
"https-browserify": "^1.0.0",
"humps": "^2.0.1",
"jquery": "^3.4.0",
"lodash": "^4.17.21",
"lodash.debounce": "^4.0.8",
"lodash.differenceby": "^4.8.0",
"lodash.find": "^4.6.0",
"lodash.first": "^3.0.0",
"lodash.forin": "^4.4.0",
"lodash.get": "^4.4.2",
"lodash.intersectionby": "^4.7.0",
"lodash.isobject": "^3.0.2",
"lodash.keys": "^4.2.0",
"lodash.last": "^3.0.0",
"lodash.map": "^4.6.0",
"lodash.max": "^4.0.1",
"lodash.merge": "^4.6.2",
"lodash.min": "^4.0.1",
"lodash.noop": "^3.0.1",
"lodash.omit": "^4.5.0",
"lodash.rangeright": "^4.2.0",
"lodash.reduce": "^4.6.0",
"luxon": "^2.3.0",
"moment": "^2.29.1",
"nanomorph": "^5.4.0",
@ -11921,6 +11938,61 @@
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
},
"node_modules/lodash.differenceby": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/lodash.differenceby/-/lodash.differenceby-4.8.0.tgz",
"integrity": "sha1-z9WelDU69d5R2l0wLKTr/zP6rFc="
},
"node_modules/lodash.find": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.find/-/lodash.find-4.6.0.tgz",
"integrity": "sha1-ywcE1Hq3F4n/oN6Ll92Sb7iLE7E="
},
"node_modules/lodash.first": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/lodash.first/-/lodash.first-3.0.0.tgz",
"integrity": "sha1-Xa4YDX+BjuZfxbIQsQSnu++YoWo="
},
"node_modules/lodash.forin": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.forin/-/lodash.forin-4.4.0.tgz",
"integrity": "sha1-XT8grlZAEfvog4H32YlJyclRlzE="
},
"node_modules/lodash.get": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
},
"node_modules/lodash.intersectionby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.intersectionby/-/lodash.intersectionby-4.7.0.tgz",
"integrity": "sha1-EvEl5NoAsiKQ/r2htsG2i7klUSU="
},
"node_modules/lodash.isobject": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz",
"integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0="
},
"node_modules/lodash.keys": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.2.0.tgz",
"integrity": "sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU="
},
"node_modules/lodash.last": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/lodash.last/-/lodash.last-3.0.0.tgz",
"integrity": "sha1-JC9mMRLdTG5jcoxgo8kJ0b2tvUw="
},
"node_modules/lodash.map": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz",
"integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM="
},
"node_modules/lodash.max": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.max/-/lodash.max-4.0.1.tgz",
"integrity": "sha1-hzVWbGGLNan3YFILSHrnllivE2o="
},
"node_modules/lodash.memoize": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
@ -11930,8 +12002,32 @@
"node_modules/lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
"dev": true
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
},
"node_modules/lodash.min": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.min/-/lodash.min-4.0.1.tgz",
"integrity": "sha1-SsG5qLr4ttKKaQ1xZRJRDPwUcIw="
},
"node_modules/lodash.noop": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-3.0.1.tgz",
"integrity": "sha1-OBiPTWUKOkdCWEObluxFsyYXEzw="
},
"node_modules/lodash.omit": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz",
"integrity": "sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA="
},
"node_modules/lodash.rangeright": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.rangeright/-/lodash.rangeright-4.2.0.tgz",
"integrity": "sha1-dCrF5C+R9oKiwLaHwpt52TIzkEI="
},
"node_modules/lodash.reduce": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz",
"integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs="
},
"node_modules/lodash.uniq": {
"version": "4.5.0",
@ -27211,6 +27307,61 @@
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
},
"lodash.differenceby": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/lodash.differenceby/-/lodash.differenceby-4.8.0.tgz",
"integrity": "sha1-z9WelDU69d5R2l0wLKTr/zP6rFc="
},
"lodash.find": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.find/-/lodash.find-4.6.0.tgz",
"integrity": "sha1-ywcE1Hq3F4n/oN6Ll92Sb7iLE7E="
},
"lodash.first": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/lodash.first/-/lodash.first-3.0.0.tgz",
"integrity": "sha1-Xa4YDX+BjuZfxbIQsQSnu++YoWo="
},
"lodash.forin": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.forin/-/lodash.forin-4.4.0.tgz",
"integrity": "sha1-XT8grlZAEfvog4H32YlJyclRlzE="
},
"lodash.get": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
},
"lodash.intersectionby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.intersectionby/-/lodash.intersectionby-4.7.0.tgz",
"integrity": "sha1-EvEl5NoAsiKQ/r2htsG2i7klUSU="
},
"lodash.isobject": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz",
"integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0="
},
"lodash.keys": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.2.0.tgz",
"integrity": "sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU="
},
"lodash.last": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/lodash.last/-/lodash.last-3.0.0.tgz",
"integrity": "sha1-JC9mMRLdTG5jcoxgo8kJ0b2tvUw="
},
"lodash.map": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz",
"integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM="
},
"lodash.max": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.max/-/lodash.max-4.0.1.tgz",
"integrity": "sha1-hzVWbGGLNan3YFILSHrnllivE2o="
},
"lodash.memoize": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
@ -27220,8 +27371,32 @@
"lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
"dev": true
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
},
"lodash.min": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.min/-/lodash.min-4.0.1.tgz",
"integrity": "sha1-SsG5qLr4ttKKaQ1xZRJRDPwUcIw="
},
"lodash.noop": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-3.0.1.tgz",
"integrity": "sha1-OBiPTWUKOkdCWEObluxFsyYXEzw="
},
"lodash.omit": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz",
"integrity": "sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA="
},
"lodash.rangeright": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.rangeright/-/lodash.rangeright-4.2.0.tgz",
"integrity": "sha1-dCrF5C+R9oKiwLaHwpt52TIzkEI="
},
"lodash.reduce": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz",
"integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs="
},
"lodash.uniq": {
"version": "4.5.0",

@ -36,7 +36,24 @@
"https-browserify": "^1.0.0",
"humps": "^2.0.1",
"jquery": "^3.4.0",
"lodash": "^4.17.21",
"lodash.debounce": "^4.0.8",
"lodash.differenceby": "^4.8.0",
"lodash.find": "^4.6.0",
"lodash.first": "^3.0.0",
"lodash.forin": "^4.4.0",
"lodash.get": "^4.4.2",
"lodash.intersectionby": "^4.7.0",
"lodash.isobject": "^3.0.2",
"lodash.keys": "^4.2.0",
"lodash.last": "^3.0.0",
"lodash.map": "^4.6.0",
"lodash.max": "^4.0.1",
"lodash.merge": "^4.6.2",
"lodash.min": "^4.0.1",
"lodash.noop": "^3.0.1",
"lodash.omit": "^4.5.0",
"lodash.rangeright": "^4.2.0",
"lodash.reduce": "^4.6.0",
"luxon": "^2.3.0",
"moment": "^2.29.1",
"nanomorph": "^5.4.0",

Loading…
Cancel
Save