Unverified Commit 739361fa authored by Kiko Beats's avatar Kiko Beats Committed by GitHub

build: upgrade edge-runtime (#67565)

The only change in this new version is that the project is now licensed
under the MIT license.

---------
Co-authored-by: 's avatarJanka Uryga <lolzatu2@gmail.com>
parent 04c21cf8
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
"@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-proposal-object-rest-spread": "7.20.7",
"@babel/preset-flow": "7.22.5", "@babel/preset-flow": "7.22.5",
"@babel/preset-react": "7.22.5", "@babel/preset-react": "7.22.5",
"@edge-runtime/jest-environment": "2.3.10", "@edge-runtime/jest-environment": "3.0.0",
"@emotion/cache": "11.11.0", "@emotion/cache": "11.11.0",
"@emotion/react": "11.11.1", "@emotion/react": "11.11.1",
"@fullhuman/postcss-purgecss": "1.3.0", "@fullhuman/postcss-purgecss": "1.3.0",
......
...@@ -149,9 +149,9 @@ ...@@ -149,9 +149,9 @@
"@babel/traverse": "7.22.5", "@babel/traverse": "7.22.5",
"@babel/types": "7.22.5", "@babel/types": "7.22.5",
"@capsizecss/metrics": "3.2.0", "@capsizecss/metrics": "3.2.0",
"@edge-runtime/cookies": "4.1.1", "@edge-runtime/cookies": "5.0.0",
"@edge-runtime/ponyfill": "2.4.2", "@edge-runtime/ponyfill": "3.0.0",
"@edge-runtime/primitives": "4.1.0", "@edge-runtime/primitives": "5.0.0",
"@hapi/accept": "5.0.2", "@hapi/accept": "5.0.2",
"@jest/transform": "29.5.0", "@jest/transform": "29.5.0",
"@jest/types": "29.5.0", "@jest/types": "29.5.0",
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
"debug": "4.1.1", "debug": "4.1.1",
"devalue": "2.0.1", "devalue": "2.0.1",
"domain-browser": "4.19.0", "domain-browser": "4.19.0",
"edge-runtime": "2.5.4", "edge-runtime": "3.0.0",
"events": "3.3.0", "events": "3.3.0",
"find-up": "4.1.0", "find-up": "4.1.0",
"fresh": "0.5.2", "fresh": "0.5.2",
......
{"name":"@edge-runtime/cookies","version":"4.1.1","main":"./index.js","license":"MPL-2.0"} {"name":"@edge-runtime/cookies","version":"5.0.0","main":"./index.js","license":"MIT"}
{"name":"@edge-runtime/ponyfill","version":"2.4.2","main":"./index.js","types":"./index.d.ts","license":"MPL-2.0"} {"name":"@edge-runtime/ponyfill","version":"3.0.0","main":"./index.js","types":"./index.d.ts","license":"MIT"}
{"name":"@edge-runtime/primitives","version":"4.1.0","main":"./index.js","license":"MPL-2.0"} {"name":"@edge-runtime/primitives","version":"5.0.0","main":"./index.js","license":"MIT"}
{"name":"edge-runtime","main":"index.js","license":"MPL-2.0"} {"name":"edge-runtime","main":"index.js","license":"MIT"}
...@@ -1623,16 +1623,20 @@ export default class NextNodeServer extends BaseServer< ...@@ -1623,16 +1623,20 @@ export default class NextNodeServer extends BaseServer<
return { finished: true } return { finished: true }
} }
for (let [key, value] of result.response.headers) { // Split compound (comma-separated) set-cookie headers
if (key.toLowerCase() !== 'set-cookie') continue if (result.response.headers.has('set-cookie')) {
const cookies = result.response.headers
.getSetCookie()
.flatMap((maybeCompoundCookie) =>
splitCookiesString(maybeCompoundCookie)
)
// Clear existing header. // Clear existing header(s)
result.response.headers.delete(key) result.response.headers.delete('set-cookie')
// Append each cookie individually. // Append each cookie individually.
const cookies = splitCookiesString(value)
for (const cookie of cookies) { for (const cookie of cookies) {
result.response.headers.append(key, cookie) result.response.headers.append('set-cookie', cookie)
} }
// Add cookies to request meta. // Add cookies to request meta.
......
...@@ -54,8 +54,8 @@ importers: ...@@ -54,8 +54,8 @@ importers:
specifier: 7.22.5 specifier: 7.22.5
version: 7.22.5(@babel/core@7.22.5) version: 7.22.5(@babel/core@7.22.5)
'@edge-runtime/jest-environment': '@edge-runtime/jest-environment':
specifier: 2.3.10 specifier: 3.0.0
version: 2.3.10 version: 3.0.0
'@emotion/cache': '@emotion/cache':
specifier: 11.11.0 specifier: 11.11.0
version: 11.11.0 version: 11.11.0
...@@ -946,14 +946,14 @@ importers: ...@@ -946,14 +946,14 @@ importers:
specifier: 3.2.0 specifier: 3.2.0
version: 3.2.0 version: 3.2.0
'@edge-runtime/cookies': '@edge-runtime/cookies':
specifier: 4.1.1 specifier: 5.0.0
version: 4.1.1 version: 5.0.0
'@edge-runtime/ponyfill': '@edge-runtime/ponyfill':
specifier: 2.4.2 specifier: 3.0.0
version: 2.4.2 version: 3.0.0
'@edge-runtime/primitives': '@edge-runtime/primitives':
specifier: 4.1.0 specifier: 5.0.0
version: 4.1.0 version: 5.0.0
'@hapi/accept': '@hapi/accept':
specifier: 5.0.2 specifier: 5.0.2
version: 5.0.2 version: 5.0.2
...@@ -1213,8 +1213,8 @@ importers: ...@@ -1213,8 +1213,8 @@ importers:
specifier: 4.19.0 specifier: 4.19.0
version: 4.19.0 version: 4.19.0
edge-runtime: edge-runtime:
specifier: 2.5.4 specifier: 3.0.0
version: 2.5.4 version: 3.0.0
events: events:
specifier: 3.3.0 specifier: 3.3.0
version: 3.3.0 version: 3.3.0
...@@ -3058,36 +3058,28 @@ packages: ...@@ -3058,36 +3058,28 @@ packages:
resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==}
engines: {node: '>=10.0.0'} engines: {node: '>=10.0.0'}
'@edge-runtime/cookies@4.1.1': '@edge-runtime/cookies@5.0.0':
resolution: {integrity: sha512-ATZLTOpnCUD9ZLNBIXhxOmP/UVx6BfhCjDy9P1YACpD8vrHb5Uw7YlG9RYUl1AMF7Y10TIIN3jhFbUSMiH2J7g==} resolution: {integrity: sha512-VTTuKiK86cLuLKoLLwkCLN75CrXElmitD6Q+7XAYOMQyDUgsNEF/muorgZWttrvYQBVG+7Pdb8udFqIcLszyLw==}
engines: {node: '>=16'}
'@edge-runtime/format@2.2.0':
resolution: {integrity: sha512-gPrS6AVw/qJJL0vcxMXv4kFXCU3ZTCD1uuJpwX15YxHV8BgU9OG5v9LrkkXcr96PBT/9epypfNJMhlWADuEziw==}
engines: {node: '>=16'} engines: {node: '>=16'}
'@edge-runtime/jest-environment@2.3.10': '@edge-runtime/format@3.0.0':
resolution: {integrity: sha512-wms2hveQV18DnWkiqzpjzIJ4SoD3+dXzuQ3/GAsklQDCGd4ClkREu5zCy0TFha0mR4I9tqi0DB8nD5Ldd/r1Pg==} resolution: {integrity: sha512-Mpg9LP4D9fxjXa6p3Wm4WnuK7XU5YKfFGvOje56ipdOvNXLj+DmLQSuX9uDbHmQ2KoJh/EYBAsmHqa+z8/wQgQ==}
engines: {node: '>=16'} engines: {node: '>=16'}
'@edge-runtime/ponyfill@2.4.2': '@edge-runtime/jest-environment@3.0.0':
resolution: {integrity: sha512-oN17GjFr69chu6sDLvXxdhg0Qe8EZviGSuqzR9qOiKh4MhFYGdBBcqRNzdmYeAdeRzOW2mM9yil4RftUQ7sUOA==} resolution: {integrity: sha512-tbp7XZwHafHm/vF3jGimAMtqESG9cZzQcEUNFOU7yOrenrx71CRcmhXwea/7TW9wsX1uNKqDx6VgZxrLQQUXyA==}
engines: {node: '>=16'} engines: {node: '>=16'}
'@edge-runtime/primitives@4.0.2': '@edge-runtime/ponyfill@3.0.0':
resolution: {integrity: sha512-zIzzqvq62O0gxKv/PrfFBn2TEJtJYw6YlNyfLsWr16Lxz6bT8CB1IrfWa9vc5zsQPElP/orwZCu+x80+ihWQyQ==} resolution: {integrity: sha512-JQm5QjLYv/0P6/TwOjFDBfQVNPKNCRsgP8G9sWPwKzcB5bc5mt6AMtQvMloiOm+7PosvBhGB3V448eSNGd3CTQ==}
engines: {node: '>=16'} engines: {node: '>=16'}
'@edge-runtime/primitives@4.1.0': '@edge-runtime/primitives@5.0.0':
resolution: {integrity: sha512-Vw0lbJ2lvRUqc7/soqygUX216Xb8T3WBZ987oywz6aJqRxcwSVWwr9e+Nqo2m9bxobA9mdbWNNoRY6S9eko1EQ==} resolution: {integrity: sha512-6EHOEnYFVvlLALXNacH0TsNR7lyCfy/58PJs8LMX3YtoR40ezGhh7kws1vuQCUf/QdJFNWN31SqESTzKmDkYLA==}
engines: {node: '>=16'} engines: {node: '>=16'}
'@edge-runtime/vm@3.1.4': '@edge-runtime/vm@4.0.0':
resolution: {integrity: sha512-k3AdzA2Bfdr7NCezxER0Ch3MPwMbPqEFJqlgJ7xSIvsuuW+8c2rRQpPDMoy8ZSPbnwzg+SK3cyoLGDt4hFhexQ==} resolution: {integrity: sha512-XHaLSnCVa5Z1pyQcbSVNYSUFWi+y4DTyN8QANdfeDl7aVg6PK4UtCb6WRAjVoFSBsYU/0oqbm4rjb27lhkW6bQ==}
engines: {node: '>=16'}
'@edge-runtime/vm@3.2.0':
resolution: {integrity: sha512-0dEVyRLM/lG4gp1R/Ik5bfPl/1wX00xFwd5KcNH602tzBa09oF7pbTKETEhR1GjZ75K6OJnYFu8II2dyMhONMw==}
engines: {node: '>=16'} engines: {node: '>=16'}
'@emnapi/runtime@1.1.1': '@emnapi/runtime@1.1.1':
...@@ -7325,8 +7317,8 @@ packages: ...@@ -7325,8 +7317,8 @@ packages:
ecdsa-sig-formatter@1.0.11: ecdsa-sig-formatter@1.0.11:
resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==}
edge-runtime@2.5.4: edge-runtime@3.0.0:
resolution: {integrity: sha512-s+FSmEuH9iUvrfBeGDrRrj7rGtGAGl0JoztV0OuUpDbxTWb6ZeBawW/CQjvFmcZRmOSm1aryk8rOsm96PNNuFg==} resolution: {integrity: sha512-hUE3VOcAYQHBovAkamow3217Rtlf/XUNo+1VpslcP52oqe6UKBohbj8DIdH7WtSVEbxaypaV46mEkC9+gusyNA==}
engines: {node: '>=16'} engines: {node: '>=16'}
hasBin: true hasBin: true
...@@ -11344,6 +11336,9 @@ packages: ...@@ -11344,6 +11336,9 @@ packages:
picocolors@1.0.0: picocolors@1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
picocolors@1.0.1:
resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==}
picomatch@2.3.1: picomatch@2.3.1:
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
engines: {node: '>=8.6'} engines: {node: '>=8.6'}
...@@ -16739,31 +16734,25 @@ snapshots: ...@@ -16739,31 +16734,25 @@ snapshots:
'@discoveryjs/json-ext@0.5.7': {} '@discoveryjs/json-ext@0.5.7': {}
'@edge-runtime/cookies@4.1.1': {} '@edge-runtime/cookies@5.0.0': {}
'@edge-runtime/format@2.2.0': {} '@edge-runtime/format@3.0.0': {}
'@edge-runtime/jest-environment@2.3.10': '@edge-runtime/jest-environment@3.0.0':
dependencies: dependencies:
'@edge-runtime/vm': 3.2.0 '@edge-runtime/vm': 4.0.0
'@jest/environment': 29.5.0 '@jest/environment': 29.5.0
'@jest/fake-timers': 29.5.0 '@jest/fake-timers': 29.5.0
jest-mock: 29.5.0 jest-mock: 29.5.0
jest-util: 29.5.0 jest-util: 29.5.0
'@edge-runtime/ponyfill@2.4.2': {} '@edge-runtime/ponyfill@3.0.0': {}
'@edge-runtime/primitives@4.0.2': {} '@edge-runtime/primitives@5.0.0': {}
'@edge-runtime/primitives@4.1.0': {} '@edge-runtime/vm@4.0.0':
'@edge-runtime/vm@3.1.4':
dependencies:
'@edge-runtime/primitives': 4.0.2
'@edge-runtime/vm@3.2.0':
dependencies: dependencies:
'@edge-runtime/primitives': 4.1.0 '@edge-runtime/primitives': 5.0.0
'@emnapi/runtime@1.1.1': '@emnapi/runtime@1.1.1':
dependencies: dependencies:
...@@ -22155,14 +22144,14 @@ snapshots: ...@@ -22155,14 +22144,14 @@ snapshots:
dependencies: dependencies:
safe-buffer: 5.2.1 safe-buffer: 5.2.1
edge-runtime@2.5.4: edge-runtime@3.0.0:
dependencies: dependencies:
'@edge-runtime/format': 2.2.0 '@edge-runtime/format': 3.0.0
'@edge-runtime/vm': 3.1.4 '@edge-runtime/ponyfill': 3.0.0
'@edge-runtime/vm': 4.0.0
async-listen: 3.0.1 async-listen: 3.0.1
mri: 1.2.0 mri: 1.2.0
picocolors: 1.0.0 picocolors: 1.0.1
pretty-bytes: 5.6.0
pretty-ms: 7.0.1 pretty-ms: 7.0.1
signal-exit: 4.0.2 signal-exit: 4.0.2
time-span: 4.0.0 time-span: 4.0.0
...@@ -27582,6 +27571,8 @@ snapshots: ...@@ -27582,6 +27571,8 @@ snapshots:
picocolors@1.0.0: {} picocolors@1.0.0: {}
picocolors@1.0.1: {}
picomatch@2.3.1: {} picomatch@2.3.1: {}
picomatch@4.0.1: {} picomatch@4.0.1: {}
......
...@@ -561,7 +561,7 @@ describe('Middleware Runtime', () => { ...@@ -561,7 +561,7 @@ describe('Middleware Runtime', () => {
const payload = readMiddlewareJSON(response) const payload = readMiddlewareJSON(response)
expect('error' in payload).toBe(true) expect('error' in payload).toBe(true)
expect(payload.error.name).toBe('AbortError') expect(payload.error.name).toBe('AbortError')
expect(payload.error.message).toContain('The operation was aborted') expect(payload.error.message).toContain('This operation was aborted')
}) })
it(`should validate & parse request url from any route`, async () => { it(`should validate & parse request url from any route`, async () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment