Socket
Socket
Sign inDemoInstall

@vercel/build-utils

Package Overview
Dependencies
Maintainers
8
Versions
306
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 6.0.1 to 6.1.0

4

dist/edge-function.d.ts

@@ -1,2 +0,2 @@

import type { Files } from './types';
import type { Cron, Files } from './types';
/**

@@ -38,3 +38,5 @@ * An Edge Functions output

regions?: string | string[];
/** Cronjob definition for the edge function */
cron?: Cron;
constructor(params: Omit<EdgeFunction, 'type'>);
}

@@ -17,4 +17,5 @@ "use strict";

this.regions = params.regions;
this.cron = params.cron;
}
}
exports.EdgeFunction = EdgeFunction;

@@ -66,3 +66,3 @@ /// <reference types="node" />

export declare function getSpawnOptions(meta: Meta, nodeVersion: NodeVersion): SpawnOptions;
export declare function getNodeVersion(destPath: string, _nodeVersion?: string, config?: Config, meta?: Meta): Promise<NodeVersion>;
export declare function getNodeVersion(destPath: string, nodeVersionFallback?: string | undefined, config?: Config, meta?: Meta): Promise<NodeVersion>;
export declare function scanParentDirs(destPath: string, readPackageJson?: boolean): Promise<ScanParentDirsResult>;

@@ -69,0 +69,0 @@ export declare function walkParentDirs({ base, start, filename, }: WalkParentDirsProps): Promise<string | null>;

@@ -116,3 +116,3 @@ "use strict";

exports.getSpawnOptions = getSpawnOptions;
async function getNodeVersion(destPath, _nodeVersion, config = {}, meta = {}) {
async function getNodeVersion(destPath, nodeVersionFallback = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION, config = {}, meta = {}) {
const latest = node_version_1.getLatestNodeVersion();

@@ -124,3 +124,3 @@ if (meta.isDev) {

const { packageJson } = await scanParentDirs(destPath, true);
let { nodeVersion } = config;
let nodeVersion = config.nodeVersion || nodeVersionFallback;
let isAuto = true;

@@ -127,0 +127,0 @@ if (packageJson?.engines?.node) {

/// <reference types="node" />
import type { Files, Config } from './types';
import type { Files, Config, Cron } from './types';
interface Environment {

@@ -19,2 +19,3 @@ [key: string]: string;

operationType?: string;
cron?: Cron;
}

@@ -53,2 +54,3 @@ export interface LambdaOptionsWithFiles extends LambdaOptionsBase {

regions?: string[];
cron?: Cron;
/**

@@ -55,0 +57,0 @@ * @deprecated Use `await lambda.createZip()` instead.

@@ -16,3 +16,3 @@ "use strict";

constructor(opts) {
const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, experimentalResponseStreaming, operationType, } = opts;
const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, cron, supportsMultiPayloads, supportsWrapper, experimentalResponseStreaming, operationType, } = opts;
if ('files' in opts) {

@@ -47,2 +47,5 @@ assert_1.default(typeof opts.files === 'object', '"files" must be an object');

}
if (cron !== undefined) {
assert_1.default(typeof cron === 'string', '"cron" is not a string');
}
this.type = 'Lambda';

@@ -58,2 +61,3 @@ this.operationType = operationType;

this.regions = regions;
this.cron = cron;
this.zipBuffer = 'zipBuffer' in opts ? opts.zipBuffer : undefined;

@@ -60,0 +64,0 @@ this.supportsMultiPayloads = supportsMultiPayloads;

@@ -365,2 +365,3 @@ /// <reference types="node" />

}
export declare type Cron = string;
/**

@@ -367,0 +368,0 @@ * When a Builder implements `version: 2`, the `build()` function is expected

{
"name": "@vercel/build-utils",
"version": "6.0.1",
"version": "6.1.0",
"license": "MIT",

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

},
"gitHead": "ada9a48d57be8f4375494a369aaa98cee1f5eae2"
"gitHead": "a4d16c681a7e85f64a2d78432d499c599b398bde"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc