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: resolve reporters using module resolution algorithm (#4536) #28548

Closed
wants to merge 3 commits into from

Conversation

steinybot
Copy link

@steinybot steinybot commented Dec 19, 2023

Additional details

  • The explicit join to the project root meant that it effectively disabled the normal module resolution algorithm which would just work™️.
  • This has been there since at least 98c4538.
  • I kept the project root there as the starting point as I wasn't sure whether __dirname or the current working directory would be correct.
  • https://nodejs.org/dist/latest-v18.x/docs/api/modules.html#requireresolverequest-options
  • I'd like some help writing a test. What is the best way?
  • Also might need to update the error. It has the correct path but it doesn't explain that it uses the module resolution algorithm.

Steps to test

  1. Setup a small monorepo that uses workspaces.
  2. Add cypress to the workspace project.
  3. Add a reporter to the root.
  4. Run cypress in the workspace project.
  5. It should find the reporter.

How has the user experience changed?

The behaviour should be the same except that it now searches up properly. It will also look in the global modules.

PR Tasks

@cypress-app-bot
Copy link
Collaborator

@CLAassistant
Copy link

CLAassistant commented Dec 19, 2023

CLA assistant check
All committers have signed the CLA.

@jennifer-shehane
Copy link
Member

@steinybot Thanks for the contribution! Could you please sign our CLA?

@jordanpowell88
Copy link
Contributor

@steinybot is this still in draft or is this ready to review?

@steinybot
Copy link
Author

I need some help figuring out how to write a test for it. Other than that it is ready for review.

@cypress-app-bot
Copy link
Collaborator

This PR has not had any activity in 180 days. If no activity is detected in the next 14 days, this PR will be closed.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Jul 9, 2024
@cypress-app-bot
Copy link
Collaborator

This PR has been closed due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity on this issue for a long period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress + Reporter Plugin in nested projects. Could not load reporter by name: reporter
5 participants