@vercel/build-utils 8.2.2 → 8.3.1
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 +17 -0
- package/dist/fs/run-user-scripts.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +9 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# @vercel/build-utils
|
2
2
|
|
3
|
+
## 8.3.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Add build callback handling ([#11807](https://github.com/vercel/vercel/pull/11807))
|
8
|
+
|
9
|
+
## 8.3.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- Adds the ability for builders to define a `diagnostics` step that is called after the build operation is done. ([#11653](https://github.com/vercel/vercel/pull/11653))
|
14
|
+
Implements the diagnostics step in the `next` builder.
|
15
|
+
|
16
|
+
### Patch Changes
|
17
|
+
|
18
|
+
- Add resolved node version range to warning message ([#11742](https://github.com/vercel/vercel/pull/11742))
|
19
|
+
|
3
20
|
## 8.2.2
|
4
21
|
|
5
22
|
### Patch Changes
|
@@ -190,7 +190,7 @@ async function getNodeVersion(destPath, fallbackVersion = process.env.VERCEL_PRO
|
|
190
190
|
const { node } = packageJson.engines;
|
191
191
|
if (configuredVersion && !(0, import_semver.intersects)(configuredVersion, supportedNodeVersion.range)) {
|
192
192
|
console.warn(
|
193
|
-
`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${configuredVersion}") will not apply. Learn More: http://vercel.link/node-version`
|
193
|
+
`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${configuredVersion}") will not apply, Node.js Version "${supportedNodeVersion.range}" will be used instead. Learn More: http://vercel.link/node-version`
|
194
194
|
);
|
195
195
|
}
|
196
196
|
if ((0, import_semver.coerce)(node)?.raw === node) {
|
package/dist/index.js
CHANGED
@@ -21912,7 +21912,7 @@ async function getNodeVersion(destPath, fallbackVersion = process.env.VERCEL_PRO
|
|
21912
21912
|
const { node } = packageJson.engines;
|
21913
21913
|
if (configuredVersion && !(0, import_semver2.intersects)(configuredVersion, supportedNodeVersion.range)) {
|
21914
21914
|
console.warn(
|
21915
|
-
`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${configuredVersion}") will not apply. Learn More: http://vercel.link/node-version`
|
21915
|
+
`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${configuredVersion}") will not apply, Node.js Version "${supportedNodeVersion.range}" will be used instead. Learn More: http://vercel.link/node-version`
|
21916
21916
|
);
|
21917
21917
|
}
|
21918
21918
|
if ((0, import_semver2.coerce)(node)?.raw === node) {
|
package/dist/types.d.ts
CHANGED
@@ -96,6 +96,12 @@ export interface BuildOptions {
|
|
96
96
|
* on the build environment.
|
97
97
|
*/
|
98
98
|
meta?: Meta;
|
99
|
+
/**
|
100
|
+
* A callback to be invoked by a builder after a project's
|
101
|
+
* build command has been run but before the outputs have been
|
102
|
+
* fully processed
|
103
|
+
*/
|
104
|
+
buildCallback?: (opts: Omit<BuildOptions, 'buildCallback'>) => Promise<void>;
|
99
105
|
}
|
100
106
|
export interface PrepareCacheOptions {
|
101
107
|
/**
|
@@ -318,12 +324,14 @@ export interface ProjectSettings {
|
|
318
324
|
export interface BuilderV2 {
|
319
325
|
version: 2;
|
320
326
|
build: BuildV2;
|
327
|
+
diagnostics?: Diagnostics;
|
321
328
|
prepareCache?: PrepareCache;
|
322
329
|
shouldServe?: ShouldServe;
|
323
330
|
}
|
324
331
|
export interface BuilderV3 {
|
325
332
|
version: 3;
|
326
333
|
build: BuildV3;
|
334
|
+
diagnostics?: Diagnostics;
|
327
335
|
prepareCache?: PrepareCache;
|
328
336
|
shouldServe?: ShouldServe;
|
329
337
|
startDevServer?: StartDevServer;
|
@@ -418,6 +426,7 @@ export interface BuildResultV3 {
|
|
418
426
|
export type BuildV2 = (options: BuildOptions) => Promise<BuildResultV2>;
|
419
427
|
export type BuildV3 = (options: BuildOptions) => Promise<BuildResultV3>;
|
420
428
|
export type PrepareCache = (options: PrepareCacheOptions) => Promise<Files>;
|
429
|
+
export type Diagnostics = (options: BuildOptions) => Promise<Files>;
|
421
430
|
export type ShouldServe = (options: ShouldServeOptions) => boolean | Promise<boolean>;
|
422
431
|
export type StartDevServer = (options: StartDevServerOptions) => Promise<StartDevServerResult>;
|
423
432
|
/**
|