Skip to content

Conversation

@AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Nov 13, 2025

  • Closes

Additional details

Converts files, fixtures, resolve, status_code, system, and a few other files to TypeScript

Steps to test

How has the user experience changed?

PR Tasks


Note

Converts several server modules to TypeScript, updates imports/usages and typings across the codebase, and adjusts tests/snapshots accordingly.

  • TypeScript migrations (major):
    • Rewrite lib/files, lib/fixture, lib/util/{resolve,status_code,system,terminal,tty} to TypeScript with async/await and explicit typings.
    • Switch to named exports for lib/util/{terminal,tty,status_code} and update call sites (e.g., server-base, print-run, start-cypress).
    • Add fs.readJsonAsync and use in files/util/file.
  • Integration updates:
    • Update imports to * as system/* as files and fixture.get in xhrs, socket-base, privileged-commands-manager, modes/run, project-base, server-base.
    • Typing fixes: BufferEncoding, HorizontalAlignment, Bluebird timeout types, and selective @ts-expect-error annotations.
  • Tests & tooling:
    • Migrate unit tests to TS (files_spec, fixture_spec, status_code_spec, terminal_spec, tty_spec) and update snapshots.
    • Child plugin runner passes NODE_OPTIONS=--import tsx for TypeScript config loading.

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

@AtofStryker AtofStryker self-assigned this Nov 13, 2025
@cypress
Copy link

cypress bot commented Nov 13, 2025

cypress    Run #67483

Run Properties:  status check failed Failed #67483  •  git commit 0625ed6dbf: add comments to ts-expect-error
Project cypress
Branch Review chore/server-files-p3
Run status status check failed Failed #67483
Run duration 44m 54s
Commit git commit 0625ed6dbf: add comments to ts-expect-error
Committer Bill Glesias
View all properties for this run ↗︎

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

Warning

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

UI Coverage  45.48%
  Untested elements 188  
  Tested elements 161  
Accessibility  98%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

Tests for review

Failed  studio-new-tests.cy.ts • 3 failed tests • app-e2e

View Output

Test Artifacts
Cypress Studio - New Test Creation > creates a new test for a specific suite with the url already defined Test Replay Screenshots
Cypress Studio - New Test Creation > prompt for a new url > when an existing visit command is cleared and adds a new url via test block editor Test Replay Screenshots
Cypress Studio - New Test Creation > prompt for a new url > ensures we clear the aut url input properly in between adding and clearing urls Test Replay Screenshots
Failed  studio-ui.cy.ts • 1 failed test • app-e2e

View Output

Test Artifacts
Cypress Studio - UI and Panel Management > studio AI is marked as coming soon Test Replay Screenshots
Failed  studio-state-management.cy.ts • 1 failed test • app-e2e

View Output

Test Artifacts
Cypress Studio - State Management > remains in studio mode when the test name is changed on the file system and file watching is disabled Test Replay Screenshots
Flakiness  commands/actions/selectFile.cy.ts • 1 flaky test • 5x-driver-electron

View Output

Test Artifacts
... > throws when any path does not exist Test Replay
Flakiness  issues/28527.cy.ts • 1 flaky test • 5x-driver-electron

View Output

Test Artifacts
issue 28527 > fails and then retries and verifies about:blank is not displayed Test Replay Screenshots
Flakiness  e2e/origin/config_env.cy.ts • 1 flaky test • 5x-driver-chrome

View Output

Test Artifacts
cy.origin- Cypress.config() > serializable > overwrites different values in secondary if one exists in the primary Test Replay
Flakiness  issues/28527.cy.ts • 1 flaky test • 5x-driver-chrome

View Output

Test Artifacts
issue 28527 > fails and then retries and verifies about:blank is not displayed Test Replay Screenshots
Flakiness  commands/location.cy.js • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
... > does not log an additional log on failure Test Replay

The first 5 flaky specs are shown, see all 12 specs in Cypress Cloud.

@AtofStryker AtofStryker force-pushed the chore/server-files-p3 branch 2 times, most recently from 0d1dd13 to f262fa7 Compare November 14, 2025 15:12
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Silent Encoding Failure in `readJson` Calls

The fs.readJsonAsync call passes 'utf8' as a second parameter, but fs-extra's readJson/readJsonSync methods only accept an options object as the second parameter, not an encoding string. This will cause the encoding to be ignored or potentially throw an error. The original code had a @ts-expect-error comment acknowledging this type mismatch, which was removed during the TypeScript conversion without fixing the underlying issue.

packages/server/lib/util/file.ts#L161-L162

return fs.readJsonAsync(this.path, 'utf8')

Fix in Cursor Fix in Web


@AtofStryker AtofStryker force-pushed the chore/server-files-p3 branch from 32aa387 to 1fea56c Compare November 14, 2025 16:57
@AtofStryker AtofStryker force-pushed the chore/server-files-p3 branch from 0d5411e to 1fd4bad Compare November 14, 2025 18:56
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: `readJsonAsync` Parameter Type Mismatch

The fs.readJsonAsync call passes 'utf8' as a second parameter, but fs-extra's readJson method expects an options object, not a direct encoding string. When promisified by Bluebird, readJsonAsync should be called as fs.readJsonAsync(this.path, { encoding: 'utf8' }) or simply fs.readJsonAsync(this.path) since utf8 is the default encoding. This will cause the method to fail or behave unexpectedly.

packages/server/lib/util/file.ts#L161-L162

return fs.readJsonAsync(this.path, 'utf8')

Fix in Cursor Fix in Web


@AtofStryker AtofStryker changed the title chore: convert server files p3 chore: convert additional server files to TypeScript Nov 18, 2025
@AtofStryker AtofStryker force-pushed the chore/server-files-p3 branch 2 times, most recently from 0989d19 to 7db621a Compare November 18, 2025 16:03
@jennifer-shehane jennifer-shehane self-requested a review November 19, 2025 14:34
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.

A few comments, fine to merge

Comment on lines 93 to 94
// @ts-expect-error
err.code = 'ENOENT'
Copy link
Member

Choose a reason for hiding this comment

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

comment on this expect-error?

@AtofStryker AtofStryker force-pushed the chore/server-files-p3 branch from 7db621a to 0625ed6 Compare November 20, 2025 17:24
@AtofStryker AtofStryker merged commit 550be4a into develop Nov 20, 2025
69 of 81 checks passed
@AtofStryker AtofStryker deleted the chore/server-files-p3 branch November 20, 2025 18:31
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.

3 participants