Skip to content

[FIX] Resolve properly package.json dependency aliases#608

Merged
d3xter666 merged 7 commits intomainfrom
fix-dependency-aliases
May 4, 2023
Merged

[FIX] Resolve properly package.json dependency aliases#608
d3xter666 merged 7 commits intomainfrom
fix-dependency-aliases

Conversation

@d3xter666
Copy link
Copy Markdown
Contributor

Resolves: UI5/cli#809

When shimmed packages are defined as dependency aliases in the package.json, they are being excluded from the bundlig as the packager eventually finds the real package and its path and as it's not defined in the shim, but its alias, it gets ignored.

We need to provide more robust discovery in order to handle those cases:

@d3xter666 d3xter666 requested a review from a team May 2, 2023 07:00
@coveralls
Copy link
Copy Markdown

coveralls commented May 2, 2023

Coverage Status

Coverage: 95.794% (-0.02%) from 95.815% when pulling 53edb46 on fix-dependency-aliases into 4a69f2c on main.

@flovogt flovogt changed the title [FIX] Resolve properly pakcage.json dependency aliases [FIX] Resolve properly package.json dependency aliases May 2, 2023
Comment thread test/fixtures/application.a.aliases/webapp/index.html Outdated
Comment thread test/fixtures/application.a.aliases/webapp/manifest.json Outdated
@flovogt flovogt requested a review from a team May 2, 2023 09:20
Comment on lines +76 to +77
// This version of library.d has an additional dependency to library.f,
// which in turn has a dependency to library.g
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this comment does not apply here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Indeed. Thanks!

Comment thread lib/graph/providers/NodePackageDependencies.js
@d3xter666 d3xter666 requested review from RandomByte and flovogt May 4, 2023 06:50
@d3xter666 d3xter666 merged commit f8753e5 into main May 4, 2023
@d3xter666 d3xter666 deleted the fix-dependency-aliases branch May 4, 2023 11:12
d3xter666 added a commit to UI5/cli that referenced this pull request Sep 25, 2025
…ui5-project#608)

Resolves: #809

When shimmed packages are defined as dependency aliases in the
package.json, they are being excluded from the bundlig as the packager
eventually finds the real package and its path and as it's not defined
in the shim, but its alias, it gets ignored.

We need to provide more robust discovery in order to handle those cases:
- npm/cli#3
-
https://github.com/npm/rfcs/blob/main/implemented/0001-package-aliases.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shims not bundled if installed under npm alias for v3

4 participants