Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
305 changes: 98 additions & 207 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@testplane/devtools": "8.32.5",
"@testplane/wdio-protocols": "9.4.7",
"@testplane/wdio-utils": "9.5.4",
"@testplane/webdriverio": "9.5.24",
"@testplane/webdriverio": "9.5.25",
"@vitest/spy": "2.1.4",
"buffer-crc32": "1.0.0",
"chalk": "2.4.2",
Expand Down Expand Up @@ -125,7 +125,7 @@
"@rrweb/record": "2.0.0-alpha.18",
"@sinonjs/fake-timers": "10.3.0",
"@swc/core": "1.13.3",
"@testplane/wdio-types": "9.5.4",
"@testplane/wdio-types": "9.5.5",
"@types/babel__code-frame": "7.0.6",
"@types/browserify": "12.0.40",
"@types/chai": "4.3.4",
Expand All @@ -139,7 +139,7 @@
"@types/lodash": "4.14.191",
"@types/micromatch": "4.0.9",
"@types/mocha": "10.0.1",
"@types/node": "18.19.3",
"@types/node": "20.19.39",
"@types/proper-lockfile": "4.1.4",
"@types/proxyquire": "1.3.28",
"@types/set-cookie-parser": "2.4.10",
Expand Down
10 changes: 6 additions & 4 deletions src/browser/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,15 @@ export class Browser {
req = this._config[optName](req);
}

if (!req.headers!["X-Request-ID"]) {
req.headers!["X-Request-ID"] = `${
const requestHeaders = req.headers as Record<string, string>;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

New version of "@types/node" complained about it
New version was necessary because old one has weird types when it comes to RawData -> Buffer conversion


if (!requestHeaders["X-Request-ID"]) {
requestHeaders["X-Request-ID"] = `${
this.state.testXReqId
}${X_REQUEST_ID_DELIMITER}${crypto.randomUUID()}`;
}
if (!req.headers!["traceparent"] && this.state.traceparent) {
req.headers!["traceparent"] = this.state.traceparent;
if (!requestHeaders["traceparent"] && this.state.traceparent) {
requestHeaders["traceparent"] = this.state.traceparent;
}

return req;
Expand Down
Loading
Loading