* api: remove the version parameter of getSupportInfo
* add changelog entry
* remove mapDeprecated
* Update pr-7620.md
* remove the first parameter completely
* Update api.md
* add default value for opts just to be on the safe side
* globby@10 update (with fast-glob implementation)
with some minor test snapshot updates in tests_integration since
fast-glob does not always keep the same file order as node-glob
* with no `nodir: true` option
use of no `nodir: true` option was introduced in 639c52388
but it does not seem to be needed with some newer
versions of globby
* with workaround for fast-glob on Windows
ref: https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: Christopher J. Brody <chris@brody.consulting>
* Revert "with no `nodir: true` option"
This reverts commit f7297cbceebc3d939bca0d90a904a1d3fea45345.
* revert updates to snapshots in tests_integration
* sort the file paths from globby
and update some snapshots in tests_integration
* Update build scripts
* replace `util.promisify` with `pify`
* style
* typo
* add pify to dict
* check index.js
* debug
* exclude `transform-async-to-generator`
* fix `bin-prettier.js`
* restore disabled script
* try depth:1
* remove depth add `./`
* sort dir
* disable expandDirectories
ref: https://github.com/sindresorhus/globby/blob/master/index.js#L95
* use absolute path
* remove sort()
* sort dir
* use `alphasorti` compare
* remove './'
* fix `findPluginsInNodeModules`
* fix `findPluginsInNodeModules`
* restore snap
* fix `findPluginsInNodeModules`
* return early
* code style
* sort
* update snap
* try mem
* mem `loadPlugins` function
* fix
* glob directories instead of package.json
* use deep
* remove mem
* improve speed
* support dot pattern
* expand directories test
* restore import order
* remove snap
* update test
* restore `findPluginsInNodeModules`
* Update `globby`
* `fast-glob` beta
* Restore logic
* Add tests for `globby` update
* Fix tests
* Remove option with default value
* Try new beta version of `fast-glob`
* Restore error info
* Add `path.sep` check
Prior to this change, the CLI would resolve the config for a file before
checking it against the ignored list. If the config was invalid, the CLI
would report a failure.
This change relocates the config-resolution phase until after the file
is confirmed to not be ignored.
- `--debug-benchmark` uses `benchmark` module to produce statistically significant time measurements.
- `--debug-repeat` uses a naive loop and measures just the average run time, but useful for profiling to highlight hot functions.
* Don't default parser to babylon
* Different default values according to version
* Fix error logging
* Add tests specifically for parser inference
* Add another test case
* Add API test
* Implement prettier.getFileInfo() method and --file-info CLI option
* Add empty line between functions in index.js
* Support --plugin-search-dirs / pluginSearchDirs() in --file-info / getFileInfo()
* Address review comments by @ikatyang
* Fix plugin API in globally installed Prettier and introduce optional --plugin-search-dir
* Use find-parent-dir instead of find-up and test autoloading (with mocked fn)
* Add two test cases where --plugin-search-dir is not .
* Do not mutate pluginSearchDirs argument in load-plugins.js
* Do not test automatic plugin resolution as mocking of "find-parent-dir" does not work due to rollup
* Document --plugin-search-dir / pluginSearchDirs and improve spacing
* Address @ikatyang's review comments
* Fix require path for third-party
* Undo alphabetic sorting of third-party scripts
* refactor(cli): defer default value applying
* Allow plugins to override default options
* Move "defaultOptions" to top level of plugin
* Simplify implementation
* Attach plugin name
* Add pluginOptions to cli help
* Update snapshots
* Code review (immutable style)
* Add test for help output
* Use snapshot test, fix Object.assign
* Refactor to immutable style
* Add test case for automatic plugin resolution
* Add tests for applying and overriding default opts
* Remove "since" option
* Only set defaults for CLI args when no pluginDefaults are present
* Revert workaround, rebase to #4045
* Add basic documentation for `options` and `defaultOptions`