Compare commits

...

18 Commits

Author SHA1 Message Date
Vercel Release Bot
acb2acf953 Version Packages (#11034)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.


# Releases
## vercel@33.2.0

### Minor Changes

-   chore: deprecate next/nuxt/gastby Speed Insights injection in favor of @vercel/speed-insights ([#11048](https://github.com/vercel/vercel/pull/11048))

### Patch Changes

-   fix error when @vercel/analytics is a transitive dependency of the deployed application ([#10892](https://github.com/vercel/vercel/pull/10892))

-   [cli] Add documentation string for `skip-domain` option ([#11051](https://github.com/vercel/vercel/pull/11051))

-   Updated dependencies \[[`260125784`](2601257846), [`cdddb33ad`](cdddb33ad4), [`72d8604c9`](72d8604c9d), [`90d0455e1`](90d0455e1f), [`0716130e5`](0716130e58), [`b6b151f39`](b6b151f391), [`b185a7e20`](b185a7e207)]:
    -   @vercel/static-build@2.1.0
    -   @vercel/build-utils@7.5.1
    -   @vercel/next@4.1.0
    -   @vercel/remix-builder@2.0.18
    -   @vercel/node@3.0.17

## @vercel/next@4.1.0

### Minor Changes

-   fix error when @vercel/analytics is a transitive dependency of the deployed application ([#10892](https://github.com/vercel/vercel/pull/10892))

### Patch Changes

-   Use `worker.name` instead of edge function name to fix type error in `@vercel/next` ([#11050](https://github.com/vercel/vercel/pull/11050))

## @vercel/static-build@2.1.0

### Minor Changes

-   chore: deprecate next/nuxt/gastby Speed Insights injection in favor of @vercel/speed-insights ([#11048](https://github.com/vercel/vercel/pull/11048))

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/gatsby-plugin-vercel-builder@2.0.16

## @vercel/build-utils@7.5.1

### Patch Changes

-   Add experimental field to Lambda and size to FileFsRef output ([#11059](https://github.com/vercel/vercel/pull/11059))

## @vercel/client@13.0.14

### Patch Changes

-   Updated dependencies \[[`cdddb33ad`](cdddb33ad4)]:
    -   @vercel/build-utils@7.5.1

## @vercel/gatsby-plugin-vercel-builder@2.0.16

### Patch Changes

-   Updated dependencies \[[`cdddb33ad`](cdddb33ad4)]:
    -   @vercel/build-utils@7.5.1

## @vercel/node@3.0.17

### Patch Changes

-   Updated dependencies \[[`cdddb33ad`](cdddb33ad4)]:
    -   @vercel/build-utils@7.5.1

## @vercel/remix-builder@2.0.18

### Patch Changes

-   Fix functions without a output path edge case ([#11038](https://github.com/vercel/vercel/pull/11038))

-   Update `@remix-run/dev` fork to v2.5.0 ([#11054](https://github.com/vercel/vercel/pull/11054))

-   Update `@remix-run/dev` fork to v2.5.1 ([#11065](https://github.com/vercel/vercel/pull/11065))

## @vercel-internals/types@1.0.21

### Patch Changes

-   Updated dependencies \[[`cdddb33ad`](cdddb33ad4)]:
    -   @vercel/build-utils@7.5.1
2024-01-19 22:07:42 +00:00
Damien Simonin Feugas
2601257846 [cli, static-builds] deprecation notice for speed insights injection (#11048)
### 🧐 What's in there?

With the recent release of [`@vercel/speed-insights`](https://vercel.com/docs/speed-insights/package) own package (like [`@vercel/analytics`](https://vercel.com/docs/analytics/package)), it's time to encourage users to migrate.

With the availability of `@vercel/speed-insights`, users will have to opt-in explicitly by installing the package. Their benefit is a better and fine-grained control of the reporting (in particular, per-application sample rate).

###  Note to reviewers

I used `console.warn` and hope it will stands out in the build logs. I'm happy to use anything else if you have better suggestions.

There's also a deprecation warning in Next.js, which covers a related but slightly different case, when users explicitly pass analyticsId in their configuration. https://github.com/vercel/next.js/pull/60677
2024-01-19 19:10:31 +00:00
jane
30b0925218 fix support link (#11067) 2024-01-19 16:55:43 +00:00
Vercel Release Bot
eddd432e06 [examples][tests] Upgrade Next.js to version 14.1.0 (#11066)
This auto-generated PR updates 7 packages to Next.js version 14.1.0

Co-authored-by: Steven <steven@ceriously.com>
2024-01-19 11:08:14 -05:00
Vercel Release Bot
b185a7e207 [remix] Update @remix-run/dev to v2.5.1 (#11065)
This auto-generated PR updates `@remix-run/dev` to version 2.5.1.
2024-01-19 00:29:36 +00:00
Trek Glowacki
5c910bf937 [static-build] bump stencil test fixture to latest (#11058)
Bump stencil test fixture to latest
2024-01-18 23:15:45 +00:00
JJ Kasper
cdddb33ad4 Add experimental field to Lambda and size to FileFsRef output (#11059)
This adds a new experimental field for new bundling behavior. This also
adds an optional `size` field to the FileFsRef output since we already
stat to avoid having to re-stat to get this value.
2024-01-18 14:51:54 -08:00
JJ Kasper
0da7ea7b78 Add retry handling when hitting SSO (#11061)
This aims to reduce flakiness when SSO disabling for a test project is
still disabling/propagating.

x-ref:
https://github.com/vercel/vercel/actions/runs/7563953104/job/20597320056?pr=11059
x-ref:
https://github.com/vercel/vercel/actions/runs/7563953104/job/20597322078?pr=11059

---------

Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2024-01-18 13:17:49 -08:00
Trek Glowacki
7de754398e [cli] Add documentation string for skip-domain option (#11051)
Text taken directly from https://vercel.com/docs/cli/deploy#skip-domain
2024-01-18 18:10:22 +00:00
Trek Glowacki
d4cc520814 [tests] update FastAPI fixture to latest (#11053)
Bumping this test fixture for python to keep up with releases.
2024-01-17 19:57:44 +00:00
Sean Massa
03d07dd163 update codeowners (#11057)
Update codeowners for shifting responsibilities.
2024-01-17 11:22:47 -06:00
Vercel Release Bot
b6b151f391 [remix] Update @remix-run/dev to v2.5.0 (#11054)
This auto-generated PR updates `@remix-run/dev` to version 2.5.0.
2024-01-17 05:07:26 +00:00
Vercel Release Bot
8c4b732d41 [tests] Upgrade Turbo to version 1.11.3 (#11021)
This auto-generated PR updates Turbo to version 1.11.3
2024-01-17 00:07:06 +00:00
Nathan Rajlich
d4335f0b56 Remove @cb1kenobi from CODEOWNERS (#11039)
:salute:
2024-01-16 15:43:30 -08:00
Nathan Rajlich
90d0455e1f [remix] Fix functions without a output path edge case (#11038)
Fixes an edge case where a route without a path was causing the build to
fail. Reproducible with this `remix.config.js` file:

```js
export default {
    ignoredRouteFiles: ["**/.*"],
    routes(defineRoutes) {
        return defineRoutes((route) => {
            route("/", "foo.tsx", { index: true });
        });
    },
};
```
2024-01-16 14:37:05 -08:00
Ethan Arrowood
0716130e58 Use worker.name instead of edge function name to fix type error in @vercel/next (#11050)
Uses another `name` property instead of the now deprecated one.
2024-01-16 12:56:28 -08:00
Ethan Arrowood
8b7479fb6e [python] update fastapi to 0.105.0 (#10958)
Updates python fixture `fastapi` to version `0.105.1`
2024-01-16 16:53:55 +00:00
Damien Simonin Feugas
72d8604c9d [cli] fix error when @vercel/analytics is a transitive dependency of the deployed application (#10892) 2024-01-11 15:48:20 +01:00
57 changed files with 1039 additions and 444 deletions

16
.github/CODEOWNERS vendored
View File

@@ -2,17 +2,17 @@
# https://help.github.com/en/articles/about-code-owners
# Restricted Paths
* @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek
/.github/workflows @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek @ijjk
/packages/fs-detectors @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek @agadzik @chloetedder
/packages/next @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek @ijjk @ztanner
/packages/routing-utils @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek @ijjk
/packages/static-build @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek
/packages/edge @vercel/compute @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek
* @TooTallNate @EndangeredMassa @trek
/.github/workflows @TooTallNate @EndangeredMassa @trek @ijjk
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @agadzik @chloetedder
/packages/next @TooTallNate @EndangeredMassa @Ethan-Arrowood @trek @ijjk @ztanner
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @ijjk
/packages/static-build @TooTallNate @EndangeredMassa @trek
/packages/edge @vercel/compute @TooTallNate @EndangeredMassa @trek
/examples @leerob
/examples/create-react-app @Timer
/examples/nextjs @timneutkens @ijjk @ztanner @huozhi
/packages/node @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek @Kikobeats
/packages/node @TooTallNate @EndangeredMassa @trek @Kikobeats
# Unrestricted Paths
.changeset/

View File

@@ -1,8 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Bug Report
url: https://vercel.com/support/request
about: Report a bug using the Vercel support form
url: https://vercel.com/help
about: Reach out to our support team
- name: Feature Request
url: https://github.com/orgs/vercel/discussions/new?category=ideas
about: Share ideas for new features

View File

@@ -25,3 +25,9 @@ body {
)
rgb(var(--background-start-rgb));
}
@layer utilities {
.text-balance {
text-wrap: balance;
}
}

View File

@@ -1,22 +1,22 @@
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
const inter = Inter({ subsets: ['latin'] })
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
title: "Create Next App",
description: "Generated by create next app",
};
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
)
);
}

View File

@@ -1,4 +1,4 @@
import Image from 'next/image'
import Image from "next/image";
export default function Home() {
return (
@@ -15,7 +15,7 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
By{' '}
By{" "}
<Image
src="/vercel.svg"
alt="Vercel Logo"
@@ -28,7 +28,7 @@ export default function Home() {
</div>
</div>
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-full sm:before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full sm:after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
<Image
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
src="/next.svg"
@@ -47,7 +47,7 @@ export default function Home() {
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{' '}
Docs{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
@@ -64,7 +64,7 @@ export default function Home() {
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{' '}
Learn{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
@@ -81,7 +81,7 @@ export default function Home() {
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{' '}
Templates{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
@@ -98,16 +98,16 @@ export default function Home() {
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{' '}
Deploy{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
<p className={`m-0 max-w-[30ch] text-sm opacity-50 text-balance`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
</div>
</main>
)
);
}

View File

@@ -1,4 +0,0 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
module.exports = nextConfig

View File

@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
export default nextConfig;

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@
"dependencies": {
"react": "^18",
"react-dom": "^18",
"next": "14.0.4"
"next": "14.1.0"
},
"devDependencies": {
"typescript": "^5",
@@ -22,6 +22,6 @@
"postcss": "^8",
"tailwindcss": "^3.3.0",
"eslint": "^8",
"eslint-config-next": "14.0.4"
"eslint-config-next": "14.1.0"
}
}

View File

@@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {},
autoprefixer: {},
},
}
};

View File

@@ -1,20 +1,20 @@
import type { Config } from 'tailwindcss'
import type { Config } from "tailwindcss";
const config: Config = {
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
backgroundImage: {
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
'gradient-conic':
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
"gradient-conic":
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
},
},
},
plugins: [],
}
export default config
};
export default config;

View File

@@ -1,6 +1,5 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,

View File

@@ -1,5 +1,12 @@
# @vercel-internals/types
## 1.0.21
### Patch Changes
- Updated dependencies [[`cdddb33ad`](https://github.com/vercel/vercel/commit/cdddb33ad49f6080c49f4fff3767e6111acd0bbe)]:
- @vercel/build-utils@7.5.1
## 1.0.20
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "@vercel-internals/types",
"version": "1.0.20",
"version": "1.0.21",
"types": "index.d.ts",
"main": "index.d.ts",
"files": [
@@ -10,7 +10,7 @@
"dependencies": {
"@types/node": "14.14.31",
"@vercel-internals/constants": "1.0.4",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"@vercel/routing-utils": "3.1.0"
},
"devDependencies": {

View File

@@ -33,7 +33,7 @@
"source-map-support": "0.5.12",
"ts-eager": "2.0.2",
"ts-jest": "29.1.0",
"turbo": "1.11.2",
"turbo": "1.11.3",
"typescript": "4.9.5"
},
"scripts": {

View File

@@ -1,5 +1,11 @@
# @vercel/build-utils
## 7.5.1
### Patch Changes
- Add experimental field to Lambda and size to FileFsRef output ([#11059](https://github.com/vercel/vercel/pull/11059))
## 7.5.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/build-utils",
"version": "7.5.0",
"version": "7.5.1",
"license": "Apache-2.0",
"main": "./dist/index.js",
"types": "./dist/index.d.js",

View File

@@ -11,6 +11,7 @@ interface FileFsRefOptions {
mode?: number;
contentType?: string;
fsPath: string;
size?: number;
}
interface FromStreamOptions {
@@ -24,28 +25,38 @@ class FileFsRef implements FileBase {
public type: 'FileFsRef';
public mode: number;
public fsPath: string;
public size?: number;
public contentType: string | undefined;
constructor({ mode = 0o100644, contentType, fsPath }: FileFsRefOptions) {
constructor({
mode = 0o100644,
contentType,
fsPath,
size,
}: FileFsRefOptions) {
assert(typeof mode === 'number');
assert(typeof fsPath === 'string');
this.type = 'FileFsRef';
this.mode = mode;
this.contentType = contentType;
this.fsPath = fsPath;
this.size = size;
}
static async fromFsPath({
mode,
contentType,
fsPath,
size,
}: FileFsRefOptions): Promise<FileFsRef> {
let m = mode;
if (!m) {
let s = size;
if (!m || typeof s === 'undefined') {
const stat = await fs.lstat(fsPath);
m = stat.mode;
s = stat.size;
}
return new FileFsRef({ mode: m, contentType, fsPath });
return new FileFsRef({ mode: m, contentType, fsPath, size: s });
}
static async fromStream({
@@ -69,7 +80,7 @@ class FileFsRef implements FileBase {
dest.on('error', reject);
});
return new FileFsRef({ mode, contentType, fsPath });
return FileFsRef.fromFsPath({ mode, contentType, fsPath });
}
async toStreamAsync(): Promise<NodeJS.ReadableStream> {

View File

@@ -37,6 +37,7 @@ export interface LambdaOptionsBase {
export interface LambdaOptionsWithFiles extends LambdaOptionsBase {
files: Files;
experimentalAllowBundling?: boolean;
}
/**
@@ -79,6 +80,7 @@ export class Lambda {
supportsWrapper?: boolean;
supportsResponseStreaming?: boolean;
framework?: FunctionFramework;
experimentalAllowBundling?: boolean;
constructor(opts: LambdaOptions) {
const {
@@ -114,6 +116,16 @@ export class Lambda {
);
}
if (
'experimentalAllowBundling' in opts &&
opts.experimentalAllowBundling !== undefined
) {
assert(
typeof opts.experimentalAllowBundling === 'boolean',
'"experimentalAllowBundling" is not a boolean'
);
}
if (memory !== undefined) {
assert(typeof memory === 'number', '"memory" is not a number');
}
@@ -183,6 +195,10 @@ export class Lambda {
this.supportsResponseStreaming =
supportsResponseStreaming ?? experimentalResponseStreaming;
this.framework = framework;
this.experimentalAllowBundling =
'experimentalAllowBundling' in opts
? opts.experimentalAllowBundling
: undefined;
}
async createZip(): Promise<Buffer> {

View File

@@ -1,5 +1,24 @@
# vercel
## 33.2.0
### Minor Changes
- chore: deprecate next/nuxt/gastby Speed Insights injection in favor of @vercel/speed-insights ([#11048](https://github.com/vercel/vercel/pull/11048))
### Patch Changes
- fix error when @vercel/analytics is a transitive dependency of the deployed application ([#10892](https://github.com/vercel/vercel/pull/10892))
- [cli] Add documentation string for `skip-domain` option ([#11051](https://github.com/vercel/vercel/pull/11051))
- Updated dependencies [[`260125784`](https://github.com/vercel/vercel/commit/2601257846fa201fc9efde021a906c706f6191aa), [`cdddb33ad`](https://github.com/vercel/vercel/commit/cdddb33ad49f6080c49f4fff3767e6111acd0bbe), [`72d8604c9`](https://github.com/vercel/vercel/commit/72d8604c9dba108ccca41d6288b765a7ba727295), [`90d0455e1`](https://github.com/vercel/vercel/commit/90d0455e1ff7b5892ff4960226535f57f704ef6f), [`0716130e5`](https://github.com/vercel/vercel/commit/0716130e580a920d92d249d029ed37f92f2ca847), [`b6b151f39`](https://github.com/vercel/vercel/commit/b6b151f3917c5cb47226951446b9dbb96c7d872b), [`b185a7e20`](https://github.com/vercel/vercel/commit/b185a7e207b153c378bd3db2618eece3a3b6a93e)]:
- @vercel/static-build@2.1.0
- @vercel/build-utils@7.5.1
- @vercel/next@4.1.0
- @vercel/remix-builder@2.0.18
- @vercel/node@3.0.17
## 33.1.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "33.1.0",
"version": "33.2.0",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -31,17 +31,17 @@
"node": ">= 16"
},
"dependencies": {
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"@vercel/fun": "1.1.0",
"@vercel/go": "3.0.5",
"@vercel/hydrogen": "1.0.2",
"@vercel/next": "4.0.17",
"@vercel/node": "3.0.16",
"@vercel/next": "4.1.0",
"@vercel/node": "3.0.17",
"@vercel/python": "4.1.0",
"@vercel/redwood": "2.0.6",
"@vercel/remix-builder": "2.0.17",
"@vercel/remix-builder": "2.0.18",
"@vercel/ruby": "2.0.4",
"@vercel/static-build": "2.0.17",
"@vercel/static-build": "2.1.0",
"chokidar": "3.3.1"
},
"devDependencies": {
@@ -88,8 +88,8 @@
"@types/yauzl-promise": "2.1.0",
"@vercel-internals/constants": "1.0.4",
"@vercel-internals/get-package-json": "1.0.0",
"@vercel-internals/types": "1.0.20",
"@vercel/client": "13.0.13",
"@vercel-internals/types": "1.0.21",
"@vercel/client": "13.0.14",
"@vercel/error-utils": "2.0.2",
"@vercel/frameworks": "2.0.6",
"@vercel/fs-detectors": "5.1.6",

View File

@@ -1,4 +1,4 @@
import fs from 'fs-extra';
import fs, { readJSON } from 'fs-extra';
import chalk from 'chalk';
import dotenv from 'dotenv';
import semver from 'semver';
@@ -71,6 +71,7 @@ import { setMonorepoDefaultSettings } from '../../util/build/monorepo';
import { help } from '../help';
import { buildCommand } from './command';
import { scrubArgv } from '../../util/build/scrub-argv';
import { cwd } from 'process';
type BuildResult = BuildResultV2 | BuildResultV3;
@@ -257,6 +258,9 @@ export default async function main(client: Client): Promise<number> {
if (project.settings.analyticsId) {
envToUnset.add('VERCEL_ANALYTICS_ID');
process.env.VERCEL_ANALYTICS_ID = project.settings.analyticsId;
output.warn(
'Vercel Speed Insights auto-injection is deprecated in favor of @vercel/speed-insights package. Learn more: https://vercel.link/upgrate-to-speed-insights-package'
);
}
// Some build processes use these env vars to platform detect Vercel
@@ -432,29 +436,6 @@ async function doBuild(
const ops: Promise<Error | void>[] = [];
const dependencyMap = makeDepencyMap(pkg);
const speedInsighsVersion = dependencyMap.get('@vercel/speed-insights');
if (speedInsighsVersion) {
if (process.env.VERCEL_ANALYTICS_ID) {
output.warn(
`The \`VERCEL_ANALYTICS_ID\` environment variable is deprecated and will be removed in a future release. Please remove it from your environment variables`
);
delete process.env.VERCEL_ANALYTICS_ID;
}
buildsJson.features = {
...(buildsJson.features ?? {}),
speedInsightsVersion: speedInsighsVersion,
};
}
const webAnalyticsVersion = dependencyMap.get('@vercel/analytics');
if (webAnalyticsVersion) {
buildsJson.features = {
...(buildsJson.features ?? {}),
webAnalyticsVersion: webAnalyticsVersion,
};
}
// Write the `detectedBuilders` result to output dir
const buildsJsonBuilds = new Map<Builder, SerializedBuilder>(
builds.map(build => {
@@ -474,10 +455,9 @@ async function doBuild(
];
})
);
buildsJson.builds = Array.from(buildsJsonBuilds.values());
await fs.writeJSON(join(outputDir, 'builds.json'), buildsJson, {
spaces: 2,
});
await writeBuildJson(buildsJson, outputDir);
// The `meta` config property is re-used for each Builder
// invocation so that Builders can share state between
@@ -608,6 +588,33 @@ async function doBuild(
}
}
let needBuildsJsonOverride = false;
const speedInsightsVersion = await readInstalledVersion(
client,
'@vercel/speed-insights'
);
if (speedInsightsVersion) {
buildsJson.features = {
...(buildsJson.features ?? {}),
speedInsightsVersion,
};
needBuildsJsonOverride = true;
}
const webAnalyticsVersion = await readInstalledVersion(
client,
'@vercel/analytics'
);
if (webAnalyticsVersion) {
buildsJson.features = {
...(buildsJson.features ?? {}),
webAnalyticsVersion,
};
needBuildsJsonOverride = true;
}
if (needBuildsJsonOverride) {
await writeBuildJson(buildsJson, outputDir);
}
// Merge existing `config.json` file into the one that will be produced
const configPath = join(outputDir, 'config.json');
const existingConfig = await readJSONFile<BuildOutputConfig>(configPath);
@@ -818,9 +825,24 @@ function mergeFlags(
});
}
function makeDepencyMap(pkg: PackageJson | null): Map<string, string> {
return new Map([
...Object.entries(pkg?.devDependencies ?? {}),
...Object.entries(pkg?.dependencies ?? {}),
]);
async function writeBuildJson(buildsJson: BuildsManifest, outputDir: string) {
await fs.writeJSON(join(outputDir, 'builds.json'), buildsJson, { spaces: 2 });
}
export async function readInstalledVersion(
{ output }: Client,
pkgName: string
): Promise<string | undefined> {
try {
const descriptorPath = require.resolve(`${pkgName}/package.json`, {
paths: [cwd()],
});
const descriptor = await readJSON(descriptorPath);
return descriptor?.version;
} catch (err) {
output.debug(
`Package ${pkgName} is not installed (failed to read its package.json: ${err})`
);
}
return;
}

View File

@@ -112,7 +112,8 @@ export const deployCommand: Command = {
shorthand: null,
type: 'boolean',
deprecated: false,
description: undefined,
description:
'Disable the automatic promotion (aliasing) of the relevant domains to a new production deployment. You can use `vc promote` to complete the domain-assignment process later',
multi: false,
},
{

View File

@@ -421,7 +421,6 @@ module.exports = async function prepare(session, binaryPath, tmpFixturesDir) {
projectId: '.',
settings: {
framework: null,
installCommand: 'echo "skipping install"',
},
}),
'package.json': JSON.stringify({
@@ -429,7 +428,22 @@ module.exports = async function prepare(session, binaryPath, tmpFixturesDir) {
build: 'mkdir -p public && echo hi > public/index.txt',
},
dependencies: {
'@vercel/speed-insights': '0.0.1',
'@vercel/speed-insights': '0.0.4',
},
}),
},
'vc-build-indirect-web-analytics': {
'.vercel/project.json': JSON.stringify({
orgId: '.',
projectId: '.',
settings: {
framework: null,
installCommand: 'yarn add @vercel/analytics@1.1.1',
},
}),
'package.json': JSON.stringify({
scripts: {
build: 'mkdir -p public && echo hi > public/index.txt',
},
}),
},
@@ -439,7 +453,6 @@ module.exports = async function prepare(session, binaryPath, tmpFixturesDir) {
projectId: '.',
settings: {
framework: null,
installCommand: 'echo "skipping install"',
},
}),
'package.json': JSON.stringify({

View File

@@ -1168,23 +1168,25 @@ test('[vc build] should build project with `@vercel/static-build`', async () =>
});
test('[vc build] should build project with `@vercel/speed-insights`', async () => {
try {
process.env.VERCEL_ANALYTICS_ID = '123';
const directory = await setupE2EFixture('vc-build-speed-insights');
const output = await execCli(binaryPath, ['build'], { cwd: directory });
expect(output.exitCode, formatOutput(output)).toBe(0);
expect(output.stderr).toContain('Build Completed in .vercel/output');
const builds = await fs.readJSON(
path.join(directory, '.vercel/output/builds.json')
);
expect(builds?.features?.speedInsightsVersion).toEqual('0.0.4');
});
const directory = await setupE2EFixture('vc-build-speed-insights');
const output = await execCli(binaryPath, ['build'], { cwd: directory });
expect(output.exitCode, formatOutput(output)).toBe(0);
expect(output.stderr).toContain('Build Completed in .vercel/output');
expect(output.stderr).toContain(
'The `VERCEL_ANALYTICS_ID` environment variable is deprecated and will be removed in a future release. Please remove it from your environment variables'
);
const builds = await fs.readJSON(
path.join(directory, '.vercel/output/builds.json')
);
expect(builds?.features?.speedInsightsVersion).toEqual('0.0.1');
} finally {
delete process.env.VERCEL_ANALYTICS_ID;
}
test('[vc build] should build project with an indirect dependency to `@vercel/analytics`', async () => {
const directory = await setupE2EFixture('vc-build-indirect-web-analytics');
const output = await execCli(binaryPath, ['build'], { cwd: directory });
expect(output.exitCode, formatOutput(output)).toBe(0);
expect(output.stderr).toContain('Build Completed in .vercel/output');
const builds = await fs.readJSON(
path.join(directory, '.vercel/output/builds.json')
);
expect(builds?.features?.webAnalyticsVersion).toEqual('1.1.1');
});
test('[vc build] should build project with `@vercel/analytics`', async () => {

View File

@@ -88,6 +88,26 @@ exports[`help command help output snapshots column width 40 1`] = `
the
deploym…
on
--skip-domain Disable
the
automat…
promoti…
(aliasi…
of the
relevant
domains
to a new
product…
deploym…
You can
use \`vc
promote\`
to
complete
the
domain-…
process
later
--with-cache Retain
build
cache
@@ -192,6 +212,10 @@ exports[`help command help output snapshots column width 80 1`] = `
--prod Create a production deployment
-p, --public Deployment is public (\`/_src\`) is exposed)
--regions Set default regions to enable the deployment on
--skip-domain Disable the automatic promotion (aliasing) of
the relevant domains to a new production
deployment. You can use \`vc promote\` to complete
the domain-assignment process later
--with-cache Retain build cache when using "--force"
-y, --yes Use default options to skip all prompts
@@ -255,6 +279,8 @@ exports[`help command help output snapshots column width 120 1`] = `
--prod Create a production deployment
-p, --public Deployment is public (\`/_src\`) is exposed)
--regions Set default regions to enable the deployment on
--skip-domain Disable the automatic promotion (aliasing) of the relevant domains to a new production
deployment. You can use \`vc promote\` to complete the domain-assignment process later
--with-cache Retain build cache when using "--force"
-y, --yes Use default options to skip all prompts

View File

@@ -785,7 +785,7 @@ describe('build', () => {
expect(files.sort()).toEqual(['index.html', 'package.json']);
});
it('should set `VERCEL_ANALYTICS_ID` environment variable', async () => {
it('should set `VERCEL_ANALYTICS_ID` environment variable and warn users', async () => {
const cwd = fixture('vercel-analytics');
const output = join(cwd, '.vercel/output');
client.cwd = cwd;
@@ -794,6 +794,9 @@ describe('build', () => {
const env = await fs.readJSON(join(output, 'static', 'env.json'));
expect(Object.keys(env).includes('VERCEL_ANALYTICS_ID')).toEqual(true);
await expect(client.stderr).toOutput(
'Vercel Speed Insights auto-injection is deprecated in favor of @vercel/speed-insights package. Learn more: https://vercel.link/upgrate-to-speed-insights-package'
);
});
it('should load environment variables from `.vercel/.env.preview.local`', async () => {

View File

@@ -1,5 +1,12 @@
# @vercel/client
## 13.0.14
### Patch Changes
- Updated dependencies [[`cdddb33ad`](https://github.com/vercel/vercel/commit/cdddb33ad49f6080c49f4fff3767e6111acd0bbe)]:
- @vercel/build-utils@7.5.1
## 13.0.13
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/client",
"version": "13.0.13",
"version": "13.0.14",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"homepage": "https://vercel.com",
@@ -37,7 +37,7 @@
"typescript": "4.9.5"
},
"dependencies": {
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"@vercel/routing-utils": "3.1.0",
"@zeit/fetch": "5.2.0",
"async-retry": "1.2.3",

View File

@@ -37,7 +37,7 @@
"@types/minimatch": "3.0.5",
"@types/node": "14.18.33",
"@types/semver": "7.3.10",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"jest-junit": "16.0.0",
"typescript": "4.9.5"
}

View File

@@ -1,5 +1,12 @@
# @vercel/gatsby-plugin-vercel-builder
## 2.0.16
### Patch Changes
- Updated dependencies [[`cdddb33ad`](https://github.com/vercel/vercel/commit/cdddb33ad49f6080c49f4fff3767e6111acd0bbe)]:
- @vercel/build-utils@7.5.1
## 2.0.15
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/gatsby-plugin-vercel-builder",
"version": "2.0.15",
"version": "2.0.16",
"main": "dist/index.js",
"files": [
"dist",
@@ -20,7 +20,7 @@
},
"dependencies": {
"@sinclair/typebox": "0.25.24",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"@vercel/routing-utils": "3.1.0",
"esbuild": "0.14.47",
"etag": "1.8.1",

View File

@@ -29,7 +29,7 @@
"@types/node-fetch": "^2.3.0",
"@types/tar": "6.1.5",
"@types/yauzl-promise": "2.1.0",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"async-retry": "1.3.3",
"execa": "^1.0.0",
"fs-extra": "^7.0.0",

View File

@@ -26,7 +26,7 @@
"devDependencies": {
"@types/jest": "27.5.1",
"@types/node": "14.18.33",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"execa": "3.2.0",
"fs-extra": "11.1.0",
"jest-junit": "16.0.0"

View File

@@ -1,5 +1,15 @@
# @vercel/next
## 4.1.0
### Minor Changes
- fix error when @vercel/analytics is a transitive dependency of the deployed application ([#10892](https://github.com/vercel/vercel/pull/10892))
### Patch Changes
- Use `worker.name` instead of edge function name to fix type error in `@vercel/next` ([#11050](https://github.com/vercel/vercel/pull/11050))
## 4.0.17
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/next",
"version": "4.0.17",
"version": "4.1.0",
"license": "Apache-2.0",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -40,7 +40,7 @@
"@types/semver": "6.0.0",
"@types/text-table": "0.2.1",
"@types/webpack-sources": "3.2.0",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"@vercel/routing-utils": "3.1.0",
"async-sema": "3.0.1",
"buffer-crc32": "0.2.13",

View File

@@ -2856,6 +2856,7 @@ export async function getMiddlewareBundle({
return {
type,
page: edgeFunction.page,
name: edgeFunction.name,
edgeFunction: (() => {
const { source, map } = wrappedModuleSource.sourceAndMap();
const transformedMap = stringifySourceMap(
@@ -2951,8 +2952,7 @@ export async function getMiddlewareBundle({
};
for (const worker of workerConfigs.values()) {
const edgeFile = worker.edgeFunction.name;
let shortPath = edgeFile;
let shortPath = worker.name;
// Replacing the folder prefix for the page
//

View File

@@ -1,5 +1,12 @@
# @vercel/node
## 3.0.17
### Patch Changes
- Updated dependencies [[`cdddb33ad`](https://github.com/vercel/vercel/commit/cdddb33ad49f6080c49f4fff3767e6111acd0bbe)]:
- @vercel/build-utils@7.5.1
## 3.0.16
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node",
"version": "3.0.16",
"version": "3.0.17",
"license": "Apache-2.0",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -24,7 +24,7 @@
"@edge-runtime/primitives": "4.0.5",
"@edge-runtime/vm": "3.1.7",
"@types/node": "14.18.33",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"@vercel/error-utils": "2.0.2",
"@vercel/nft": "0.26.2",
"@vercel/static-config": "3.0.0",

View File

@@ -26,7 +26,7 @@
"@types/jest": "27.4.1",
"@types/node": "14.18.33",
"@types/which": "3.0.0",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"execa": "^1.0.0",
"fs-extra": "11.1.1",
"jest-junit": "16.0.0",

View File

@@ -1,2 +1,2 @@
fastapi==0.54.1
pydantic==1.5
fastapi==0.109.0
pydantic==2.5.3

View File

@@ -28,7 +28,7 @@
"@types/aws-lambda": "8.10.19",
"@types/node": "14.18.33",
"@types/semver": "6.0.0",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"execa": "3.2.0",
"fs-extra": "11.1.0",
"jest-junit": "16.0.0"

View File

@@ -1,5 +1,15 @@
# @vercel/remix-builder
## 2.0.18
### Patch Changes
- Fix functions without a output path edge case ([#11038](https://github.com/vercel/vercel/pull/11038))
- Update `@remix-run/dev` fork to v2.5.0 ([#11054](https://github.com/vercel/vercel/pull/11054))
- Update `@remix-run/dev` fork to v2.5.1 ([#11065](https://github.com/vercel/vercel/pull/11065))
## 2.0.17
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/remix-builder",
"version": "2.0.17",
"version": "2.0.18",
"license": "Apache-2.0",
"main": "./dist/index.js",
"homepage": "https://vercel.com/docs",
@@ -26,11 +26,11 @@
"ts-morph": "12.0.0"
},
"devDependencies": {
"@remix-run/dev": "npm:@vercel/remix-run-dev@2.4.1",
"@remix-run/dev": "npm:@vercel/remix-run-dev@2.5.1",
"@types/jest": "27.5.1",
"@types/node": "14.18.33",
"@types/semver": "7.3.13",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"jest-junit": "16.0.0",
"path-to-regexp": "6.2.1",
"semver": "7.5.2"

View File

@@ -148,7 +148,9 @@ export function getPathFromRoute(
): ResolvedRoutePaths {
if (
route.id === 'root' ||
(route.parentId === 'root' && !route.path && route.index)
(route.parentId === 'root' &&
(!route.path || route.path === '/') &&
route.index)
) {
return { path: 'index', rePath: '/index' };
}

View File

@@ -112,10 +112,19 @@ describe('getPathFromRoute()', () => {
parentId: 'root',
file: 'routes/admin.(lol).tsx',
},
manual: {
path: '/',
index: true,
caseSensitive: undefined,
id: 'manual',
parentId: 'root',
file: 'manual.tsx',
},
};
it.each([
{ id: 'root', expected: { path: 'index', rePath: '/index' } },
{ id: 'manual', expected: { path: 'index', rePath: '/index' } },
{ id: 'routes/__pathless', expected: { path: '', rePath: '/' } },
{ id: 'routes/index', expected: { path: 'index', rePath: '/index' } },
{

View File

@@ -23,7 +23,7 @@
"devDependencies": {
"@types/fs-extra": "8.0.0",
"@types/semver": "6.0.0",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"execa": "2.0.4",
"fs-extra": "^7.0.1",
"jest-junit": "16.0.0",

View File

@@ -1,5 +1,16 @@
# @vercel/static-build
## 2.1.0
### Minor Changes
- chore: deprecate next/nuxt/gastby Speed Insights injection in favor of @vercel/speed-insights ([#11048](https://github.com/vercel/vercel/pull/11048))
### Patch Changes
- Updated dependencies []:
- @vercel/gatsby-plugin-vercel-builder@2.0.16
## 2.0.17
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/static-build",
"version": "2.0.17",
"version": "2.1.0",
"license": "Apache-2.0",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/build-step",
@@ -21,7 +21,7 @@
},
"dependencies": {
"@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
"@vercel/gatsby-plugin-vercel-builder": "2.0.15",
"@vercel/gatsby-plugin-vercel-builder": "2.0.16",
"@vercel/static-config": "3.0.0",
"ts-morph": "12.0.0"
},
@@ -35,7 +35,7 @@
"@types/node-fetch": "2.5.4",
"@types/promise-timeout": "1.3.0",
"@types/semver": "7.3.13",
"@vercel/build-utils": "7.5.0",
"@vercel/build-utils": "7.5.1",
"@vercel/error-utils": "2.0.2",
"@vercel/frameworks": "2.0.6",
"@vercel/fs-detectors": "5.1.6",

View File

@@ -50,6 +50,9 @@ export async function injectPlugins(
if (process.env.VERCEL_ANALYTICS_ID) {
process.env.GATSBY_VERCEL_ANALYTICS_ID = process.env.VERCEL_ANALYTICS_ID;
plugins.add('@vercel/gatsby-plugin-vercel-analytics');
console.warn(
'Vercel Speed Insights auto-injection is deprecated in favor of @vercel/speed-insights package. Learn more: https://vercel.link/upgrate-to-speed-insights-package'
);
}
if (plugins.size === 0) {

View File

@@ -7,6 +7,9 @@ import { DeepWriteable, readPackageJson, writePackageJson } from './_shared';
const ANALYTICS_PLUGIN_PACKAGE = '@nuxtjs/web-vitals';
export async function injectVercelAnalyticsPlugin(dir: string) {
console.warn(
'Vercel Speed Insights auto-injection is deprecated in favor of @vercel/speed-insights package. Learn more: https://vercel.link/upgrate-to-speed-insights-package'
);
// First update the `.nuxtrc` file to inject the Speed Insights (formerly Analytics) plugin.
// See: https://gist.github.com/pi0/23b5253ac19b4ed5a70add3b971545c9
const nuxtrcPath = join(dir, '.nuxtrc');

View File

@@ -7,10 +7,14 @@ const runBuildLambda = createRunBuildLambda(builder);
const FOUR_MINUTES = 240000;
const warnSpy = jest.spyOn(console, 'warn');
beforeAll(() => {
process.env.VERCEL_ANALYTICS_ID = 'test';
});
beforeEach(() => jest.clearAllMocks());
it(
'Should build Gatsby without any configuration',
async () => {
@@ -35,6 +39,9 @@ it(
],
}
`);
expect(warnSpy).toHaveBeenCalledWith(
'Vercel Speed Insights auto-injection is deprecated in favor of @vercel/speed-insights package. Learn more: https://vercel.link/upgrate-to-speed-insights-package'
);
},
FOUR_MINUTES
);
@@ -334,6 +341,10 @@ it(
// The `package.json` file should have the plugin listed as a dependency
const pkg = require(path.join(workPath, 'package.json'));
expect(pkg.dependencies['@nuxtjs/web-vitals']).toBe('latest');
expect(warnSpy).toHaveBeenCalledWith(
'Vercel Speed Insights auto-injection is deprecated in favor of @vercel/speed-insights package. Learn more: https://vercel.link/upgrate-to-speed-insights-package'
);
},
FOUR_MINUTES
);

View File

@@ -9,7 +9,7 @@
"version": "0.0.1",
"license": "MIT",
"dependencies": {
"@stencil/core": "^4.9.0"
"@stencil/core": "^4.10.0"
},
"devDependencies": {
"@types/jest": "^27.5.2",
@@ -1039,9 +1039,9 @@
}
},
"node_modules/@stencil/core": {
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.9.0.tgz",
"integrity": "sha512-aWSkhBmk3yPwRAkUwBbzRwmdhb8hKiQ/JMr9m5jthpBZLjtppYbzz6PN2MhSMDfRp6K93eQw5WogSEH4HHuB6w==",
"version": "4.10.0",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.10.0.tgz",
"integrity": "sha512-7lDTPY1IxXN2/C+wQPHt3e/dYgY4YgelA8MxOsU3ZftXtpzWad/QNWhSAtKisJMrSjQh41jMDOgD0yLBwV6E7w==",
"bin": {
"stencil": "bin/stencil"
},
@@ -5781,9 +5781,9 @@
}
},
"@stencil/core": {
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.9.0.tgz",
"integrity": "sha512-aWSkhBmk3yPwRAkUwBbzRwmdhb8hKiQ/JMr9m5jthpBZLjtppYbzz6PN2MhSMDfRp6K93eQw5WogSEH4HHuB6w=="
"version": "4.10.0",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.10.0.tgz",
"integrity": "sha512-7lDTPY1IxXN2/C+wQPHt3e/dYgY4YgelA8MxOsU3ZftXtpzWad/QNWhSAtKisJMrSjQh41jMDOgD0yLBwV6E7w=="
},
"@tootallnate/once": {
"version": "1.1.2",

View File

@@ -26,7 +26,7 @@
"generate": "stencil generate"
},
"dependencies": {
"@stencil/core": "^4.9.0"
"@stencil/core": "^4.10.0"
},
"devDependencies": {
"@types/jest": "^27.5.2",

130
pnpm-lock.yaml generated
View File

@@ -89,8 +89,8 @@ importers:
specifier: 29.1.0
version: 29.1.0(@babel/core@7.5.0)(esbuild@0.19.2)(jest@29.5.0)(typescript@4.9.5)
turbo:
specifier: 1.11.2
version: 1.11.2
specifier: 1.11.3
version: 1.11.3
typescript:
specifier: 4.9.5
version: 4.9.5
@@ -186,7 +186,7 @@ importers:
specifier: 1.0.4
version: link:../constants
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../../packages/build-utils
'@vercel/routing-utils':
specifier: 3.1.0
@@ -310,7 +310,7 @@ importers:
packages/cli:
dependencies:
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
'@vercel/fun':
specifier: 1.1.0
@@ -322,10 +322,10 @@ importers:
specifier: 1.0.2
version: link:../hydrogen
'@vercel/next':
specifier: 4.0.17
specifier: 4.1.0
version: link:../next
'@vercel/node':
specifier: 3.0.16
specifier: 3.0.17
version: link:../node
'@vercel/python':
specifier: 4.1.0
@@ -334,13 +334,13 @@ importers:
specifier: 2.0.6
version: link:../redwood
'@vercel/remix-builder':
specifier: 2.0.17
specifier: 2.0.18
version: link:../remix
'@vercel/ruby':
specifier: 2.0.4
version: link:../ruby
'@vercel/static-build':
specifier: 2.0.17
specifier: 2.1.0
version: link:../static-build
chokidar:
specifier: 3.3.1
@@ -476,10 +476,10 @@ importers:
specifier: 1.0.0
version: link:../../internals/get-package-json
'@vercel-internals/types':
specifier: 1.0.20
specifier: 1.0.21
version: link:../../internals/types
'@vercel/client':
specifier: 13.0.13
specifier: 13.0.14
version: link:../client
'@vercel/error-utils':
specifier: 2.0.2
@@ -722,7 +722,7 @@ importers:
packages/client:
dependencies:
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
'@vercel/routing-utils':
specifier: 3.1.0
@@ -923,7 +923,7 @@ importers:
specifier: 7.3.10
version: 7.3.10
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
jest-junit:
specifier: 16.0.0
@@ -948,7 +948,7 @@ importers:
specifier: 0.25.24
version: 0.25.24
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
'@vercel/routing-utils':
specifier: 3.1.0
@@ -1015,7 +1015,7 @@ importers:
specifier: 2.1.0
version: 2.1.0
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
async-retry:
specifier: 1.3.3
@@ -1064,7 +1064,7 @@ importers:
specifier: 14.18.33
version: 14.18.33
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
execa:
specifier: 3.2.0
@@ -1125,7 +1125,7 @@ importers:
specifier: 3.2.0
version: 3.2.0
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
'@vercel/routing-utils':
specifier: 3.1.0
@@ -1212,7 +1212,7 @@ importers:
specifier: 14.18.33
version: 14.18.33
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
'@vercel/error-utils':
specifier: 2.0.2
@@ -1321,7 +1321,7 @@ importers:
specifier: 3.0.0
version: 3.0.0
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
execa:
specifier: ^1.0.0
@@ -1358,7 +1358,7 @@ importers:
specifier: 6.0.0
version: 6.0.0
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
execa:
specifier: 3.2.0
@@ -1383,8 +1383,8 @@ importers:
version: 12.0.0
devDependencies:
'@remix-run/dev':
specifier: npm:@vercel/remix-run-dev@2.4.1
version: /@vercel/remix-run-dev@2.4.1(@types/node@14.18.33)(typescript@4.9.5)
specifier: npm:@vercel/remix-run-dev@2.5.1
version: /@vercel/remix-run-dev@2.5.1(@types/node@14.18.33)(typescript@4.9.5)
'@types/jest':
specifier: 27.5.1
version: 27.5.1
@@ -1395,7 +1395,7 @@ importers:
specifier: 7.3.13
version: 7.3.13
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
jest-junit:
specifier: 16.0.0
@@ -1439,7 +1439,7 @@ importers:
specifier: 6.0.0
version: 6.0.0
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
execa:
specifier: 2.0.4
@@ -1460,7 +1460,7 @@ importers:
specifier: 1.0.11
version: link:../gatsby-plugin-vercel-analytics
'@vercel/gatsby-plugin-vercel-builder':
specifier: 2.0.15
specifier: 2.0.16
version: link:../gatsby-plugin-vercel-builder
'@vercel/static-config':
specifier: 3.0.0
@@ -1497,7 +1497,7 @@ importers:
specifier: 7.3.13
version: 7.3.13
'@vercel/build-utils':
specifier: 7.5.0
specifier: 7.5.1
version: link:../build-utils
'@vercel/error-utils':
specifier: 2.0.2
@@ -3555,8 +3555,8 @@ packages:
tslib: 2.5.0
dev: true
/@remix-run/node@2.4.1(typescript@4.9.5):
resolution: {integrity: sha512-TENt5OiTnjZmoayqpEiU0207JIFF7TbagQ4UT0dFI9oKQrNQJvkDd2JQBEldd8TLDuSYxU8iu7+CXZ/kl3O35w==}
/@remix-run/node@2.5.1(typescript@4.9.5):
resolution: {integrity: sha512-UI442xzHAiokmsfrYOabMQB024+IizmRhZBGcNa42QjJWsNqogy1bNwYhzEpB6oQEB1wF3vwOKK1AD1/iYA/9A==}
engines: {node: '>=18.0.0'}
peerDependencies:
typescript: ^5.1.0
@@ -3564,7 +3564,7 @@ packages:
typescript:
optional: true
dependencies:
'@remix-run/server-runtime': 2.4.1(typescript@4.9.5)
'@remix-run/server-runtime': 2.5.1(typescript@4.9.5)
'@remix-run/web-fetch': 4.4.2
'@remix-run/web-file': 3.1.0
'@remix-run/web-stream': 1.1.0
@@ -3575,13 +3575,13 @@ packages:
typescript: 4.9.5
dev: true
/@remix-run/router@1.14.1:
resolution: {integrity: sha512-Qg4DMQsfPNAs88rb2xkdk03N3bjK4jgX5fR24eHCTR9q6PrhZQZ4UJBPzCHJkIpTRN1UKxx2DzjZmnC+7Lj0Ow==}
/@remix-run/router@1.14.2:
resolution: {integrity: sha512-ACXpdMM9hmKZww21yEqWwiLws/UPLhNKvimN8RrYSqPSvB3ov7sLvAcfvaxePeLvccTQKGdkDIhLYApZVDFuKg==}
engines: {node: '>=14.0.0'}
dev: true
/@remix-run/server-runtime@2.4.1(typescript@4.9.5):
resolution: {integrity: sha512-aQyBa0U8Db4E9sv2sruMfPDBYB4jlqvZ43YvkaZ1BGjUzi84ssfmaHdWgX/QveB6hi61RABTi6v8DV548kmRQg==}
/@remix-run/server-runtime@2.5.1(typescript@4.9.5):
resolution: {integrity: sha512-bP31jrVbYTJ2eP5sxZfDgT1YyXzDlzsfMxGYVzpaoLCYDJAekq1QpHLLXKGOXhmyb46O9rdhlQKfwD6WpAxr3A==}
engines: {node: '>=18.0.0'}
peerDependencies:
typescript: ^5.1.0
@@ -3589,10 +3589,10 @@ packages:
typescript:
optional: true
dependencies:
'@remix-run/router': 1.14.1
'@types/cookie': 0.5.4
'@remix-run/router': 1.14.2
'@types/cookie': 0.6.0
'@web3-storage/multipart-parser': 1.0.0
cookie: 0.5.0
cookie: 0.6.0
set-cookie-parser: 2.6.0
source-map: 0.7.3
typescript: 4.9.5
@@ -4265,8 +4265,8 @@ packages:
resolution: {integrity: sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow==}
dev: true
/@types/cookie@0.5.4:
resolution: {integrity: sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA==}
/@types/cookie@0.6.0:
resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
dev: true
/@types/cross-spawn@6.0.0:
@@ -5405,12 +5405,12 @@ packages:
- supports-color
dev: false
/@vercel/remix-run-dev@2.4.1(@types/node@14.18.33)(typescript@4.9.5):
resolution: {integrity: sha512-3koLwOdgTKIewtkARDXZ6/zdxQjU9DHEI8yronP4I1dNqvpVeAY++EjNdjfAWxbRF5w/fxLwUUvqR2K59wx7sA==}
/@vercel/remix-run-dev@2.5.1(@types/node@14.18.33)(typescript@4.9.5):
resolution: {integrity: sha512-1GyE8L+jGOKGRBvyiQi4b0VnwrhTSf6fS+Tcwt/JqIcudW0ZaQgcDP1x3qkXUR68TPLapk4V5cacde7h57ICCA==}
engines: {node: '>=18.0.0'}
hasBin: true
peerDependencies:
'@remix-run/serve': ^2.4.1
'@remix-run/serve': ^2.5.1
typescript: ^5.1.0
vite: ^5.0.0
peerDependenciesMeta:
@@ -5431,9 +5431,9 @@ packages:
'@babel/types': 7.23.0
'@mdx-js/mdx': 2.3.0
'@npmcli/package-json': 4.0.1
'@remix-run/node': 2.4.1(typescript@4.9.5)
'@remix-run/router': 1.14.1
'@remix-run/server-runtime': 2.4.1(typescript@4.9.5)
'@remix-run/node': 2.5.1(typescript@4.9.5)
'@remix-run/router': 1.14.2
'@remix-run/server-runtime': 2.5.1(typescript@4.9.5)
'@types/mdx': 2.0.7
'@vanilla-extract/integration': 6.2.1(@types/node@14.18.33)
arg: 5.0.2
@@ -6914,8 +6914,8 @@ packages:
engines: {node: '>= 0.6'}
dev: true
/cookie@0.5.0:
resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==}
/cookie@0.6.0:
resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==}
engines: {node: '>= 0.6'}
dev: true
@@ -14646,64 +14646,64 @@ packages:
safe-buffer: 5.2.1
dev: true
/turbo-darwin-64@1.11.2:
resolution: {integrity: sha512-toFmRG/adriZY3hOps7nYCfqHAS+Ci6xqgX3fbo82kkLpC6OBzcXnleSwuPqjHVAaRNhVoB83L5njcE9Qwi2og==}
/turbo-darwin-64@1.11.3:
resolution: {integrity: sha512-IsOOg2bVbIt3o/X8Ew9fbQp5t1hTHN3fGNQYrPQwMR2W1kIAC6RfbVD4A9OeibPGyEPUpwOH79hZ9ydFH5kifw==}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/turbo-darwin-arm64@1.11.2:
resolution: {integrity: sha512-FCsEDZ8BUSFYEOSC3rrARQrj7x2VOrmVcfrMUIhexTxproRh4QyMxLfr6LALk4ymx6jbDCxWa6Szal8ckldFbA==}
/turbo-darwin-arm64@1.11.3:
resolution: {integrity: sha512-FsJL7k0SaPbJzI/KCnrf/fi3PgCDCjTliMc/kEFkuWVA6Httc3Q4lxyLIIinz69q6JTx8wzh6yznUMzJRI3+dg==}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/turbo-linux-64@1.11.2:
resolution: {integrity: sha512-Vzda/o/QyEske5CxLf0wcu7UUS+7zB90GgHZV4tyN+WZtoouTvbwuvZ3V6b5Wgd3OJ/JwWR0CXDK7Sf4VEMr7A==}
/turbo-linux-64@1.11.3:
resolution: {integrity: sha512-SvW7pvTVRGsqtSkII5w+wriZXvxqkluw5FO/MNAdFw0qmoov+PZ237+37/NgArqE3zVn1GX9P6nUx9VO+xcQAg==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-linux-arm64@1.11.2:
resolution: {integrity: sha512-bRLwovQRz0yxDZrM4tQEAYV0fBHEaTzUF0JZ8RG1UmZt/CqtpnUrJpYb1VK8hj1z46z9YehARpYCwQ2K0qU4yw==}
/turbo-linux-arm64@1.11.3:
resolution: {integrity: sha512-YhUfBi1deB3m+3M55X458J6B7RsIS7UtM3P1z13cUIhF+pOt65BgnaSnkHLwETidmhRh8Dl3GelaQGrB3RdCDw==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-windows-64@1.11.2:
resolution: {integrity: sha512-LgTWqkHAKgyVuLYcEPxZVGPInTjjeCnN5KQMdJ4uQZ+xMDROvMFS2rM93iQl4ieDJgidwHCxxCxaU9u8c3d/Kg==}
/turbo-windows-64@1.11.3:
resolution: {integrity: sha512-s+vEnuM2TiZuAUUUpmBHDr6vnNbJgj+5JYfnYmVklYs16kXh+EppafYQOAkcRIMAh7GjV3pLq5/uGqc7seZeHA==}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/turbo-windows-arm64@1.11.2:
resolution: {integrity: sha512-829aVBU7IX0c/B4G7g1VI8KniAGutHhIupkYMgF6xPkYVev2G3MYe6DMS/vsLt9GGM9ulDtdWxWrH5P2ngK8IQ==}
/turbo-windows-arm64@1.11.3:
resolution: {integrity: sha512-ZR5z5Zpc7cASwfdRAV5yNScCZBsgGSbcwiA/u3farCacbPiXsfoWUkz28iyrx21/TRW0bi6dbsB2v17swa8bjw==}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/turbo@1.11.2:
resolution: {integrity: sha512-jPC7LVQJzebs5gWf8FmEvsvXGNyKbN+O9qpvv98xpNaM59aS0/Irhd0H0KbcqnXfsz7ETlzOC3R+xFWthC4Z8A==}
/turbo@1.11.3:
resolution: {integrity: sha512-RCJOUFcFMQNIGKSjC9YmA5yVP1qtDiBA0Lv9VIgrXraI5Da1liVvl3VJPsoDNIR9eFMyA/aagx1iyj6UWem5hA==}
hasBin: true
optionalDependencies:
turbo-darwin-64: 1.11.2
turbo-darwin-arm64: 1.11.2
turbo-linux-64: 1.11.2
turbo-linux-arm64: 1.11.2
turbo-windows-64: 1.11.2
turbo-windows-arm64: 1.11.2
turbo-darwin-64: 1.11.3
turbo-darwin-arm64: 1.11.3
turbo-linux-64: 1.11.3
turbo-linux-arm64: 1.11.3
turbo-windows-64: 1.11.3
turbo-windows-arm64: 1.11.3
dev: true
/tweetnacl@0.14.5:

View File

@@ -11,7 +11,33 @@ async function fetchRetry(url, ...rest) {
return await retryBailByDefault(
async canRetry => {
try {
return await fetch(url, ...rest);
const requestIds = [];
for (let i = 60; i >= 0; i--) {
const res = await fetch(url, ...rest);
if (res.status === 401) {
const clonedRes = res.clone();
const body = await clonedRes.text();
if (body.includes('https://vercel.com/sso-api')) {
requestIds.push(res.headers.get('x-vercel-id'));
if (i === 0) {
console.error(
`Failed request ids (because of 401s): `,
JSON.stringify(requestIds, null, 2)
);
throw new Error(
`Failed to fetch ${url}, received 401 status for over 1 minute`
);
}
} else {
return res;
}
await new Promise(resolve => setTimeout(resolve, 1000));
} else {
return res;
}
}
} catch (error) {
if (error.type === 'request-timeout') {
// FetchError: network timeout at: ...

View File

@@ -3,7 +3,7 @@ const assert = require('assert');
const { createHash } = require('crypto');
const path = require('path');
const _fetch = require('node-fetch');
const fetch = require('./fetch-retry.js');
const fetch = require('./fetch-retry');
const fileModeSymbol = Symbol('fileMode');
const { logWithinTest } = require('./log');
const ms = require('ms');
@@ -149,7 +149,7 @@ async function disableSSO(deploymentId, useTeam = true) {
);
if (settingRes.ok) {
for (let i = 0; i < 5; i++) {
for (let i = 0; i < 10; i++) {
const res = await fetch(`https://${deploymentUrl}`);
if (res.status !== 401) {
break;