@vercel/build-utils 7.2.2 → 7.2.3

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 7.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Add experimental flag to allow Node.js v20 ([#10802](https://github.com/vercel/vercel/pull/10802))
8
+
3
9
  ## 7.2.2
4
10
 
5
11
  ### Patch Changes
@@ -3,6 +3,10 @@ export declare function getLatestNodeVersion(): {
3
3
  readonly major: 18;
4
4
  readonly range: "18.x";
5
5
  readonly runtime: "nodejs18.x";
6
+ } | {
7
+ readonly major: 20;
8
+ readonly range: "20.x";
9
+ readonly runtime: "nodejs20.x";
6
10
  };
7
11
  export declare function getDiscontinuedNodeVersions(): NodeVersion[];
8
12
  export declare function getSupportedNodeVersion(engineRange: string | undefined, isAuto?: boolean): Promise<NodeVersion>;
@@ -70,6 +70,12 @@ function getOptions() {
70
70
  discontinueDate: /* @__PURE__ */ new Date("2020-01-06")
71
71
  }
72
72
  ];
73
+ if (process.env.VERCEL_ALLOW_NODEJS20 === "1") {
74
+ return [
75
+ { major: 20, range: "20.x", runtime: "nodejs20.x" },
76
+ ...options
77
+ ];
78
+ }
73
79
  return options;
74
80
  }
75
81
  function getHint(isAuto = false) {
package/dist/index.js CHANGED
@@ -20349,9 +20349,11 @@ var require_toml = __commonJS({
20349
20349
  var require_dist = __commonJS({
20350
20350
  "../error-utils/dist/index.js"(exports2, module2) {
20351
20351
  "use strict";
20352
+ var __create2 = Object.create;
20352
20353
  var __defProp2 = Object.defineProperty;
20353
20354
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
20354
20355
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
20356
+ var __getProtoOf2 = Object.getPrototypeOf;
20355
20357
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
20356
20358
  var __export2 = (target, all) => {
20357
20359
  for (var name in all)
@@ -20365,6 +20367,14 @@ var require_dist = __commonJS({
20365
20367
  }
20366
20368
  return to;
20367
20369
  };
20370
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
20371
+ // If the importer is in node compatibility mode or this is not an ESM
20372
+ // file that has been converted to a CommonJS file using a Babel-
20373
+ // compatible transform (i.e. "__esModule" has not been set), then set
20374
+ // "default" to the CommonJS "module.exports" for node compatibility.
20375
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
20376
+ mod
20377
+ ));
20368
20378
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
20369
20379
  var src_exports2 = {};
20370
20380
  __export2(src_exports2, {
@@ -20377,18 +20387,10 @@ var require_dist = __commonJS({
20377
20387
  normalizeError: () => normalizeError
20378
20388
  });
20379
20389
  module2.exports = __toCommonJS2(src_exports2);
20390
+ var import_node_util = __toESM2(require("util"));
20380
20391
  var isObject = (obj) => typeof obj === "object" && obj !== null;
20381
20392
  var isError = (error) => {
20382
- if (!isObject(error))
20383
- return false;
20384
- if (error instanceof Error)
20385
- return true;
20386
- while (error) {
20387
- if (Object.prototype.toString.call(error) === "[object Error]")
20388
- return true;
20389
- error = Object.getPrototypeOf(error);
20390
- }
20391
- return false;
20393
+ return import_node_util.default.types.isNativeError(error);
20392
20394
  };
20393
20395
  var isErrnoException2 = (error) => {
20394
20396
  return isError(error) && "code" in error;
@@ -21622,6 +21624,12 @@ function getOptions() {
21622
21624
  discontinueDate: /* @__PURE__ */ new Date("2020-01-06")
21623
21625
  }
21624
21626
  ];
21627
+ if (process.env.VERCEL_ALLOW_NODEJS20 === "1") {
21628
+ return [
21629
+ { major: 20, range: "20.x", runtime: "nodejs20.x" },
21630
+ ...options
21631
+ ];
21632
+ }
21625
21633
  return options;
21626
21634
  }
21627
21635
  function getHint(isAuto = false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "7.2.2",
3
+ "version": "7.2.3",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -26,7 +26,7 @@
26
26
  "@types/node-fetch": "^2.1.6",
27
27
  "@types/semver": "6.0.0",
28
28
  "@types/yazl": "2.4.2",
29
- "@vercel/error-utils": "2.0.1",
29
+ "@vercel/error-utils": "2.0.2",
30
30
  "aggregate-error": "3.0.1",
31
31
  "async-retry": "1.2.3",
32
32
  "async-sema": "2.1.4",
@@ -50,6 +50,7 @@
50
50
  "build": "node build.mjs",
51
51
  "test": "jest --reporters=default --reporters=jest-junit --env node --verbose --runInBand --bail",
52
52
  "test-unit": "pnpm test test/unit.*test.*",
53
- "test-e2e": "pnpm test test/integration.test.ts"
53
+ "test-e2e": "pnpm test test/integration.test.ts",
54
+ "type-check": "tsc --noEmit"
54
55
  }
55
56
  }