Skip to content
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

feat(cdp): implementation of cdp-bridge #961

Open
wants to merge 16 commits into
base: feature/v9
Choose a base branch
from
Open

Conversation

mato533
Copy link
Member

@mato533 mato533 commented Feb 16, 2025

This new package (@wdio/cdp-bridge) will be used to connect the node debugger.

*) This PR uses the IPC-Bridge replacement development branch ‘ta/cdp/main’ as the Base Branch.

@mato533 mato533 added the type:enhancement New feature or request label Feb 16, 2025
@mato533 mato533 added this to the 9.x.y milestone Feb 16, 2025
@mato533 mato533 requested a review from goosewobbler February 16, 2025 14:21
@mato533 mato533 linked an issue Feb 16, 2025 that may be closed by this pull request
@mato533
Copy link
Member Author

mato533 commented Feb 16, 2025

@goosewobbler
If you think it is better to review the contents of this new package after looking at the entire code replace IPC -Bridge, please comment on this.
This PR will be merged immediately.

We will create another pull request with base as main to close #308, based on the base branch of this PR.

@mato533 mato533 changed the title feat: implementation of cdp-bridge feat(cdp): implementation of cdp-bridge Feb 21, 2025
@mato533 mato533 self-assigned this Feb 21, 2025
@mato533 mato533 mentioned this pull request Feb 21, 2025
9 tasks
@goosewobbler
Copy link
Member

goosewobbler commented Mar 4, 2025

Let's get #952 done, and the other v8 PRs (#996, #960, #978, #956) merged, do a second v8.x release. Then we can look at the v9 stuff.

@goosewobbler goosewobbler added release:future Include in a future release (not the next one) semver:major Breaking changes (typically assigned to major milestone) track:next For the next major version track labels Mar 5, 2025
@mato533
Copy link
Member Author

mato533 commented Mar 5, 2025

@goosewobbler
I agree that this should be considered after the PRs you mentioned has been completed.

After that, I would like to discuss the possibility of releasing this change as part of v8 (minor update).
At the moment, this PR is created in such a way that it does NOT cause a BREAKING CHANGES from the user's point of view.

@goosewobbler
Copy link
Member

I see - well, it doesn't NEED to be released before v9 as nothing in v8.x.y will use the new package.

However I'm not against getting the new package published as part of 8.x.y if it will make the v9 dev easier in some way...

@mato533
Copy link
Member Author

mato533 commented Mar 6, 2025

@goosewobbler
I'll update to get rid of the asset that's needed for backward compatibility toward v8.
For example, remove preload/main script, remove dependencies of sample apps to this service, etc...

It will also be possible to test when ‘feature/v9’ is created and v9.next can be released.

Update

We have completed to get rid of the code related for backward compatibility.(the commit belongs to #969)

@goosewobbler goosewobbler changed the base branch from ta/cdp/main to feature/v9 March 8, 2025 16:23
@goosewobbler
Copy link
Member

@mato533 I created feature/v9 from ta/cdp/main

@mato533
Copy link
Member Author

mato533 commented Mar 10, 2025

@mato533 I created feature/v9 from ta/cdp/main

@goosewobbler
Thank you for your operation.
But It seems that the name feature/v9 is conflicted between the changes of #1025 .

@goosewobbler goosewobbler requested a review from Copilot March 27, 2025 16:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a new package (@wdio/cdp-bridge) that provides a lightweight interface for connecting to the Node debugger via the Chrome Developer Protocol (CDP). Key changes include:

  • Adding package configuration to the monorepo (pnpm-workspace.yaml)
  • Implementing the main library files for connecting to the debugger (dev-tool, bridge, types, constants)
  • Adding unit and end-to-end tests as well as build configuration via Rollup and documentation in the README

Reviewed Changes

Copilot reviewed 12 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Added new package entry for cdp-bridge
packages/@wdio_electron-cdp-bridge/vitest.config.ts Setup of vitest configuration for the new package
packages/@wdio_electron-cdp-bridge/test/dev-tool.spec.ts Unit tests for DevTool functionality
packages/@wdio_electron-cdp-bridge/test/bridge.spec.ts Unit tests for CdpBridge covering connection, messaging, etc.
packages/@wdio_electron-cdp-bridge/src/types.ts Type definitions for debugger info and version data
packages/@wdio_electron-cdp-bridge/src/index.ts Entry point re-exporting public API components
packages/@wdio_electron-cdp-bridge/src/dev-tool.ts Implements debugger connection and request execution
packages/@wdio_electron-cdp-bridge/src/constants.ts Declaration of default settings and error messages
packages/@wdio_electron-cdp-bridge/src/bridge.ts Implements the bridge class for sending commands and handling events
packages/@wdio_electron-cdp-bridge/rollup.config.ts Build configuration for both ESM and CJS modules
packages/@wdio_electron-cdp-bridge/e2e/node.spec.ts End-to-end tests for cdp-bridge functionality
packages/@wdio_electron-cdp-bridge/README.md Documentation and usage examples for the new package
Files not reviewed (6)
  • packages/@wdio_electron-cdp-bridge/e2e/tsconfig.json: Language not supported
  • packages/@wdio_electron-cdp-bridge/package.json: Language not supported
  • packages/@wdio_electron-cdp-bridge/test/tsconfig.json: Language not supported
  • packages/@wdio_electron-cdp-bridge/tsconfig.json: Language not supported
  • pnpm-lock.yaml: Language not supported
  • turbo.json: Language not supported
Comments suppressed due to low confidence (1)

packages/@wdio_electron-cdp-bridge/README.md:3

  • [nitpick] Replace the non-standard hyphen 'ー' with a standard hyphen '-' in the package name URL.
<a href="https://www.npmjs.com/package/@wdio/cdpーbridge" alt="NPM Version">

@goosewobbler
Copy link
Member

goosewobbler commented Mar 27, 2025

@mato533 I created feature/v9 from ta/cdp/main

@goosewobbler Thank you for your operation. But It seems that the name feature/v9 is conflicted between the changes of #1025 .

Not sure what you mean here, you mean it has merge conflicts with main now? We can just recreate it before merge...

EDIT: just recreated feature/v9 from main and rebased

@goosewobbler goosewobbler changed the base branch from feature/v9 to main March 27, 2025 17:13
@goosewobbler goosewobbler changed the base branch from main to feature/v9 March 27, 2025 17:14
@mato533
Copy link
Member Author

mato533 commented Mar 27, 2025

@mato533 I created feature/v9 from ta/cdp/main

@goosewobbler Thank you for your operation. But It seems that the name feature/v9 is conflicted between the changes of #1025 .

Not sure what you mean here, you mean it has merge conflicts with main now? We can just recreate it before merge...

EDIT: just recreated feature/v9 from main and rebased

Sorry....it's so hard to understand....
Based on following logic, the feature branch name for the v9 should be feature/v9.x nor feature/v9.
This is what I wanted to say....

if [ "${BRANCH_TYPE}" == 'feature' ]; then
# For feature branches, use as-is
echo "target_branch=feature/v${FEATURE_MAJOR_VERSION}.x"
echo "target_branch=feature/v${FEATURE_MAJOR_VERSION}.x" >> $GITHUB_OUTPUT

@goosewobbler
Copy link
Member

Got it, haha! We started off using v9 and then changed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:future Include in a future release (not the next one) semver:major Breaking changes (typically assigned to major milestone) track:next For the next major version track type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selecting the library for handling debugger session
2 participants