Socket
Socket
Sign inDemoInstall

unified-engine

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unified-engine - npm Package Compare versions

Comparing version 9.0.0 to 9.0.1

1

index.d.ts

@@ -10,1 +10,2 @@ export {engine} from './lib/index.js'

export type Options = import('./lib/index.js').Options
export type Callback = import('./lib/index.js').Callback

@@ -10,4 +10,5 @@ /**

* @typedef {import('./lib/index.js').Options} Options
* @typedef {import('./lib/index.js').Callback} Callback
*/
export {engine} from './lib/index.js'

127

lib/configuration.d.ts

@@ -15,62 +15,75 @@ /**

export class Configuration {
/**
* @param {Options} options
*/
constructor(options: Options);
/** @type {string} */
cwd: string;
/** @type {string|undefined} */
packageField: string | undefined;
/** @type {string|undefined} */
pluginPrefix: string | undefined;
/** @type {ConfigTransform|undefined} */
configTransform: ConfigTransform | undefined;
/** @type {Preset|undefined} */
defaultConfig: Preset | undefined;
/** @type {Preset} */
given: Preset;
/**
* @param {Buffer|undefined} buf
* @param {string|undefined} filePath
* @returns {Promise<Config|undefined>}
*/
create(buf: Buffer | undefined, filePath: string | undefined): Promise<Config | undefined>;
/** @type {FindUp<Config>} */
findUp: FindUp<Config>;
/**
* @param {string} filePath
* @param {Callback} callback
* @returns {void}
*/
load(filePath: string, callback: Callback): void;
/**
* @param {Options} options
*/
constructor(options: Options)
/** @type {string} */
cwd: string
/** @type {string|undefined} */
packageField: string | undefined
/** @type {string|undefined} */
pluginPrefix: string | undefined
/** @type {ConfigTransform|undefined} */
configTransform: ConfigTransform | undefined
/** @type {Preset|undefined} */
defaultConfig: Preset | undefined
/** @type {Preset} */
given: Preset
/**
* @param {Buffer|undefined} buf
* @param {string|undefined} filePath
* @returns {Promise<Config|undefined>}
*/
create(
buf: Buffer | undefined,
filePath: string | undefined
): Promise<Config | undefined>
/** @type {FindUp<Config>} */
findUp: FindUp<Config>
/**
* @param {string} filePath
* @param {Callback} callback
* @returns {void}
*/
load(filePath: string, callback: Callback): void
}
export type Plugin = import('unified').Plugin<unknown[]>;
export type PluginTuple = import('unified').PluginTuple<unknown[]>;
export type PluggableList = import('unified').PluggableList;
export type Settings = Record<string, unknown>;
export type PluginIdObject = Record<string, Settings | null | undefined>;
export type PluginIdList = Array<string | [string, ...unknown[]]>;
export type Plugin = import('unified').Plugin<unknown[]>
export type PluginTuple = import('unified').PluginTuple<unknown[]>
export type PluggableList = import('unified').PluggableList
export type Settings = Record<string, unknown>
export type PluginIdObject = Record<string, Settings | null | undefined>
export type PluginIdList = Array<string | [string, ...unknown[]]>
export type Preset = {
settings?: Settings | undefined;
plugins?: import("unified").PluggableList | PluginIdObject | PluginIdList | undefined;
};
settings?: Settings | undefined
plugins?:
| import('unified').PluggableList
| PluginIdObject
| PluginIdList
| undefined
}
export type Config = {
settings?: Settings | undefined;
plugins?: [import("unified").Plugin<unknown[]>, ...unknown[]][] | undefined;
};
export type ConfigTransform = (config: any, filePath: string) => Preset;
export type Loader = (buf: Buffer, filePath: string) => Promise<Preset | undefined>;
export type Callback = (error: Error | null, result?: Config | undefined) => void;
settings?: Settings | undefined
plugins?: [import('unified').Plugin<unknown[]>, ...unknown[]][] | undefined
}
export type ConfigTransform = (config: any, filePath: string) => Preset
export type Loader = (
buf: Buffer,
filePath: string
) => Promise<Preset | undefined>
export type Callback = (
error: Error | null,
result?: Config | undefined
) => void
export type Options = {
cwd: string;
packageField?: string | undefined;
pluginPrefix?: string | undefined;
rcName?: string | undefined;
rcPath?: string | undefined;
detectConfig?: boolean | undefined;
configTransform?: ConfigTransform | undefined;
defaultConfig?: Preset | undefined;
settings?: Preset['settings'];
plugins?: Preset['plugins'];
};
import { FindUp } from "./find-up.js";
cwd: string
packageField?: string | undefined
pluginPrefix?: string | undefined
rcName?: string | undefined
rcPath?: string | undefined
detectConfig?: boolean | undefined
configTransform?: ConfigTransform | undefined
defaultConfig?: Preset | undefined
settings?: Preset['settings']
plugins?: Preset['plugins']
}
import {FindUp} from './find-up.js'

@@ -8,5 +8,5 @@ /**

*/
export function configure(context: Context, file: VFile, next: Callback): void;
export type VFile = import('vfile').VFile;
export type Callback = import('trough').Callback;
export type Context = import('./index.js').Context;
export function configure(context: Context, file: VFile, next: Callback): void
export type VFile = import('vfile').VFile
export type Callback = import('trough').Callback
export type Context = import('./index.js').Context

@@ -8,5 +8,5 @@ /**

*/
export function copy(context: Context, file: VFile, next: Callback): void;
export type VFile = import('vfile').VFile;
export type Callback = import('trough').Callback;
export type Context = import('./index.js').Context;
export function copy(context: Context, file: VFile, next: Callback): void
export type VFile = import('vfile').VFile
export type Callback = import('trough').Callback
export type Context = import('./index.js').Context

@@ -9,5 +9,5 @@ /**

*/
export function fileSystem(context: Context, file: VFile, next: Callback): void;
export type VFile = import('vfile').VFile;
export type Callback = import('trough').Callback;
export type Context = import('./index.js').Context;
export function fileSystem(context: Context, file: VFile, next: Callback): void
export type VFile = import('vfile').VFile
export type Callback = import('trough').Callback
export type Context = import('./index.js').Context

@@ -1,16 +0,16 @@

export const filePipeline: import("trough").Pipeline;
export type Pipeline = import('trough').Pipeline;
export type VFile = import('vfile').VFile;
export type VFileMessage = import('vfile-message').VFileMessage;
export type Node = import('unist').Node;
export type Processor = import('unified').Processor;
export type FileSet = import('../file-set.js').FileSet;
export type Configuration = import('../configuration.js').Configuration;
export type Settings = import('../index.js').Settings;
export const filePipeline: import('trough').Pipeline
export type Pipeline = import('trough').Pipeline
export type VFile = import('vfile').VFile
export type VFileMessage = import('vfile-message').VFileMessage
export type Node = import('unist').Node
export type Processor = import('unified').Processor
export type FileSet = import('../file-set.js').FileSet
export type Configuration = import('../configuration.js').Configuration
export type Settings = import('../index.js').Settings
export type Context = {
processor: Processor;
fileSet: FileSet;
configuration: Configuration;
settings: Settings;
tree?: import("unist").Node<import("unist").Data> | undefined;
};
processor: Processor
fileSet: FileSet
configuration: Configuration
settings: Settings
tree?: import('unist').Node<import('unist').Data> | undefined
}

@@ -7,4 +7,4 @@ /**

*/
export function parse(context: Context, file: VFile): void;
export type VFile = import('vfile').VFile;
export type Context = import('./index.js').Context;
export function parse(context: Context, file: VFile): void
export type VFile = import('vfile').VFile
export type Context = import('./index.js').Context

@@ -9,5 +9,5 @@ /**

*/
export function queue(context: Context, file: VFile, next: Callback): void;
export type VFile = import('vfile').VFile;
export type Callback = import('trough').Callback;
export type Context = import('./index.js').Context;
export function queue(context: Context, file: VFile, next: Callback): void
export type VFile = import('vfile').VFile
export type Callback = import('trough').Callback
export type Context = import('./index.js').Context

@@ -8,5 +8,5 @@ /**

*/
export function read(context: Context, file: VFile, next: Callback): void;
export type VFile = import('vfile').VFile;
export type Callback = import('trough').Callback;
export type Context = import('./index.js').Context;
export function read(context: Context, file: VFile, next: Callback): void
export type VFile = import('vfile').VFile
export type Callback = import('trough').Callback
export type Context = import('./index.js').Context

@@ -10,5 +10,5 @@ /**

*/
export function stdout(context: Context, file: VFile, next: Callback): void;
export type VFile = import('vfile').VFile;
export type Callback = import('trough').Callback;
export type Context = import('./index.js').Context;
export function stdout(context: Context, file: VFile, next: Callback): void
export type VFile = import('vfile').VFile
export type Callback = import('trough').Callback
export type Context = import('./index.js').Context

@@ -7,4 +7,4 @@ /**

*/
export function stringify(context: Context, file: VFile): void;
export type VFile = import('vfile').VFile;
export type Context = import('./index.js').Context;
export function stringify(context: Context, file: VFile): void
export type VFile = import('vfile').VFile
export type Context = import('./index.js').Context

@@ -8,5 +8,5 @@ /**

*/
export function transform(context: Context, file: VFile, next: Callback): void;
export type VFile = import('vfile').VFile;
export type Callback = import('trough').Callback;
export type Context = import('./index.js').Context;
export function transform(context: Context, file: VFile, next: Callback): void
export type VFile = import('vfile').VFile
export type Callback = import('trough').Callback
export type Context = import('./index.js').Context

@@ -5,7 +5,7 @@ /**

*/
export function configure(context: Context, settings: Settings): void;
export type Settings = import('./index.js').Settings;
export function configure(context: Context, settings: Settings): void
export type Settings = import('./index.js').Settings
export type Context = {
configuration?: Configuration | undefined;
};
import { Configuration } from "../configuration.js";
configuration?: Configuration | undefined
}
import {Configuration} from '../configuration.js'

@@ -6,10 +6,14 @@ /**

*/
export function fileSystem(context: Context, settings: Settings, next: Callback): void;
export type VFile = import('vfile').VFile;
export type Callback = import('trough').Callback;
export type Settings = import('./index.js').Settings;
export type Configuration = import('./index.js').Configuration;
export function fileSystem(
context: Context,
settings: Settings,
next: Callback
): void
export type VFile = import('vfile').VFile
export type Callback = import('trough').Callback
export type Settings = import('./index.js').Settings
export type Configuration = import('./index.js').Configuration
export type Context = {
files: Array<string | VFile>;
configuration?: import("../configuration.js").Configuration | undefined;
};
files: Array<string | VFile>
configuration?: import('../configuration.js').Configuration | undefined
}

@@ -1,4 +0,4 @@

export const fileSetPipeline: import("trough").Pipeline;
export type VFile = import('vfile').VFile;
export type Configuration = import('../configuration.js').Configuration;
export type Settings = import('../index.js').Settings;
export const fileSetPipeline: import('trough').Pipeline
export type VFile = import('vfile').VFile
export type Configuration = import('../configuration.js').Configuration
export type Settings = import('../index.js').Settings

@@ -10,10 +10,10 @@ /**

*/
export function log(context: Context, settings: Settings): Promise<any>;
export function log(context: Context, settings: Settings): Promise<any>
export type Context = {
files: Array<VFile>;
configuration?: import("../configuration.js").Configuration | undefined;
};
export type VFile = import('vfile').VFile;
export type VFileReporter = import('../index.js').VFileReporter;
export type Settings = import('./index.js').Settings;
export type Configuration = import('./index.js').Configuration;
files: Array<VFile>
configuration?: import('../configuration.js').Configuration | undefined
}
export type VFile = import('vfile').VFile
export type VFileReporter = import('../index.js').VFileReporter
export type Settings = import('./index.js').Settings
export type Configuration = import('./index.js').Configuration

@@ -6,8 +6,12 @@ /**

*/
export function stdin(context: Context, settings: Settings, next: Callback): void;
export type VFile = import('vfile').VFile;
export type Callback = import('trough').Callback;
export type Settings = import('./index.js').Settings;
export function stdin(
context: Context,
settings: Settings,
next: Callback
): void
export type VFile = import('vfile').VFile
export type Callback = import('trough').Callback
export type Settings = import('./index.js').Settings
export type Context = {
files: Array<string | VFile>;
};
files: Array<string | VFile>
}

@@ -8,12 +8,16 @@ /**

*/
export function transform(context: Context, settings: Settings, next: Callback): void;
export type VFile = import('vfile').VFile;
export type Callback = import('trough').Callback;
export type Settings = import('./index.js').Settings;
export type Configuration = import('./index.js').Configuration;
export function transform(
context: Context,
settings: Settings,
next: Callback
): void
export type VFile = import('vfile').VFile
export type Callback = import('trough').Callback
export type Settings = import('./index.js').Settings
export type Configuration = import('./index.js').Configuration
export type Context = {
files: Array<VFile>;
configuration: Configuration;
fileSet: FileSet;
};
import { FileSet } from "../file-set.js";
files: Array<VFile>
configuration: Configuration
fileSet: FileSet
}
import {FileSet} from '../file-set.js'

@@ -5,51 +5,70 @@ /**

export class FindUp<Value> {
/**
* @callback Create
* @param {Buffer} buf
* @param {string} filePath
* @returns {Promise<Value|undefined>|Value|undefined}
*/
/**
* @callback Callback
* @param {Error|null} error
* @param {Value} [result]
* @returns {void}
*/
/**
* @typedef Options
* @property {string} cwd
* @property {string|undefined} filePath
* @property {boolean|undefined} [detect]
* @property {string[]} names
* @property {Create} create
*/
/**
* @param {Options} options
*/
constructor(options: {
cwd: string;
filePath: string | undefined;
detect?: boolean | undefined;
names: string[];
create: (buf: Buffer, filePath: string) => Promise<Value | undefined> | Value | undefined;
});
/** @type {Record<string, Callback[]|undefined|Error|Value>} */
cache: Record<string, Value | Error | ((error: Error | null, result?: Value | undefined) => void)[] | undefined>;
/** @type {string} */
cwd: string;
/** @type {boolean|undefined} */
detect: boolean | undefined;
/** @type {string[]} */
names: string[];
/** @type {Create} */
create: (buf: Buffer, filePath: string) => Promise<Value | undefined> | Value | undefined;
/** @type {string|undefined} */
givenFilePath: string | undefined;
/** @type {Error|Value|Callback[]|undefined} */
givenFile: Value | Error | ((error: Error | null, result?: Value | undefined) => void)[] | undefined;
/**
* @param {string} filePath
* @param {Callback} callback
*/
load(filePath: string, callback: (error: Error | null, result?: Value | undefined) => void): void;
/**
* @callback Create
* @param {Buffer} buf
* @param {string} filePath
* @returns {Promise<Value|undefined>|Value|undefined}
*/
/**
* @callback Callback
* @param {Error|null} error
* @param {Value} [result]
* @returns {void}
*/
/**
* @typedef Options
* @property {string} cwd
* @property {string|undefined} filePath
* @property {boolean|undefined} [detect]
* @property {string[]} names
* @property {Create} create
*/
/**
* @param {Options} options
*/
constructor(options: {
cwd: string
filePath: string | undefined
detect?: boolean | undefined
names: string[]
create: (
buf: Buffer,
filePath: string
) => Promise<Value | undefined> | Value | undefined
})
/** @type {Record<string, Callback[]|undefined|Error|Value>} */
cache: Record<
string,
| Value
| Error
| ((error: Error | null, result?: Value | undefined) => void)[]
| undefined
>
/** @type {string} */
cwd: string
/** @type {boolean|undefined} */
detect: boolean | undefined
/** @type {string[]} */
names: string[]
/** @type {Create} */
create: (
buf: Buffer,
filePath: string
) => Promise<Value | undefined> | Value | undefined
/** @type {string|undefined} */
givenFilePath: string | undefined
/** @type {Error|Value|Callback[]|undefined} */
givenFile:
| Value
| Error
| ((error: Error | null, result?: Value | undefined) => void)[]
| undefined
/**
* @param {string} filePath
* @param {Callback} callback
*/
load(
filePath: string,
callback: (error: Error | null, result?: Value | undefined) => void
): void
}

@@ -9,27 +9,34 @@ /// <reference types="node" />

*/
export function finder(input: Array<string | VFile>, options: Options, callback: Callback): void;
export type Stats = import('fs').Stats;
export type VFile = import('vfile').VFile;
export type Ignore = import('./ignore.js').Ignore;
export type GitIgnore = import('ignore').Ignore;
export function finder(
input: Array<string | VFile>,
options: Options,
callback: Callback
): void
export type Stats = import('fs').Stats
export type VFile = import('vfile').VFile
export type Ignore = import('./ignore.js').Ignore
export type GitIgnore = import('ignore').Ignore
export type Options = {
cwd: string;
extensions: Array<string>;
silentlyIgnore: boolean | undefined;
ignorePatterns: Array<string>;
ignore: Ignore;
};
cwd: string
extensions: Array<string>
silentlyIgnore: boolean | undefined
ignorePatterns: Array<string>
ignore: Ignore
}
export type SearchResults = {
stats: fs.Stats | undefined;
ignored: boolean | undefined;
};
stats: fs.Stats | undefined
ignored: boolean | undefined
}
export type Result = {
input: Array<string | VFile>;
output: VFile[];
};
input: Array<string | VFile>
output: VFile[]
}
export type CleanResult = {
oneFileMode: boolean;
files: VFile[];
};
export type Callback = (error: Error | null, result?: CleanResult | undefined) => any;
import fs from "fs";
oneFileMode: boolean
files: VFile[]
}
export type Callback = (
error: Error | null,
result?: CleanResult | undefined
) => any
import fs from 'fs'
export class Ignore {
/**
* @param {Options} options
*/
constructor(options: Options);
/** @type {string} */
cwd: string;
/** @type {ResolveFrom|undefined} */
ignorePathResolveFrom: ResolveFrom | undefined;
/** @type {FindUp<IgnoreConfig>} */
findUp: FindUp<IgnoreConfig>;
/**
* @param {string} filePath
* @param {Callback} callback
*/
check(filePath: string, callback: Callback): void;
/**
* @param {Options} options
*/
constructor(options: Options)
/** @type {string} */
cwd: string
/** @type {ResolveFrom|undefined} */
ignorePathResolveFrom: ResolveFrom | undefined
/** @type {FindUp<IgnoreConfig>} */
findUp: FindUp<IgnoreConfig>
/**
* @param {string} filePath
* @param {Callback} callback
*/
check(filePath: string, callback: Callback): void
}
export type IgnoreConfig = import('ignore').Ignore & {
filePath: string;
};
export type ResolveFrom = 'cwd' | 'dir';
filePath: string
}
export type ResolveFrom = 'cwd' | 'dir'
export type Options = {
cwd: string;
detectIgnore: boolean | undefined;
ignoreName: string | undefined;
ignorePath: string | undefined;
ignorePathResolveFrom: ResolveFrom | undefined;
};
export type Callback = (error: Error | null, result?: boolean | undefined) => any;
import { FindUp } from "./find-up.js";
cwd: string
detectIgnore: boolean | undefined
ignoreName: string | undefined
ignorePath: string | undefined
ignorePathResolveFrom: ResolveFrom | undefined
}
export type Callback = (
error: Error | null,
result?: boolean | undefined
) => any
import {FindUp} from './find-up.js'
{
"name": "unified-engine",
"version": "9.0.0",
"version": "9.0.1",
"description": "Engine to process multiple files with unified",

@@ -5,0 +5,0 @@ "license": "MIT",

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