Skip to content

fix: restore duplicate dependency and workspace tree resolution#9548

Merged
mmaietta merged 3 commits into
masterfrom
fix/json-parsing-node-collector
Jan 31, 2026
Merged

fix: restore duplicate dependency and workspace tree resolution#9548
mmaietta merged 3 commits into
masterfrom
fix/json-parsing-node-collector

Conversation

@mmaietta
Copy link
Copy Markdown
Collaborator

@mmaietta mmaietta commented Jan 28, 2026

Key Changes

Return tree within workspace instead of pruning:
Partial revert of PR #9380 to be able reduce dependencies being bundled. Updated test to validate native module compilation and runtime during e2e updater test.

Duplicate Dependency Handling
When a duplicate dependency is detected (with _dependencies but empty dependencies), we now:

  • Fetch the complete previously collected tree from allDependencies.get(dependencyId)
  • Use this tree for both dependencies and _dependencies checks
  • This ensures we filter against matching _dependencies, preventing the "too many files" issue

Collector Parsing
The trim() is to handle odd edge case where pnpm outputs something unparseable on a per-line basis. yarn v1 already had this logic, this is replicating it for base collector's bracket-counting.
Added additional args for loglevel=error to help reduce console pollution and follow the optimal code-path
Example: https://github.com/electron-userland/electron-builder/actions/runs/21449112753/job/61772893356

[Functional Tests] Lockfile stub
Adding a stub lockfile, if none already exists, during test setup to prevent flaky package manager prompts/warnings/errors (such as yarn v1 No lockfile found. error).
Example: https://github.com/electron-userland/electron-builder/actions/runs/21546118903/job/62087715031

Should fix:
#9532
#9545

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 28, 2026

🦋 Changeset detected

Latest commit: c28269f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
app-builder-lib Patch
dmg-builder Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mmaietta mmaietta changed the title fix: trimming each line for json parsing fix: return tree within workspace instead of pruning Jan 29, 2026
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jan 29, 2026

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@github-actions github-actions Bot added the mac label Jan 30, 2026
When a duplicate dependency is detected (has _dependencies but empty dependencies), we now:
- Fetch the complete tree from allDependencies.get(dependencyId)
- Use this tree for both dependencies and _dependencies checks
- This ensures we filter against matching _dependencies, preventing the "too many files" issue
@mmaietta mmaietta force-pushed the fix/json-parsing-node-collector branch from e172610 to c28269f Compare January 31, 2026 21:59
@mmaietta mmaietta changed the title fix: return tree within workspace instead of pruning fix: restore duplicate dependency and workspace tree resolution Jan 31, 2026
@mmaietta mmaietta merged commit aec9157 into master Jan 31, 2026
35 checks passed
@mmaietta mmaietta deleted the fix/json-parsing-node-collector branch January 31, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant