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

@gasket/utils

Package Overview
Dependencies
Maintainers
6
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gasket/utils - npm Package Compare versions

Comparing version 6.0.13 to 6.2.0

4

CHANGELOG.md
# `@gasket/utils`
### 6.3.0
- Fixed issue where an `environments` section of config files was doing proper inheritance of dev environment settings for the `local` environment.
### 6.0.13

@@ -4,0 +8,0 @@

42

lib/apply-env-overrides.js

@@ -17,33 +17,27 @@ const path = require('path');

const { environments = {}, ...baseConfig } = config;
// Iterate over any `.` delimited parts (e.g. `production.subEnv`) and
// merge any corresponding config within `environments` into the
// configuration of this command.
const isLocalEnv = env === 'local';
const envParts = env.split('.');
let normalizedConfig = envParts.reduce((acc, part, i) => {
return defaultsDeep({},
environments[envParts.slice(0, i + 1).join('.')],
acc);
}, baseConfig);
// Special case for the local environment, which inherits from the
// development environment
if (env === 'local') {
const devConfig = environments.development || environments.dev;
if (devConfig) {
normalizedConfig = defaultsDeep({}, normalizedConfig, devConfig);
}
const configs = [
// For git-ignorable changes, merge in optional `.local` file
if (localFile) {
const localOverrides = tryRequire(path.join(root, localFile));
if (localOverrides) {
normalizedConfig = defaultsDeep({}, localOverrides, normalizedConfig);
}
}
}
isLocalEnv && localFile && tryRequire(path.join(root, localFile)),
return normalizedConfig;
// Iterate over any `.` delimited parts (e.g. `production.subEnv`) and
// merge any corresponding configs within `environments`
...envParts
.map((_, i) => environments[envParts.slice(0, i + 1).join('.')])
.reverse(),
// Special case for the local environment, which inherits from the
// development environment
isLocalEnv && (environments.development || environments.dev),
baseConfig
].filter(Boolean);
return defaultsDeep({}, ...configs);
}
module.exports = applyEnvironmentOverrides;
{
"name": "@gasket/utils",
"version": "6.0.13",
"version": "6.2.0",
"description": "Reusable utilities for Gasket internals",

@@ -63,4 +63,3 @@ "main": "lib",

"test/fixtures"
],
"gitHead": "538602de36e1704f8ab26d4a8e29b08587b32145"
]
}
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