Options
All
  • Public
  • Public/Protected
  • All
Menu

A class that represents wrapper logic on top of plugins that patch core (built-in) modules. Core modules are different because (1) they can be required by the plugins that patch them, and (2) the core module being patched doesn't necessarily correspond to the name of the plugin.

Hierarchy

  • CorePluginWrapper

Implements

Index

Constructors

constructor

Methods

applyPlugin

  • applyPlugin<T>(moduleExports: T, file: string, version: string): T
  • Applies this object's underlying plugin patches to a file, returning the patched or intercepted value.

    Type parameters

    • T

    Parameters

    • moduleExports: T

      The module exports of the file.

    • file: string

      The file path, relative to the module root.

    • version: string

      The module version.

    Returns T

isSupported

  • isSupported(version: string): boolean
  • Returns whether the given version of the module is supported by this plugin. This may load the plugin into memory.

    Parameters

    • version: string

      A semver version string.

    Returns boolean

unapplyAll

  • unapplyAll(): void

Generated using TypeDoc