Home Reference Source
import Patch from 'comptroller/src/patch.js'
public class | source

Patch

A class representing operations to apply to a package.

Static Member Summary

Static Public Members
public static get

A symbol representing the ADD operation.

public static get

A symbol representing the INHERIT operation.

public static get

A symbol representing the REMOVE operation.

public static get

A symbol representing the UPDATE operation.

Constructor Summary

Public Constructor
public

constructor(type: Symbol, config: object)

Creates a new patch instance.

Member Summary

Public Members
public

Whether or not this is a devDependency

public

Whether or not the patch is disabled

public

The files that necessitate the patch.

public

The name of the item being patched.

public

The dependency type being patched.

public

The type of patch this is.

public

The value of the item being patched.

Static Public Members

public static get ADD: Symbol source

A symbol representing the ADD operation.

public static get INHERIT: Symbol source

A symbol representing the INHERIT operation.

public static get REMOVE: Symbol source

A symbol representing the REMOVE operation.

public static get UPDATE: Symbol source

A symbol representing the UPDATE operation.

Public Constructors

public constructor(type: Symbol, config: object) source

Creates a new patch instance.

Params:

NameTypeAttributeDescription
type Symbol

The type of patch this is.

config object
  • optional
  • default: {}

The configuration of the patch.

config.name string

The name of the item being patched.

config.value object

The value of the item being patched.

config.source string

The dependency type being patched.

config.dev boolean
  • optional
  • default: false

Whether or not this is a devDependency.

config.disabled boolean
  • optional
  • default: false

Whether or not the patch is disabled.

config.files string[]
  • optional
  • default: []

The files that necessitate the patch.

Public Members

public dev: boolean source

Whether or not this is a devDependency

public disabled: boolean source

Whether or not the patch is disabled

public files: string[] source

The files that necessitate the patch.

public name: string source

The name of the item being patched.

public source: string source

The dependency type being patched.

public type: Symbol source

The type of patch this is.

public value: object source

The value of the item being patched.