Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
chore: limit globbing when calculating subdirectories (#862)
Browse files Browse the repository at this point in the history
  • Loading branch information
grzpab authored Jan 30, 2024
1 parent 288a808 commit f815e79
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "intuita-vscode-extension",
"displayName": "Intuita",
"description": " Discover, run & manage codemods faster & easier.",
"version": "0.38.11",
"version": "0.38.12",
"publisher": "Intuita",
"icon": "img/intuita_square128.png",
"repository": {
Expand Down
20 changes: 14 additions & 6 deletions src/components/webview/MainProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,20 @@ export class MainViewProvider implements WebviewViewProvider {
return;
}

this.__directoryPaths =
(await glob(`${basePath}/**`, {
// ignore node_modules and files, match only directories
onlyDirectories: true,
ignore: ['**/node_modules/**'],
})) ?? [];
const directoryPaths = await glob(`${basePath}/**`, {
// ignore node_modules and files, match only directories
onlyDirectories: true,
ignore: ['**/node_modules/**'],
followSymbolicLinks: false,
deep: 10,
});

const MAX_NUMBER_OF_DIRECTORIES = 10000;

this.__directoryPaths = directoryPaths.slice(
0,
MAX_NUMBER_OF_DIRECTORIES,
);
}

private __postMessage(message: WebviewMessage) {
Expand Down

0 comments on commit f815e79

Please sign in to comment.