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

@types/webpack

Package Overview
Dependencies
Maintainers
1
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/webpack - npm Package Compare versions

Comparing version 1.12.36 to 2.0.0

151

webpack/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for webpack 1.12.9
// Type definitions for webpack 2.0.0
// Project: https://github.com/webpack/webpack

@@ -66,3 +66,3 @@ // Definitions by: Qubo <https://github.com/tkqubo>

/** Stats options for logging */
stats?: Configuration;
stats?: compiler.StatsToStringOptions;
}

@@ -128,9 +128,7 @@

interface Module {
/** A array of automatically applied loaders. */
loaders?: Loader[];
interface BaseModule {
/** A array of applied pre loaders. */
preLoaders?: Loader[];
preLoaders?: Rule[];
/** A array of applied post loaders. */
postLoaders?: Loader[];
postLoaders?: Rule[];
/** A RegExp or an array of RegExps. Don’t parse files matching. */

@@ -150,2 +148,11 @@ noParse?: RegExp | RegExp[];

}
interface OldModule extends BaseModule {
/** An array of automatically applied loaders. */
loaders: Rule[];
}
interface NewModule extends BaseModule {
/** An array of rules applied for modules. */
rules: Rule[];
}
type Module = OldModule | NewModule;

@@ -220,19 +227,125 @@ interface Resolve {

type LoaderCondition = string | RegExp | ((absPath: string) => boolean);
interface BaseConditionSpec {
/** The Condition must match. The convention is the provide a string or array of strings here, but it's not enforced. */
include?: Condition;
/** The Condition must NOT match. The convention is the provide a string or array of strings here, but it's not enforced. */
exclude?: Condition;
}
interface TestConditionSpec extends BaseConditionSpec {
/** The Condition must match. The convention is the provide a RegExp or array of RegExps here, but it's not enforced. */
test: Condition;
}
interface AndConditionSpec extends BaseConditionSpec {
/** All Conditions must match. */
and: Condition[];
}
interface OrConditionSpec extends BaseConditionSpec {
/** Any Condition must match. */
or: Condition[];
}
interface NotConditionSpec extends BaseConditionSpec {
/** The Condition must NOT match. */
not: Condition;
}
type ConditionSpec = TestConditionSpec | OrConditionSpec | AndConditionSpec | NotConditionSpec;
interface Loader {
interface ConditionArray extends Array<Condition> {}
type Condition = string | RegExp | ((absPath: string) => boolean) | ConditionSpec | ConditionArray;
interface OldLoader {
loader: string;
query?: { [name: string]: any };
}
interface NewLoader {
loader: string;
options?: { [name: string]: any };
}
type Loader = string | OldLoader | NewLoader;
/**
* There are direct and delegate rules. Direct Rules need a test, Delegate rules delegate to subrules bringing their own.
* Direct rules can optionally contain delegate keys (oneOf, rules).
*
* These types exist to enforce that a rule has the keys `((loader XOR loaders) AND test) OR oneOf OR rules`
*/
interface BaseRule {
/**
* Specifies the category of the loader. No value means normal loader.
*
* There is also an additional category "inlined loader" which are loaders applied inline of the import/require.
*
* All loaders are sorted in the order post, inline, normal, pre and used in this order.
*
* All normal loaders can be omitted (overridden) by prefixing ! in the request.
*
* All normal and pre loaders can be omitted (overridden) by prefixing -! in the request.
*
* All normal, post and pre loaders can be omitted (overridden) by prefixing !! in the request.
*
* Inline loaders and ! prefixes should not be used as they are non-standard. They may be use by loader generated code.
*/
enforce?: 'pre' | 'post';
/** A condition that must be met */
test?: Condition | Condition[];
/** A condition that must not be met */
exclude?: LoaderCondition | LoaderCondition[];
exclude?: Condition | Condition[];
/** A condition that must be met */
include?: LoaderCondition | LoaderCondition[];
include?: Condition | Condition[];
/** A Condition matched with the resource. */
resource?: Condition | Condition[];
/** A condition matched with the issuer */
issuer?: Condition | Condition[];
/**
* An object with parser options. All applied parser options are merged.
*
* For each different parser options object a new parser is created and plugins can apply plugins depending on the parser options. Many of the default plugins apply their parser plugins only if a property in the parser options is not set or true.
*/
parser?: { [optName: string]: any };
/** An array of Rules that is also used when the Rule matches. */
rules?: Rule[];
/** An array of Rules from which only the first matching Rule is used when the Rule matches. */
oneOf?: Rule[];
}
interface BaseDirectRule extends BaseRule {
/** A condition that must be met */
test: LoaderCondition | LoaderCondition[];
/** A string of “!” separated loaders */
loader?: string;
/** A array of loaders as string */
loaders?: string[];
query?: {
[name: string]: any;
}
test: Condition | Condition[];
}
// Direct Rules
interface BaseSingleLoaderRule extends BaseDirectRule {
/** Loader name or an object with name and options */
loader: Loader;
}
interface OldLoaderRule extends BaseSingleLoaderRule {
/**
* Loader options
* @deprecated:
*/
query?: { [name: string]: any };
}
interface NewLoaderRule extends BaseSingleLoaderRule {
options?: { [name: string]: any };
}
type LoaderRule = OldLoaderRule | NewLoaderRule;
interface OldUseRule extends BaseDirectRule {
/**
* A array of loaders.
* @deprecated use `use` instead
*/
loaders: string[];
}
interface NewUseRule extends BaseDirectRule {
/** A loader or array of loaders */
use: Loader | Loader[];
}
type UseRule = OldUseRule | NewUseRule;
// Delegate Rules
interface RulesRule extends BaseRule {
/** An array of Rules that is also used when the Rule matches. */
rules: Rule[];
}
interface OneOfRule extends BaseRule {
oneOf: Rule[];
}
type Rule = LoaderRule | UseRule | RulesRule | OneOfRule;

@@ -239,0 +352,0 @@ interface Plugin { }

6

webpack/package.json
{
"name": "@types/webpack",
"version": "1.12.36",
"description": "TypeScript definitions for webpack 1.12.9",
"version": "2.0.0",
"description": "TypeScript definitions for webpack 2.0.0",
"license": "MIT",

@@ -18,3 +18,3 @@ "author": "Qubo <https://github.com/tkqubo>",

"typings": "index.d.ts",
"typesPublisherContentHash": "b08719c6a95e1cec873779f66a40ac335cb7ba9a93dfab9237c96c508edefab3"
"typesPublisherContentHash": "c2152d62a1737be1e8d6bb49c6739cb0df7cf7d437fc9f2fdf1fae5305637c5a"
}

@@ -5,3 +5,3 @@ # Installation

# Summary
This package contains type definitions for webpack 1.12.9 (https://github.com/webpack/webpack).
This package contains type definitions for webpack 2.0.0 (https://github.com/webpack/webpack).

@@ -12,3 +12,3 @@ # Details

Additional Details
* Last updated: Mon, 14 Nov 2016 19:35:02 GMT
* Last updated: Tue, 15 Nov 2016 14:55:32 GMT
* File structure: ProperModule

@@ -15,0 +15,0 @@ * Library Dependencies: uglify-js

@@ -10,5 +10,5 @@ {

],
"libraryMajorVersion": 1,
"libraryMinorVersion": 12,
"libraryName": "webpack 1.12.9",
"libraryMajorVersion": 2,
"libraryMinorVersion": 0,
"libraryName": "webpack 2.0.0",
"typingsPackageName": "webpack",

@@ -29,3 +29,3 @@ "projectName": "https://github.com/webpack/webpack",

"hasPackageJson": false,
"contentHash": "b08719c6a95e1cec873779f66a40ac335cb7ba9a93dfab9237c96c508edefab3"
"contentHash": "c2152d62a1737be1e8d6bb49c6739cb0df7cf7d437fc9f2fdf1fae5305637c5a"
}
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