New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

unconfig

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

unconfig - npm Package Compare versions

Comparing version 0.0.4 to 0.1.0

15

dist/index.d.ts

@@ -18,6 +18,12 @@ import { Arrayable } from '@antfu/utils';

/**
* Rewrite the config object
* Rewrite the config object,
* return nullish value to bypassing loading the file
*/
rewrite?: <F = any>(obj: F, filepath: string, loader: ConfigLoaderType) => Promise<T | undefined> | T | undefined;
/**
* Transform the source code before loading,
* return nullish value to skip transformation
*/
transform?: (code: string, filepath: string) => Promise<string | undefined> | string | undefined;
/**
* Skip this source if error occurred on loading

@@ -47,4 +53,5 @@ *

}
interface LoadConfigOptions extends SearchOptions {
sources: Arrayable<LoadConfigSource>;
interface LoadConfigOptions<T = any> extends SearchOptions {
sources: Arrayable<LoadConfigSource<T>>;
defaults?: T;
}

@@ -67,4 +74,4 @@ interface LoadConfigResult<T> {

declare function loadConfig<T>(options: LoadConfigOptions): Promise<LoadConfigResult<T> | undefined>;
declare function loadConfig<T>(options: LoadConfigOptions): Promise<LoadConfigResult<T>>;
export { ConfigLoaderType, LoadConfigOptions, LoadConfigResult, LoadConfigSource, SearchOptions, SourceObjectFieldOptions, SourceVitePluginConfigOptions, defaultExtensions, loadConfig, sourceNuxtConfigFields, sourcePackageJsonFields, sourceViteConfigFields, sourceVitePluginConfig };
{
"name": "unconfig",
"version": "0.0.4",
"version": "0.1.0",
"description": "A universal solution for loading configurations.",

@@ -5,0 +5,0 @@ "keywords": [

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