kibana/packages/kbn-find-used-node-modules
Tiago Costa df8b62aa98
chore(NA): allow packages to not have an obligation for a src folder on packages (#138038)
* refact(NA): apply root_input_dir=src to each already created pkg

* refact(NA): update package generator

* fix(NA): correctly use rootDir

* fix(NA): use root input dir on latest introduced pkgs for jsts_transpiler macro

* chore(NA): merge with main

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-08-08 15:54:05 +01:00
..
src [plugins] use module ids to import across plugins 2022-04-16 01:19:05 -05:00
BUILD.bazel chore(NA): allow packages to not have an obligation for a src folder on packages (#138038) 2022-08-08 15:54:05 +01:00
jest.config.js [plugins] use module ids to import across plugins 2022-04-16 01:19:05 -05:00
package.json [plugins] use module ids to import across plugins 2022-04-16 01:19:05 -05:00
README.md [plugins] use module ids to import across plugins 2022-04-16 01:19:05 -05:00
tsconfig.json [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05: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.