From a204f5eecac5fefca00fb0d0d46e55315afd69ab Mon Sep 17 00:00:00 2001 From: ElevateBart Date: Mon, 16 Aug 2021 21:04:25 -0500 Subject: [PATCH] add comment to getImporters --- npm/vite-dev-server/src/makeCypressPlugin.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/npm/vite-dev-server/src/makeCypressPlugin.ts b/npm/vite-dev-server/src/makeCypressPlugin.ts index a1fc6f5c1a..6fa37ac045 100644 --- a/npm/vite-dev-server/src/makeCypressPlugin.ts +++ b/npm/vite-dev-server/src/makeCypressPlugin.ts @@ -134,6 +134,12 @@ export const makeCypressPlugin = ( } } +/** + * Gets all the modules that import the set of modules passed in parameters + * @param modules the set of module whose dependents to return + * @param alreadyExploredFiles set of files that have already been looked at and should be avoided in case of circular dependency + * @returns a set of ModuleMode that import directly the current modules + */ function getImporters (modules: Set, alreadyExploredFiles: Set): Set { const allImporters = new Set()