Socket
Socket
Sign inDemoInstall

cosmiconfig

Package Overview
Dependencies
16
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.3.2 to 8.3.3

2

dist/Explorer.js

@@ -36,3 +36,3 @@ "use strict";

}
const stopDir = this.config.stopDir && node_path_1.default.resolve(this.config.stopDir);
const stopDir = node_path_1.default.resolve(this.config.stopDir);
from = node_path_1.default.resolve(from);

@@ -39,0 +39,0 @@ const search = async () => {

@@ -36,3 +36,3 @@ "use strict";

}
const stopDir = this.config.stopDir && node_path_1.default.resolve(this.config.stopDir);
const stopDir = node_path_1.default.resolve(this.config.stopDir);
from = node_path_1.default.resolve(from);

@@ -39,0 +39,0 @@ const search = () => {

@@ -27,2 +27,3 @@ "use strict";

const loaders_js_1 = require("./loaders.js");
const util_1 = require("./util");
// this needs to be hardcoded, as this is intended for end users, who can't supply options at this point

@@ -86,3 +87,3 @@ exports.metaSearchPlaces = [

overrideOptions.metaConfigFilePath = metaConfig.filepath;
return { ...options, ...overrideOptions };
return { ...options, ...(0, util_1.removeUndefinedValuesFromObject)(overrideOptions) };
}

@@ -122,5 +123,5 @@ function normalizeOptions(moduleName, options) {

};
const normalizedOptions = {
return {
...defaults,
...options,
...(0, util_1.removeUndefinedValuesFromObject)(options),
loaders: {

@@ -131,3 +132,2 @@ ...defaults.loaders,

};
return normalizedOptions;
}

@@ -164,5 +164,5 @@ function normalizeOptionsSync(moduleName, options) {

};
const normalizedOptions = {
return {
...defaults,
...options,
...(0, util_1.removeUndefinedValuesFromObject)(options),
loaders: {

@@ -173,3 +173,2 @@ ...defaults.loaders,

};
return normalizedOptions;
}

@@ -176,0 +175,0 @@ function cosmiconfig(moduleName, options = {}) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPropertyByPath = exports.emplace = void 0;
exports.removeUndefinedValuesFromObject = exports.getPropertyByPath = exports.emplace = void 0;
/**

@@ -40,2 +40,11 @@ * @internal

exports.getPropertyByPath = getPropertyByPath;
/** @internal */
function removeUndefinedValuesFromObject(options) {
/* istanbul ignore if -- @preserve */
if (!options) {
return undefined;
}
return Object.fromEntries(Object.entries(options).filter(([, value]) => value !== undefined));
}
exports.removeUndefinedValuesFromObject = removeUndefinedValuesFromObject;
//# sourceMappingURL=util.js.map
{
"name": "cosmiconfig",
"version": "8.3.2",
"version": "8.3.3",
"description": "Find and load configuration from a package.json property, rc file, TypeScript module, and more!",

@@ -78,3 +78,3 @@ "main": "dist/index.js",

"@types/js-yaml": "^4.0.5",
"@types/node": "~18",
"@types/node": "^14",
"@types/parse-json": "^4.0.0",

@@ -104,4 +104,4 @@ "@typescript-eslint/eslint-plugin": "^6.5.0",

"engines": {
"node": ">=18"
"node": ">=14"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc