Skip to content

Conversation

@mmaietta
Copy link
Collaborator

@mmaietta mmaietta commented Oct 12, 2025

  • This rewrites the yarn parser to no longer use npm list and instead use yarn list. The JSON format is entirely different and doesn't possess the same tree setup that npm list returns, but in this migration, we can officially support corepack for yarn classic (as npm list won't run if corepack enable has run).
  • Adds new functionality, dedicated support for Yarn Berry. Only Yarn v1 can use CLI. We should use pnp.cjs for PnP, but we can't access the files due to virtual file paths within zipped modules. (e.g. <package_name>.zip/<file_path>) We fallback to npm node module collection (since Yarn Berry could have npm-like structure OR pnpm-like structure, depending on nmHoistingLimits configuration). In the latter case, we still can't assume pnpm is installed, so we still try to use npm collection as a best-effort attempt.
  • If all options fail for npm or yarn berry....added new functionality to parse the node_module tree manually as the ultimate fallback 😅

All filesystem operations are async and memoized.

Migrated packTester to leverage corepack for isolating text/fixture environments and the various installation/hoisting setups they can have.
Using specific installation methods in new unit tests (+ snapshot verification) of package manager implementations

Investigating fixes for: #9025 #9239 #9240 #8870 #9310

@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2025

🦋 Changeset detected

Latest commit: 6cf7b19

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

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

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

@socket-security
Copy link

socket-security bot commented Oct 12, 2025

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn Medium
Low adoption: npm foo

Location: Package overview

From: test/fixtures/test-app-yarn-workspace-version-conflict/packages/test-app/package.jsonnpm/foo@1.0.0

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/foo@1.0.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Deprecated by its maintainer: npm uuid

Reason: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

From: pnpm-lock.yamlnpm/uuid@3.4.0

ℹ Read more on: This package | This alert | What is a deprecated package?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Research the state of the package and determine if there are non-deprecated versions that can be used, or if it should be replaced with a new, supported solution.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/uuid@3.4.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

…environments and using specific installation methods (+ snapshot verification) of package manager implementations
@socket-security
Copy link

socket-security bot commented Nov 6, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedfoo@​1.0.0651005079100
Addedtemp-file@​3.4.01001007278100
Addedtiny-typed-emitter@​2.1.01001009277100
Addedtiny-async-pool@​1.3.01001009278100
Addedtoml@​3.0.01001009978100
Addedyargs@​17.7.29810010086100
Addedelectron-log@​2.2.99910010087100
Addedtar@​6.2.19810010088100

View full report

@mmaietta mmaietta marked this pull request as ready for review November 7, 2025 02:06
@mmaietta mmaietta changed the title feat: support corepack packageManager and add related unit tests [WIP] feat: support corepack packageManager and add related unit tests Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants