Skip to content

Conversation

@jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Nov 21, 2025

Additional details

Add health-check command to root of repo that runs knip checks. View current health-check here: https://app.circleci.com/pipelines/github/cypress-io/cypress/77438/workflows/98f4f680-9225-4f53-b1c7-8bb36140e40e/jobs/3322448

Right now, since much of the feedback hasn't been addressed and we may need to tweak the config still, knip always:

  • warns
  • exits with code: 0

Currently this is a job that one could inspect in CI or run locally to further improve the health of the repo in subsequent PRs.

Steps to test

  • Run yarn
  • Run yarn health-check

How has the user experience changed?

N/A

PR Tasks


Note

Adds a Knip-based health check with config and CI job, makes it required in workflows, removes legacy dependency-check script, and updates dev deps.

  • CI:
    • Add health-check job running yarn health-check to .circleci pipelines (@pipeline.yml, workflows/@main.yml, workflows/pull-request.yml) and make it a prerequisite for ready-to-release.
  • Tooling:
    • Introduce knip.json and root script health-check (knip --no-exit-code); add knip to devDependencies.
  • CLI:
    • Remove test-dependencies script and dependency-check devDependency; keep postinstall script.
  • Packages:
    • Add @jest/globals as a devDependency in packages/data-context.
  • Deps/Lockfile:
    • Update yarn.lock with Knip and related transitive dependencies.

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

@jennifer-shehane jennifer-shehane self-assigned this Nov 21, 2025
@cypress
Copy link

cypress bot commented Nov 21, 2025

cypress    Run #67551

Run Properties:  status check passed Passed #67551  •  git commit 8280c92e67: Merge branch 'develop' into knip-integration
Project cypress
Branch Review knip-integration
Run status status check passed Passed #67551
Run duration 18m 44s
Commit git commit 8280c92e67: Merge branch 'develop' into knip-integration
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 8
Tests that did not run due to a developer annotating a test with .skip  Pending 1097
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 26698
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  45.76%
  Untested elements 187  
  Tested elements 162  
Accessibility  98.01%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

@MikeMcC399

This comment was marked as duplicate.

},
"devDependencies": {
"@babel/types": "7.28.2",
"@jest/globals": "^30.1.2",
Copy link

Choose a reason for hiding this comment

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

Bug: Unrelated @jest/globals dependency added to data-context

The PR is described as adding knip health checks, yet it includes an unrelated addition of @jest/globals to the data-context package devDependencies. This appears to be an accidental or unintended change that got included with the knip-related modifications.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

This is unrelated! This is used in this package however and it was correlated to so many errors that I added it to reduce the errors.

"gulpfile.js"
]
},
"cli": {
Copy link
Member Author

@jennifer-shehane jennifer-shehane Nov 25, 2025

Choose a reason for hiding this comment

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

These entrypoints do seem like they'll be a bit unreasonable to keep up with. Probably a sign of our own monorepo not being so well organized. Maybe esm migration will help with this. You can kind of tell which packages are most unruly just by the amount of rules or ignores needed.

"size": "t=\"cypress-v0.0.0.tgz\"; yarn pack --filename \"${t}\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";",
"test": "yarn test-unit",
"test-debug": "npx vitest --inspect-brk --no-file-parallelism --test-timeout=0",
"test-dependencies": "dependency-check . --missing --no-dev --verbose",
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm pretty sure this wasn't even being called anymore, but this was the intention - to remove this dep.

Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

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

looks good and we can tune it without having to worry about disruptions

@jennifer-shehane jennifer-shehane merged commit 747ee9d into develop Nov 25, 2025
86 of 92 checks passed
@jennifer-shehane jennifer-shehane deleted the knip-integration branch November 25, 2025 16:51
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.

Replace deprecated dependency-check

5 participants