From bc66cd6f3b5870c17632a21d3a1caef10d4f645c Mon Sep 17 00:00:00 2001 From: Burke Davison Date: Wed, 24 Jul 2019 15:51:58 -0700 Subject: [PATCH 1/3] Use declared lodash dependencies. Resolve build failures for dependent projects using Yarn PnP. --- src/components/Form.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Form.js b/src/components/Form.js index 9201bcd62f..b9a6cb7dc9 100644 --- a/src/components/Form.js +++ b/src/components/Form.js @@ -1,7 +1,7 @@ import React, { Component } from "react"; import PropTypes from "prop-types"; -import _pick from "lodash/pick"; -import _get from "lodash/get"; +import _pick from "lodash.pick"; +import _get from "lodash.get"; import { default as DefaultErrorList } from "./ErrorList"; import { From affef2623b9534338dd565fd8a91ba10eeea75e8 Mon Sep 17 00:00:00 2001 From: burke davison Date: Wed, 24 Jul 2019 22:14:55 -0700 Subject: [PATCH 2/3] Use cherry-picked lodash requires. --- package-lock.json | 22 +++------------------- package.json | 4 +--- src/components/Form.js | 4 ++-- src/validate.js | 2 +- 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 883215effd..bc6c580b45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7565,10 +7565,9 @@ } }, "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", - "dev": true + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, "lodash._baseassign": { "version": "3.2.0", @@ -7672,11 +7671,6 @@ "lodash._root": "^3.0.0" } }, - "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.isarguments": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", @@ -7706,22 +7700,12 @@ "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, - "lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" - }, "lodash.restparam": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", "dev": true }, - "lodash.topath": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz", - "integrity": "sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=" - }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", diff --git a/package.json b/package.json index 568bf5ea33..aee557e011 100644 --- a/package.json +++ b/package.json @@ -46,9 +46,7 @@ "@babel/runtime-corejs2": "^7.4.5", "ajv": "^6.7.0", "core-js": "^2.5.7", - "lodash.get": "^4.4.2", - "lodash.pick": "^4.4.0", - "lodash.topath": "^4.5.2", + "lodash": "^4.17.15", "prop-types": "^15.5.8", "react-is": "^16.8.4", "react-lifecycles-compat": "^3.0.4", diff --git a/src/components/Form.js b/src/components/Form.js index b9a6cb7dc9..9201bcd62f 100644 --- a/src/components/Form.js +++ b/src/components/Form.js @@ -1,7 +1,7 @@ import React, { Component } from "react"; import PropTypes from "prop-types"; -import _pick from "lodash.pick"; -import _get from "lodash.get"; +import _pick from "lodash/pick"; +import _get from "lodash/get"; import { default as DefaultErrorList } from "./ErrorList"; import { diff --git a/src/validate.js b/src/validate.js index 526bceef93..09201440c2 100644 --- a/src/validate.js +++ b/src/validate.js @@ -1,4 +1,4 @@ -import toPath from "lodash.topath"; +import toPath from "lodash/topath"; import Ajv from "ajv"; let ajv = createAjvInstance(); import { deepEquals } from "./utils"; From 2f1bd2e620a0abe293a0050e39bac17bdbf96b00 Mon Sep 17 00:00:00 2001 From: burke davison Date: Wed, 24 Jul 2019 22:23:37 -0700 Subject: [PATCH 3/3] Correct lodash/toPath require. --- src/validate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validate.js b/src/validate.js index 09201440c2..8454e93e90 100644 --- a/src/validate.js +++ b/src/validate.js @@ -1,4 +1,4 @@ -import toPath from "lodash/topath"; +import toPath from "lodash/toPath"; import Ajv from "ajv"; let ajv = createAjvInstance(); import { deepEquals } from "./utils";