npm package diff
Package: @forge/bundler
Versions: 4.20.9-next.28 - 4.20.9-next.29
Modified: package/out/stubs/http-sandbox-impl.js
Index: package/out/stubs/http-sandbox-impl.js
===================================================================
--- package/out/stubs/http-sandbox-impl.js
+++ package/out/stubs/http-sandbox-impl.js
@@ -154,27 +154,30 @@
this.statusMessage = response.statusText;
this.headers = {};
this.headersDistinct = {};
const rawHeaders = response.headers.raw();
- for (const [name, values] of Object.entries(rawHeaders)) {
+ for (const [name, value] of Object.entries(rawHeaders)) {
if (name === 'content-encoding') {
continue;
}
- let value;
+ let distinctValues;
+ let overrideHeaderValue;
if (HEADERS_DISCARD_DUPLICATES.has(name)) {
- value = values[0];
+ const allHeaderValues = value.split(', ');
+ overrideHeaderValue = allHeaderValues[0];
+ distinctValues = allHeaderValues;
}
else if (name === 'set-cookie') {
- value = values;
+ distinctValues = [value];
}
else if (name === 'cookie') {
- value = values.join('; ');
+ distinctValues = value.split('; ');
}
else {
- value = values.join(', ');
+ distinctValues = value.split(', ');
}
- this.headers[name] = value;
- this.headersDistinct[name] = values;
+ this.headers[name] = overrideHeaderValue ?? value;
+ this.headersDistinct[name] = distinctValues;
}
this._read = () => { };
this.push(Buffer.from(content));
this.push(null);
Modified: package/package.json
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "@forge/bundler",
- "version": "4.20.9-next.28",
+ "version": "4.20.9-next.29",
"description": "Default bundler for Forge apps",
"license": "SEE LICENSE IN LICENSE.txt",
"author": "Atlassian",
"main": "out/index.js",
@@ -34,8 +34,9 @@
"cheerio": "^0.22.0",
"console-browserify": "^1.2.0",
"crypto-browserify": "^3.12.0",
"events": "^3.3.0",
+ "headers-utils": "^3.0.2",
"html-webpack-plugin": "^5.6.0",
"inherits": "^2.0.4",
"memfs": "^4.6.0",
"nock": "13.5.4",
Modified: package/CHANGELOG.md
Large diffs are not rendered by default.