You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@vercel/build-utils

Package Overview
Dependencies
Maintainers
4
Versions
401
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/build-utils - npm Package Compare versions

Comparing version
12.2.0
to
12.2.1
+17
dist/framework-helpers.d.ts
/**
* List of backend frameworks supported by the experimental backends feature
*/
export declare const BACKEND_FRAMEWORKS: readonly ["express", "hono", "h3", "nestjs", "fastify"];
export type BackendFramework = (typeof BACKEND_FRAMEWORKS)[number];
/**
* Checks if the given framework is a backend framework
*/
export declare function isBackendFramework(framework: string | null | undefined): framework is BackendFramework;
/**
* Checks if experimental backends are enabled via environment variable
*/
export declare function isExperimentalBackendsEnabled(): boolean;
/**
* Checks if experimental backends are enabled AND the framework is a backend framework
*/
export declare function shouldUseExperimentalBackends(framework: string | null | undefined): boolean;
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var framework_helpers_exports = {};
__export(framework_helpers_exports, {
BACKEND_FRAMEWORKS: () => BACKEND_FRAMEWORKS,
isBackendFramework: () => isBackendFramework,
isExperimentalBackendsEnabled: () => isExperimentalBackendsEnabled,
shouldUseExperimentalBackends: () => shouldUseExperimentalBackends
});
module.exports = __toCommonJS(framework_helpers_exports);
const BACKEND_FRAMEWORKS = [
"express",
"hono",
"h3",
"nestjs",
"fastify"
];
function isBackendFramework(framework) {
if (!framework)
return false;
return BACKEND_FRAMEWORKS.includes(framework);
}
function isExperimentalBackendsEnabled() {
return process.env.VERCEL_EXPERIMENTAL_BACKENDS === "1" || // Previously used for experimental express and hono builds
process.env.VERCEL_EXPERIMENTAL_EXPRESS_BUILD === "1" || process.env.VERCEL_EXPERIMENTAL_HONO_BUILD === "1";
}
function shouldUseExperimentalBackends(framework) {
return isExperimentalBackendsEnabled() && isBackendFramework(framework);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
BACKEND_FRAMEWORKS,
isBackendFramework,
isExperimentalBackendsEnabled,
shouldUseExperimentalBackends
});
+6
-0
# @vercel/build-utils
## 12.2.1
### Patch Changes
- Add backend util helpers ([#14152](https://github.com/vercel/vercel/pull/14152))
## 12.2.0

@@ -4,0 +10,0 @@

+1
-0

@@ -35,1 +35,2 @@ import FileBlob from './file-blob';

export { generateNodeBuilderFunctions } from './generate-node-builder-functions';
export { BACKEND_FRAMEWORKS, BackendFramework, isBackendFramework, isExperimentalBackendsEnabled, shouldUseExperimentalBackends, } from './framework-helpers';
+2
-2
{
"name": "@vercel/build-utils",
"version": "12.2.0",
"version": "12.2.1",
"license": "Apache-2.0",

@@ -30,3 +30,3 @@ "main": "./dist/index.js",

"@vercel/error-utils": "2.0.3",
"@vercel/routing-utils": "5.2.0",
"@vercel/routing-utils": "5.2.1",
"aggregate-error": "3.0.1",

@@ -33,0 +33,0 @@ "async-retry": "1.2.3",

Sorry, the diff of this file is too big to display