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

@netlify/config

Package Overview
Dependencies
Maintainers
20
Versions
438
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/config - npm Package Compare versions

Comparing version 20.5.1 to 20.5.2

50

lib/edge_functions.js

@@ -6,3 +6,3 @@ import { isString, validProperties } from './validate/helpers.js';

property: 'edge_functions.*',
...validProperties(['path', 'function', 'cache'], []),
...validProperties(['path', 'excludedPath', 'pattern', 'excludedPattern', 'function', 'cache'], []),
example: () => ({ edge_functions: [{ path: '/hello', function: 'hello' }] }),

@@ -12,4 +12,4 @@ },

property: 'edge_functions.*',
check: (edgeFunction) => edgeFunction.path !== undefined,
message: '"path" property is required.',
check: (edgeFunction) => edgeFunction.path !== undefined || edgeFunction.pattern !== undefined,
message: 'either "path" or "pattern" is required.',
example: () => ({ edge_functions: [{ path: '/hello', function: 'hello' }] }),

@@ -19,2 +19,8 @@ },

property: 'edge_functions.*',
check: (edgeFunction) => !(edgeFunction.path !== undefined && edgeFunction.pattern !== undefined),
message: '"path" and "pattern" are mutually exclusive.',
example: () => ({ edge_functions: [{ path: '/hello', function: 'hello' }] }),
},
{
property: 'edge_functions.*',
check: (edgeFunction) => edgeFunction.function !== undefined,

@@ -31,2 +37,40 @@ message: '"function" property is required.',

{
property: 'edge_functions.*.excludedPath',
check: (value) => isString(value) || (Array.isArray(value) && value.every(isString)),
message: 'must be a string or array of strings.',
example: () => ({
edge_functions: [{ path: '/products/*', excludedPath: ['/products/*.jpg'], function: 'customise' }],
}),
},
{
property: 'edge_functions.*',
check: (value) => value.excludedPath === undefined || value.path !== undefined,
message: '"excludedPath" can only be specified together with "path".',
example: () => ({
edge_functions: [{ path: '/products/*', excludedPath: ['/products/*.jpg'], function: 'customise' }],
}),
},
{
property: 'edge_functions.*.pattern',
check: isString,
message: 'must be a string.',
example: () => ({ edge_functions: [{ pattern: '/hello/(.*)', function: 'hello' }] }),
},
{
property: 'edge_functions.*.excludedPattern',
check: (value) => isString(value) || (Array.isArray(value) && value.every(isString)),
message: 'must be a string or array of strings.',
example: () => ({
edge_functions: [{ path: '/products/(.*)', excludedPath: ['/products/(.*)\\.jpg'], function: 'customise' }],
}),
},
{
property: 'edge_functions.*.excludedPattern',
check: (value) => value.excludedPattern === undefined || value.pattern !== undefined,
message: '"excludedPattern" can only be specified together with "pattern".',
example: () => ({
edge_functions: [{ path: '/products/(.*)', excludedPath: ['/products/(.*)\\.jpg'], function: 'customise' }],
}),
},
{
property: 'edge_functions.*.function',

@@ -33,0 +77,0 @@ check: isString,

4

package.json
{
"name": "@netlify/config",
"version": "20.5.1",
"version": "20.5.2",
"description": "Netlify config module",

@@ -96,3 +96,3 @@ "type": "module",

},
"gitHead": "a6c1b829ea47b4600dae206cdc5df2dda7296eed"
"gitHead": "2bb08a1fb4ad1bca50cee1131b70cbd94a9f08a3"
}
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