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
This commit is contained in:
Michał Pierzchała
2019-03-18 09:25:14 -07:00
committed by Facebook Github Bot
parent fa426cf05f
commit 79be593f27
2 changed files with 10 additions and 10 deletions

View File

@@ -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",

View File

@@ -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"