Skip to content

Conversation

@tanu9979
Copy link

@tanu9979 tanu9979 commented Dec 2, 2025

  • Closes

Additional details

Steps to test

How has the user experience changed?

PR Tasks


Note

Refactors support file resolution to native async/await, adds symlink correction logic, and updates tests accordingly.

  • Config (project utils):
    • Refactor setSupportFileAndFolder from Bluebird chains to native async/await with clearer debug output.
    • Improve support file resolution:
      • Detect path changes from require.resolve via checkIfResolveChangedRootFolder.
      • Add correctSymlinkedPath to switch back to original (symlinked) path and verify via fs.pathExists.
      • Keep behavior for MODULE_NOT_FOUND with discoverModuleFile and set supportFolder accordingly.
  • Tests:
    • Mock fs-extra.pathExists and resolveModule.
    • Add unit tests for correctSymlinkedPath and symlink resolution scenarios in setSupportFileAndFolder.
    • Adjust existing tests to new async/await flow and logging.

Written by Cursor Bugbot for commit 0eb084b. This will update automatically on new commits. Configure here.

@CLAassistant
Copy link

CLAassistant commented Dec 2, 2025

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link
Collaborator

@tanu9979
Copy link
Author

tanu9979 commented Dec 2, 2025

Hi @jennifer-shehane ,

This is my first ever PR in open source, and I’ve been working on this issue. The ESLint issues are fixed, and Bluebird has been replaced with native Promises/async-await in packages/config/src/project/utils.ts. CI is running the remaining checks.

Please guide me if I’ve done anything incorrectly — I’m happy to learn and improve.

Thanks a lot!

@jennifer-shehane
Copy link
Member

@tanu9979 I'll help get the tests running so we can see what's impacted. Right now there is a lint error.

/root/cypress/packages/config/src/project/utils.ts
  324:7  error  Expected blank line before this statement  padding-line-between-statements
  346:5  error  Expected blank line before this statement  padding-line-between-statements

✖ 2 problems (2 errors, 0 warnings)
  2 errors and 0 warnings potentially fixable with the `--fix` option.

error Command failed with exit code 1.

@tanu9979
Copy link
Author

tanu9979 commented Dec 2, 2025

Hi @jennifer-shehane,

I’ve pushed the fixes for the two lint errors you pointed out — the required blank lines have been added and the file should now pass the padding-line-between-statements rule.

Let me know if anything else needs adjustment. Thanks for the guidance!

@jennifer-shehane
Copy link
Member

@tanu9979 There's still some linting errors. You should be able to see these errors by running yarn lint at the root of the repo.

/root/cypress/packages/config/src/project/utils.ts
  324:7  error  Expected blank line before this statement  padding-line-between-statements
  331:1  error  Trailing spaces not allowed                no-trailing-spaces
  347:5  error  Expected blank line before this statement  padding-line-between-statements

✖ 3 problems (3 errors, 0 warnings)
  3 errors and 0 warnings potentially fixable with the `--fix` option.

error Command failed with exit code 1.

@tanu9979
Copy link
Author

tanu9979 commented Dec 3, 2025

@jennifer-shehane
That lint error are fixed what next?

@tanu9979
Copy link
Author

tanu9979 commented Dec 4, 2025

Hello
@jennifer-shehane please review it once

@tanu9979 tanu9979 force-pushed the chore/config/migrate-off-bluebird branch from 97b879f to d9a4d36 Compare December 4, 2025 11:42
@jennifer-shehane
Copy link
Member

@tanu9979 I'm planning on reviewing, I had another change that I didn't want to conflict with this first.

@tanu9979
Copy link
Author

tanu9979 commented Dec 5, 2025

@jennifer-shehane
ok then what to do from my side?

@jennifer-shehane
Copy link
Member

@tanu9979 Nothing more needing on your side at the moment.

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tanu9979 This looks good. Thanks!

  • I added some extra test coverage and confirmed it all passes with the old code + refactored code.
  • I also cleaned up the naming of a few things since the original code didn't have the best flow to follow to begin with.

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.

4 participants