Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
confederation
Advanced tools
You can define application's configuration in multiple ways: `.env` or `env.json` files, cli arguments, load from database and many more. They all usually have different case styling. This library aims to unify the process of loading and normalizing confi
You can define application's configuration in multiple ways: .env
or env.json
files, cli arguments, load from database and many more. They all usually have different case styling. This library aims to unify the process of loading and normalizing configurations so that they become a single object aka "source of truth".
Let's look an example, when we run export MODULE__VARIABLE2=from-env
and then app with --module--variable3=from-cli
cli argument.
const configurationSources = [
{
value: require(`dotenv`).config().parsed,
},
{
value: utils.pick(process.env, [`MODULE__VARIABLE2`, `MODULE__VARIABLE3`]),
},
{
value: require(`minimist`)(process.argv.slice(2)),
parser: parsers.dashParser,
},
];
console.log(configurationSources);
// Returns:
// [
// {
// value: {
// MODULE__VARIABLE1: 'from-dotenv',
// MODULE__VARIABLE2: 'from-dotenv'
// }
// },
// {
// value: { MODULE__VARIABLE2: 'from-env', MODULE__VARIABLE3: 'from-env' }
// },
// {
// value: { _: [], 'module--variable3': 'from-cli' },
// parser: { nestifyPattern: '--', keyTransformer: [Function: camelCase] }
// }
// ]
const unifiedConfig = unifyConfigurations(configurationSources);
console.log(unifiedConfig);
// Returns:
// {
// module: {
// variable1: 'from-dotenv',
// variable2: 'from-env'
// variable3: 'from-cli',
// },
// _: []
// }
FAQs
You can define application's configuration in multiple ways: `.env` or `env.json` files, cli arguments, load from database and many more. They all usually have different case styling. This library aims to unify the process of loading and normalizing confi
The npm package confederation receives a total of 4 weekly downloads. As such, confederation popularity was classified as not popular.
We found that confederation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.