Skip to content

Commit

Permalink
feat: exclude optional dep when managing if checkoptionaldep == false
Browse files Browse the repository at this point in the history
close #24
  • Loading branch information
std-microblock committed Aug 23, 2024
1 parent 87a5024 commit 7bcd956
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Binary file modified resources/dist.rc
Binary file not shown.
10 changes: 7 additions & 3 deletions src/celemod-ui/src/routes/Manage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,8 @@ export const Manage = () => {

if (recursive) {
if (enabled) {
const deps = mod?.dependencies;
const deps = mod?.dependencies
.filter((v) => checkOptionalDep || !v.optional)

for (const dep of deps ?? []) {
if (!('_missing' in dep)) {
Expand All @@ -782,7 +783,9 @@ export const Manage = () => {
(v) =>
!('_missing' in v) &&
!v.dependedBy.some((v) => v.enabled && v.name !== name)
);
).filter((v) =>
checkOptionalDep || !v.optional
)

for (const dep of orphanDeps ?? []) {
addToSwitchList(dep.name);
Expand Down Expand Up @@ -842,7 +845,8 @@ export const Manage = () => {
fullTree,
showUpdate,
alwaysOnMods,
modComments
modComments,
checkOptionalDep
]
);

Expand Down

0 comments on commit 7bcd956

Please sign in to comment.