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

netlify-headers-parser

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netlify-headers-parser - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

2

package.json
{
"name": "netlify-headers-parser",
"version": "2.0.0",
"version": "2.1.0",
"description": "Parses Netlify headers into a JavaScript object representation",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -9,10 +9,14 @@ const { parseFileHeaders } = require('./line_parser')

// and validate those.
const parseAllHeaders = async function ({ headersFiles = [], netlifyConfigPath } = {}) {
const [{ headers: fileHeaders, errors: fileParseErrors }, { headers: configHeaders, errors: configParseErrors }] =
await Promise.all([getFileHeaders(headersFiles), getConfigHeaders(netlifyConfigPath)])
const parseAllHeaders = async function ({ headersFiles = [], netlifyConfigPath, configHeaders = [] } = {}) {
const [
{ headers: fileHeaders, errors: fileParseErrors },
{ headers: parsedConfigHeaders, errors: configParseErrors },
] = await Promise.all([getFileHeaders(headersFiles), getConfigHeaders(netlifyConfigPath)])
const { headers: normalizedFileHeaders, errors: fileNormalizeErrors } = normalizeHeaders(fileHeaders)
const { headers: normalizedConfigParseHeaders, errors: configParseNormalizeErrors } =
normalizeHeaders(parsedConfigHeaders)
const { headers: normalizedConfigHeaders, errors: configNormalizeErrors } = normalizeHeaders(configHeaders)
const { headers, errors: mergeErrors } = mergeHeaders({
fileHeaders: normalizedFileHeaders,
configHeaders: normalizedConfigHeaders,
configHeaders: [...normalizedConfigParseHeaders, ...normalizedConfigHeaders],
})

@@ -23,2 +27,3 @@ const errors = [

...configParseErrors,
...configParseNormalizeErrors,
...configNormalizeErrors,

@@ -25,0 +30,0 @@ ...mergeErrors,

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