Skip to content

chore: add logging summary to end of node collector to flag any special cases/alerts#9587

Merged
mmaietta merged 4 commits intomasterfrom
chore/add-collector-log-summary
Feb 13, 2026
Merged

chore: add logging summary to end of node collector to flag any special cases/alerts#9587
mmaietta merged 4 commits intomasterfrom
chore/add-collector-log-summary

Conversation

@mmaietta
Copy link
Collaborator

@mmaietta mmaietta commented Feb 13, 2026

Enhances the node module collection process by adding a comprehensive warn/error logging summary at the end of collection. The changes track and report special cases and potential issues encountered during dependency resolution:

  • New logging categories tracked:

    • Duplicate dependency references
    • Dependencies that cannot be found
    • Dependencies not found on disk
    • Self-referential dependencies
    • Missing optional dependencies
    • Collector stderr output
  • Details:

    • Adds a logSummary cache in ModuleManager to accumulate warnings across the collection process
    • Refactors to collectNodeModulesWithLogging() to display all accumulated warnings as a summary after collection completes
    • Returns both nodeModules array and logSummary from getNodeModules()

This provides better visibility into edge cases during the build process without cluttering logs with individual warnings during collection.

@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2026

🦋 Changeset detected

Latest commit: 41efe85

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

This PR includes changesets to release 10 packages
Name Type
app-builder-lib Patch
builder-util 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
electron-publish 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 PR aims to improve visibility into node module collection edge-cases by accumulating collector warnings during dependency resolution and emitting a single summary at the end of collection (instead of logging many warnings inline).

Changes:

  • Add a logSummary cache to ModuleManager and plumb it through node-module collectors.
  • Change collectors to record special cases (duplicate refs, missing deps, self refs, collector stderr) into the summary.
  • Refactor node module collection in appFileCopier to use getCollectorByPackageManager(...).getNodeModules(...) and print the summary after collection.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test/vitest-scripts/_vitest-smart-cache.json Updates Vitest smart-cache stats (appears generated/noisy).
packages/app-builder-lib/src/util/appFileCopier.ts Refactors node module collection and emits end-of-run warning summary.
packages/app-builder-lib/src/node-module-collector/traversalNodeModulesCollector.ts Records self-referential and missing optional deps into logSummary.
packages/app-builder-lib/src/node-module-collector/npmNodeModulesCollector.ts Records npm duplicate dependency references into logSummary.
packages/app-builder-lib/src/node-module-collector/nodeModulesCollector.ts Changes getNodeModules() to return { nodeModules, logSummary } and records missing paths/stderr into summary.
packages/app-builder-lib/src/node-module-collector/moduleManager.ts Introduces logSummary storage and log-key constants.
packages/app-builder-lib/src/node-module-collector/index.ts Removes exported getNodeModules(...) helper; relies on getCollectorByPackageManager.
.changeset/curvy-insects-notice.md Adds a patch changeset entry describing the logging summary change.

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

@mmaietta mmaietta merged commit 4edd695 into master Feb 13, 2026
63 of 65 checks passed
@mmaietta mmaietta deleted the chore/add-collector-log-summary branch February 13, 2026 19:43
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.

2 participants