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

corsica

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

corsica - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

37

lib/config.js

@@ -23,2 +23,16 @@ var fs = require('fs');

// if the working directory contains a config.json, inherit from it.
try {
var configJsonPath = path.resolve('config.json');
if (fs.existsSync(configJsonPath)) {
console.log('Reading config from ' + configJsonPath);
var configJson = fs.readFileSync(configJsonPath, {encoding: 'utf8'});
var configObj = JSON.parse(configJson);
for (var key in configObj) {
config[key] = configObj[key];
}
}
} catch(e) {
console.warn('Error reading config.json');
}

@@ -29,3 +43,2 @@ for (var key in process.env) {

// Load settings from a .env file in the working directory. This will override

@@ -35,12 +48,16 @@ // the defaults, but not the environment.

var dotEnvPath = path.resolve(path.join('.env'));
var env = fs.readFileSync(dotEnvPath, {encoding: 'utf8'});
env.split('\n').forEach(function(line) {
var parts = line.split('=');
var key = parts[0];
var value = parse(parts.slice(1).join('='));
if (!(key in process.env)) {
config[key] = value;
}
});
if (fs.existsSync(dotEnvPath)) {
console.log('Reading config from ' + dotEnvPath);
var env = fs.readFileSync(dotEnvPath, {encoding: 'utf8'});
env.split('\n').forEach(function(line) {
var parts = line.split('=');
var key = parts[0];
var value = parse(parts.slice(1).join('='));
if (!(key in process.env)) {
config[key] = value;
}
});
}
} catch(e) {
console.warn('Error reading .env');
}

@@ -47,0 +64,0 @@

{
"name": "corsica",
"version": "2.1.1",
"version": "2.2.0",
"description": "Ephemeral screens for the masses.",

@@ -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