add showConfig support (#11588)

* draft: showConfig support

* feat: pass through showConfig command options

* update test file

* refactor: add createLogger to makeChainWalker

* serializing dynamic plugin instance

* fix flow errors

* chore: add tests on extended config

* fix: do not print empty presets

* add more test cases

* add windows testcases

* address review comments

* throw error when showConfigPath does not exist

* print reason when showConfig is targetting an ignored file

* remove showConfig: boolean

* refactor: simplify environment flag name

* rename test fixtures

* fix: throw when SHOW_CONFIG_FOR is not a regular file

* cleanup test fixtures

* add test on only

* Update packages/babel-core/src/config/files/configuration.js

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

* address review comments

* update test fixtures

* feat: sort config items in ascending priority

Co-authored-by: Brian Ng <bng412@gmail.com>
This commit is contained in:
Huáng Jùnliàng
2020-07-30 09:24:19 -04:00
committed by GitHub
parent 374a253d0c
commit 164a93945d
57 changed files with 827 additions and 39 deletions

View File

@@ -19,3 +19,8 @@ export const exists = gensync<[string], boolean>({
},
errback: (path, cb) => fs.access(path, undefined, err => cb(null, !err)),
});
export const stat = gensync<[string], *>({
sync: fs.statSync,
errback: fs.stat,
});