Socket
Socket
Sign inDemoInstall

yaml-crypt

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaml-crypt - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

2

lib/yaml-crypt.js

@@ -30,3 +30,3 @@ const { homedir } = require("os");

try {
content = readFileSync(join(h, filename));
content = readFileSync(join(h, ".yaml-crypt", filename));
break;

@@ -33,0 +33,0 @@ } catch (e) {

{
"name": "yaml-crypt",
"version": "0.4.0",
"version": "0.4.1",
"description": "Encrypt and decrypt YAML documents",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -30,3 +30,7 @@ const fs = require("fs");

const home = tmp.dirSync();
fs.writeFileSync(`${home.name}/config.yml`, "keys:\n - key: 123");
fs.mkdirSync(`${home.name}/.yaml-crypt`);
fs.writeFileSync(
`${home.name}/.yaml-crypt/config.yml`,
"keys:\n - key: 123"
);
const config = loadConfig({ home: home.name });

@@ -39,3 +43,4 @@ expect(config).to.not.be.null;

const home = tmp.dirSync();
fs.mkdirSync(`${home.name}/config.yaml`);
fs.mkdirSync(`${home.name}/.yaml-crypt`);
fs.mkdirSync(`${home.name}/.yaml-crypt/config.yaml`);
expect(() => loadConfig({ home: home.name })).to.throw(/illegal operation/);

@@ -42,0 +47,0 @@ });

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