-
Notifications
You must be signed in to change notification settings - Fork 89
Fix extension-id-sync-guard test after canonical ID update #26263
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -122,10 +122,10 @@ cd clients/chrome-extension/native-host | |||||||
| bun install | ||||||||
| ``` | ||||||||
|
|
||||||||
| 2. Export your extension ID(s). Include both the CWS ID and your dev ID if you want both to work: | ||||||||
| 2. Export your extension ID(s). Include both the CWS ID (from the canonical allowlist) and your dev ID if you want both to work: | ||||||||
|
|
||||||||
| ```bash | ||||||||
| export CWS_EXTENSION_ID=hphbdmpffeigpcdjkckleobjmhhokpne | ||||||||
| export CWS_EXTENSION_ID=$(cat ../../meta/browser-extension/chrome-extension-allowlist.json | grep -oE '[a-p]{32}') | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This command is documented in a section that explicitly runs from Useful? React with 👍 / 👎.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Wrong relative path in README: The manual setup instructions tell the user to
Suggested change
Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||||
| export DEV_EXTENSION_ID=<id from chrome://extensions> | ||||||||
| ``` | ||||||||
|
|
||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Missing
gflag on CWS_URL_PATTERN causes only the first CWS URL to be strippedThe comment on line 231 says "Strip all CWS URLs" but
CWS_URL_PATTERNatassistant/src/__tests__/extension-id-sync-guard.test.ts:214lacks theg(global) flag.String.replace()withoutgonly replaces the first match. If a file contains the extension ID in two or more CWS URLs, the second occurrence won't be stripped, andstripped.includes(extensionId)will betrue, causing a false-positive test failure. Currently no file has multiple CWS URLs, but the code doesn't match its stated intent.Was this helpful? React with 👍 or 👎 to provide feedback.