Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
bb042d8
globby@10 update (with fast-glob implementation)
Oct 29, 2019
f7297cb
with no `nodir: true` option
Oct 29, 2019
5c898f8
with workaround for fast-glob on Windows
Oct 30, 2019
5997f1f
Revert "with no `nodir: true` option"
Oct 30, 2019
8a94615
revert updates to snapshots in tests_integration
Oct 30, 2019
cefeb53
sort the file paths from globby
Oct 30, 2019
e21e2aa
Update build scripts
fisker Oct 30, 2019
bbbcfdd
replace `util.promisify` with `pify`
fisker Oct 30, 2019
01ddc44
style
fisker Oct 30, 2019
4869bbc
typo
fisker Oct 30, 2019
21fad4b
add pify to dict
fisker Oct 30, 2019
f78a602
check index.js
fisker Oct 30, 2019
0b3b420
debug
fisker Oct 30, 2019
e6b8e41
exclude `transform-async-to-generator`
fisker Oct 30, 2019
5c2c5f1
fix `bin-prettier.js`
fisker Oct 30, 2019
1cc3d9b
restore disabled script
fisker Oct 30, 2019
d12d1c0
try depth:1
fisker Oct 30, 2019
cdd8788
remove depth add `./`
fisker Oct 30, 2019
5b344e5
sort dir
fisker Oct 30, 2019
df94b41
disable expandDirectories
fisker Oct 30, 2019
211d61a
use absolute path
fisker Oct 30, 2019
3b10b71
remove sort()
fisker Oct 30, 2019
493e96b
sort dir
fisker Oct 30, 2019
99de6c8
use `alphasorti` compare
fisker Oct 30, 2019
cc379b7
remove './'
fisker Oct 30, 2019
bd6ed7e
fix `findPluginsInNodeModules`
fisker Oct 31, 2019
87fdca8
fix `findPluginsInNodeModules`
fisker Oct 31, 2019
28a8322
Merge branch 'master' into globby-10-update-with-fast-glob
fisker Oct 31, 2019
cb8aaed
restore snap
fisker Oct 31, 2019
257feb8
fix `findPluginsInNodeModules`
fisker Oct 31, 2019
e9decff
return early
fisker Oct 31, 2019
bfa435e
code style
fisker Oct 31, 2019
97ac4f8
sort
fisker Oct 31, 2019
b000597
update snap
fisker Oct 31, 2019
e950c01
try mem
fisker Oct 31, 2019
41e0469
mem `loadPlugins` function
fisker Oct 31, 2019
1c84415
fix
fisker Oct 31, 2019
1646392
glob directories instead of package.json
fisker Oct 31, 2019
c12fe4a
use deep
fisker Oct 31, 2019
3f37495
remove mem
fisker Oct 31, 2019
e6a3fa2
improve speed
fisker Oct 31, 2019
6347ff2
support dot pattern
fisker Oct 31, 2019
226de48
expand directories test
fisker Oct 31, 2019
1a137fc
restore import order
fisker Oct 31, 2019
07b9764
remove snap
fisker Oct 31, 2019
a1270a2
update test
fisker Nov 1, 2019
1703029
restore `findPluginsInNodeModules`
fisker Nov 1, 2019
c1cbe62
Merge branch 'master' into globby-10-update-with-fast-glob
fisker Nov 1, 2019
d15e184
Merge branch 'next' into globby-10-update-with-fast-glob
fisker Feb 4, 2020
c16ac4a
Update `globby`
fisker Feb 4, 2020
e79d10c
`fast-glob` beta
fisker Feb 4, 2020
4d349fc
Restore logic
fisker Feb 4, 2020
e8e4fd9
Add tests for `globby` update
fisker Feb 4, 2020
3851c65
Merge branch 'add-glob-test' into globby-10-update-with-fast-glob
fisker Feb 4, 2020
fcffe5a
Fix tests
fisker Feb 4, 2020
7242e4f
Remove option with default value
fisker Feb 4, 2020
34183f1
Try new beta version of `fast-glob`
fisker Feb 9, 2020
6fbe271
Merge branch 'next' into globby-10-update-with-fast-glob
fisker Feb 9, 2020
755a2b2
Merge branch 'next' into globby-10-update-with-fast-glob
fisker Feb 13, 2020
ebb3531
Merge branch 'next' into globby-10-update-with-fast-glob
fisker Feb 16, 2020
ea7ceb0
Restore error info
fisker Feb 16, 2020
b3bba07
Add `path.sep` check
fisker Feb 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
glob directories instead of package.json
  • Loading branch information
fisker committed Oct 31, 2019
commit 1646392ddcc5d2eabc7e26052347159f85ab03ac
13 changes: 6 additions & 7 deletions src/common/load-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,16 @@ function loadPlugins(plugins, pluginSearchDirs) {
}

function findPluginsInNodeModules(nodeModulesDir) {
const pluginPackageJsonPaths = globby.sync(
const pluginPackages = globby.sync(
[
"prettier-plugin-*/package.json",
"@*/prettier-plugin-*/package.json",
"@prettier/plugin-*/package.json"
"prettier-plugin-*",
"@*/prettier-plugin-*",
"@prettier/plugin-*"
],
{ cwd: nodeModulesDir, expandDirectories: false }
{ cwd: nodeModulesDir, expandDirectories: false, deep: 2, onlyDirectories: true }
);

return pluginPackageJsonPaths
.map(packageJsonFile => path.dirname(packageJsonFile.replace(/^\.\//, "")))
return pluginPackages
.sort((a, b) => a.localeCompare(b));
}

Expand Down