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

cosmiconfig

Package Overview
Dependencies
Maintainers
4
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cosmiconfig - npm Package Compare versions

Comparing version 8.1.0 to 8.1.1

dist/src/cacheWrapper.d.ts

21

dist/index.js

@@ -46,2 +46,4 @@ "use strict";

function getExplorerOptions(moduleName, options) {
var _metaConfig$config;
const metaExplorer = new _ExplorerSync.ExplorerSync({

@@ -64,14 +66,17 @@ packageProp: 'cosmiconfig',

const config = metaConfig.config ?? {};
if (config.loaders) {
if ((_metaConfig$config = metaConfig.config) !== null && _metaConfig$config !== void 0 && _metaConfig$config.loaders) {
throw new Error('Can not specify loaders in meta config file');
}
if (config.searchPlaces) {
config.searchPlaces = replaceMetaPlaceholders(config.searchPlaces, moduleName);
const overrideOptions = metaConfig.config ?? {};
if (overrideOptions.searchPlaces) {
overrideOptions.searchPlaces = replaceMetaPlaceholders(overrideOptions.searchPlaces, moduleName);
}
config.metaConfigFilePath = metaConfig.filepath;
return normalizeOptions(moduleName, config, false);
overrideOptions.metaConfigFilePath = metaConfig.filepath;
const mergedOptions = { ...options,
...overrideOptions
};
return normalizeOptions(moduleName, mergedOptions, false);
}

@@ -121,3 +126,3 @@

/* istanbul ignore next */
/* istanbul ignore next -- @preserve */
if (mergeLoaders) {

@@ -124,0 +129,0 @@ Object.assign(loaders, options.loaders);

{
"name": "cosmiconfig",
"version": "8.1.0",
"version": "8.1.1",
"description": "Find and load configuration from a package.json property, rc file, or CommonJS module",

@@ -23,4 +23,4 @@ "main": "dist/index.js",

"typescript": "tsc",
"test": "jest --coverage",
"test:watch": "jest --watch",
"test": "vitest run --coverage",
"test:watch": "vitest",
"check:all": "npm run test && npm run typescript && npm run lint && npm run format:check",

@@ -76,24 +76,2 @@ "prepublishOnly": "npm run check:all && npm run build"

},
"jest": {
"testEnvironment": "node",
"collectCoverageFrom": [
"src/**/*.{js,ts}"
],
"coverageReporters": [
"text",
"html",
"lcov"
],
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
},
"resetModules": true,
"resetMocks": true,
"restoreMocks": true
},
"babel": {

@@ -123,19 +101,19 @@ "presets": [

"@babel/preset-typescript": "^7.10.4",
"@types/jest": "^26.0.4",
"@types/js-yaml": "^4.0.5",
"@types/node": "^14.0.22",
"@types/parse-json": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"@vitest/coverage-istanbul": "^0.29.2",
"cross-env": "^7.0.2",
"del": "^5.1.0",
"del-cli": "^3.0.1",
"eslint": "^7.4.0",
"eslint": "^8.36.0",
"eslint-config-davidtheclark-node": "^0.2.2",
"eslint-config-prettier": "^6.11.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^23.18.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-vitest": "^0.0.54",
"husky": "^4.2.5",
"jest": "^26.1.0",
"lint-staged": "^10.2.11",

@@ -146,3 +124,4 @@ "make-dir": "^3.1.0",

"remark-preset-davidtheclark": "^0.12.0",
"typescript": "^3.9.6"
"typescript": "^4.9.5",
"vitest": "^0.29.2"
},

@@ -149,0 +128,0 @@ "engines": {

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc