Skip to content

Conversation

@beyondkmp
Copy link
Contributor

@beyondkmp beyondkmp commented Dec 10, 2025

Fix #9394 (comment)

  • Change npm dependency graph extraction from parallel to sequential processing to ensure consistent ordering
  • Add _dependencies field check in yarn berry isProdDependency for proper production dependency detection

🤖 Generated with Claude Code

…_dependencies support

- Change npm dependency graph extraction from parallel to sequential processing to ensure consistent ordering
- Add _dependencies field check in yarn berry isProdDependency for proper production dependency detection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings December 10, 2025 00:44
@changeset-bot
Copy link

changeset-bot bot commented Dec 10, 2025

🦋 Changeset detected

Latest commit: 02ff806

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

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request makes two improvements to dependency graph extraction for Node.js module collectors:

Summary:
This PR refactors the npm dependency graph extraction logic to ensure sequential, predictable processing order and extends Yarn Berry's production dependency detection to handle all dependency field types.

Key Changes:

  • Refactored extractProductionDependencyGraph in npm collector from a parallel promise pattern to a sequential loop, preventing potential race conditions when processing shared state
  • Added _dependencies and dependencies field checks to Yarn Berry's isProdDependency method for comprehensive production dependency detection

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/app-builder-lib/src/node-module-collector/npmNodeModulesCollector.ts Simplified dependency extraction loop to sequential processing, improving code clarity and preventing race conditions on shared productionGraph state
packages/app-builder-lib/src/node-module-collector/yarnBerryNodeModulesCollector.ts Extended production dependency detection to check _dependencies, dependencies, and optionalDependencies fields for better Yarn Berry compatibility

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ector

Add early check for resolvedDeps existence and use for...in loop instead of Object.entries() for better performance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mmaietta mmaietta merged commit bdfc76b into electron-userland:master Dec 10, 2025
80 of 82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

builds broken since v26.3.0

2 participants