Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

read-config-file

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-config-file - npm Package Compare versions

Comparing version 5.0.2 to 6.0.0

9

out/main.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs_extra_1 = require("fs-extra");
const fs_1 = require("fs");
const js_yaml_1 = require("js-yaml");

@@ -8,3 +8,3 @@ const path = require("path");

async function readConfig(configFile, request) {
const data = await fs_extra_1.readFile(configFile, "utf8");
const data = await fs_1.promises.readFile(configFile, "utf8");
let result;

@@ -60,3 +60,4 @@ if (configFile.endsWith(".json5") || configFile.endsWith(".json")) {

if (packageMetadata == null) {
packageMetadata = await orNullIfFileNotExist(fs_extra_1.readJson(path.join(request.projectDir, "package.json")));
const json = await orNullIfFileNotExist(fs_1.promises.readFile(path.join(request.projectDir, "package.json"), "utf8"));
packageMetadata = json == null ? null : JSON.parse(json);
}

@@ -102,3 +103,3 @@ const data = packageMetadata == null ? null : packageMetadata[request.packageKey];

async function loadEnv(envFile) {
const data = await orNullIfFileNotExist(fs_extra_1.readFile(envFile, "utf8"));
const data = await orNullIfFileNotExist(fs_1.promises.readFile(envFile, "utf8"));
if (data == null) {

@@ -105,0 +106,0 @@ return null;

{
"name": "read-config-file",
"version": "5.0.2",
"version": "6.0.0",
"main": "out/main.js",

@@ -9,3 +9,3 @@ "author": "Vladimir Krivosheev",

"engines": {
"node": ">=8.12.0"
"node": ">=10.0.0"
},

@@ -24,5 +24,4 @@ "bugs": "https://github.com/develar/read-config-file/issues",

"dotenv-expand": "^5.1.0",
"fs-extra": "^8.1.0",
"js-yaml": "^3.13.1",
"json5": "^2.1.1",
"json5": "^2.1.2",
"lazy-val": "^1.0.4"

@@ -32,5 +31,4 @@ },

"@types/dotenv": "^8.2.0",
"@types/fs-extra": "^8.1.0",
"@types/js-yaml": "^3.12.2",
"@types/node": "^13.7.7",
"@types/js-yaml": "^3.12.3",
"@types/node": "^13.9.8",
"typescript": "^3.8.3"

@@ -37,0 +35,0 @@ },

Sorry, the diff of this file is not supported yet

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