Skip to content

Commit 0edb112

Browse files
authored
[edge-runtime] drop node16 (vercel#73432)
1 parent 4ed2815 commit 0edb112

25 files changed

+37354
-223
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
7777
"@babel/preset-flow": "7.22.5",
7878
"@babel/preset-react": "7.22.5",
79-
"@edge-runtime/jest-environment": "3.0.4",
79+
"@edge-runtime/jest-environment": "4.0.0",
8080
"@emotion/cache": "11.11.0",
8181
"@emotion/react": "11.11.1",
8282
"@fullhuman/postcss-purgecss": "1.3.0",

packages/next/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@
153153
"@babel/traverse": "7.22.5",
154154
"@babel/types": "7.22.5",
155155
"@capsizecss/metrics": "3.4.0",
156-
"@edge-runtime/cookies": "5.0.0",
157-
"@edge-runtime/ponyfill": "3.0.0",
158-
"@edge-runtime/primitives": "5.1.1",
156+
"@edge-runtime/cookies": "6.0.0",
157+
"@edge-runtime/ponyfill": "4.0.0",
158+
"@edge-runtime/primitives": "6.0.0",
159159
"@hapi/accept": "5.0.2",
160160
"@jest/transform": "29.5.0",
161161
"@jest/types": "29.5.0",
@@ -242,7 +242,7 @@
242242
"debug": "4.1.1",
243243
"devalue": "2.0.1",
244244
"domain-browser": "4.19.0",
245-
"edge-runtime": "3.0.5",
245+
"edge-runtime": "4.0.1",
246246
"events": "3.3.0",
247247
"find-up": "4.1.0",
248248
"fresh": "0.5.2",

packages/next/src/compiled/@edge-runtime/cookies/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ type RequestCookie = Pick<CookieListItem, 'name' | 'value'>;
143143
*/
144144
declare class RequestCookies {
145145
constructor(requestHeaders: Headers);
146-
[Symbol.iterator](): IterableIterator<[string, RequestCookie]>;
146+
[Symbol.iterator](): MapIterator<[string, RequestCookie]>;
147147
/**
148148
* The amount of cookies received from the client
149149
*/

packages/next/src/compiled/@edge-runtime/cookies/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ function parseSetCookie(setCookie) {
7979
partitioned,
8080
priority
8181
} = Object.fromEntries(
82-
attributes.map(([key, value2]) => [key.toLowerCase(), value2])
82+
attributes.map(([key, value2]) => [
83+
key.toLowerCase().replace(/-/g, ""),
84+
value2
85+
])
8386
);
8487
const cookie = {
8588
name,
@@ -297,8 +300,8 @@ var ResponseCookies = class {
297300
* {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.
298301
*/
299302
delete(...args) {
300-
const [name, path, domain] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0].path, args[0].domain];
301-
return this.set({ name, path, domain, value: "", expires: /* @__PURE__ */ new Date(0) });
303+
const [name, options] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0]];
304+
return this.set({ ...options, name, value: "", expires: /* @__PURE__ */ new Date(0) });
302305
}
303306
[Symbol.for("edge-runtime.inspect.custom")]() {
304307
return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"@edge-runtime/cookies","version":"5.0.0","main":"./index.js","license":"MIT"}
1+
{"name":"@edge-runtime/cookies","version":"6.0.0","main":"./index.js","license":"MIT"}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"@edge-runtime/ponyfill","version":"3.0.0","main":"./index.js","types":"./index.d.ts","license":"MIT"}
1+
{"name":"@edge-runtime/ponyfill","version":"4.0.0","main":"./index.js","types":"./index.d.ts","license":"MIT"}

packages/next/src/compiled/@edge-runtime/primitives/blob.d.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/next/src/compiled/@edge-runtime/primitives/blob.js.text.js

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
"use strict";
2+
var __defProp = Object.defineProperty;
3+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4+
var __getOwnPropNames = Object.getOwnPropertyNames;
5+
var __hasOwnProp = Object.prototype.hasOwnProperty;
6+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7+
var __export = (target, all) => {
8+
for (var name in all)
9+
__defProp(target, name, { get: all[name], enumerable: true });
10+
};
11+
var __copyProps = (to, from, except, desc) => {
12+
if (from && typeof from === "object" || typeof from === "function") {
13+
for (let key of __getOwnPropNames(from))
14+
if (!__hasOwnProp.call(to, key) && key !== except)
15+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16+
}
17+
return to;
18+
};
19+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20+
21+
// src/primitives/crypto.js
22+
var crypto_exports = {};
23+
__export(crypto_exports, {
24+
Crypto: () => Crypto,
25+
CryptoKey: () => CryptoKey,
26+
SubtleCrypto: () => SubtleCrypto,
27+
crypto: () => crypto
28+
});
29+
module.exports = __toCommonJS(crypto_exports);
30+
var import_node_crypto = require("crypto");
31+
var { Crypto, CryptoKey } = import_node_crypto.webcrypto;
32+
function SubtleCrypto() {
33+
if (!(this instanceof SubtleCrypto))
34+
return new SubtleCrypto();
35+
throw TypeError("Illegal constructor");
36+
}
37+
__name(SubtleCrypto, "SubtleCrypto");
38+
var crypto = new Crypto();
39+
// Annotate the CommonJS export names for ESM import in node:
40+
0 && (module.exports = {
41+
Crypto,
42+
CryptoKey,
43+
SubtleCrypto,
44+
crypto
45+
});

packages/next/src/compiled/@edge-runtime/primitives/crypto.js.text.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)