Skip to content

Conversation

@AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Oct 16, 2025

USE A MERGE COMMIT

  • Closes

Additional details

contains PRs:

Steps to test

How has the user experience changed?

PR Tasks


Note

Splits @packages/socket into browser and node bundles and migrates @packages/extension to TypeScript/Vitest with new app-dist/lib-dist builds, updating imports/tests across the repo and making minor server/proxy/CI adjustments.

  • Packages:
    • @packages/socket:
      • Split into browser (browser/client) and node (cjs/node, esm/node) bundles with new entrypoints/exports (SocketIOServer, CDPSocketServer, client, createWebsocket).
      • Added build scripts and TS configs (tsconfig.browser.json, tsconfig.cjs.json, tsconfig.esm.json); removed legacy index.js and reorganized sources.
    • @packages/extension:
      • Migrated sources to TypeScript; switched tests from Mocha/Sinon to Vitest; updated README and .gitignore.
      • New build pipeline: output to app-dist/ (v2 via webpack, v3 via tsc) and lib-dist/ (CJS); rewrote gulpfile.ts and webpack.config.mjs.
      • Replaced lib/extension.js with lib/index.ts; removed util.js; added new TS configs and vitest config.
      • Converted integration/unit tests to .spec.ts and updated mocks/types.
  • Repo-wide import updates:
    • Browser clients now import from @packages/socket/browser/client; server/types import from @packages/socket.
    • Updated usages in packages/app, frontend-shared, network, server tests, and system tests.
  • Server/Proxy adjustments:
    • Inlined getCookieUrl in server/lib/automation/cookies.ts (removed @packages/extension dependency).
    • Updated Chrome/Electron browser code to import CDPSocketServer from @packages/socket and extension as module.
    • Proxy error middleware now imports from @packages/errors.
    • V8 snapshot metadata updated to new socket CJS paths.
  • Docs:
    • guides/esm-migration.md status updates (extension/socket completed) and notes.
  • CI:
    • CircleCI mocha expected result count adjusted from 4 to 3.

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

@AtofStryker AtofStryker self-assigned this Oct 16, 2025
cursor[bot]

This comment was marked as outdated.

@cypress
Copy link

cypress bot commented Oct 16, 2025

cypress    Run #66768

Run Properties:  status check passed Passed #66768  •  git commit 2408fe5e96: chore: update expected result count
Project cypress
Branch Review chore/refactor-socket-and-extension
Run status status check passed Passed #66768
Run duration 19m 47s
Commit git commit 2408fe5e96: chore: update expected result count
Committer Bill Glesias
View all properties for this run ↗︎

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

Warning

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

UI Coverage  45.61%
  Untested elements 187  
  Tested elements 161  
Accessibility  97.98%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@AtofStryker
Copy link
Contributor Author

@jennifer-shehane are you able to review the feature branch? only commit that isn't reviewed already is 2408fe5 just to get things synced with develop

@cursor
Copy link

cursor bot commented Oct 23, 2025

Bug: Incorrect SocketIO Imports Cause Module Resolution Errors

The socketIo imports are incorrect for CommonJS contexts. cypress.config.js imports the ESM client from @packages/socket/browser/client. Test files (websockets_spec.js, socket_spec.js) import from @packages/socket/lib/client, which is a source path, not the built CommonJS output at @packages/socket/cjs/node. These paths will cause module resolution errors.

Additional Locations (2)

Fix in Cursor Fix in Web

@AtofStryker
Copy link
Contributor Author

Bug: Incorrect SocketIO Imports Cause Module Resolution Errors

The socketIo imports are incorrect for CommonJS contexts. cypress.config.js imports the ESM client from @packages/socket/browser/client. Test files (websockets_spec.js, socket_spec.js) import from @packages/socket/lib/client, which is a source path, not the built CommonJS output at @packages/socket/cjs/node. These paths will cause module resolution errors.

Additional Locations (2)

Fix in Cursor Fix in Web

this is intentional until we are able to convert those tests to vitest. there is a giant comment where the import from source is happening

@AtofStryker AtofStryker merged commit 98decd5 into develop Oct 23, 2025
88 of 92 checks passed
@AtofStryker AtofStryker deleted the chore/refactor-socket-and-extension branch October 23, 2025 19:33
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