New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@netlify/edge-bundler

Package Overview
Dependencies
Maintainers
19
Versions
137
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 4.3.2 to 4.4.0

dist/node/validation/manifest/error.d.ts

4

dist/node/bridge.d.ts

@@ -5,4 +5,4 @@ /// <reference types="node" />

declare const DENO_VERSION_RANGE = "^1.22.0";
declare type OnBeforeDownloadHook = () => void | Promise<void>;
declare type OnAfterDownloadHook = (error?: Error) => void | Promise<void>;
type OnBeforeDownloadHook = () => void | Promise<void>;
type OnAfterDownloadHook = (error?: Error) => void | Promise<void>;
interface DenoOptions {

@@ -9,0 +9,0 @@ cacheDirectory?: string;

@@ -1,6 +0,9 @@

interface Bundle {
export declare enum BundleFormat {
ESZIP2 = "eszip2",
JS = "js"
}
export interface Bundle {
extension: string;
format: string;
format: BundleFormat;
hash: string;
}
export type { Bundle };

@@ -1,1 +0,5 @@

export {};
export var BundleFormat;
(function (BundleFormat) {
BundleFormat["ESZIP2"] = "eszip2";
BundleFormat["JS"] = "js";
})(BundleFormat || (BundleFormat = {}));

@@ -7,10 +7,10 @@ import { FunctionConfig } from './config.js';

}
declare type DeclarationWithPath = BaseDeclaration & {
type DeclarationWithPath = BaseDeclaration & {
path: string;
};
declare type DeclarationWithPattern = BaseDeclaration & {
type DeclarationWithPattern = BaseDeclaration & {
pattern: string;
};
declare type Declaration = DeclarationWithPath | DeclarationWithPattern;
type Declaration = DeclarationWithPath | DeclarationWithPattern;
export declare const getDeclarationsFromConfig: (tomlDeclarations: Declaration[], functionsConfig: Record<string, FunctionConfig>) => Declaration[];
export { Declaration, DeclarationWithPath, DeclarationWithPattern };
declare const defaultFlags: Record<string, boolean>;
declare type FeatureFlag = keyof typeof defaultFlags;
declare type FeatureFlags = Record<FeatureFlag, boolean>;
type FeatureFlag = keyof typeof defaultFlags;
type FeatureFlags = Record<FeatureFlag, boolean>;
declare const getFlags: (input?: Record<string, boolean>, flags?: Record<string, boolean>) => FeatureFlags;
export { defaultFlags, getFlags };
export type { FeatureFlag, FeatureFlags };
import { DenoBridge } from '../bridge.js';
import type { Bundle } from '../bundle.js';
import { Bundle } from '../bundle.js';
import { EdgeFunction } from '../edge_function.js';

@@ -4,0 +4,0 @@ import { FeatureFlags } from '../feature_flags.js';

import { join } from 'path';
import { BundleFormat } from '../bundle.js';
import { wrapBundleError } from '../bundle_error.js';

@@ -30,3 +31,3 @@ import { wrapNpmImportError } from '../npm_import_error.js';

const hash = await getFileHash(destPath);
return { extension, format: 'eszip2', hash };
return { extension, format: BundleFormat.ESZIP2, hash };
};

@@ -33,0 +34,0 @@ const getESZIPPaths = () => {

import { DenoBridge } from '../bridge.js';
import type { Bundle } from '../bundle.js';
import { Bundle } from '../bundle.js';
import { EdgeFunction } from '../edge_function.js';

@@ -4,0 +4,0 @@ import { ImportMap } from '../import_map.js';

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

import { deleteAsync } from 'del';
import { BundleFormat } from '../bundle.js';
import { wrapBundleError } from '../bundle_error.js';

@@ -27,3 +28,3 @@ import { wrapNpmImportError } from '../npm_import_error.js';

const hash = await getFileHash(jsBundlePath);
return { extension, format: 'js', hash };
return { extension, format: BundleFormat.JS, hash };
};

@@ -30,0 +31,0 @@ const defaultFormatExportTypeError = (name) => `The Edge Function "${name}" has failed to load. Does it have a function as the default export?`;

@@ -6,1 +6,2 @@ export { bundle } from './bundler.js';

export { serve } from './server/server.js';
export { validateManifest, ManifestValidationError } from './validation/manifest/index.js';

@@ -6,1 +6,2 @@ export { bundle } from './bundler.js';

export { serve } from './server/server.js';
export { validateManifest, ManifestValidationError } from './validation/manifest/index.js';

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

declare type LogFunction = (...args: unknown[]) => void;
type LogFunction = (...args: unknown[]) => void;
interface Logger {

@@ -3,0 +3,0 @@ system: LogFunction;

import { env } from 'process';
import { test, expect } from 'vitest';
import { BundleFormat } from './bundle.js';
import { generateManifest } from './manifest.js';

@@ -7,3 +8,3 @@ test('Generates a manifest with different bundles', () => {

extension: '.ext1',
format: 'format1',
format: BundleFormat.ESZIP2,
hash: '123456',

@@ -13,3 +14,3 @@ };

extension: '.ext2',
format: 'format2',
format: BundleFormat.ESZIP2,
hash: '654321',

@@ -49,3 +50,3 @@ };

extension: '.ext2',
format: 'format1',
format: BundleFormat.ESZIP2,
hash: '123456',

@@ -65,3 +66,3 @@ };

extension: '.ext2',
format: 'format1',
format: BundleFormat.ESZIP2,
hash: '123456',

@@ -90,3 +91,3 @@ };

extension: '.ext1',
format: 'format1',
format: BundleFormat.ESZIP2,
hash: '123456',

@@ -96,3 +97,3 @@ };

extension: '.ext2',
format: 'format2',
format: BundleFormat.ESZIP2,
hash: '654321',

@@ -99,0 +100,0 @@ };

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

import { LogFunction } from '../logger.js';
declare type FormatFunction = (name: string) => string;
type FormatFunction = (name: string) => string;
interface StartServerOptions {

@@ -14,0 +14,0 @@ getFunctionsConfig?: boolean;

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

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

"test:ci": "run-s test:ci:*",
"test:dev:vitest": "vitest run",
"test:dev:vitest": "cross-env FORCE_COLOR=0 vitest run",
"test:dev:deno": "deno test --allow-all deno",
"test:ci:vitest": "vitest run",
"test:ci:vitest": "cross-env FORCE_COLOR=0 vitest run",
"test:ci:deno": "deno test --allow-all deno",

@@ -63,2 +63,3 @@ "test:integration": "node --experimental-modules test/integration/test.js"

"archiver": "^5.3.1",
"cross-env": "^7.0.3",
"husky": "^8.0.0",

@@ -76,2 +77,5 @@ "nock": "^13.2.4",

"@import-maps/resolve": "^1.0.1",
"ajv": "^8.11.2",
"ajv-errors": "^3.0.0",
"better-ajv-errors": "^1.2.0",
"common-path-prefix": "^3.0.0",

@@ -78,0 +82,0 @@ "del": "^7.0.0",

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