Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to control the Pnpm dependencies tree depth #807

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions utils/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const (

// Repository environment variables - Ignored if the frogbot-config.yml file is used
InstallCommandEnv = "JF_INSTALL_DEPS_CMD"
MaxPnpmTreeDepthEnv = "JF_PNPM_MAX_TREE_DEPTH"
RequirementsFileEnv = "JF_REQUIREMENTS_FILE"
WorkingDirectoryEnv = "JF_WORKING_DIR"
PathExclusionsEnv = "JF_PATH_EXCLUSIONS"
Expand Down
5 changes: 5 additions & 0 deletions utils/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ type Project struct {
WorkingDirs []string `yaml:"workingDirs,omitempty"`
PathExclusions []string `yaml:"pathExclusions,omitempty"`
UseWrapper *bool `yaml:"useWrapper,omitempty"`
MaxPnpmTreeDepth string `yaml:"maxPnpmTreeDepth,omitempty"`
DepsRepo string `yaml:"repository,omitempty"`
InstallCommandName string
InstallCommandArgs []string
Expand Down Expand Up @@ -131,6 +132,10 @@ func (p *Project) setDefaultsIfNeeded() error {
if p.DepsRepo == "" {
p.DepsRepo = getTrimmedEnv(DepsRepoEnv)
}
if p.MaxPnpmTreeDepth == "" {
p.MaxPnpmTreeDepth = getTrimmedEnv(MaxPnpmTreeDepthEnv)
}

return nil
}

Expand Down
1 change: 1 addition & 0 deletions utils/scandetails.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ func (sc *ScanDetails) RunInstallAndAudit(workDirs ...string) (auditResults *res
SetXscVersion(sc.XscVersion).
SetPipRequirementsFile(sc.PipRequirementsFile).
SetUseWrapper(*sc.UseWrapper).
SetMaxTreeDepth(sc.MaxPnpmTreeDepth).
SetDepsRepo(sc.DepsRepo).
SetIgnoreConfigFile(true).
SetServerDetails(sc.ServerDetails).
Expand Down
Loading