Socket
Socket
Sign inDemoInstall

@vercel/build-utils

Package Overview
Dependencies
Maintainers
12
Versions
311
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 2.4.3-canary.4 to 2.4.3-canary.5

1

dist/detect-builders.d.ts

@@ -18,2 +18,3 @@ import { Route } from '@vercel/routing-utils';

outputDirectory?: string | null;
createdAt?: number;
};

@@ -20,0 +21,0 @@ cleanUrls?: boolean;

27

dist/detect-builders.js

@@ -297,2 +297,3 @@ "use strict";

const withTag = tag ? `@${tag}` : '';
const { createdAt = 0 } = projectSettings;
let { framework } = projectSettings;

@@ -314,3 +315,3 @@ const config = {

}
if (pkg && framework !== null) {
if (pkg && (framework !== null || createdAt < Date.parse('2020-03-01'))) {
const deps = {

@@ -663,2 +664,3 @@ ...pkg.dependencies,

function getRouteResult(apiRoutes, dynamicRoutes, outputDirectory, apiBuilders, frontendBuilder, options) {
var _a, _b;
const defaultRoutes = [];

@@ -668,6 +670,6 @@ const redirectRoutes = [];

const errorRoutes = [];
const isNextjs = frontendBuilder &&
((frontendBuilder.use && frontendBuilder.use.startsWith('@vercel/next')) ||
(frontendBuilder.config &&
frontendBuilder.config.framework === 'nextjs'));
const framework = ((_a = frontendBuilder === null || frontendBuilder === void 0 ? void 0 : frontendBuilder.config) === null || _a === void 0 ? void 0 : _a.framework) || '';
const use = (frontendBuilder === null || frontendBuilder === void 0 ? void 0 : frontendBuilder.use) || '';
const isNextjs = framework === 'nextjs' || use.startsWith('@vercel/next');
const ignoreRuntimes = (_b = slugToFramework.get(framework)) === null || _b === void 0 ? void 0 : _b.ignoreRuntimes;
if (apiRoutes && apiRoutes.length > 0) {

@@ -705,7 +707,12 @@ if (options.featHandleMiss) {

rewriteRoutes.push(...dynamicRoutes);
rewriteRoutes.push({
src: '^/api(/.*)?$',
status: 404,
continue: true,
});
if (typeof ignoreRuntimes === 'undefined') {
// This route is only necessary to hide the directory listing
// to avoid enumerating serverless function names.
// But it causes issues in `vc dev` for frameworks that handle
// their own functions such as redwood, so we ignore.
errorRoutes.push({
status: 404,
src: '^/api(/.*)?$',
});
}
}

@@ -712,0 +719,0 @@ else {

{
"name": "@vercel/build-utils",
"version": "2.4.3-canary.4",
"version": "2.4.3-canary.5",
"license": "MIT",

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

},
"gitHead": "828244293934439370463b050eec5514323c1c32"
"gitHead": "10c598834a1bf74ebad2710f47bdc79562916948"
}

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc