refactor: add @babel/helper-validator-option (#12006)

* refactor: add @babel/helper-validator-option

* refactor: simplify validateTopLevelOptions

* perf: the recursive version is not practically fast

* Update packages/babel-helper-validator-option/README.md

Co-authored-by: Brian Ng <bng412@gmail.com>

* Update packages/babel-helper-validator-option/src/validator.js

* fix: incorrect type annotation

* refactor: use babel/helper-option-validator in babel/compat-data

* chore: fix flow types error

* Address review comments

* address review comments

Co-authored-by: Brian Ng <bng412@gmail.com>
This commit is contained in:
Huáng Jùnliàng
2020-09-24 16:23:35 -04:00
committed by GitHub
parent 0d32e3fc36
commit f2da186714
19 changed files with 374 additions and 196 deletions

View File

@@ -358,9 +358,8 @@ __metadata:
"@babel/compat-data": "workspace:^7.10.4"
"@babel/core": "workspace:^7.10.4"
"@babel/helper-plugin-test-runner": "workspace:^7.10.4"
"@babel/helper-validator-option": "workspace:^7.11.4"
browserslist: ^4.12.0
invariant: ^2.2.4
levenary: ^1.1.1
semver: ^5.5.0
peerDependencies:
"@babel/core": ^7.0.0
@@ -794,6 +793,12 @@ __metadata:
languageName: unknown
linkType: soft
"@babel/helper-validator-option@workspace:^7.11.4, @babel/helper-validator-option@workspace:packages/babel-helper-validator-option":
version: 0.0.0-use.local
resolution: "@babel/helper-validator-option@workspace:packages/babel-helper-validator-option"
languageName: unknown
linkType: soft
"@babel/helper-wrap-function@npm:^7.10.4":
version: 7.10.4
resolution: "@babel/helper-wrap-function@npm:7.10.4"
@@ -2957,6 +2962,7 @@ __metadata:
"@babel/helper-module-imports": "workspace:^7.10.4"
"@babel/helper-plugin-test-runner": "workspace:^7.10.4"
"@babel/helper-plugin-utils": "workspace:^7.10.4"
"@babel/helper-validator-option": "workspace:^7.11.4"
"@babel/plugin-proposal-async-generator-functions": "workspace:^7.10.4"
"@babel/plugin-proposal-class-properties": "workspace:^7.10.4"
"@babel/plugin-proposal-dynamic-import": "workspace:^7.10.4"
@@ -3018,8 +3024,6 @@ __metadata:
"@babel/types": "workspace:^7.11.5"
browserslist: ^4.12.0
core-js-compat: ^3.6.2
invariant: ^2.2.2
levenary: ^1.1.1
semver: ^5.5.0
peerDependencies:
"@babel/core": ^7.0.0-0