Skip to content

Commit

Permalink
Replace btoa (#2233)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Dec 29, 2024
1 parent 8fc72a6 commit 5edbdb9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
4 changes: 2 additions & 2 deletions lib/chrome/chromeDevtoolsProtocol.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import intel from 'intel';
import CDP from 'chrome-remote-interface';
import btoa from 'btoa';
const log = intel.getLogger('browsertime.chrome.cdp');
import { toArray } from '../support/util.js';
import { traceCategories as defaultTraceCategories } from './settings/traceCategories.js';
Expand Down Expand Up @@ -107,7 +106,8 @@ export class ChromeDevtoolsProtocol {

async setBasicAuth(basicAuth) {
const parts = basicAuth.split('@');
const basic = 'Basic ' + btoa(parts[0] + ':' + parts[1]);
const basic =
'Basic ' + Buffer.from(parts[0] + ':' + parts[1]).toString('base64');
await this.cdpClient.Network.setExtraHTTPHeaders({
headers: { Authorization: basic }
});
Expand Down
17 changes: 0 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@sitespeed.io/geckodriver": "0.35.0-1",
"@sitespeed.io/throttle": "5.0.1",
"@sitespeed.io/tracium": "0.3.3",
"btoa": "1.2.1",
"chrome-har": "1.0.1",
"chrome-remote-interface": "0.33.2",
"dayjs": "1.11.13",
Expand Down

0 comments on commit 5edbdb9

Please sign in to comment.