diff --git a/packages/analytics/package.json b/packages/analytics/package.json index c61b1e619..9e55b5c34 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -8,13 +8,7 @@ "@ezs/store": "2.0.4", "async-each-series": "1.1.0", "fast-sort": "2.1.1", - "lodash.clone": "4.5.0", - "lodash.flatten": "4.4.0", - "lodash.get": "4.4.2", - "lodash.mergewith": "4.6.2", - "lodash.set": "4.3.2", - "lodash.uniq": "4.5.0", - "lodash.unset": "4.5.2", + "lodash": "4.17.21", "make-dir": "3.1.0", "node-object-hash": "2.3.10", "path-exists": "4.0.0", diff --git a/packages/analytics/src/aggregate.js b/packages/analytics/src/aggregate.js index f4a171353..dad9d1a1f 100644 --- a/packages/analytics/src/aggregate.js +++ b/packages/analytics/src/aggregate.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import core from './core'; /** diff --git a/packages/analytics/src/count.js b/packages/analytics/src/count.js index 2f39e9571..2223b596b 100644 --- a/packages/analytics/src/count.js +++ b/packages/analytics/src/count.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import core from './core'; /** * Take `Object` and throw special `Object` like `{id, value}` if key(s) was found diff --git a/packages/analytics/src/distance.js b/packages/analytics/src/distance.js index 06d7b3fce..c91aa91ed 100644 --- a/packages/analytics/src/distance.js +++ b/packages/analytics/src/distance.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import { levenshteinDistance } from './algorithms'; /** diff --git a/packages/analytics/src/distinct.js b/packages/analytics/src/distinct.js index 927172ee9..f55380f38 100644 --- a/packages/analytics/src/distinct.js +++ b/packages/analytics/src/distinct.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import core from './core'; /** * Take `Object` object getting some fields with json path, and do ... diff --git a/packages/analytics/src/distribute.js b/packages/analytics/src/distribute.js index 5443b8105..3ba997f2b 100644 --- a/packages/analytics/src/distribute.js +++ b/packages/analytics/src/distribute.js @@ -1,6 +1,6 @@ -import get from 'lodash.get'; -import core from './core'; +import { get } from 'lodash'; import { createStore } from '@ezs/store'; +import core from './core'; /** * Take `Object` like { id, value } and throw a serie of number value diff --git a/packages/analytics/src/drop.js b/packages/analytics/src/drop.js index c8d19291f..8bdf82fd3 100644 --- a/packages/analytics/src/drop.js +++ b/packages/analytics/src/drop.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; /** * Take `Object` and throw the same object only if there the value of the select field is not equals than a value diff --git a/packages/analytics/src/exploding.js b/packages/analytics/src/exploding.js index 353173c6a..6de240a88 100644 --- a/packages/analytics/src/exploding.js +++ b/packages/analytics/src/exploding.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import core from './core'; /** * Take `Object` and take values with [value] path (must be an array) diff --git a/packages/analytics/src/filter.js b/packages/analytics/src/filter.js index c57b89c2a..fcda1b9c5 100644 --- a/packages/analytics/src/filter.js +++ b/packages/analytics/src/filter.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; /** * Take `Object` and throw the same object only if there the value of the select field is equals than a value diff --git a/packages/analytics/src/graph.js b/packages/analytics/src/graph.js index 6f1b44b56..2cb5b9235 100644 --- a/packages/analytics/src/graph.js +++ b/packages/analytics/src/graph.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import core from './core'; /** diff --git a/packages/analytics/src/greater.js b/packages/analytics/src/greater.js index d15721303..9caca0c8f 100644 --- a/packages/analytics/src/greater.js +++ b/packages/analytics/src/greater.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; /** * Take `Object` and throw the same object only if the value of the selected diff --git a/packages/analytics/src/groupingByEquality.js b/packages/analytics/src/groupingByEquality.js index 8045df80b..9892d8dcb 100644 --- a/packages/analytics/src/groupingByEquality.js +++ b/packages/analytics/src/groupingByEquality.js @@ -1,5 +1,4 @@ -import get from 'lodash.get'; -import uniq from 'lodash.uniq'; +import { get, uniq } from 'lodash'; import core from './core'; const equalTo = (id) => (item) => item.id.some((key) => key === id); diff --git a/packages/analytics/src/groupingByHamming.js b/packages/analytics/src/groupingByHamming.js index ca05e6e5f..970913372 100644 --- a/packages/analytics/src/groupingByHamming.js +++ b/packages/analytics/src/groupingByHamming.js @@ -1,5 +1,4 @@ -import get from 'lodash.get'; -import uniq from 'lodash.uniq'; +import { get, uniq } from 'lodash'; import core from './core'; import { hammingDistance } from './algorithms'; diff --git a/packages/analytics/src/groupingByLevenshtein.js b/packages/analytics/src/groupingByLevenshtein.js index 6fba5013a..6e263fb4a 100644 --- a/packages/analytics/src/groupingByLevenshtein.js +++ b/packages/analytics/src/groupingByLevenshtein.js @@ -1,5 +1,4 @@ -import get from 'lodash.get'; -import uniq from 'lodash.uniq'; +import { get, uniq } from 'lodash'; import core from './core'; import { levenshteinDistance } from './algorithms'; diff --git a/packages/analytics/src/groupingByModulo.js b/packages/analytics/src/groupingByModulo.js index 8978cab9d..373a01cc3 100644 --- a/packages/analytics/src/groupingByModulo.js +++ b/packages/analytics/src/groupingByModulo.js @@ -1,5 +1,4 @@ -import get from 'lodash.get'; -import uniq from 'lodash.uniq'; +import { get, uniq } from 'lodash'; import core from './core'; const mod = (x, m) => x - (x % m); diff --git a/packages/analytics/src/less.js b/packages/analytics/src/less.js index 0a13f31bf..22c6e4374 100644 --- a/packages/analytics/src/less.js +++ b/packages/analytics/src/less.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; /** * Take `Object` and throw the same object only if the value of the selected diff --git a/packages/analytics/src/maximizing.js b/packages/analytics/src/maximizing.js index b2c4b375c..82fbaca95 100644 --- a/packages/analytics/src/maximizing.js +++ b/packages/analytics/src/maximizing.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import core from './core'; /** * Take special `Object` like `{id, value}` and replace `value` with the max of `value`s diff --git a/packages/analytics/src/merging.js b/packages/analytics/src/merging.js index c13d3bc6c..d794137e2 100644 --- a/packages/analytics/src/merging.js +++ b/packages/analytics/src/merging.js @@ -1,5 +1,4 @@ -import get from 'lodash.get'; -import mergeWith from 'lodash.mergewith'; +import { get, mergeWith } from 'lodash'; import core from './core'; diff --git a/packages/analytics/src/minimizing.js b/packages/analytics/src/minimizing.js index 4acf7bf6c..6f710b062 100644 --- a/packages/analytics/src/minimizing.js +++ b/packages/analytics/src/minimizing.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import core from './core'; /** diff --git a/packages/analytics/src/mulitply.js b/packages/analytics/src/mulitply.js index c6257ee8d..b5b198cc9 100644 --- a/packages/analytics/src/mulitply.js +++ b/packages/analytics/src/mulitply.js @@ -1,5 +1,4 @@ -import set from 'lodash.set'; -import clone from 'lodash.clone'; +import { set, clone } from 'lodash'; /** * Take `Object` and throw the same object only if there the value of the select field is equals than a value diff --git a/packages/analytics/src/output.js b/packages/analytics/src/output.js index cdfa59cf2..2e3de1ce4 100644 --- a/packages/analytics/src/output.js +++ b/packages/analytics/src/output.js @@ -1,6 +1,4 @@ -import get from 'lodash.get'; -import unset from 'lodash.unset'; - +import { get, unset } from 'lodash'; /** * Pair function see documentation at the end. * This part of the doc is used for jsdoc typing diff --git a/packages/analytics/src/pair.js b/packages/analytics/src/pair.js index 2a5859f99..1f30a71f3 100644 --- a/packages/analytics/src/pair.js +++ b/packages/analytics/src/pair.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import core from './core'; /** diff --git a/packages/analytics/src/pluck.js b/packages/analytics/src/pluck.js index 88d487d5c..198846142 100644 --- a/packages/analytics/src/pluck.js +++ b/packages/analytics/src/pluck.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import core from './core'; /** diff --git a/packages/analytics/src/reducing.js b/packages/analytics/src/reducing.js index c325c62ea..d18728cb8 100644 --- a/packages/analytics/src/reducing.js +++ b/packages/analytics/src/reducing.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import { createStore } from '@ezs/store'; /** diff --git a/packages/analytics/src/segment.js b/packages/analytics/src/segment.js index 4024299fe..c04f413cf 100644 --- a/packages/analytics/src/segment.js +++ b/packages/analytics/src/segment.js @@ -1,5 +1,4 @@ -import get from 'lodash.get'; -import flatten from 'lodash.flatten'; +import { get, flatten } from 'lodash'; import core from './core'; /** diff --git a/packages/analytics/src/sort.js b/packages/analytics/src/sort.js index b05c71c15..4580e95b6 100644 --- a/packages/analytics/src/sort.js +++ b/packages/analytics/src/sort.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import fastsort from 'fast-sort'; import { createStore } from '@ezs/store'; import { normalize } from './tune'; diff --git a/packages/analytics/src/statistics.js b/packages/analytics/src/statistics.js index 35a7ec2ab..6e2e589b3 100644 --- a/packages/analytics/src/statistics.js +++ b/packages/analytics/src/statistics.js @@ -1,6 +1,5 @@ import hasher from 'node-object-hash'; -import get from 'lodash.get'; -import set from 'lodash.set'; +import { get, set } from 'lodash'; import { createStore } from '@ezs/store'; const hashCoerce = hasher({ diff --git a/packages/analytics/src/summing.js b/packages/analytics/src/summing.js index 128adf8d3..9fca015cc 100644 --- a/packages/analytics/src/summing.js +++ b/packages/analytics/src/summing.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import core from './core'; /** diff --git a/packages/analytics/src/tune.js b/packages/analytics/src/tune.js index da8035c82..3c687676c 100644 --- a/packages/analytics/src/tune.js +++ b/packages/analytics/src/tune.js @@ -1,5 +1,4 @@ -import get from 'lodash.get'; -import clone from 'lodash.clone'; +import { get, clone } from 'lodash'; import { levenshteinDistance } from './algorithms'; import core from './core'; diff --git a/packages/analytics/src/value.js b/packages/analytics/src/value.js index ccc8d6662..44ac843b7 100644 --- a/packages/analytics/src/value.js +++ b/packages/analytics/src/value.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; /** * Value function see documentation at the end. diff --git a/packages/ark/package.json b/packages/ark/package.json index ffaa0c701..611568e8c 100644 --- a/packages/ark/package.json +++ b/packages/ark/package.json @@ -9,7 +9,7 @@ "inist-ark": "2.1.3", "leveldown": "6.1.0", "levelup": "5.1.1", - "lodash.set": "4.3.2" + "lodash": "4.17.21" }, "directories": { "test": "test" diff --git a/packages/ark/src/generateARK.js b/packages/ark/src/generateARK.js index 8baf555b9..c6ab85f4a 100644 --- a/packages/ark/src/generateARK.js +++ b/packages/ark/src/generateARK.js @@ -1,4 +1,4 @@ -import set from 'lodash.set'; +import { set } from 'lodash'; import leveldown from 'leveldown'; import levelup from 'levelup'; import InistArk from 'inist-ark'; diff --git a/packages/basics/package.json b/packages/basics/package.json index 048cc4f6c..6d70ebaed 100644 --- a/packages/basics/package.json +++ b/packages/basics/package.json @@ -17,13 +17,7 @@ "get-stream": "6.0.1", "higher-path": "1.0.0", "inflection": "2.0.1", - "lodash.escaperegexp": "4.1.2", - "lodash.get": "4.4.2", - "lodash.mapkeys": "4.6.0", - "lodash.mapvalues": "4.6.0", - "lodash.merge": "4.6.2", - "lodash.set": "4.3.2", - "lodash.zipobject": "4.1.3", + "lodash": "4.17.21", "make-dir": "4.0.0", "micromatch": "4.0.4", "node-abort-controller": "1.1.0", diff --git a/packages/basics/src/obj-namespaces.js b/packages/basics/src/obj-namespaces.js index 135b4be13..36092bb90 100644 --- a/packages/basics/src/obj-namespaces.js +++ b/packages/basics/src/obj-namespaces.js @@ -1,7 +1,4 @@ -import zipObject from 'lodash.zipobject'; -import escapeRegExp from 'lodash.escaperegexp'; -import mapKeys from 'lodash.mapkeys'; -import mapValues from 'lodash.mapvalues'; +import { zipObject, escapeRegExp, mapKeys, mapValues } from 'lodash'; /** * Take `Object` and throw the same object, all keys parsed to replace namespaces with their prefixes diff --git a/packages/basics/src/tar-dump.js b/packages/basics/src/tar-dump.js index e5086c8ff..a4b888899 100644 --- a/packages/basics/src/tar-dump.js +++ b/packages/basics/src/tar-dump.js @@ -3,7 +3,7 @@ import { promisify } from 'util'; import { readFile } from 'fs'; import tar from 'tar-stream'; import { createGzip } from 'zlib'; -import merge from 'lodash.merge'; +import { merge } from 'lodash'; // Avoid importing from fs/promise to be compatible with node 12 const readFilePromise = promisify(readFile); diff --git a/packages/basics/src/txt-inflection.js b/packages/basics/src/txt-inflection.js index 9b70fcf09..a7d2881a5 100644 --- a/packages/basics/src/txt-inflection.js +++ b/packages/basics/src/txt-inflection.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import { transform } from 'inflection'; diff --git a/packages/basics/src/txt-sentences.js b/packages/basics/src/txt-sentences.js index 1218dd057..5b6b65314 100644 --- a/packages/basics/src/txt-sentences.js +++ b/packages/basics/src/txt-sentences.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; const UPPER_LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; const SENTENCE_INIT = ' '; diff --git a/packages/basics/src/url-fetch.js b/packages/basics/src/url-fetch.js index d92bc4343..45a87687d 100644 --- a/packages/basics/src/url-fetch.js +++ b/packages/basics/src/url-fetch.js @@ -1,6 +1,5 @@ import debug from 'debug'; -import get from 'lodash.get'; -import set from 'lodash.set'; +import { get, set } from 'lodash'; import AbortController from 'node-abort-controller'; import parseHeaders from 'parse-headers'; import retry from 'async-retry'; diff --git a/packages/basics/src/url-request.js b/packages/basics/src/url-request.js index d1450f9e8..9b78338c9 100644 --- a/packages/basics/src/url-request.js +++ b/packages/basics/src/url-request.js @@ -1,4 +1,4 @@ -import set from 'lodash.set'; +import { set } from 'lodash'; import debug from 'debug'; import { URL, URLSearchParams } from 'url'; import AbortController from 'node-abort-controller'; diff --git a/packages/conditor/package.json b/packages/conditor/package.json index 9ab7f206e..d8999b646 100644 --- a/packages/conditor/package.json +++ b/packages/conditor/package.json @@ -19,7 +19,7 @@ "fast-xml-parser": "4.2.5", "fetch-with-proxy": "3.0.1", "isomorphic-fetch": "2.2.1", - "lodash.get": "^4.4.2", + "lodash": "4.17.21", "node-abort-controller": "1.1.0", "progress": "2.0.3", "qs": "6.10.3", diff --git a/packages/conditor/src/wos-fetch.js b/packages/conditor/src/wos-fetch.js index f17c7ccb8..630a3f7b2 100644 --- a/packages/conditor/src/wos-fetch.js +++ b/packages/conditor/src/wos-fetch.js @@ -2,7 +2,7 @@ import debug from 'debug'; import { URL, URLSearchParams } from 'url'; import AbortController from 'node-abort-controller'; -import get from 'lodash.get'; +import { get } from 'lodash'; import retry from 'async-retry'; import fetch from 'fetch-with-proxy'; import writeTo from 'stream-write'; diff --git a/packages/libpostal/package.json b/packages/libpostal/package.json index f87aee4d4..deda5f634 100755 --- a/packages/libpostal/package.json +++ b/packages/libpostal/package.json @@ -5,9 +5,7 @@ "author": "Nicolas Thouvenin ", "bugs": "https://github.com/Inist-CNRS/ezs/issues", "dependencies": { - "lodash.clone": "4.5.0", - "lodash.get": "4.4.2", - "lodash.set": "4.3.2" + "lodash": "4.17.21" }, "homepage": "https://github.com/Inist-CNRS/ezs/tree/master/packages/libpostal#readme", "keywords": [ diff --git a/packages/libpostal/src/expand-address-with.js b/packages/libpostal/src/expand-address-with.js index 2b8cc2298..fd1f8512b 100644 --- a/packages/libpostal/src/expand-address-with.js +++ b/packages/libpostal/src/expand-address-with.js @@ -1,7 +1,5 @@ import postal from '@cymen/node-postal'; -import get from 'lodash.get'; -import set from 'lodash.set'; -import clone from 'lodash.clone'; +import { get, set, clone } from 'lodash'; const expand = (input) => ({ id: input, diff --git a/packages/libpostal/src/parse-address-with.js b/packages/libpostal/src/parse-address-with.js index 2d9f3b597..e5c7e3103 100644 --- a/packages/libpostal/src/parse-address-with.js +++ b/packages/libpostal/src/parse-address-with.js @@ -1,7 +1,5 @@ import postal from '@cymen/node-postal'; -import get from 'lodash.get'; -import set from 'lodash.set'; -import clone from 'lodash.clone'; +import { get, set, clone } from 'lodash'; const parse = (input) => ({ id: input, diff --git a/packages/loterre/package.json b/packages/loterre/package.json index 340cb3855..db5ce6874 100644 --- a/packages/loterre/package.json +++ b/packages/loterre/package.json @@ -6,9 +6,7 @@ "bugs": "https://github.com/Inist-CNRS/ezs/issues", "dependencies": { "@ezs/store": "2.0.4", - "lodash.get": "4.4.2", - "lodash.has": "4.5.2", - "lodash.set": "4.3.2" + "lodash": "4.17.21" }, "directories": { "test": "test" diff --git a/packages/loterre/src/skos-hierarchy.js b/packages/loterre/src/skos-hierarchy.js index 7904d9ce9..da09226bd 100644 --- a/packages/loterre/src/skos-hierarchy.js +++ b/packages/loterre/src/skos-hierarchy.js @@ -1,7 +1,5 @@ import { createStore } from '@ezs/store'; -import has from 'lodash.has'; -import get from 'lodash.get'; -import set from 'lodash.set'; +import { has, get } from 'lodash'; /** diff --git a/packages/loterre/src/skos-pathenum.js b/packages/loterre/src/skos-pathenum.js index 829e2206e..28e248aaf 100644 --- a/packages/loterre/src/skos-pathenum.js +++ b/packages/loterre/src/skos-pathenum.js @@ -1,7 +1,5 @@ import { createStore } from '@ezs/store'; -import has from 'lodash.has'; -import get from 'lodash.get'; -import set from 'lodash.set'; +import { has, get, set } from 'lodash'; /** * @name getBroaderOrNarrowerLst diff --git a/packages/loterre/src/skos-to-gexf.js b/packages/loterre/src/skos-to-gexf.js index 43b8dbc16..5f57a4be1 100644 --- a/packages/loterre/src/skos-to-gexf.js +++ b/packages/loterre/src/skos-to-gexf.js @@ -1,8 +1,6 @@ /* istanbul ignore file */ import { createStore } from '@ezs/store'; -import has from 'lodash.has'; -import get from 'lodash.get'; -import set from 'lodash.set'; +import { has, get } from 'lodash'; /** diff --git a/packages/spawn/package.json b/packages/spawn/package.json index e18b1c58e..f6cb3a1c0 100644 --- a/packages/spawn/package.json +++ b/packages/spawn/package.json @@ -5,9 +5,6 @@ "author": "Nicolas Thouvenin ", "bugs": "https://github.com/Inist-CNRS/ezs/issues", "dependencies": { - "lodash.clone": "4.5.0", - "lodash.get": "4.4.2", - "lodash.set": "4.3.2", "semver": "7.5.2", "stream-iterate": "1.2.0" }, diff --git a/packages/storage/package.json b/packages/storage/package.json index 0641644d8..dd9ace669 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -6,8 +6,7 @@ "bugs": "https://github.com/Inist-CNRS/ezs/issues", "dependencies": { "cacache": "^17.1.3", - "lodash.get": "4.4.2", - "lodash.set": "^4.3.2", + "lodash": "4.17.21", "lru-cache": "5.1.1", "make-dir": "3.1.0", "path-exists": "4.0.0" diff --git a/packages/storage/src/load.js b/packages/storage/src/load.js index 022b129ef..a6be298a5 100644 --- a/packages/storage/src/load.js +++ b/packages/storage/src/load.js @@ -1,5 +1,4 @@ -import get from 'lodash.get'; -import set from 'lodash.set'; +import { get, set } from 'lodash'; import store from './store'; /** diff --git a/packages/storage/src/save.js b/packages/storage/src/save.js index 534a7ae3b..77427ee3b 100644 --- a/packages/storage/src/save.js +++ b/packages/storage/src/save.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import store from './store'; /** diff --git a/packages/strings/package.json b/packages/strings/package.json index cbd4c4193..1a67ce9f5 100644 --- a/packages/strings/package.json +++ b/packages/strings/package.json @@ -32,8 +32,7 @@ }, "dependencies": { "inflection": "2.0.1", - "lodash.get": "4.4.2", - "lodash.set": "4.3.2" + "lodash": "4.17.21" }, "scripts": { "build": "babel src --out-dir lib", diff --git a/packages/strings/src/decode.js b/packages/strings/src/decode.js index fb63a998a..64e0e1987 100644 --- a/packages/strings/src/decode.js +++ b/packages/strings/src/decode.js @@ -1,5 +1,4 @@ -import get from 'lodash.get'; -import set from 'lodash.set'; +import { get, set } from 'lodash'; /** * Decodes a given string using a provided mapping, replacing strings that diff --git a/packages/strings/src/encode.js b/packages/strings/src/encode.js index 5564841b1..4c28504e1 100644 --- a/packages/strings/src/encode.js +++ b/packages/strings/src/encode.js @@ -1,5 +1,4 @@ -import get from 'lodash.get'; -import set from 'lodash.set'; +import { get, set } from 'lodash'; /** * Encodes a given string using a provided mapping, replacing characters that diff --git a/packages/strings/src/inflection.js b/packages/strings/src/inflection.js index e8d7a14cd..d2754dd0d 100644 --- a/packages/strings/src/inflection.js +++ b/packages/strings/src/inflection.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import { transform } from 'inflection'; const transformer = (transformations) => (str) => diff --git a/packages/strings/src/sentences.js b/packages/strings/src/sentences.js index a044ff852..a90b38ed8 100644 --- a/packages/strings/src/sentences.js +++ b/packages/strings/src/sentences.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; const UPPER_LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; const SENTENCE_INIT = ' '; diff --git a/packages/transformers/package.json b/packages/transformers/package.json index 471109e87..a643c845e 100644 --- a/packages/transformers/package.json +++ b/packages/transformers/package.json @@ -6,9 +6,7 @@ "bugs": "https://github.com/Inist-CNRS/ezs/issues", "dependencies": { "json-6": "1.0.4", - "lodash.flatten": "4.4.0", - "lodash.get": "4.4.2", - "lodash.uniq": "4.5.0", + "lodash": "4.17.21", "sprintf-js": "1.1.2" }, "directories": { diff --git a/packages/transformers/src/operations/GET.js b/packages/transformers/src/operations/GET.js index 8a4edca59..4310a0a85 100644 --- a/packages/transformers/src/operations/GET.js +++ b/packages/transformers/src/operations/GET.js @@ -1,5 +1,4 @@ -import _get from 'lodash.get'; -import _flatten from 'lodash.flatten'; +import { get as _get, flatten as _flatten } from 'lodash'; import { transformerWithArg } from './transformer'; export const get = (value, path) => { diff --git a/packages/transformers/src/operations/SELECT.js b/packages/transformers/src/operations/SELECT.js index 2290c432f..0db051312 100644 --- a/packages/transformers/src/operations/SELECT.js +++ b/packages/transformers/src/operations/SELECT.js @@ -1,4 +1,4 @@ -import get from 'lodash.get'; +import { get } from 'lodash'; import { rawTransformerWithArg } from './transformer'; export const select = (value, path) => { diff --git a/packages/transformers/src/operations/UNIQ.js b/packages/transformers/src/operations/UNIQ.js index 1d54387a1..c29fe5e3a 100644 --- a/packages/transformers/src/operations/UNIQ.js +++ b/packages/transformers/src/operations/UNIQ.js @@ -1,4 +1,4 @@ -import uniq from 'lodash.uniq'; +import { uniq } from 'lodash'; export const uniqArray = value => { if (value === null || typeof value === 'undefined') { diff --git a/yarn.lock b/yarn.lock index 852ded58d..61091236e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4858,7 +4858,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.3: +debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -8333,11 +8333,6 @@ lodash._reinterpolate@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== -lodash.clone@4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" - integrity sha512-GhrVeweiTD6uTmmn5hV/lzgCQhccwReIVRLHp7LT4SopOjqEZ5BbX8b5WWEtAKasjmy8hR7ZPwsYlxRCku5odg== - lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -8353,26 +8348,11 @@ lodash.difference@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" integrity sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA== -lodash.escaperegexp@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" - integrity sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw== - -lodash.flatten@4.4.0, lodash.flatten@^4.4.0: +lodash.flatten@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== -lodash.get@4.4.2, lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== - -lodash.has@4.5.2: - version "4.5.2" - resolved "https://registry.yarnpkg.com/lodash.has/-/lodash.has-4.5.2.tgz#d19f4dc1095058cccbe2b0cdf4ee0fe4aa37c862" - integrity sha512-rnYUdIo6xRCJnQmbVFEwcxF144erlD+M3YcJUVesflU9paQaE8p+fJDcIQrlMYbxoANFL+AB9hZrzSBBk5PL+g== - lodash.ismatch@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" @@ -8383,27 +8363,7 @@ lodash.isplainobject@^4.0.6: resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== -lodash.mapkeys@4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.mapkeys/-/lodash.mapkeys-4.6.0.tgz#df2cfa231d7c57c7a8ad003abdad5d73d3ea5195" - integrity sha512-0Al+hxpYvONWtg+ZqHpa/GaVzxuN3V7Xeo2p+bY06EaK/n+Y9R7nBePPN2o1LxmL0TWQSwP8LYZ008/hc9JzhA== - -lodash.mapvalues@4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" - integrity sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ== - -lodash.merge@4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash.mergewith@4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" - integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== - -lodash.set@4.3.2, lodash.set@^4.3.2: +lodash.set@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" integrity sha512-4hNPN5jlm/N/HLMCO43v8BXKq9Z7QdAGc/VGrRD61w8gN9g/6jF9A4L1pbUgBLCffi0w9VsXfTOij5x8iTyFvg== @@ -8433,21 +8393,6 @@ lodash.union@^4.6.0: resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" integrity sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw== -lodash.uniq@4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== - -lodash.unset@4.5.2: - version "4.5.2" - resolved "https://registry.yarnpkg.com/lodash.unset/-/lodash.unset-4.5.2.tgz#370d1d3e85b72a7e1b0cdf2d272121306f23e4ed" - integrity sha512-bwKX88k2JhCV9D1vtE8+naDKlLiGrSmf8zi/Y9ivFHwbmRfA8RxS/aVJ+sIht2XOwqoNr4xUPUkGZpc1sHFEKg== - -lodash.zipobject@4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/lodash.zipobject/-/lodash.zipobject-4.1.3.tgz#b399f5aba8ff62a746f6979bf20b214f964dbef8" - integrity sha512-A9SzX4hMKWS25MyalwcOnNoplyHbkNVsjidhTp8ru0Sj23wY9GWBKS8gAIGDSAqeWjIjvE4KBEl24XXAs+v4wQ== - lodash@4.17.21, lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"