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(bidi): remove non-spec-compliant bidi commands #3020

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
abdfd54
remove bidi commands
anshikavashistha Jan 23, 2025
9ae5bdc
Update src/bidiMapper/CommandProcessor.ts
anshikavashistha Jan 25, 2025
76d8cf8
Update src/bidiMapper/CommandProcessor.ts
anshikavashistha Jan 25, 2025
17d21fd
chore: touch dependabot.yml (#3021)
OrKoN Jan 24, 2025
c01164a
chore(deps): Bump wpt from `41bcf67` to `d852a80` (#3022)
dependabot[bot] Jan 24, 2025
42bb371
chore(deps): Bump the all group with 3 updates (#3024)
dependabot[bot] Jan 24, 2025
4e87ab3
fix: handle max depth property (#3027)
OrKoN Jan 24, 2025
5700dae
chore(deps): Bump websockets from 14.1 to 14.2 in /examples in the al…
dependabot[bot] Jan 24, 2025
ea4c4db
fix: support correct to base64 for non-latin (#3031)
Lightning00Blade Jan 24, 2025
c177062
fix: rely on frameSubtreeWillBeDetached to emit contextDestroyed even…
OrKoN Jan 24, 2025
d902ad6
chore: update EsLint preset (#3032)
Lightning00Blade Jan 24, 2025
8f879ae
fix: fix unsubscribe by id parser (#3034)
OrKoN Jan 24, 2025
84ac0a2
chore(deps): Bump wpt from `d852a80` to `bf6ec7a` (#3033)
dependabot[bot] Jan 24, 2025
03ddf05
chore(deps-dev): Bump the all group with 9 updates (#3025)
dependabot[bot] Jan 24, 2025
8a2bcba
ci: don't use always() (#3035)
Lightning00Blade Jan 24, 2025
ba8b23b
build(chrome): update the pinned browser version to 134.0.6978.0 (#3005)
browser-automation-bot Jan 25, 2025
6a248fe
chore(deps): Bump wpt from `bf6ec7a` to `7063191` (#3038)
dependabot[bot] Jan 27, 2025
fc7314c
chore(deps-dev): Bump the all group with 2 updates (#3037)
dependabot[bot] Jan 27, 2025
bbc7364
fix: allow `bluetooth.requestDevicePromptUpdated` subscription (#3044)
sadym-chromium Jan 28, 2025
cb16a32
chore(main): release chromium-bidi 1.2.0 (#3018)
release-please[bot] Jan 28, 2025
33c49cb
feat: implement user context subscriptions (#3039)
OrKoN Jan 29, 2025
686e1a8
chore(deps): Bump wpt from `7063191` to `2e8b491` (#3048)
dependabot[bot] Jan 29, 2025
ef252c4
test: fix flake (#3047)
Lightning00Blade Jan 29, 2025
8550219
build(chrome): update the pinned browser version to 134.0.6987.0 (#3036)
browser-automation-bot Jan 30, 2025
16be466
build(chrome): update the pinned browser version to 134.0.6988.0 (#3051)
browser-automation-bot Jan 30, 2025
fda5f7d
chore(deps): Bump wpt from `2e8b491` to `402df69` (#3050)
dependabot[bot] Jan 30, 2025
7ee8c3a
feat(bidi): remove non-spec-compliant bidi commands
anshikavashistha Jan 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified examples/classic_to_bidi_example.py
100755 → 100644
Empty file.
Empty file modified examples/console_log_example.py
100755 → 100644
Empty file.
Empty file modified examples/preload_script_example.py
100755 → 100644
Empty file.
Empty file modified examples/print_example.py
100755 → 100644
Empty file.
Empty file modified examples/screenshot_example.py
100755 → 100644
Empty file.
Empty file modified examples/script_example.py
100755 → 100644
Empty file.
25 changes: 1 addition & 24 deletions src/bidiMapper/CommandProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,30 +253,7 @@ export class CommandProcessor extends EventEmitter<CommandProcessorEventsMap> {
// CDP deprecated domain.
// https://github.com/GoogleChromeLabs/chromium-bidi/issues/2844
// keep-sorted start block=yes
case 'cdp.getSession':
this.#logger?.(
LogType.debugWarn,
`Legacy '${command.method}' command is deprecated and will not supported soon. Use 'goog:${command.method}' instead.`,
);
return this.#cdpProcessor.getSession(
this.#parser.parseGetSessionParams(command.params),
);
case 'cdp.resolveRealm':
this.#logger?.(
LogType.debugWarn,
`Legacy '${command.method}' command is deprecated and will not supported soon. Use 'goog:${command.method}' instead.`,
);
return this.#cdpProcessor.resolveRealm(
this.#parser.parseResolveRealmParams(command.params),
);
case 'cdp.sendCommand':
this.#logger?.(
LogType.debugWarn,
`Legacy '${command.method}' command is deprecated and will not supported soon. Use 'goog:${command.method}' instead.`,
);
return await this.#cdpProcessor.sendCommand(
this.#parser.parseSendCommandParams(command.params),
);

// keep-sorted end

// Input module
Expand Down
16 changes: 2 additions & 14 deletions src/bidiTab/Transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class WindowBidiTransport implements BidiTransport {
id?: unknown;
method?: unknown;
params?: unknown;
channel?: unknown;

'goog:channel'?: unknown;
};
try {
Expand Down Expand Up @@ -168,19 +168,7 @@ export class WindowBidiTransport implements BidiTransport {
if (command['goog:channel'] !== '') {
channel = {'goog:channel': command['goog:channel'] as string};
}
} else if (command.channel !== undefined) {
log(
WindowBidiTransport.LOGGER_PREFIX_WARN,
'Legacy `channel` parameter is deprecated and will not supported soon. Use `goog:channel` instead.',
);
const channelType = WindowBidiTransport.#getJsonType(command.channel);
if (channelType !== 'string') {
throw new Error(`Expected string 'channel' but got ${channelType}`);
}
if (command.channel !== '') {
channel = {channel: command.channel as string};
}
}
}

return {id, method, params, channel} as ChromiumBidi.Command;
}
Expand Down
Empty file modified tools/generate-bidi-types.mjs
100755 → 100644
Empty file.
Empty file modified tools/install-browser.mjs
100755 → 100644
Empty file.
Empty file modified tools/run-bidi-server.mjs
100755 → 100644
Empty file.
Empty file modified tools/run-e2e.mjs
100755 → 100644
Empty file.
Empty file modified tools/run-wpt-all.mjs
100755 → 100644
Empty file.
Empty file modified tools/run-wpt.mjs
100755 → 100644
Empty file.