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: check resolvedNodePath for Next.js 12 guard #19604

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

ZachJW34
Copy link
Contributor

@ZachJW34 ZachJW34 commented Jan 6, 2022

User facing changelog

Remove "nodeVersion": "system" requirement for Next.js v12 applications now that "nodeVersion": "system" is the default for users using Cypress >= 9.0.0

Additional details

Next.js uses SWC to compile js and wasn't working with our plugin due to "nodeVersion": "bundled" (which was the default prior to Cypress 9.0.0) causing Rust to not be able to run. Since "nodeVersion": "system", this PR changes how we check the nodeVersion so as to remove the requirement of having this property set for the application to compile if a user is using Cypress >= 9.0.0.

How it works:

  • If using Next.js >= 12 and Cypress < 9: Users need to set "nodeVersion": "system"
  • If using Next.js >= 12 and Cypress >= 9: Works with no change, errors if "nodeVersion": "bundled"

How has the user experience changed?

Users using Cypress >=9.0.0 and Next.js >= 12 no longer need "nodeVersion": "system" set in there Cypress config.

How to test

Check out this branch and run yarn workspace @cypress/react build. Then, you can copy and paste the dist and plugins folder into a Next.js project.

Getting #19088 done would be great so we could properly test changes like this. I ran into an issue trying to write a system test trying to install a @cypress dependency due to our use of 0.0.0-development.

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 6, 2022

Thanks for taking the time to open a PR!

@ZachJW34 ZachJW34 changed the title chore: release @cypress/react-v5.12.0 fix: check resolvedNodePath for Next.js 12 guard Jan 6, 2022
@cypress
Copy link

cypress bot commented Jan 7, 2022



Test summary

4297 0 51 0Flakiness 1


Run details

Project cypress
Status Passed
Commit 348ade0
Started Jan 7, 2022 4:33 PM
Ended Jan 7, 2022 4:44 PM
Duration 11:15 💡
OS Linux Debian - 10.10
Browser Electron 94

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/commands/net_stubbing_spec.ts Flakiness
1 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@ZachJW34 ZachJW34 merged commit 6304fd7 into master Jan 10, 2022
@ZachJW34 ZachJW34 deleted the fix-nextjs-nodeVersion-check branch January 10, 2022 16:01
mschile added a commit that referenced this pull request Jan 18, 2022
commit d8fa85d
Author: Chris Breiding <chrisbreiding@users.noreply.github.com>
Date:   Fri Jan 14 09:48:43 2022 -0500

    chore: Fix a couple multi-domain bugs (#19698)

commit 2e5fbad
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 13 11:44:35 2022 -0500

    fix types issue

commit cc08d12
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 13 09:56:31 2022 -0500

    fix issues after merge

commit 8e0770f
Merge: 2ee9893 d87711e
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 13 09:31:25 2022 -0500

    Merge branch 'develop' into feature-multidomain

commit d87711e
Merge: 576519e f22e3ca
Author: Brian Barrow <briancbarrow@gmail.com>
Date:   Wed Jan 12 16:41:35 2022 +0000

    Merge branch 'master' into develop

commit f22e3ca
Author: Brian Barrow <briancbarrow@gmail.com>
Date:   Wed Jan 12 09:40:48 2022 -0700

    Fixed Vue README links in Global Components section (#19550)

commit 576519e
Author: Pascal Gafner <gafner.pascal@gmail.com>
Date:   Wed Jan 12 15:52:26 2022 +0100

    fix: use util.getEnv to handle environment variables set with npm (#19560)

    Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
    Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>

commit 0382768
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Jan 11 21:35:43 2022 +0000

    chore(deps): update dependency electron to v15.3.4 🌟 (#19657)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 1305cca
Author: Lachlan Miller <lachlan.miller.1990@outlook.com>
Date:   Wed Jan 12 07:10:14 2022 +1000

    fix: rename specs to correctly match convention (#19641)

    * fix: rename specs to correctly match convention

    * Remove underscore from TESTFILES glob pattern

    Co-authored-by: Zach Bloomquist <github@chary.us>

commit c45a240
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Jan 11 12:59:14 2022 -0800

    fix(deps): update dependency node-forge to v1 [security] (#19635)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit ea531b7
Author: Kukhyeon Heo <sainthkh@naver.com>
Date:   Wed Jan 12 00:37:05 2022 +0900

    chore: remove pkg/driver //@ts-nocheck part 2 (#19483)

    * listeners.ts

    * chainer.ts

    * command.ts

    * actionability.ts

    * inspect.ts

    * agents.ts

    * aliasing.ts

    * angular.ts

    * asserting.ts

    * clock.ts files

    * commands.ts

    * debugging.ts

    * fix comment.

    * roll back change.

    * Fix.

    * fix

    * Casted to cast.

    * Feedback changes.

    * fix any.

commit 513074e
Author: Josh Wooding <12938082+joshwooding@users.noreply.github.com>
Date:   Tue Jan 11 15:34:01 2022 +0000

    fix: overflow clip to prevent selector header from disapearing (#18649) (#19646)

    Co-authored-by: Tim Griesser <tgriesser10@gmail.com>

commit b8ccf12
Merge: 2071575 d227420
Author: Ryan Manuel <ryanm@cypress.io>
Date:   Mon Jan 10 15:38:23 2022 -0600

    Merge branch 'develop'

commit d227420
Author: Ryan Manuel <ryanm@cypress.io>
Date:   Mon Jan 10 15:34:34 2022 -0600

    release 9.2.1 [skip ci]

commit 5d1dce6
Author: Ryan Manuel <ryanm@cypress.io>
Date:   Mon Jan 10 13:01:12 2022 -0600

    Merge master to dev

commit 4818a21
Author: Juan Julián Merelo Guervós <jjmerelo@gmail.com>
Date:   Mon Jan 10 19:52:32 2022 +0100

    fix: update cli-table dependency to fix broken colors.js (#19622)

    Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
    Co-authored-by: Ryan Manuel <ryanm@cypress.io>

commit 2071575
Author: semantic-release-bot <semantic-release-bot@martynus.net>
Date:   Mon Jan 10 11:23:17 2022 -0500

    chore: release @cypress/react-v5.12.1

    [skip ci]

commit 3f85a04
Merge: 642ec41 6304fd7
Author: Zachary Williams <ZachJW34@gmail.com>
Date:   Mon Jan 10 16:02:22 2022 +0000

    Merge branch 'master' into develop

commit 6304fd7
Author: Zachary Williams <ZachJW34@gmail.com>
Date:   Mon Jan 10 10:01:27 2022 -0600

    fix: check resolvedNodePath for Next.js 12 guard (#19604)

commit 10e3e0a
Author: semantic-release-bot <semantic-release-bot@martynus.net>
Date:   Tue Dec 21 14:35:12 2021 -0500

    chore: release @cypress/react-v5.12.0

    [skip ci]
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.

2 participants