Skip to content

Commit 739361f

Browse files
build: upgrade edge-runtime (vercel#67565)
The only change in this new version is that the project is now licensed under the MIT license. --------- Co-authored-by: Janka Uryga <lolzatu2@gmail.com>
1 parent 04c21cf commit 739361f

File tree

10 files changed

+63
-68
lines changed

10 files changed

+63
-68
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
7070
"@babel/preset-flow": "7.22.5",
7171
"@babel/preset-react": "7.22.5",
72-
"@edge-runtime/jest-environment": "2.3.10",
72+
"@edge-runtime/jest-environment": "3.0.0",
7373
"@emotion/cache": "11.11.0",
7474
"@emotion/react": "11.11.1",
7575
"@fullhuman/postcss-purgecss": "1.3.0",

packages/next/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@
149149
"@babel/traverse": "7.22.5",
150150
"@babel/types": "7.22.5",
151151
"@capsizecss/metrics": "3.2.0",
152-
"@edge-runtime/cookies": "4.1.1",
153-
"@edge-runtime/ponyfill": "2.4.2",
154-
"@edge-runtime/primitives": "4.1.0",
152+
"@edge-runtime/cookies": "5.0.0",
153+
"@edge-runtime/ponyfill": "3.0.0",
154+
"@edge-runtime/primitives": "5.0.0",
155155
"@hapi/accept": "5.0.2",
156156
"@jest/transform": "29.5.0",
157157
"@jest/types": "29.5.0",
@@ -238,7 +238,7 @@
238238
"debug": "4.1.1",
239239
"devalue": "2.0.1",
240240
"domain-browser": "4.19.0",
241-
"edge-runtime": "2.5.4",
241+
"edge-runtime": "3.0.0",
242242
"events": "3.3.0",
243243
"find-up": "4.1.0",
244244
"fresh": "0.5.2",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"@edge-runtime/cookies","version":"4.1.1","main":"./index.js","license":"MPL-2.0"}
1+
{"name":"@edge-runtime/cookies","version":"5.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":"2.4.2","main":"./index.js","types":"./index.d.ts","license":"MPL-2.0"}
1+
{"name":"@edge-runtime/ponyfill","version":"3.0.0","main":"./index.js","types":"./index.d.ts","license":"MIT"}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"@edge-runtime/primitives","version":"4.1.0","main":"./index.js","license":"MPL-2.0"}
1+
{"name":"@edge-runtime/primitives","version":"5.0.0","main":"./index.js","license":"MIT"}

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"edge-runtime","main":"index.js","license":"MPL-2.0"}
1+
{"name":"edge-runtime","main":"index.js","license":"MIT"}

packages/next/src/server/next-server.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,16 +1623,20 @@ export default class NextNodeServer extends BaseServer<
16231623
return { finished: true }
16241624
}
16251625

1626-
for (let [key, value] of result.response.headers) {
1627-
if (key.toLowerCase() !== 'set-cookie') continue
1626+
// Split compound (comma-separated) set-cookie headers
1627+
if (result.response.headers.has('set-cookie')) {
1628+
const cookies = result.response.headers
1629+
.getSetCookie()
1630+
.flatMap((maybeCompoundCookie) =>
1631+
splitCookiesString(maybeCompoundCookie)
1632+
)
16281633

1629-
// Clear existing header.
1630-
result.response.headers.delete(key)
1634+
// Clear existing header(s)
1635+
result.response.headers.delete('set-cookie')
16311636

16321637
// Append each cookie individually.
1633-
const cookies = splitCookiesString(value)
16341638
for (const cookie of cookies) {
1635-
result.response.headers.append(key, cookie)
1639+
result.response.headers.append('set-cookie', cookie)
16361640
}
16371641

16381642
// Add cookies to request meta.

pnpm-lock.yaml

Lines changed: 42 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/e2e/middleware-general/test/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ describe('Middleware Runtime', () => {
561561
const payload = readMiddlewareJSON(response)
562562
expect('error' in payload).toBe(true)
563563
expect(payload.error.name).toBe('AbortError')
564-
expect(payload.error.message).toContain('The operation was aborted')
564+
expect(payload.error.message).toContain('This operation was aborted')
565565
})
566566

567567
it(`should validate & parse request url from any route`, async () => {

0 commit comments

Comments
 (0)