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(nm): Gives hoisting priority to direct portal dependencies #3183

Merged
merged 5 commits into from Aug 3, 2021

Conversation

larixer
Copy link
Member

@larixer larixer commented Jul 27, 2021

What's the problem this PR addresses?

In some cases portal dependencies are blocked from hoisting due to the dependency with the same name gets hoisted first from regular dependencies and blocks the way. In this case the assertion is triggered. One example of this situation is:
storybookjs/storybook#15682 (comment)

How did you fix it?

I have added static hoisting priority inside hoister (just a number, the dependencies with higher hoisting priority number get hoisted first among other dependencies). I assign direct portal dependencies with the hoisting priority 1, this lets them to be hoisted first and does not let regular dependencies take their place.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@larixer larixer requested a review from arcanis July 27, 2021 10:09
@larixer
Copy link
Member Author

larixer commented Jul 27, 2021

Angular E2E tests are failing, because of this issue:
angular/angular-cli#21413
It was already fixed on their side, but the cli with the fix hasn't been published yet.

gaetanmaisse added a commit to storybookjs/storybook that referenced this pull request Jul 27, 2021
gaetanmaisse added a commit to storybookjs/storybook that referenced this pull request Jul 27, 2021
gaetanmaisse added a commit to storybookjs/storybook that referenced this pull request Jul 28, 2021
@larixer larixer requested review from merceyz and removed request for arcanis July 29, 2021 16:10
@arcanis arcanis enabled auto-merge (squash) August 3, 2021 10:09
@larixer larixer removed the request for review from merceyz August 3, 2021 10:09
@arcanis arcanis merged commit 9f9fca0 into master Aug 3, 2021
@arcanis arcanis deleted the larixer/portal-dep-hoist-priority branch August 3, 2021 11:15
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.

None yet

3 participants