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 6.0.0 to 6.1.0

LICENSE

1

out/deepAssign.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deepAssign = void 0;
function isObject(x) {

@@ -4,0 +5,0 @@ if (Array.isArray(x)) {

7

out/main.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadEnv = exports.loadParentConfig = exports.getConfig = exports.loadConfig = exports.orIfFileNotExist = exports.orNullIfFileNotExist = exports.findAndReadConfig = void 0;
const fs_1 = require("fs");

@@ -13,3 +14,3 @@ const js_yaml_1 = require("js-yaml");

}
else if (configFile.endsWith(".js")) {
else if (configFile.endsWith(".js") || configFile.endsWith(".cjs")) {
result = require(configFile);

@@ -28,3 +29,3 @@ if (result.default != null) {

else {
result = js_yaml_1.safeLoad(data);
result = js_yaml_1.load(data);
}

@@ -35,3 +36,3 @@ return { result, configFile };

const prefix = request.configFilename;
for (const configFile of [`${prefix}.yml`, `${prefix}.yaml`, `${prefix}.json`, `${prefix}.json5`, `${prefix}.toml`, `${prefix}.js`]) {
for (const configFile of [`${prefix}.yml`, `${prefix}.yaml`, `${prefix}.json`, `${prefix}.json5`, `${prefix}.toml`, `${prefix}.js`, `${prefix}.cjs`]) {
const data = await orNullIfFileNotExist(readConfig(path.join(request.projectDir, configFile), request));

@@ -38,0 +39,0 @@ if (data != null) {

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

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

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

@@ -19,3 +19,3 @@ "bugs": "https://github.com/develar/read-config-file/issues",

"compile": "tsc",
"release": "yarn compile && npm publish"
"release": "pnpm compile && npm publish"
},

@@ -25,13 +25,12 @@ "dependencies": {

"dotenv-expand": "^5.1.0",
"js-yaml": "^3.13.1",
"json5": "^2.1.2",
"js-yaml": "^4.0.0",
"json5": "^2.2.0",
"lazy-val": "^1.0.4"
},
"devDependencies": {
"@types/dotenv": "^8.2.0",
"@types/js-yaml": "^3.12.3",
"@types/node": "^13.9.8",
"typescript": "^3.8.3"
"@types/js-yaml": "^4.0.0",
"@types/node": "^14.14.34",
"typescript": "^4.2.3"
},
"typings": "./out/main.d.ts"
}

@@ -8,2 +8,4 @@ ## read-config-file

* json
* toml (if installed, `yarn add toml`).
* js
* cjs
* toml (if installed, `yarn add toml`).

Sorry, the diff of this file is not supported yet

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