Skip to content

Commit

Permalink
clear more json keys with dependencies from package.json with optimiz…
Browse files Browse the repository at this point in the history
…e-dependencies (#197)

* add more json keys with dependencies in package.json

* do yarn installation with verbose flag if debug logs enabled
  • Loading branch information
maltek authored Sep 2, 2022
1 parent 11b33bb commit 4e4ef75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ object PackageJsonParser {

val LOCKFILES: List[String] = List(JSON_LOCK_FILENAME, YARN_LOCK_FILENAME, PNPM_LOCK_FILENAME)

val PROJECT_DEPENDENCIES: Seq[String] =
Seq("dependencies", "devDependencies", "peerDependencies", "optionalDependencies")
val PROJECT_DEPENDENCIES: Seq[String] = Seq(
"dependencies",
"devDependencies",
"peerDependencies",
"optionalDependencies",
"resolutions",
"bundledDependencies"
)

private val cachedDependencies: TrieMap[Path, Map[String, String]] = TrieMap.empty

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ case class TranspilerGroup(override val config: Config, override val projectPath
val command = if (pnpmAvailable(projectPath)) {
s"${TranspilingEnvironment.PNPM_ADD} $BABEL_PLUGINS && ${TranspilingEnvironment.PNPM_INSTALL}"
} else if (yarnAvailable()) {
s"${TranspilingEnvironment.YARN_ADD} $BABEL_PLUGINS && ${TranspilingEnvironment.YARN_INSTALL}"
val verbose = if (logger.isDebugEnabled) " -v" else ""
s"${TranspilingEnvironment.YARN_ADD} $verbose $BABEL_PLUGINS && ${TranspilingEnvironment.YARN_INSTALL} $verbose"
} else {
s"${TranspilingEnvironment.NPM_INSTALL} $BABEL_PLUGINS && ${TranspilingEnvironment.NPM_INSTALL}"
}
Expand Down

0 comments on commit 4e4ef75

Please sign in to comment.