Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@netlify/edge-bundler

Package Overview
Dependencies
Maintainers
19
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/edge-bundler - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

12

dist/node/declaration.d.ts
import { FunctionConfig } from './config.js';
interface DeclarationWithPath {
interface BaseDeclaration {
function: string;
name?: string;
}
declare type DeclarationWithPath = BaseDeclaration & {
path: string;
}
interface DeclarationWithPattern {
function: string;
};
declare type DeclarationWithPattern = BaseDeclaration & {
pattern: string;
}
};
declare type Declaration = DeclarationWithPath | DeclarationWithPattern;
export declare const getDeclarationsFromConfig: (tomlDeclarations: Declaration[], functionsConfig: Record<string, FunctionConfig>) => Declaration[];
export { Declaration, DeclarationWithPath, DeclarationWithPattern };

@@ -17,2 +17,3 @@ import type { Bundle } from './bundle.js';

function: string;
name?: string;
pattern: string;

@@ -19,0 +20,0 @@ }[];

@@ -16,2 +16,3 @@ import { promises as fs } from 'fs';

function: func.name,
name: declaration.name,
pattern: serializablePattern,

@@ -18,0 +19,0 @@ };

@@ -27,2 +27,19 @@ import { env } from 'process';

});
test('Generates a manifest with display names', () => {
const functions = [
{ name: 'func-1', path: '/path/to/func-1.ts' },
{ name: 'func-2', path: '/path/to/func-2.ts' },
];
const declarations = [
{ function: 'func-1', name: 'Display Name', path: '/f1/*' },
{ function: 'func-2', path: '/f2/*' },
];
const manifest = generateManifest({ bundles: [], declarations, functions });
const expectedRoutes = [
{ function: 'func-1', name: 'Display Name', pattern: '^/f1/.*/?$' },
{ function: 'func-2', pattern: '^/f2/.*/?$' },
];
expect(manifest.routes).toEqual(expectedRoutes);
expect(manifest.bundler_version).toBe(env.npm_package_version);
});
test('Excludes functions for which there are function files but no matching config declarations', () => {

@@ -29,0 +46,0 @@ const bundle1 = {

{
"name": "@netlify/edge-bundler",
"version": "2.4.0",
"version": "2.5.0",
"description": "Intelligently prepare Netlify Edge Functions for deployment",

@@ -5,0 +5,0 @@ "type": "module",

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