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

serverless-dotenv-plugin

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-dotenv-plugin - npm Package Compare versions

Comparing version 3.5.0 to 3.5.1

1

CHANGELOG.md

@@ -8,2 +8,3 @@ # Changelog

* [Documentation](https://github.com/neverendingqs/serverless-dotenv-plugin/pulls?q=+is%3Apr+label%3Adocumentation)
* [Refactor](https://github.com/neverendingqs/serverless-dotenv-plugin/pulls?q=label%3Arefactor+is%3Apr)

@@ -10,0 +11,0 @@ ## Unreleased

47

index.js

@@ -91,23 +91,3 @@ 'use strict'

const envVars = envVarsArray.reduce(
(acc, curr) => ({ ...acc, ...curr }),
{},
)
const missingRequiredEnvVars = (this.required.env || []).filter(
(envVarName) => !envVars[envVarName] && !process.env[envVarName],
)
if (missingRequiredEnvVars.length > 0) {
throw Object.assign(
new Error(
`Missing the following required environment variables: ${missingRequiredEnvVars.join(
',',
)}`,
),
{ type: errorTypes.HALT },
)
}
return envVars
return envVarsArray.reduce((acc, curr) => ({ ...acc, ...curr }), {})
}

@@ -153,3 +133,3 @@

'DOTENV: Loading environment variables from ' +
envFileNames.reverse().join(', ') +
[...envFileNames].reverse().join(', ') +
':',

@@ -168,2 +148,22 @@ )

/**
* @param {string[]} envFileNames
*/
validateEnvVars(envVars) {
const missingRequiredEnvVars = (this.required.env || []).filter(
(envVarName) => !envVars[envVarName] && !process.env[envVarName],
)
if (missingRequiredEnvVars.length > 0) {
throw Object.assign(
new Error(
`Missing the following required environment variables: ${missingRequiredEnvVars.join(
',',
)}`,
),
{ type: errorTypes.HALT },
)
}
}
/**
* @param {string} env

@@ -174,5 +174,6 @@ */

try {
this.validateEnvFileNames(envFileNames)
const envVars = this.parseEnvFiles(envFileNames)
this.validateEnvVars(envVars)
this.setProviderEnv(envVars)
this.validateEnvFileNames(envFileNames)
} catch (e) {

@@ -179,0 +180,0 @@ if (e.type === errorTypes.HALT) {

{
"name": "serverless-dotenv-plugin",
"version": "3.5.0",
"version": "3.5.1",
"description": "Preload environment variables with dotenv into serverless.",

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

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