Discussed in #45325
Originally posted by a-connoisseur August 18, 2026
Description
In a repo where each subdirectory is a standalone Deno project (its own deno.json, package.json, deno.lock) with no npm/Deno workspaces, the deno manager attaches every nested package.json to the root deno.lock in addition to extracting each against its own lock. During lockFileMaintenance this deletes the root lock while running deno install in a subdirectory, ending in Artifact file update failure with only some locks refreshed.
Root cause
detectNodeCompatWorkspaces in lib/modules/manager/deno/compat.ts sets filters = undefined when no workspaces is declared and calls findPackages(dir, { patterns: undefined }), which defaults to ['.', '**'] and returns every package.json in the tree. collectPackageJson binds all of them to the root lock. The other caller, post.ts, guards the same call with isNonEmptyArray(pkg.managerData?.workspaces); collectPackageJson does not.
Fix
Skip the member sweep when no workspaces are declared (mirror the post.ts
guard), so a lock is only ever paired with its own package.json unless a
workspace is explicitly declared.
Discussed in #45325
Originally posted by a-connoisseur August 18, 2026
Description
In a repo where each subdirectory is a standalone Deno project (its own
deno.json,package.json,deno.lock) with no npm/Deno workspaces, the deno manager attaches every nestedpackage.jsonto the rootdeno.lockin addition to extracting each against its own lock. DuringlockFileMaintenancethis deletes the root lock while runningdeno installin a subdirectory, ending inArtifact file update failurewith only some locks refreshed.Root cause
detectNodeCompatWorkspacesinlib/modules/manager/deno/compat.tssetsfilters = undefinedwhen noworkspacesis declared and callsfindPackages(dir, { patterns: undefined }), which defaults to['.', '**']and returns everypackage.jsonin the tree.collectPackageJsonbinds all of them to the root lock. The other caller,post.ts, guards the same call withisNonEmptyArray(pkg.managerData?.workspaces);collectPackageJsondoes not.Fix
Skip the member sweep when no workspaces are declared (mirror the
post.tsguard), so a lock is only ever paired with its own
package.jsonunless aworkspace is explicitly declared.