@whatwg-node/node-fetch 0.7.20-alpha-20250515122015-59d3c484fd8db5af4c19af10d10f13c2c4c1b597 → 0.7.20-alpha-20250515123636-b0cbb054c56426df02d3bf080f670444c6e02bbd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/Headers.js CHANGED
@@ -142,6 +142,16 @@ class PonyfillHeaders {
142
142
  this._setCookies = [value];
143
143
  return;
144
144
  }
145
+ if (this._map) {
146
+ this._map.set(key, value);
147
+ return;
148
+ }
149
+ if (this.headersInit != null &&
150
+ !isHeadersLike(this.headersInit) &&
151
+ !Array.isArray(this.headersInit)) {
152
+ this.headersInit[key] = value;
153
+ return;
154
+ }
145
155
  this.getMap().set(key, value);
146
156
  }
147
157
  delete(name) {
package/esm/Headers.js CHANGED
@@ -138,6 +138,16 @@ export class PonyfillHeaders {
138
138
  this._setCookies = [value];
139
139
  return;
140
140
  }
141
+ if (this._map) {
142
+ this._map.set(key, value);
143
+ return;
144
+ }
145
+ if (this.headersInit != null &&
146
+ !isHeadersLike(this.headersInit) &&
147
+ !Array.isArray(this.headersInit)) {
148
+ this.headersInit[key] = value;
149
+ return;
150
+ }
141
151
  this.getMap().set(key, value);
142
152
  }
143
153
  delete(name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.7.20-alpha-20250515122015-59d3c484fd8db5af4c19af10d10f13c2c4c1b597",
3
+ "version": "0.7.20-alpha-20250515123636-b0cbb054c56426df02d3bf080f670444c6e02bbd",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "dependencies": {