diff --git a/notNeededPackages.json b/notNeededPackages.json index 4df3f8e095..4577575a0b 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -2382,6 +2382,12 @@ "sourceRepoURL": "http://webix.com", "asOfVersion": "5.1.1" }, + { + "libraryName": "webpack-chain", + "typingsPackageName": "webpack-chain", + "sourceRepoURL": "https://github.com/neutrinojs/webpack-chain", + "asOfVersion": "5.2.0" + }, { "libraryName": "winston", "typingsPackageName": "winston", diff --git a/types/webpack-chain/index.d.ts b/types/webpack-chain/index.d.ts deleted file mode 100644 index 1cdcc9ff27..0000000000 --- a/types/webpack-chain/index.d.ts +++ /dev/null @@ -1,271 +0,0 @@ -// Type definitions for webpack-chain 5.0 -// Project: https://github.com/neutrinojs/webpack-chain -// Definitions by: Eirikur Nilsson , Paul Sachs -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -import * as webpack from 'webpack'; -import * as https from 'https'; - -export = Config; - -declare namespace __Config { - class Chained { - end(): Parent; - } - - class TypedChainedMap extends Chained { - clear(): this; - delete(key: string): this; - has(key: string): boolean; - get(key: string): Value; - set(key: string, value: Value): this; - merge(obj: { [key: string]: Value }): this; - entries(): { [key: string]: Value }; - values(): Value[]; - when(condition: boolean, trueBrancher: (obj: this) => void, falseBrancher?: (obj: this) => void): this; - } - - class ChainedMap extends TypedChainedMap {} - - class TypedChainedSet extends Chained { - add(value: Value): this; - prepend(value: Value): this; - clear(): this; - delete(key: string): this; - has(key: string): boolean; - merge(arr: Value[]): this; - values(): Value[]; - when(condition: boolean, trueBrancher: (obj: this) => void, falseBrancher?: (obj: this) => void): this; - } - - class ChainedSet extends TypedChainedSet {} -} - -declare class Config extends __Config.ChainedMap { - devServer: Config.DevServer; - entryPoints: Config.TypedChainedMap; - module: Config.Module; - node: Config.ChainedMap; - output: Config.Output; - optimization: Config.Optimization; - performance: Config.Performance; - plugins: Config.Plugins; - resolve: Config.Resolve; - resolveLoader: Config.ResolveLoader; - - amd(value: { [moduleName: string]: boolean }): this; - bail(value: boolean): this; - cache(value: boolean | any): this; - devtool(value: Config.DevTool): this; - context(value: string): this; - externals(value: webpack.ExternalsElement | webpack.ExternalsElement[]): this; - loader(value: any): this; - profile(value: boolean): this; - recordsPath(value: string): this; - recordsInputPath(value: string): this; - recordsOutputPath(value: string): this; - stats(value: webpack.Options.Stats): this; - target(value: string): this; - watch(value: boolean): this; - watchOptions(value: webpack.Options.WatchOptions): this; - - entry(name: string): Config.EntryPoint; - plugin(name: string): Config.Plugin; - - toConfig(): webpack.Configuration; -} - -declare namespace Config { - class Chained extends __Config.Chained {} - class TypedChainedMap extends __Config.TypedChainedMap {} - class ChainedMap extends __Config.TypedChainedMap {} - class TypedChainedSet extends __Config.TypedChainedSet {} - class ChainedSet extends __Config.TypedChainedSet {} - - class Plugins extends TypedChainedMap> {} - - class Plugin extends ChainedMap implements Orderable { - init(value: (plugin: PluginClass, args: any[]) => webpack.Plugin): this; - use(plugin: PluginClass, args?: any[]): this; - tap(f: (args: any[]) => any[]): this; - - // Orderable - before(name: string): this; - after(name: string): this; - } - - class Module extends ChainedMap { - rules: TypedChainedMap; - rule(name: string): Rule; - noParse(noParse: RegExp | RegExp[] | ((contentPath: string) => boolean)): this; - } - - class Output extends ChainedMap { - chunkFilename(value: string): this; - crossOriginLoading(value: boolean | string): this; - filename(value: string): this; - library(value: string): this; - libraryTarget(value: string): this; - devtoolFallbackModuleFilenameTemplate(value: any): this; - devtoolLineToLine(value: any): this; - devtoolModuleFilenameTemplate(value: any): this; - hashFunction(value: string): this; - hashDigest(value: string): this; - hashDigestLength(value: number): this; - hashSalt(value: any): this; - hotUpdateChunkFilename(value: string): this; - hotUpdateFunction(value: any): this; - hotUpdateMainFilename(value: string): this; - jsonpFunction(value: string): this; - path(value: string): this; - pathinfo(value: boolean): this; - publicPath(value: string): this; - sourceMapFilename(value: string): this; - sourcePrefix(value: string): this; - strictModuleExceptionHandling(value: boolean): this; - umdNamedDefine(value: boolean): this; - } - - class DevServer extends ChainedMap { - clientLogLevel(value: 'none' | 'error' | 'warning' | 'info'): this; - compress(value: boolean): this; - contentBase(value: boolean | string | string[]): this; - filename(value: string): this; - headers(value: { [header: string]: string }): this; - historyApiFallback(value: boolean | any): this; - host(value: string): this; - hot(value: boolean): this; - hotOnly(value: boolean): this; - https(value: boolean | https.ServerOptions): this; - inline(value: boolean): this; - lazy(value: boolean): this; - noInfo(value: boolean): this; - overlay(value: boolean | { warnings?: boolean, errors?: boolean }): this; - port(value: number): this; - progress(value: boolean): this; - proxy(value: any): this; - public(value: string): this; - publicPath(publicPath: string): this; - quiet(value: boolean): this; - setup(value: (expressApp: any) => void): this; - staticOptions(value: any): this; - stats(value: webpack.Options.Stats): this; - watchContentBase(value: boolean): this; - watchOptions(value: any): this; - } - - class Performance extends ChainedMap { - hints(value: boolean | 'error' | 'warning'): this; - maxEntrypointSize(value: number): this; - maxAssetSize(value: number): this; - assetFilter(value: (assetFilename: string) => boolean): this; - } - - class EntryPoint extends TypedChainedSet {} - - class Resolve extends ChainedMap { - alias: TypedChainedMap; - aliasFields: TypedChainedSet; - descriptionFiles: TypedChainedSet; - extensions: TypedChainedSet; - mainFields: TypedChainedSet; - mainFiles: TypedChainedSet; - modules: TypedChainedSet; - plugins: TypedChainedMap>; - - enforceExtension(value: boolean): this; - enforceModuleExtension(value: boolean): this; - unsafeCache(value: boolean | RegExp | RegExp[]): this; - symlinks(value: boolean): this; - cachePredicate(value: (data: { path: string, request: string }) => boolean): this; - - plugin(name: string): Plugin; - } - - class ResolveLoader extends ChainedMap { - extensions: TypedChainedSet; - modules: TypedChainedSet; - moduleExtensions: TypedChainedSet; - packageMains: TypedChainedSet; - } - - class Rule extends ChainedMap { - uses: TypedChainedMap; - include: TypedChainedSet; - exclude: TypedChainedSet; - - parser(value: { [optName: string]: any }): this; - test(value: webpack.Condition | webpack.Condition[]): this; - enforce(value: 'pre' | 'post'): this; - - use(name: string): Use; - pre(): this; - post(): this; - } - - class Optimization extends ChainedMap { - concatenateModules(value: boolean): this; - flagIncludedChunks(value: boolean): this; - mergeDuplicateChunks(value: boolean): this; - minimize(value: boolean): this; - minimizer(name: string): Plugin; - namedChunks(value: boolean): this; - namedModules(value: boolean): this; - nodeEnv(value: boolean | string): this; - noEmitOnErrors(value: boolean): this; - occurrenceOrder(value: boolean): this; - portableRecords(value: boolean): this; - providedExports(value: boolean): this; - removeAvailableModules(value: boolean): this; - removeEmptyChunks(value: boolean): this; - runtimeChunk(value: boolean | "single" | "multiple" | RuntimeChunk): this; - sideEffects(value: boolean): this; - splitChunks(value: SplitChunksOptions): this; - usedExports(value: boolean): this; - } - - interface RuntimeChunk { - name: string | RuntimeChunkFunction; - } - - type RuntimeChunkFunction = (entryPoint: EntryPoint) => string; - - interface SplitChunksOptions { [name: string]: any; } - - interface LoaderOptions { [name: string]: any; } - - class Use extends ChainedMap implements Orderable { - loader(value: string): this; - options(value: LoaderOptions): this; - - tap(f: (options: LoaderOptions) => LoaderOptions): this; - - // Orderable - before(name: string): this; - after(name: string): this; - } - - type DevTool = 'eval' | 'inline-source-map' | 'cheap-eval-source-map' | 'cheap-source-map' | - 'cheap-module-eval-source-map' | 'cheap-module-source-map' | 'eval-source-map' | 'source-map' | - 'nosources-source-map' | 'hidden-source-map' | 'nosources-source-map' | '@eval' | - '@inline-source-map' | '@cheap-eval-source-map' | '@cheap-source-map' | - '@cheap-module-eval-source-map' | '@cheap-module-source-map' | '@eval-source-map' | - '@source-map' | '@nosources-source-map' | '@hidden-source-map' | '@nosources-source-map' | - '#eval' | '#inline-source-map' | '#cheap-eval-source-map' | '#cheap-source-map' | - '#cheap-module-eval-source-map' | '#cheap-module-source-map' | '#eval-source-map' | - '#source-map' | '#nosources-source-map' | '#hidden-source-map' | '#nosources-source-map' | - '#@eval' | '#@inline-source-map' | '#@cheap-eval-source-map' | '#@cheap-source-map' | - '#@cheap-module-eval-source-map' | '#@cheap-module-source-map' | '#@eval-source-map' | - '#@source-map' | '#@nosources-source-map' | '#@hidden-source-map' | '#@nosources-source-map' | - boolean; - - interface PluginClass { - new (...opts: any[]): webpack.Plugin; - } - - interface Orderable { - before(name: string): this; - after(name: string): this; - } -} diff --git a/types/webpack-chain/tsconfig.json b/types/webpack-chain/tsconfig.json deleted file mode 100644 index 45d1deba96..0000000000 --- a/types/webpack-chain/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "webpack-chain-tests.ts" - ] -} \ No newline at end of file diff --git a/types/webpack-chain/tslint.json b/types/webpack-chain/tslint.json deleted file mode 100644 index b1439230db..0000000000 --- a/types/webpack-chain/tslint.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - // TODO - "no-any-union": false - } -} diff --git a/types/webpack-chain/webpack-chain-tests.ts b/types/webpack-chain/webpack-chain-tests.ts deleted file mode 100644 index b655df07ea..0000000000 --- a/types/webpack-chain/webpack-chain-tests.ts +++ /dev/null @@ -1,255 +0,0 @@ -import Config = require('webpack-chain'); -import * as webpack from 'webpack'; - -const config = new Config(); - -config - .amd({ foo: true }) - .bail(true) - .cache(false) - .cache({}) - .devtool('hidden-source-map') - .devtool(false) - .context('') - .externals('foo') - .externals(/node_modules/) - .externals({ test: false, foo: 'bar' }) - .externals(['foo', 'bar']) - .externals((context, request, cb) => cb(null, true)) - .loader({}) - .profile(false) - .recordsPath('') - .recordsInputPath('') - .recordsOutputPath('') - .stats({ - assets: false, - publicPath: true, - modules: false - }) - .target('web') - .watch(true) - .watchOptions({}) - .when(false, config => config.watch(true), config => config.watch(false)) - - .entry('main') - .add('index.js') - .delete('index.js') - .clear() - .when(false, entry => entry.clear(), entry => entry.clear()) - .end() - - .entryPoints - .delete('main') - .end() - - .plugin('foo') - .use(webpack.DefinePlugin, []) - .end() - - .plugin('bar') - .use(webpack.DefinePlugin, []) - .before('foo') - .end() - - .plugin('baz') - .use(webpack.DefinePlugin, []) - .after('bar') - .end() - - .plugins - .delete('foo') - .delete('bar') - .delete('baz') - .end() - - .devServer - .clientLogLevel('error') - .compress(false) - .contentBase('/') - .contentBase(['foo', 'bar']) - .filename('hello') - .headers({ - 'Content-Type': 'text/css', - }) - .historyApiFallback(true) - .host('localhost') - .hot(true) - .hotOnly(true) - .https(true) - .inline(true) - .lazy(true) - .noInfo(true) - .overlay(true) - .overlay({ - warnings: true, - errors: true, - }) - .port(8080) - .progress(true) - .proxy({}) - .public('foo') - .publicPath('bar') - .quiet(false) - .setup(app => {}) - .staticOptions({}) - .stats({ - reasons: true, - errors: true, - warnings: false, - }) - .watchContentBase(true) - .watchOptions({}) - .end() - - .module - .noParse(/.min.js$/) - .rule('compile') - .test(/.js$/) - .include - .add(/.js$/) - .end() - .exclude - .add(/node_modules/) - .end() - .parser({ - opt: 'foo', - }) - .enforce('pre') - .use('babel') - .loader('babel-loader') - .options({}) - .end() - .use('eslint') - .loader('eslint-loader') - .options({}) - .after('babel') - .end() - .uses - .delete('babel') - .delete('eslint') - .end() - .pre() - .post() - .end() - .rules - .delete('compile') - .end() - .end() - - .node - .set('__dirname', true) - .delete('__dirname') - .clear() - .end() - - .output - .chunkFilename('') - .crossOriginLoading(true) - .filename('main.js') - .library('var') - .libraryTarget('var') - .devtoolFallbackModuleFilenameTemplate('') - .devtoolLineToLine('') - .devtoolModuleFilenameTemplate('') - .hashFunction('md5') - .hashDigest('md5') - .hashDigestLength(15) - .hashSalt('') - .hotUpdateChunkFilename('update') - .hotUpdateFunction(() => {}) - .hotUpdateMainFilename('main') - .jsonpFunction('callback') - .path('/') - .pathinfo(true) - .publicPath('/') - .sourceMapFilename('index.js.map') - .sourcePrefix('~') - .strictModuleExceptionHandling(true) - .umdNamedDefine(true) - .end() - - .optimization - .concatenateModules(true) - .flagIncludedChunks(true) - .mergeDuplicateChunks(true) - .minimize(true) - .minimizer('foo') - .use(webpack.DefinePlugin) - .end() - .namedChunks(true) - .namedModules(true) - .nodeEnv(true) - .noEmitOnErrors(true) - .occurrenceOrder(true) - .portableRecords(true) - .providedExports(true) - .removeAvailableModules(true) - .removeEmptyChunks(true) - .runtimeChunk("single") - .runtimeChunk({ name: ({}) => "hello" }) - .sideEffects(true) - .splitChunks({}) - .usedExports(true) - .end() - - .performance - .hints(true) - .hints('warning') - .maxEntrypointSize(20000) - .maxAssetSize(20000) - .assetFilter(filename => true) - .end() - - .resolve - .alias - .set('foo', 'bar') - .end() - .aliasFields - .add('foo') - .end() - .descriptionFiles - .add('foo') - .end() - .extensions - .add('.js') - .end() - .mainFields - .add('browser') - .end() - .mainFiles - .add('index.js') - .end() - .modules - .add('index.js') - .end() - .enforceExtension(true) - .enforceModuleExtension(true) - .unsafeCache(false) - .unsafeCache(/foo/) - .symlinks(true) - .cachePredicate(({ path, request }) => true) - .plugin('foo') - .use(webpack.DefinePlugin, []) - .end() - .plugins - .delete('foo') - .end() - .end() - - .resolveLoader - .extensions - .add('.js') - .end() - .modules - .add('index.js') - .end() - .moduleExtensions - .add('.js') - .end() - .packageMains - .add('index.js') - .end() - .end() - - .merge({}) - .toConfig();