@vercel/build-utils 14.2.0 → 14.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/dist/fs/run-user-scripts.d.ts +19 -10
- package/dist/fs/run-user-scripts.js +266 -85
- package/dist/index.d.ts +2 -2
- package/dist/index.js +295 -107
- package/dist/prerender.d.ts +24 -15
- package/dist/prerender.js +2 -2
- package/dist/service-path-utils.d.ts +2 -0
- package/dist/service-path-utils.js +13 -2
- package/dist/types.d.ts +9 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 14.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f8add0a: Replace `prerenderClassification` on `Prerender` with `initialMetadata`.
|
|
8
|
+
|
|
9
|
+
The platform consumes only the request-time compute mode and the HTML shell
|
|
10
|
+
size, so the flattened four-field taxonomy (`routeType`, `response`,
|
|
11
|
+
`compute`, `htmlSize`) is reduced to a single grouped field:
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
initialMetadata?: {
|
|
15
|
+
compute: 'blocking' | 'resuming' | 'static';
|
|
16
|
+
htmlSize?: number;
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The group is named `initialMetadata` because the values describe the
|
|
21
|
+
deployment as it was built: revalidation can regenerate a route's output over
|
|
22
|
+
the deployment's lifetime, so readers must treat them as initial values, not
|
|
23
|
+
live state. `@vercel/next` reads `compute` and `htmlSize` off the v4
|
|
24
|
+
prerender-manifest taxonomy and deliberately ignores `routeType` and
|
|
25
|
+
`response`; the values are still carried unvalidated so a compute mode added
|
|
26
|
+
by a future framework release cannot hard-fail a deploy, and they are still
|
|
27
|
+
set only on the primary output of each prerender group. `htmlSize: 0` is a
|
|
28
|
+
real size (a shell that postponed everything); `htmlSize` is absent when
|
|
29
|
+
there is no HTML shell to measure (route handlers, Pages Router). Absence of
|
|
30
|
+
the whole group remains legitimate (`notFoundRoutes`, Pages Router
|
|
31
|
+
`fallback: false`, older frameworks).
|
|
32
|
+
|
|
33
|
+
## 14.3.0
|
|
34
|
+
|
|
35
|
+
### Minor Changes
|
|
36
|
+
|
|
37
|
+
- cd6b038: Honor `package.json` pnpm pins without Corepack, and default new projects to pnpm 11.
|
|
38
|
+
|
|
39
|
+
When Corepack is off, `devEngines.packageManager` is preferred, then a lockfile-compatible `packageManager` field, then `engines.pnpm` as a selector. Unpinned lockfile `9.0` projects created on or after 2026-08-19 use pnpm 11 (Node 22+) if `/pnpm11` is present in the build image; otherwise they keep pnpm 10.
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- 0b08df6: Canonicalized internal service contract ownership.
|
|
44
|
+
- 96444ba: Simplify dependency installation logs to show the selected package manager and version.
|
|
45
|
+
|
|
3
46
|
## 14.2.0
|
|
4
47
|
|
|
5
48
|
### Minor Changes
|
|
@@ -33,6 +33,11 @@ export interface ScanParentDirsResult extends FindPackageJsonResult {
|
|
|
33
33
|
* specified by `packageJsonPath`, in the case of a monorepo.
|
|
34
34
|
*/
|
|
35
35
|
packageJsonPackageManager?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The contents of the `devEngines` field from `package.json` if found.
|
|
38
|
+
* May come from a different `package.json` than `packageJsonPath` in a monorepo.
|
|
39
|
+
*/
|
|
40
|
+
packageJsonDevEngines?: PackageJson.DevEngines;
|
|
36
41
|
/**
|
|
37
42
|
* Whether Turborepo supports the `COREPACK_HOME` environment variable.
|
|
38
43
|
* `undefined` if not a Turborepo project.
|
|
@@ -124,6 +129,7 @@ export declare function usingCorepack(env: {
|
|
|
124
129
|
[x: string]: string | undefined;
|
|
125
130
|
}, packageJsonPackageManager: string | undefined, turboSupportsCorepackHome: boolean | undefined): boolean;
|
|
126
131
|
export declare function walkParentDirs({ base, start, filename, }: WalkParentDirsProps): Promise<string | null>;
|
|
132
|
+
export declare function stripPnpmVersionFooter(line: string): string;
|
|
127
133
|
/**
|
|
128
134
|
* Reset the customInstallCommandSet. This should be called at the start of each build
|
|
129
135
|
* to prevent custom install commands from being skipped due to the set persisting
|
|
@@ -135,10 +141,11 @@ export declare function runNpmInstall(destPath: string, args?: string[], spawnOp
|
|
|
135
141
|
* Prepares the input environment based on the used package manager and lockfile
|
|
136
142
|
* versions.
|
|
137
143
|
*/
|
|
138
|
-
export declare function getEnvForPackageManager({ cliType, lockfileVersion, packageJsonPackageManager, nodeVersion, env, packageJsonEngines, turboSupportsCorepackHome, projectCreatedAt, }: {
|
|
144
|
+
export declare function getEnvForPackageManager({ cliType, lockfileVersion, packageJsonPackageManager, packageJsonDevEngines, nodeVersion, env, packageJsonEngines, turboSupportsCorepackHome, projectCreatedAt, }: {
|
|
139
145
|
cliType: CliType;
|
|
140
146
|
lockfileVersion: number | undefined;
|
|
141
147
|
packageJsonPackageManager?: string | undefined;
|
|
148
|
+
packageJsonDevEngines?: PackageJson.DevEngines;
|
|
142
149
|
nodeVersion?: NodeVersion | BunVersion;
|
|
143
150
|
env: {
|
|
144
151
|
[x: string]: string | undefined;
|
|
@@ -150,14 +157,22 @@ export declare function getEnvForPackageManager({ cliType, lockfileVersion, pack
|
|
|
150
157
|
[x: string]: string | undefined;
|
|
151
158
|
};
|
|
152
159
|
export declare const PNPM_10_PREFERRED_AT: Date;
|
|
160
|
+
export declare const PNPM_11_PREFERRED_AT: Date;
|
|
161
|
+
type PnpmPathOverride = {
|
|
162
|
+
path: string;
|
|
163
|
+
detectedLockfile: string;
|
|
164
|
+
detectedPackageManager: string;
|
|
165
|
+
pnpmVersionRange: string;
|
|
166
|
+
};
|
|
153
167
|
/**
|
|
154
168
|
* Helper to get the binary paths that link to the used package manager.
|
|
155
169
|
* Note: Make sure it doesn't contain any `console.log` calls.
|
|
156
170
|
*/
|
|
157
|
-
export declare function getPathOverrideForPackageManager({ cliType, lockfileVersion, corepackPackageManager, corepackEnabled, nodeVersion, packageJsonEngines, projectCreatedAt, }: {
|
|
171
|
+
export declare function getPathOverrideForPackageManager({ cliType, lockfileVersion, corepackPackageManager, packageJsonDevEngines, corepackEnabled, nodeVersion, packageJsonEngines, projectCreatedAt, }: {
|
|
158
172
|
cliType: CliType;
|
|
159
173
|
lockfileVersion: number | undefined;
|
|
160
174
|
corepackPackageManager: string | undefined;
|
|
175
|
+
packageJsonDevEngines?: PackageJson.DevEngines;
|
|
161
176
|
corepackEnabled?: boolean;
|
|
162
177
|
nodeVersion?: NodeVersion | BunVersion;
|
|
163
178
|
packageJsonEngines?: PackageJson.Engines;
|
|
@@ -177,21 +192,14 @@ export declare function getPathOverrideForPackageManager({ cliType, lockfileVers
|
|
|
177
192
|
*/
|
|
178
193
|
path: string | undefined;
|
|
179
194
|
};
|
|
180
|
-
export declare function detectPackageManager(cliType: CliType, lockfileVersion: number | undefined, projectCreatedAt?: number): {
|
|
181
|
-
path: string;
|
|
182
|
-
detectedLockfile: string;
|
|
183
|
-
detectedPackageManager: string;
|
|
184
|
-
pnpmVersionRange: string;
|
|
185
|
-
} | {
|
|
195
|
+
export declare function detectPackageManager(cliType: CliType, lockfileVersion: number | undefined, projectCreatedAt?: number, nodeVersion?: NodeVersion | BunVersion): PnpmPathOverride | {
|
|
186
196
|
path: string;
|
|
187
197
|
detectedLockfile: string;
|
|
188
198
|
detectedPackageManager: string;
|
|
189
|
-
pnpmVersionRange?: undefined;
|
|
190
199
|
} | {
|
|
191
200
|
path: undefined;
|
|
192
201
|
detectedLockfile: string;
|
|
193
202
|
detectedPackageManager: string;
|
|
194
|
-
pnpmVersionRange?: undefined;
|
|
195
203
|
} | undefined;
|
|
196
204
|
/**
|
|
197
205
|
* Helper to get the binary paths that link to the used package manager.
|
|
@@ -249,3 +257,4 @@ export declare function getScriptName(pkg: Pick<PackageJson, 'scripts'> | null |
|
|
|
249
257
|
* Please use runNpmInstall() instead.
|
|
250
258
|
*/
|
|
251
259
|
export declare const installDependencies: typeof runNpmInstall;
|
|
260
|
+
export {};
|