@vercel/build-utils 15.1.0 → 15.2.0-snapshot-c4f338842961
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 +12 -0
- package/dist/fs/node-version.d.ts +1 -1
- package/dist/fs/node-version.js +3 -6
- package/dist/fs/run-user-scripts.js +1 -2
- package/dist/index.js +4 -4
- package/dist/trace/trace.d.ts +3 -0
- package/dist/trace/trace.js +5 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 15.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- cd2647b: Use Node.js 26 by default and for matching broad engine ranges without an environment variable.
|
|
8
|
+
|
|
9
|
+
## 15.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 11a7991: Record service and daemon counts, build concurrency, and per-build timing totals on the `vc.doBuild` span, and the service name, runtime, and kind on each service or daemon `vc.builder` span. Spans now expose their duration once stopped.
|
|
14
|
+
|
|
3
15
|
## 15.1.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -7,7 +7,7 @@ declare function getOptions(): NodeVersion[];
|
|
|
7
7
|
export declare function getAvailableNodeVersions(): NodeVersionMajor[];
|
|
8
8
|
export declare function getLatestNodeVersion(availableVersions?: NodeVersionMajor[]): NodeVersion;
|
|
9
9
|
export declare function getDiscontinuedNodeVersions(): NodeVersion[];
|
|
10
|
-
export declare function getSupportedNodeVersion(engineRange: string | undefined, isAuto?: boolean, availableVersions?: NodeVersionMajor[]
|
|
10
|
+
export declare function getSupportedNodeVersion(engineRange: string | undefined, isAuto?: boolean, availableVersions?: NodeVersionMajor[]): Promise<NodeVersion>;
|
|
11
11
|
export declare function getSupportedBunVersion(engineRange: string): BunVersion;
|
|
12
12
|
export declare function isBunVersion(version: Version): boolean;
|
|
13
13
|
export {};
|
package/dist/fs/node-version.js
CHANGED
|
@@ -143,9 +143,7 @@ function getHint(isAuto = false, availableVersions) {
|
|
|
143
143
|
return isAuto ? `Please set Node.js Version to ${range} in your Project Settings to use Node.js ${major}.` : `Please set "engines": { "node": "${range}" } in your \`package.json\` file to use Node.js ${major}.`;
|
|
144
144
|
}
|
|
145
145
|
function getLatestNodeVersion(availableVersions) {
|
|
146
|
-
const all = getOptions()
|
|
147
|
-
(version) => version.major !== 26 || process.env.VERCEL_DEFAULT_NODE_26 === "1"
|
|
148
|
-
);
|
|
146
|
+
const all = getOptions();
|
|
149
147
|
if (availableVersions) {
|
|
150
148
|
for (const version of all) {
|
|
151
149
|
for (const major of availableVersions) {
|
|
@@ -162,13 +160,12 @@ function getDiscontinuedNodeVersions() {
|
|
|
162
160
|
return version.state === "discontinued";
|
|
163
161
|
});
|
|
164
162
|
}
|
|
165
|
-
async function getSupportedNodeVersion(engineRange, isAuto = false, availableVersions
|
|
163
|
+
async function getSupportedNodeVersion(engineRange, isAuto = false, availableVersions) {
|
|
166
164
|
let selection;
|
|
167
165
|
if (engineRange) {
|
|
168
166
|
const found = (0, import_semver.validRange)(engineRange) && getOptions().some((o) => {
|
|
169
167
|
selection = o;
|
|
170
|
-
|
|
171
|
-
return canSelectNode26 && (0, import_semver.intersects)(o.range, engineRange) && (availableVersions?.length ? availableVersions.includes(o.major) : true);
|
|
168
|
+
return (0, import_semver.intersects)(o.range, engineRange) && (availableVersions?.length ? availableVersions.includes(o.major) : true);
|
|
172
169
|
});
|
|
173
170
|
if (!found) {
|
|
174
171
|
throw new import_errors.NowBuildError({
|
|
@@ -254,8 +254,7 @@ async function getNodeVersion(destPath, fallbackVersion = process.env.VERCEL_PRO
|
|
|
254
254
|
const supportedNodeVersion = await (0, import_node_version.getSupportedNodeVersion)(
|
|
255
255
|
packageJsonNodeVersion || configuredNodeVersion,
|
|
256
256
|
!packageJsonNodeVersion,
|
|
257
|
-
availableVersions
|
|
258
|
-
configuredNodeVersion
|
|
257
|
+
availableVersions
|
|
259
258
|
);
|
|
260
259
|
if (packageJson?.engines?.node) {
|
|
261
260
|
const { node } = packageJson.engines;
|