Compare commits

..

5 Commits

Author SHA1 Message Date
Nathan Rajlich
7845bef826 Publish Stable
- vercel@28.16.7
 - @vercel/edge@0.3.0
 - @vercel/gatsby-plugin-vercel-builder@1.1.9
 - @vercel/next@3.6.1
 - @vercel/node-bridge@3.1.12
 - @vercel/node@2.9.8
 - @vercel/static-build@1.3.12
2023-02-24 04:04:16 -08:00
github-actions[bot]
7acb2e4b07 [examples] Upgrade Next.js to version 13.2.1 (#9536)
This auto-generated PR updates Next.js to version 13.2.1
2023-02-24 11:55:18 +00:00
Gal Schlezinger
abea002e93 [edge] Add RequestContext type (#9526)
Co-authored-by: Kiko Beats <josefrancisco.verdu@gmail.com>
2023-02-24 03:07:16 -08:00
Nathan Rajlich
2db9678bd4 [node-bridge] Fix multiple Set-Cookie headers in streaming mode (#9520)
Multiple `Set-Cookie` headers are being concat'd instead of being sent individually when in streaming mode.

**Non-streaming:**

```
$ curl -v https://01-remix-basics-eqztqyq3y.vercel-support.app/set-cookie 2>&1 | grep cookie
* h2h3 [:path: /set-cookie]
> GET /set-cookie HTTP/2
< set-cookie: foo=bar
< set-cookie: sessionId=38afes7a8
```

**Streaming:**

```
$ curl -v https://01-remix-basics-9b18alizh.vercel-support.app/set-cookie 2>&1 | grep cookie
* h2h3 [:path: /set-cookie]
> GET /set-cookie HTTP/2
< set-cookie: foo=bar,sessionId=38afes7a8
```
2023-02-24 04:03:37 +00:00
JJ Kasper
05f942c53f [tests] Update app-dir integration test (#9532)
The cache heuristic changed so there are now two separate serverless functions expected.
2023-02-24 00:29:34 +00:00
16 changed files with 230 additions and 91 deletions

View File

@@ -9,8 +9,8 @@
"version": "0.1.0",
"dependencies": {
"eslint": "8.34.0",
"eslint-config-next": "13.2.0",
"next": "13.2.0",
"eslint-config-next": "13.2.1",
"next": "13.2.1",
"react": "18.2.0",
"react-dom": "18.2.0"
}
@@ -79,22 +79,22 @@
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA=="
},
"node_modules/@next/env": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.2.0.tgz",
"integrity": "sha512-yv9oaRVa+AxFa27uQOVecS931NrE+GcQSqcL2HaRxL8NunStLtPiyNm/VixvdzfiWLabMz4dXvbXfwCNaECzcw=="
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.2.1.tgz",
"integrity": "sha512-Hq+6QZ6kgmloCg8Kgrix+4F0HtvLqVK3FZAnlAoS0eonaDemHe1Km4kwjSWRE3JNpJNcKxFHF+jsZrYo0SxWoQ=="
},
"node_modules/@next/eslint-plugin-next": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.2.0.tgz",
"integrity": "sha512-/UW29MPgX5P1J1AVIj9g1TCv4BKzUTBB54wgtEp7X15pEKerACGYv9iny44KGZxSJDizWD2+Zaw6+E7do4kwRA==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.2.1.tgz",
"integrity": "sha512-r0i5rcO6SMAZtqiGarUVMr3k256X0R0j6pEkKg4PxqUW+hG0qgMxRVAJsuoRG5OBFkCOlSfWZJ0mP9fQdCcyNg==",
"dependencies": {
"glob": "7.1.7"
}
},
"node_modules/@next/swc-android-arm-eabi": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.0.tgz",
"integrity": "sha512-VMetUwBWtDBGzNiOkhiWTP+99ZYW5NVRpIGlUsldEtY8IQIqleaUgW9iamsO0kDSjhWNdCQCB+xu5HcCvmDTww==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.1.tgz",
"integrity": "sha512-Yua7mUpEd1wzIT6Jjl3dpRizIfGp9NR4F2xeRuQv+ae+SDI1Em2WyM9m46UL+oeW5GpMiEHoaBagr47RScZFmQ==",
"cpu": [
"arm"
],
@@ -107,9 +107,9 @@
}
},
"node_modules/@next/swc-android-arm64": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.2.0.tgz",
"integrity": "sha512-fAiP54Om3fSj5aKntxEvW5fWzyMUzLzjFrHuUt5jBnTRWM4QikhLy547OZDoxycyk4GoQVHmNMSA3hILsrV/dQ==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.2.1.tgz",
"integrity": "sha512-Bifcr2f6VwInOdq1uH/9lp8fH7Nf7XGkIx4XceVd32LPJqG2c6FZU8ZRBvTdhxzXVpt5TPtuXhOP4Ij9UPqsVw==",
"cpu": [
"arm64"
],
@@ -122,9 +122,9 @@
}
},
"node_modules/@next/swc-darwin-arm64": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.0.tgz",
"integrity": "sha512-F4zbvPnq3zCTqyyM6WN8ledazzJx3OrxIdc2ewnqnfk6tjBZ/aq1M27GhEfylGjZG1KvbtJCxUqi7dR/6R94bA==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.1.tgz",
"integrity": "sha512-gvqm+fGMYxAkwBapH0Vvng5yrb6HTkIvZfY4oEdwwYrwuLdkjqnJygCMgpNqIFmAHSXgtlWxfYv1VC8sjN81Kw==",
"cpu": [
"arm64"
],
@@ -137,9 +137,9 @@
}
},
"node_modules/@next/swc-darwin-x64": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.0.tgz",
"integrity": "sha512-Y9+fB7TLAAnkCZQXWjwJg5bi1pT5NuNkI+HoKYp26U1J0SxW5vZWFGc31WFmmHIz3wA0zlaQfRa4mF7cpZL5yw==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.1.tgz",
"integrity": "sha512-HGqVqmaZWj6zomqOZUVbO5NhlABL0iIaxTmd0O5B0MoMa5zpDGoaHSG+fxgcWMXcGcxmUNchv1NfNOYiTKoHOg==",
"cpu": [
"x64"
],
@@ -152,9 +152,9 @@
}
},
"node_modules/@next/swc-freebsd-x64": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.0.tgz",
"integrity": "sha512-b9bCLlfznbV6e6Vg9wKYZJs7Uz8z/Py9105MYq95a3JlHiI3e/fvBpm1c7fe5QlvWJlqyNav6Clyu1W+lDk+IQ==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.1.tgz",
"integrity": "sha512-N/a4JarAq+E+g+9K2ywJUmDIgU2xs2nA+BBldH0oq4zYJMRiUhL0iaN9G4e72VmGOJ61L/3W6VN8RIUOwTLoqQ==",
"cpu": [
"x64"
],
@@ -167,9 +167,9 @@
}
},
"node_modules/@next/swc-linux-arm-gnueabihf": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.0.tgz",
"integrity": "sha512-jY/2JjDVVyktzRtMclAIVLgOxk5Ut9NKu8kKMCPdKMf9/ila37UpRfIh2fOXtRhv8AK7Lq/iSI/v2vjopZxZgQ==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.1.tgz",
"integrity": "sha512-WaFoerF/eRbhbE57TaIGJXbQAERADZ/RZ45u6qox9beb5xnWsyYgzX+WuN7Tkhyvga0/aMuVYFzS9CEay7D+bw==",
"cpu": [
"arm"
],
@@ -182,9 +182,9 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.0.tgz",
"integrity": "sha512-EKjWU3/lSBhOwPQRQLbySUnATnXygCjGd8ag3rP6d7kTIhfuPO4pY+DYW+wHOt5qB1ULNRmW0sXZ/ZKnQrVszw==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.1.tgz",
"integrity": "sha512-R+Jhc1/RJTnncE9fkePboHDNOCm1WJ8daanWbjKhfPySMyeniKYRwGn5SLYW3S8YlRS0QVdZaaszDSZWgUcsmA==",
"cpu": [
"arm64"
],
@@ -197,9 +197,9 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.0.tgz",
"integrity": "sha512-T5R9r23Docwo6PYZRzndeFB5WUN3+smMbyk25K50MAngCiSydr82/YfAetcp7Ov7Shp4a8xXP9DHDIsBas6wbQ==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.1.tgz",
"integrity": "sha512-oI1UfZPidGAVddlL2eOTmfsuKV9EaT1aktIzVIxIAgxzQSdwsV371gU3G55ggkurzfdlgF3GThFePDWF0d8dmw==",
"cpu": [
"arm64"
],
@@ -212,9 +212,9 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.0.tgz",
"integrity": "sha512-FeXTc2KFvUSnTJmkpNMKoBHmNA1Ujr3QdfcKnVm/gXWqK+rfuEhAiRNOo+6mPcQ0noEge1j8Ai+W1LTbdDwPZQ==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.1.tgz",
"integrity": "sha512-PCygPwrQmS+7WUuAWWioWMZCzZm4PG91lfRxToLDg7yIm/3YfAw5N2EK2TaM9pzlWdvHQAqRMX/oLvv027xUiA==",
"cpu": [
"x64"
],
@@ -227,9 +227,9 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.0.tgz",
"integrity": "sha512-7Y0XMUzWDWI94pxC0xWGMWrgTFKHu/myc+GTNVEwvLtI9WA0brKqZrL1tCQW/+t6J+5XqS7w+AHbViaF+muu1A==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.1.tgz",
"integrity": "sha512-sUAKxo7CFZYGHNxheGh9nIBElLYBM6md/liEGfOTwh/xna4/GTTcmkGWkF7PdnvaYNgcPIQgHIMYiAa6yBKAVw==",
"cpu": [
"x64"
],
@@ -242,9 +242,9 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.0.tgz",
"integrity": "sha512-NM5h2gEMe8EtvOeRU3vRM83tq1xo6Qvhuz0xJem/176SAMxbqzAz4LLP3l9VyUI3SIzGyiztvF/1c0jqeq7UEA==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.1.tgz",
"integrity": "sha512-qDmyEjDBpl/vBXxuOOKKWmPQOcARcZIMach1s7kjzaien0SySut/PHRlj56sosa81Wt4hTGhfhZ1R7g1n7+B8w==",
"cpu": [
"arm64"
],
@@ -257,9 +257,9 @@
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.0.tgz",
"integrity": "sha512-G7YEJZX9wkcUaBOvXQSCF9Wb2sqP8hhsmFXF6po7M3llw4b+2ut2DXLf+UMdthOdUK0u+Ijhy5F7SbW9HOn2ig==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.1.tgz",
"integrity": "sha512-2joqFQ81ZYPg6DcikIzQn3DgjKglNhPAozx6dL5sCNkr1CPMD0YIkJgT3CnYyMHQ04Qi3Npv0XX3MD6LJO8OCA==",
"cpu": [
"ia32"
],
@@ -272,9 +272,9 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.0.tgz",
"integrity": "sha512-QTAjSuPevnZnlHfC4600+4NvxRuPar6tWdYbPum9vnk3OIH1xu9YLK+2ArPGFd0bB2K8AoY2SIMbs1dhK0GjQQ==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.1.tgz",
"integrity": "sha512-r3+0fSaIZT6N237iMzwUhfNwjhAFvXjqB+4iuW+wcpxW+LHm1g/IoxN8eSRcb8jPItC86JxjAxpke0QL97qd6g==",
"cpu": [
"x64"
],
@@ -1022,11 +1022,11 @@
}
},
"node_modules/eslint-config-next": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.2.0.tgz",
"integrity": "sha512-nZfIQG5m82xwgGO8EjakbF5qjnXADcveGxOxlg5J1jZ9MQlESvqqRrvl4+KHE+JKRgFD2h0q5xwDDWfFbtZmMA==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.2.1.tgz",
"integrity": "sha512-2GAx7EjSiCzJN6H2L/v1kbYrNiwQxzkyjy6eWSjuhAKt+P6d3nVNHGy9mON8ZcYd72w/M8kyMjm4UB9cvijgrw==",
"dependencies": {
"@next/eslint-plugin-next": "13.2.0",
"@next/eslint-plugin-next": "13.2.1",
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.42.0",
"eslint-import-resolver-node": "^0.3.6",
@@ -2317,11 +2317,11 @@
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="
},
"node_modules/next": {
"version": "13.2.0",
"resolved": "https://registry.npmjs.org/next/-/next-13.2.0.tgz",
"integrity": "sha512-vhByvKHedsaMwNTwXKzK4IMmNp7XI7vN4etcGUoIpLrIuDfoYA3bS0ImS4X9F6lKzopG5aVp7a1CjuzF2NGkvA==",
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/next/-/next-13.2.1.tgz",
"integrity": "sha512-qhgJlDtG0xidNViJUPeQHLGJJoT4zDj/El7fP3D3OzpxJDUfxsm16cK4WTMyvSX1ciIfAq05u+0HqFAa+VJ+Hg==",
"dependencies": {
"@next/env": "13.2.0",
"@next/env": "13.2.1",
"@swc/helpers": "0.4.14",
"caniuse-lite": "^1.0.30001406",
"postcss": "8.4.14",
@@ -2334,19 +2334,19 @@
"node": ">=14.6.0"
},
"optionalDependencies": {
"@next/swc-android-arm-eabi": "13.2.0",
"@next/swc-android-arm64": "13.2.0",
"@next/swc-darwin-arm64": "13.2.0",
"@next/swc-darwin-x64": "13.2.0",
"@next/swc-freebsd-x64": "13.2.0",
"@next/swc-linux-arm-gnueabihf": "13.2.0",
"@next/swc-linux-arm64-gnu": "13.2.0",
"@next/swc-linux-arm64-musl": "13.2.0",
"@next/swc-linux-x64-gnu": "13.2.0",
"@next/swc-linux-x64-musl": "13.2.0",
"@next/swc-win32-arm64-msvc": "13.2.0",
"@next/swc-win32-ia32-msvc": "13.2.0",
"@next/swc-win32-x64-msvc": "13.2.0"
"@next/swc-android-arm-eabi": "13.2.1",
"@next/swc-android-arm64": "13.2.1",
"@next/swc-darwin-arm64": "13.2.1",
"@next/swc-darwin-x64": "13.2.1",
"@next/swc-freebsd-x64": "13.2.1",
"@next/swc-linux-arm-gnueabihf": "13.2.1",
"@next/swc-linux-arm64-gnu": "13.2.1",
"@next/swc-linux-arm64-musl": "13.2.1",
"@next/swc-linux-x64-gnu": "13.2.1",
"@next/swc-linux-x64-musl": "13.2.1",
"@next/swc-win32-arm64-msvc": "13.2.1",
"@next/swc-win32-ia32-msvc": "13.2.1",
"@next/swc-win32-x64-msvc": "13.2.1"
},
"peerDependencies": {
"@opentelemetry/api": "^1.4.0",

View File

@@ -10,8 +10,8 @@
},
"dependencies": {
"eslint": "8.34.0",
"eslint-config-next": "13.2.0",
"next": "13.2.0",
"eslint-config-next": "13.2.1",
"next": "13.2.1",
"react": "18.2.0",
"react-dom": "18.2.0"
}

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "28.16.6",
"version": "28.16.7",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -44,13 +44,13 @@
"@vercel/build-utils": "6.3.1",
"@vercel/go": "2.3.8",
"@vercel/hydrogen": "0.0.54",
"@vercel/next": "3.6.0",
"@vercel/node": "2.9.7",
"@vercel/next": "3.6.1",
"@vercel/node": "2.9.8",
"@vercel/python": "3.1.50",
"@vercel/redwood": "1.1.6",
"@vercel/remix": "1.4.1",
"@vercel/ruby": "1.3.67",
"@vercel/static-build": "1.3.11"
"@vercel/static-build": "1.3.12"
},
"devDependencies": {
"@alex_neo/jest-expect-message": "1.0.5",

View File

@@ -7,6 +7,7 @@
- [ExtraResponseInit](interfaces/ExtraResponseInit.md)
- [Geo](interfaces/Geo.md)
- [ModifiedRequest](interfaces/ModifiedRequest.md)
- [RequestContext](interfaces/RequestContext.md)
### Variables

View File

@@ -0,0 +1,79 @@
# Interface: RequestContext
An extension to the standard `Request` object that is passed to every Edge Function.
**`Example`**
```ts
import type { RequestContext } from '@vercel/edge';
export default async function handler(
request: Request,
ctx: RequestContext
): Promise<Response> {
// ctx is the RequestContext
}
```
## Table of contents
### Methods
- [waitUntil](RequestContext.md#waituntil)
## Methods
### waitUntil
**waitUntil**(`promise`): `void`
A method that can be used to keep the function running after a response has been sent.
This is useful when you have an async task that you want to keep running even after the
response has been sent and the request has ended.
**`Example`**
<caption>Sending an internal error to an error tracking service</caption>
```ts
import type { RequestContext } from '@vercel/edge';
export async function handleRequest(
request: Request,
ctx: RequestContext
): Promise<Response> {
try {
return await myFunctionThatReturnsResponse();
} catch (e) {
ctx.waitUntil(
(async () => {
// report this error to your error tracking service
await fetch('https://my-error-tracking-service.com', {
method: 'POST',
body: JSON.stringify({
stack: e.stack,
message: e.message,
name: e.name,
url: request.url,
}),
});
})()
);
return new Response('Internal Server Error', { status: 500 });
}
}
```
#### Parameters
| Name | Type | Description |
| :-------- | :---------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------- |
| `promise` | [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`unknown`\> | A promise that will be kept alive until it resolves or rejects. |
#### Returns
`void`
#### Defined in
[packages/edge/src/request.ts:47](https://github.com/vercel/vercel/blob/main/packages/edge/src/request.ts#L47)

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/edge",
"version": "0.2.7",
"version": "0.3.0",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",

View File

@@ -4,5 +4,6 @@ export * from './middleware-helpers';
export type { Geo } from './edge-headers';
export * from './edge-headers';
export * from './response';
export type { RequestContext } from './request';
import './published-types.d.ts';

View File

@@ -0,0 +1,52 @@
/**
* An extension to the standard `Request` object that is passed to every Edge Function.
*
* @example
* ```ts
* import type { RequestContext } from '@vercel/edge';
*
* export default async function handler(request: Request, ctx: RequestContext): Promise<Response> {
* // ctx is the RequestContext
* }
* ```
*/
export interface RequestContext {
/**
* A method that can be used to keep the function running after a response has been sent.
* This is useful when you have an async task that you want to keep running even after the
* response has been sent and the request has ended.
*
* @example
*
* <caption>Sending an internal error to an error tracking service</caption>
*
* ```ts
* import type { RequestContext } from '@vercel/edge';
*
* export async function handleRequest(request: Request, ctx: RequestContext): Promise<Response> {
* try {
* return await myFunctionThatReturnsResponse();
* } catch (e) {
* ctx.waitUntil((async () => {
* // report this error to your error tracking service
* await fetch('https://my-error-tracking-service.com', {
* method: 'POST',
* body: JSON.stringify({
* stack: e.stack,
* message: e.message,
* name: e.name,
* url: request.url,
* }),
* });
* })());
* return new Response('Internal Server Error', { status: 500 });
* }
* }
* ```
*/
waitUntil(
/**
* A promise that will be kept alive until it resolves or rejects.
*/ promise: Promise<unknown>
): void;
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/gatsby-plugin-vercel-builder",
"version": "1.1.8",
"version": "1.1.9",
"main": "dist/index.js",
"files": [
"dist",
@@ -15,7 +15,7 @@
},
"dependencies": {
"@vercel/build-utils": "6.3.1",
"@vercel/node": "2.9.7",
"@vercel/node": "2.9.8",
"@vercel/routing-utils": "2.1.9",
"ajv": "8.12.0",
"esbuild": "0.14.47",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/next",
"version": "3.6.0",
"version": "3.6.1",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",

View File

@@ -26,7 +26,7 @@ if (parseInt(process.versions.node.split('.')[0], 10) >= 16) {
}
}
expect(lambdas.size).toBe(1);
expect(lambdas.size).toBe(2);
expect(buildResult.output['dashboard']).toBeDefined();
expect(buildResult.output['dashboard/another']).toBeDefined();
expect(buildResult.output['dashboard/changelog']).toBeDefined();

View File

@@ -435,7 +435,13 @@ function getStreamResponseCallback({ url, socket, cipher, resolve, reject }) {
headers += `x-vercel-status-code: ${response.statusCode || 200}${CRLF}`;
for (const [name, value] of getHeadersIterator(response.headers)) {
if (!['connection', 'transfer-encoding'].includes(name)) {
headers += `x-vercel-header-${name}: ${value}${CRLF}`;
if (typeof value === 'string') {
headers += `x-vercel-header-${name}: ${value}${CRLF}`;
} else {
for (const val of value) {
headers += `x-vercel-header-${name}: ${val}${CRLF}`;
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node-bridge",
"version": "3.1.11",
"version": "3.1.12",
"license": "MIT",
"main": "./index.js",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node",
"version": "2.9.7",
"version": "2.9.8",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -32,7 +32,7 @@
"@edge-runtime/vm": "2.0.0",
"@types/node": "14.18.33",
"@vercel/build-utils": "6.3.1",
"@vercel/node-bridge": "3.1.11",
"@vercel/node-bridge": "3.1.12",
"@vercel/static-config": "2.0.13",
"edge-runtime": "2.0.0",
"esbuild": "0.14.47",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/static-build",
"version": "1.3.11",
"version": "1.3.12",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/build-step",
@@ -30,7 +30,7 @@
},
"dependencies": {
"@vercel/gatsby-plugin-vercel-analytics": "1.0.7",
"@vercel/gatsby-plugin-vercel-builder": "1.1.8"
"@vercel/gatsby-plugin-vercel-builder": "1.1.9"
},
"devDependencies": {
"@types/aws-lambda": "8.10.64",

12
pnpm-lock.yaml generated
View File

@@ -213,14 +213,14 @@ importers:
'@vercel/go': 2.3.8
'@vercel/hydrogen': 0.0.54
'@vercel/ncc': 0.24.0
'@vercel/next': 3.6.0
'@vercel/node': 2.9.7
'@vercel/next': 3.6.1
'@vercel/node': 2.9.8
'@vercel/python': 3.1.50
'@vercel/redwood': 1.1.6
'@vercel/remix': 1.4.1
'@vercel/routing-utils': 2.1.9
'@vercel/ruby': 1.3.67
'@vercel/static-build': 1.3.11
'@vercel/static-build': 1.3.12
'@zeit/source-map-support': 0.6.2
ajv: 6.12.2
alpha-sort: 2.0.1
@@ -598,7 +598,7 @@ importers:
'@types/node': 14.18.33
'@types/react': 18.0.26
'@vercel/build-utils': 6.3.1
'@vercel/node': 2.9.7
'@vercel/node': 2.9.8
'@vercel/routing-utils': 2.1.9
ajv: 8.12.0
esbuild: 0.14.47
@@ -777,7 +777,7 @@ importers:
'@vercel/build-utils': 6.3.1
'@vercel/ncc': 0.24.0
'@vercel/nft': 0.22.5
'@vercel/node-bridge': 3.1.11
'@vercel/node-bridge': 3.1.12
'@vercel/static-config': 2.0.13
content-type: 1.0.4
cookie: 0.4.0
@@ -989,7 +989,7 @@ importers:
'@vercel/frameworks': 1.3.1
'@vercel/fs-detectors': 3.8.1
'@vercel/gatsby-plugin-vercel-analytics': 1.0.7
'@vercel/gatsby-plugin-vercel-builder': 1.1.8
'@vercel/gatsby-plugin-vercel-builder': 1.1.9
'@vercel/ncc': 0.24.0
'@vercel/routing-utils': 2.1.9
'@vercel/static-config': 2.0.13