Skip to content

Conversation

aarlaud
Copy link
Contributor

@aarlaud aarlaud commented May 15, 2025

What this does

Introduces support for npm and yarn aliases to alternative packages using npm aliases.
It reflects the true dependencies being aliased to in the depgraph, which means the referenced package(s), the one(s) usually imported, will not appear in the depgraph which will show the aliased package instead.

Notes for the reviewer

  • The alias support is aimed to be an opt-in only capability that operators will need to explicitly add as CLI argument. The relevant CLI change will be provided if this approach is validated.
  • Prod aliases usage is generally discouraged
  • aliases are generally only usable at the top level only. While workarounds might exist to use aliased packages for transitive dependencies, the aliased transitive deps use case is not covered here.

@CLAassistant
Copy link

CLAassistant commented May 15, 2025

CLA assistant check
All committers have signed the CLA.

@aarlaud aarlaud force-pushed the feat/add-npm-yarn-alias-support branch 8 times, most recently from 3e48c25 to 5750f8b Compare May 15, 2025 16:34
@aarlaud aarlaud force-pushed the feat/add-npm-yarn-alias-support branch from 5750f8b to d7097b5 Compare May 16, 2025 11:08
@aarlaud aarlaud force-pushed the feat/add-npm-yarn-alias-support branch from d7097b5 to 028acdb Compare May 16, 2025 11:16
@aarlaud aarlaud changed the title feat: add alias support - wip feat: add alias support May 16, 2025
@aarlaud aarlaud marked this pull request as ready for review May 16, 2025 14:54
@aarlaud aarlaud requested a review from a team as a code owner May 16, 2025 14:54
Copy link

@MarcusArdelean MarcusArdelean left a comment

Choose a reason for hiding this comment

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

Reviewed the code and it looks good from a functionality/design point of view.

Can I ask where did the request for this feature came from? We will need to discuss this further with the team before merging it. Maybe there are other releases planned that will impact this in some sort of way that I'm not aware of.

@aarlaud aarlaud merged commit f43f91d into main Jun 12, 2025
4 checks passed
@aarlaud aarlaud deleted the feat/add-npm-yarn-alias-support branch June 12, 2025 14:21
@snyksec
Copy link

snyksec commented Jun 12, 2025

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants