From 79be593f27bfcfa2fb66c5085f52ce0a94736362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 18 Mar 2019 09:25:14 -0700 Subject: [PATCH] feat: validate config with jest-validate (#205) Summary: **Summary** This PR introduces validation for the new `metro-config`. For now I'm keen on only validating new config, because I can see there's yet unused `convertConfig` which, I guess, defeats the purpose. Let me know otherwise. This is still work in progress, as I need to fix some stuff upstream (e.g. recursive object validation and pretty-printing). Just letting you know I'm working on it :) **Test plan** Added a test. cc CompuIves cpojer Pull Request resolved: https://github.com/facebook/metro/pull/205 Differential Revision: D14501222 Pulled By: cpojer fbshipit-source-id: 0ab8f3ad14d6f33690d5f57fd1e7487f3a4a8c71 --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 159be8798eb..d5e37d1d096 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "metro-react-native-babel-transformer": "0.52.0", "mkdirp": "^0.5.1", "nullthrows": "^1.1.0", - "pretty-format": "24.0.0-alpha.6", + "pretty-format": "24.5.0", "promise": "^7.1.1", "prop-types": "^15.5.8", "react-devtools-core": "^3.6.0", diff --git a/yarn.lock b/yarn.lock index 45d2676c827..7e42e5bef2b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5588,15 +5588,7 @@ pretty-format@24.0.0-alpha.6: ansi-regex "^4.0.0" ansi-styles "^3.2.0" -pretty-format@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.0.0.tgz#cb6599fd73ac088e37ed682f61291e4678f48591" - integrity sha512-LszZaKG665djUcqg5ZQq+XzezHLKrxsA86ZABTozp+oNhkdqa+tG2dX4qa6ERl5c/sRDrAa3lHmwnvKoP+OG/g== - dependencies: - ansi-regex "^4.0.0" - ansi-styles "^3.2.0" - -pretty-format@^24.5.0: +pretty-format@24.5.0, pretty-format@^24.5.0: version "24.5.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.5.0.tgz#cc69a0281a62cd7242633fc135d6930cd889822d" integrity sha512-/3RuSghukCf8Riu5Ncve0iI+BzVkbRU5EeUoArKARZobREycuH5O4waxvaNIloEXdb0qwgmEAed5vTpX1HNROQ== @@ -5606,6 +5598,14 @@ pretty-format@^24.5.0: ansi-styles "^3.2.0" react-is "^16.8.4" +pretty-format@^24.0.0: + version "24.0.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.0.0.tgz#cb6599fd73ac088e37ed682f61291e4678f48591" + integrity sha512-LszZaKG665djUcqg5ZQq+XzezHLKrxsA86ZABTozp+oNhkdqa+tG2dX4qa6ERl5c/sRDrAa3lHmwnvKoP+OG/g== + dependencies: + ansi-regex "^4.0.0" + ansi-styles "^3.2.0" + private@^0.1.6, private@~0.1.5: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"