Skip to content

chore: fix sinon-chai relative path rewrite as it is breaking type checking in the cypress cli externally #31733

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
May 16, 2025

Conversation

AtofStryker
Copy link
Contributor

  • Closes N/A

Additional details

The sinon-chai updates in #31716 introduced a failure in https://app.circleci.com/pipelines/github/cypress-io/cypress/70732/workflows/85cb0258-851d-40aa-ac39-5e863f6d7caf/jobs/2904496. This had to do with us rewriting the type imports to be relative importsin @types/sinon-chai and a few other type packages in the post install. In @types/sinon-chai 3.2.9, the imports used single quotes, but changed to double quotes in 3.2.10. This broke the rewrite and it failed silently only until the type checking was performed against the binary in CI.

<=3.2.9
Screenshot 2025-05-16 at 10 14 40 AM
>=3.2.10
Screenshot 2025-05-16 at 10 14 32 AM

In the future, this likely should be a patch-package instead of a post install script because it will fail loudly and not silently like we saw here.

Steps to test

Failing job in todomvc should now pass

How has the user experience changed?

npx tsc should not fail externally in the binary

PR Tasks

@AtofStryker AtofStryker self-assigned this May 16, 2025
@jennifer-shehane jennifer-shehane self-requested a review May 16, 2025 14:26
Copy link

cypress bot commented May 16, 2025

cypress    Run #62493

Run Properties:  status check passed Passed #62493  •  git commit 5a33433f8e: chore: fix sinon-chai relative path rewrite as it is breaking type checking in t...
Project cypress
Branch Review chore/fix_sinon_chai_rewrite
Run status status check passed Passed #62493
Run duration 11m 32s
Commit git commit 5a33433f8e: chore: fix sinon-chai relative path rewrite as it is breaking type checking in t...
Committer Bill Glesias
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 685
View all changes introduced in this branch ↗︎
UI Coverage  37.62%
  Untested elements 131  
  Tested elements 79  
Accessibility  92.37%
  Failed rules  3 critical   8 serious   1 moderate   1 minor
  Failed elements 429  

@AtofStryker AtofStryker merged commit 744d9b6 into develop May 16, 2025
92 of 93 checks passed
@AtofStryker AtofStryker deleted the chore/fix_sinon_chai_rewrite branch May 16, 2025 15:38
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 20, 2025

Released in 14.4.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 20, 2025
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.

3 participants