kibana/packages/kbn-find-used-node-modules
Luke Elmers b6287708f6
Adds AGPL 3.0 license (#192025)
Updates files outside of x-pack to be triple-licensed under Elastic
License 2.0, AGPL 3.0, or SSPL 1.0.
2024-09-06 19:02:41 -06:00
..
src Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
index.ts Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
jest.config.js Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kibana.jsonc Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
package.json Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
README.md
tsconfig.json [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00

@kbn/find-used-node-modules

Simple abstraction over the @babel/parser and the @babel/traverse to find the node_modules used by a list of files.

findUsedNodeModules(resolver, entryPaths): string[]

Pass an ImportResolver instance from @kbn/import-resolver and a list of absolute paths to JS files to get the list of node_modules used by those files and the files the import.