Remove rollup-plugin-commonjs (#34541)

This commit is contained in:
Tiger Oakes
2019-04-23 14:49:47 -07:00
committed by Pranav Senthilnathan
parent 2a6f27f442
commit 0e2c7c1643
6 changed files with 6 additions and 110 deletions

View File

@@ -2496,6 +2496,12 @@
"sourceRepoURL": "https://github.com/rollup/rollup",
"asOfVersion": "0.54.0"
},
{
"libraryName": "rollup-plugin-commonjs",
"typingsPackageName": "rollup-plugin-commonjs",
"sourceRepoURL": "https://github.com/rollup/rollup-plugin-commonjs",
"asOfVersion": "9.3.1"
},
{
"libraryName": "rollup-plugin-node-resolve",
"typingsPackageName": "rollup-plugin-node-resolve",

View File

@@ -1,62 +0,0 @@
// Type definitions for rollup-plugin-commonjs 9.2
// Project: https://github.com/rollup/rollup-plugin-commonjs
// Definitions by: Eoin O'Brien <https://github.com/eoin-obrien>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="node" />
import { Plugin } from 'rollup';
export type IgnoreFunction = (id: string) => boolean;
export interface Options {
/**
* Non-CommonJS modules will be ignored, but you can also
* specifically include files.
* @default undefined
*/
include?: string | Array<string | RegExp>;
/**
* Non-CommonJS modules will be ignored, but you can also
* specifically exclude files.
* @default undefined
*/
exclude?: string | Array<string | RegExp>;
/**
* Search for files other than .js files (must already
* be transpiled by a previous plugin).
* @default [ '.js' ]
*/
extensions?: string[];
/**
* If `true`, then uses of `global` won't be dealt with by this plugin.
* @default false
*/
ignoreGlobal?: boolean;
/**
* If false, then skip sourceMap generation for CommonJS modules.
* @default true
*/
sourceMap?: boolean;
/**
* Explicitly specify unresolvable named exports.
* @default undefined
*/
namedExports?: { [key: string]: string[] };
/**
* Sometimes you have to leave require statements
* unconverted. Pass an array containing the IDs
* or a `id => boolean` function. Only use this
* option if you know what you're doing!
* @default undefined
*/
ignore?: IgnoreFunction | string[];
}
export default function commonjs(options?: Options): Plugin;

View File

@@ -1,6 +0,0 @@
{
"private": true,
"dependencies": {
"rollup": "^0.63.5"
}
}

View File

@@ -1,18 +0,0 @@
import commonjs from 'rollup-plugin-commonjs';
// $ExpectType Plugin
commonjs();
// $ExpectType Plugin
commonjs({});
// $ExpectType Plugin
commonjs({
include: 'node_modules/**',
exclude: [ 'node_modules/foo/**', 'node_modules/bar/**' ],
extensions: [ '.js', '.coffee' ],
ignoreGlobal: false,
sourceMap: false,
namedExports: { './module.js': ['foo', 'bar' ] },
ignore: [ 'conditional-runtime-dependency' ],
});

View File

@@ -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",
"rollup-plugin-commonjs-tests.ts"
]
}

View File

@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }