@vercel/build-utils 13.0.2 → 13.1.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 13.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Only run introspection when isExperimentalBackendsWithoutIntrospectionEnabled is truthy ([#14336](https://github.com/vercel/vercel/pull/14336))
8
+
9
+ ## 13.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Remove --unsafe-perm from npm install command ([#14302](https://github.com/vercel/vercel/pull/14302))
14
+
3
15
  ## 13.0.2
4
16
 
5
17
  ### Patch Changes
@@ -9,9 +9,7 @@ export type BackendFramework = (typeof BACKEND_FRAMEWORKS)[number];
9
9
  * Checks if the given framework is a backend framework
10
10
  */
11
11
  export declare function isBackendFramework(framework: string | null | undefined): framework is BackendFramework;
12
- /**
13
- * Checks if experimental backends are enabled via environment variable
14
- */
12
+ export declare function isExperimentalBackendsWithoutIntrospectionEnabled(): boolean;
15
13
  export declare function isExperimentalBackendsEnabled(): boolean;
16
14
  export declare function isBackendBuilder(builder: Builder | null | undefined): boolean;
17
15
  /**
@@ -23,6 +23,7 @@ __export(framework_helpers_exports, {
23
23
  isBackendBuilder: () => isBackendBuilder,
24
24
  isBackendFramework: () => isBackendFramework,
25
25
  isExperimentalBackendsEnabled: () => isExperimentalBackendsEnabled,
26
+ isExperimentalBackendsWithoutIntrospectionEnabled: () => isExperimentalBackendsWithoutIntrospectionEnabled,
26
27
  shouldUseExperimentalBackends: () => shouldUseExperimentalBackends
27
28
  });
28
29
  module.exports = __toCommonJS(framework_helpers_exports);
@@ -47,8 +48,11 @@ function isBackendFramework(framework) {
47
48
  return false;
48
49
  return BACKEND_FRAMEWORKS.includes(framework);
49
50
  }
51
+ function isExperimentalBackendsWithoutIntrospectionEnabled() {
52
+ return process.env.VERCEL_BACKENDS_BUILDS === "1";
53
+ }
50
54
  function isExperimentalBackendsEnabled() {
51
- return process.env.VERCEL_EXPERIMENTAL_BACKENDS === "1" || // Previously used for experimental express and hono builds
55
+ return isExperimentalBackendsWithoutIntrospectionEnabled() || process.env.VERCEL_EXPERIMENTAL_BACKENDS === "1" || // Previously used for experimental express and hono builds
52
56
  process.env.VERCEL_EXPERIMENTAL_EXPRESS_BUILD === "1" || process.env.VERCEL_EXPERIMENTAL_HONO_BUILD === "1";
53
57
  }
54
58
  function isBackendBuilder(builder) {
@@ -67,5 +71,6 @@ function shouldUseExperimentalBackends(framework) {
67
71
  isBackendBuilder,
68
72
  isBackendFramework,
69
73
  isExperimentalBackendsEnabled,
74
+ isExperimentalBackendsWithoutIntrospectionEnabled,
70
75
  shouldUseExperimentalBackends
71
76
  });
@@ -474,7 +474,7 @@ function getInstallCommandForPackageManager(packageManager, args) {
474
474
  case "npm":
475
475
  return {
476
476
  prettyCommand: "npm install",
477
- commandArguments: args.filter((a) => a !== "--prefer-offline").concat(["install", "--no-audit", "--unsafe-perm"])
477
+ commandArguments: args.filter((a) => a !== "--prefer-offline").concat(["install", "--no-audit"])
478
478
  };
479
479
  case "pnpm":
480
480
  return {
package/dist/index.d.ts CHANGED
@@ -32,4 +32,4 @@ export { NODE_VERSIONS } from './fs/node-version';
32
32
  export { getInstalledPackageVersion } from './get-installed-package-version';
33
33
  export { defaultCachePathGlob } from './default-cache-path-glob';
34
34
  export { generateNodeBuilderFunctions } from './generate-node-builder-functions';
35
- export { BACKEND_FRAMEWORKS, BackendFramework, isBackendFramework, isBackendBuilder, isExperimentalBackendsEnabled, shouldUseExperimentalBackends, } from './framework-helpers';
35
+ export { BACKEND_FRAMEWORKS, BackendFramework, isBackendFramework, isBackendBuilder, isExperimentalBackendsEnabled, isExperimentalBackendsWithoutIntrospectionEnabled, shouldUseExperimentalBackends, } from './framework-helpers';
package/dist/index.js CHANGED
@@ -21872,6 +21872,7 @@ __export(src_exports, {
21872
21872
  isBunVersion: () => isBunVersion,
21873
21873
  isDirectory: () => isDirectory,
21874
21874
  isExperimentalBackendsEnabled: () => isExperimentalBackendsEnabled,
21875
+ isExperimentalBackendsWithoutIntrospectionEnabled: () => isExperimentalBackendsWithoutIntrospectionEnabled,
21875
21876
  isSymbolicLink: () => isSymbolicLink,
21876
21877
  normalizePath: () => normalizePath,
21877
21878
  readConfigFile: () => readConfigFile,
@@ -23597,7 +23598,7 @@ function getInstallCommandForPackageManager(packageManager, args) {
23597
23598
  case "npm":
23598
23599
  return {
23599
23600
  prettyCommand: "npm install",
23600
- commandArguments: args.filter((a) => a !== "--prefer-offline").concat(["install", "--no-audit", "--unsafe-perm"])
23601
+ commandArguments: args.filter((a) => a !== "--prefer-offline").concat(["install", "--no-audit"])
23601
23602
  };
23602
23603
  case "pnpm":
23603
23604
  return {
@@ -24796,8 +24797,11 @@ function isBackendFramework(framework) {
24796
24797
  return false;
24797
24798
  return BACKEND_FRAMEWORKS.includes(framework);
24798
24799
  }
24800
+ function isExperimentalBackendsWithoutIntrospectionEnabled() {
24801
+ return process.env.VERCEL_BACKENDS_BUILDS === "1";
24802
+ }
24799
24803
  function isExperimentalBackendsEnabled() {
24800
- return process.env.VERCEL_EXPERIMENTAL_BACKENDS === "1" || // Previously used for experimental express and hono builds
24804
+ return isExperimentalBackendsWithoutIntrospectionEnabled() || process.env.VERCEL_EXPERIMENTAL_BACKENDS === "1" || // Previously used for experimental express and hono builds
24801
24805
  process.env.VERCEL_EXPERIMENTAL_EXPRESS_BUILD === "1" || process.env.VERCEL_EXPERIMENTAL_HONO_BUILD === "1";
24802
24806
  }
24803
24807
  function isBackendBuilder(builder) {
@@ -24866,6 +24870,7 @@ function shouldUseExperimentalBackends(framework) {
24866
24870
  isBunVersion,
24867
24871
  isDirectory,
24868
24872
  isExperimentalBackendsEnabled,
24873
+ isExperimentalBackendsWithoutIntrospectionEnabled,
24869
24874
  isSymbolicLink,
24870
24875
  normalizePath,
24871
24876
  readConfigFile,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "13.0.2",
3
+ "version": "13.1.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -27,7 +27,7 @@
27
27
  "@types/semver": "6.0.0",
28
28
  "@types/yazl": "2.4.2",
29
29
  "@vercel/error-utils": "2.0.3",
30
- "@vercel/routing-utils": "5.2.2",
30
+ "@vercel/routing-utils": "5.3.0",
31
31
  "aggregate-error": "3.0.1",
32
32
  "async-retry": "1.2.3",
33
33
  "async-sema": "2.1.4",