Skip to content

fix: patch enhanced-resolve when installed as production dependency #27583

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

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

AtofStryker
Copy link
Contributor

Additional details

When upgrading to webpack 5, webpack/enhanced-resolve looks for the pnpapi in their resolver factory. This is likely due to webpack 5 shipping with their pnp plugin, which tries to resolve to itself. There is a proposed fix, but until then we just need to patch the enhanced-resolve library to discover the pnp process invoked from the command line. see webpack/enhanced-resolve#263 for root issue. We were already patching this with out update to webpack 5, but the mistake was not patching this as a production level dependency. That is what this PR resolves.

Steps to test

follow the steps in #27562 with this binary 5bd41d6. Tests should work as expected

How has the user experience changed?

PR Tasks

  • Have tests been added/updated? We do test for this in system-tests, but it has this patch in dev dependencies, which is why it works currently.
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?

@cypress
Copy link

cypress bot commented Aug 17, 2023

4 flaky tests on run #50306 ↗︎

0 5280 138 0 Flakiness 4

Details:

fix: patch enhanced-resolve when installed as production dep [run ci]
Project: cypress Commit: 0622150155
Status: Passed Duration: 14:03 💡
Started: Aug 22, 2023 3:01 PM Ended: Aug 22, 2023 3:15 PM
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-firefox

View Output Video

Test Artifacts
network stubbing > intercepting request > can delay and throttle a StaticResponse Output
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-firefox

View Output Video

Test Artifacts
... > correctly returns currentRetry Output
... > correctly returns currentRetry Output
... > correctly returns currentRetry Output

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@astone123 astone123 self-requested a review August 21, 2023 14:48
@AtofStryker AtofStryker force-pushed the fix/pnp_discovery branch 2 times, most recently from 4546bde to 7493003 Compare August 21, 2023 17:57
@jennifer-shehane jennifer-shehane merged commit 5109a74 into develop Aug 22, 2023
@jennifer-shehane jennifer-shehane deleted the fix/pnp_discovery branch August 22, 2023 15:49
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 29, 2023

Released in 13.0.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.0.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Yarn Modern Plug'n'Play (pnp) E2E fails with "Error: Cannot find module 'pnpapi'"
4 participants