Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(TypeScript): npm peer dependency install conflicts in user applications #2699

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

platosha
Copy link
Contributor

@platosha platosha commented Sep 4, 2024

As pointed out in npm/cli#7719, npm struggles with resolving peer dependencies when running npm install and applying new peer dependency requirements that do not align with previously installed versions. In many cases it produces an unexpected error for the user instead of updating installed peer dependency packages.

As a (temporary?) workaround, let us avoid using strict peer dependency requirements for our packages.

This changes the package.json to use regular dependency version spec even though the expectation is that the install is “flat”, i. e., the packages are is installed on the top-level of node_modules/ in the user application.

…ations

As pointed out in npm/cli#7719, npm struggles with resolving peer dependencies when running `npm install` and applying new peer dependency requirements that do not align with previously installed versions. In many cases it produces an unexpected error for the user instead of updating installed peer dependency packages.

As a (temporary?) workaround, let us avoid using strict peer dependency requirements for our packages.

This changes the `package.json` to use regular dependency version spec even though the expectation is that the install is “flat”, i. e., the packages are is installed on the top-level of `node_modules/` in the user application.
@platosha platosha added hilla Issues related to Hilla target/24.4 labels Sep 4, 2024
@platosha platosha requested a review from Artur- September 4, 2024 09:52
Copy link

sonarcloud bot commented Sep 4, 2024

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.15%. Comparing base (1503513) to head (e495329).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2699   +/-   ##
=======================================
  Coverage   92.15%   92.15%           
=======================================
  Files          80       80           
  Lines        2536     2536           
  Branches      656      656           
=======================================
  Hits         2337     2337           
  Misses        152      152           
  Partials       47       47           
Flag Coverage Δ
unittests 92.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Artur- Artur- merged commit b912c18 into main Sep 4, 2024
15 checks passed
@Artur- Artur- deleted the fix/ap/no-internal-peer-deps branch September 4, 2024 10:31
@vaadin-bot
Copy link
Collaborator

Hi @platosha and @Artur-, when i performed cherry-pick to this commit to 24.4, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick b912c18
error: could not apply b912c18... fix(TypeScript): npm peer dependency install conflicts in user applications (#2699)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

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.

5 participants