rollup 0.55.1 → 0.55.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +40 -4
- package/bin/rollup +13 -4
- package/dist/rollup.browser.js +134 -79
- package/dist/rollup.es.js +135 -80
- package/dist/rollup.js +136 -81
- package/dist/typings/Chunk.d.ts +4 -0
- package/dist/typings/Graph.d.ts +1 -2
- package/dist/typings/rollup/index.d.ts +1 -0
- package/dist/typings/utils/defaults.d.ts +2 -1
- package/dist/typings/utils/renderHelpers.d.ts +12 -0
- package/dist/typings/watch/index.d.ts +1 -1
- package/package.json +10 -5
- package/dist/typings/Bundle.d.ts +0 -29
- package/dist/typings/ast/Node.d.ts +0 -185
- package/dist/typings/ast/nodes/Declaration.d.ts +0 -8
- package/dist/typings/ast/nodes/Expression.d.ts +0 -46
- package/dist/typings/ast/nodes/Pattern.d.ts +0 -12
- package/dist/typings/ast/nodes/Statement.d.ts +0 -10
- package/dist/typings/ast/nodes/shared/VirtualObjectExpression.d.ts +0 -7
- package/dist/typings/ast/nodes/shared/disallowIllegalReassignment.d.ts +0 -6
- package/dist/typings/bin/src/index.d.ts +0 -1
- package/dist/typings/bin/src/logging.d.ts +0 -3
- package/dist/typings/bin/src/run/alternateScreen.d.ts +0 -8
- package/dist/typings/bin/src/run/batchWarnings.d.ts +0 -11
- package/dist/typings/bin/src/run/build.d.ts +0 -9
- package/dist/typings/bin/src/run/index.d.ts +0 -1
- package/dist/typings/bin/src/run/loadConfigFile.d.ts +0 -6
- package/dist/typings/bin/src/run/watch.d.ts +0 -8
- package/dist/typings/bin/src/sourceMappingUrl.d.ts +0 -2
- package/dist/typings/bin/src/utils/sequence.d.ts +0 -4
- package/dist/typings/browser/fs.d.ts +0 -5
- package/dist/typings/browser/path.d.ts +0 -10
- package/dist/typings/src/Bundle.d.ts +0 -29
- package/dist/typings/src/ExternalModule.d.ts +0 -23
- package/dist/typings/src/Graph.d.ts +0 -60
- package/dist/typings/src/Module.d.ts +0 -137
- package/dist/typings/src/ast/CallOptions.d.ts +0 -24
- package/dist/typings/src/ast/Entity.d.ts +0 -19
- package/dist/typings/src/ast/ExecutionPathOptions.d.ts +0 -97
- package/dist/typings/src/ast/Node.d.ts +0 -186
- package/dist/typings/src/ast/clone.d.ts +0 -1
- package/dist/typings/src/ast/comment.d.ts +0 -4
- package/dist/typings/src/ast/enhance.d.ts +0 -7
- package/dist/typings/src/ast/keys.d.ts +0 -4
- package/dist/typings/src/ast/nodes/ArrayExpression.d.ts +0 -9
- package/dist/typings/src/ast/nodes/ArrayPattern.d.ts +0 -21
- package/dist/typings/src/ast/nodes/ArrowFunctionExpression.d.ts +0 -48
- package/dist/typings/src/ast/nodes/AssignmentExpression.d.ts +0 -16
- package/dist/typings/src/ast/nodes/AssignmentPattern.d.ts +0 -23
- package/dist/typings/src/ast/nodes/AssignmentProperty.d.ts +0 -10
- package/dist/typings/src/ast/nodes/AwaitExpression.d.ts +0 -8
- package/dist/typings/src/ast/nodes/BinaryExpression.d.ts +0 -38
- package/dist/typings/src/ast/nodes/BlockStatement.d.ts +0 -19
- package/dist/typings/src/ast/nodes/BreakStatement.d.ts +0 -9
- package/dist/typings/src/ast/nodes/CallExpression.d.ts +0 -45
- package/dist/typings/src/ast/nodes/CatchClause.d.ts +0 -14
- package/dist/typings/src/ast/nodes/ClassBody.d.ts +0 -17
- package/dist/typings/src/ast/nodes/ClassDeclaration.d.ts +0 -11
- package/dist/typings/src/ast/nodes/ClassExpression.d.ts +0 -10
- package/dist/typings/src/ast/nodes/ConditionalExpression.d.ts +0 -50
- package/dist/typings/src/ast/nodes/Declaration.d.ts +0 -8
- package/dist/typings/src/ast/nodes/DoWhileStatement.d.ts +0 -10
- package/dist/typings/src/ast/nodes/EmptyStatement.d.ts +0 -7
- package/dist/typings/src/ast/nodes/ExportAllDeclaration.d.ts +0 -11
- package/dist/typings/src/ast/nodes/ExportDefaultDeclaration.d.ts +0 -18
- package/dist/typings/src/ast/nodes/ExportNamedDeclaration.d.ts +0 -24
- package/dist/typings/src/ast/nodes/ExportSpecifier.d.ts +0 -8
- package/dist/typings/src/ast/nodes/Expression.d.ts +0 -46
- package/dist/typings/src/ast/nodes/ExpressionStatement.d.ts +0 -5
- package/dist/typings/src/ast/nodes/ForInStatement.d.ts +0 -17
- package/dist/typings/src/ast/nodes/ForOfStatement.d.ts +0 -18
- package/dist/typings/src/ast/nodes/ForStatement.d.ts +0 -16
- package/dist/typings/src/ast/nodes/FunctionDeclaration.d.ts +0 -9
- package/dist/typings/src/ast/nodes/FunctionExpression.d.ts +0 -6
- package/dist/typings/src/ast/nodes/Identifier.d.ts +0 -56
- package/dist/typings/src/ast/nodes/IfStatement.d.ts +0 -15
- package/dist/typings/src/ast/nodes/Import.d.ts +0 -20
- package/dist/typings/src/ast/nodes/ImportDeclaration.d.ts +0 -19
- package/dist/typings/src/ast/nodes/ImportDefaultSpecifier.d.ts +0 -7
- package/dist/typings/src/ast/nodes/ImportNamespaceSpecifier.d.ts +0 -7
- package/dist/typings/src/ast/nodes/ImportSpecifier.d.ts +0 -8
- package/dist/typings/src/ast/nodes/LabeledStatement.d.ts +0 -10
- package/dist/typings/src/ast/nodes/Literal.d.ts +0 -22
- package/dist/typings/src/ast/nodes/LogicalExpression.d.ts +0 -47
- package/dist/typings/src/ast/nodes/MemberExpression.d.ts +0 -61
- package/dist/typings/src/ast/nodes/MethodDefinition.d.ts +0 -20
- package/dist/typings/src/ast/nodes/NewExpression.d.ts +0 -17
- package/dist/typings/src/ast/nodes/ObjectExpression.d.ts +0 -52
- package/dist/typings/src/ast/nodes/ObjectPattern.d.ts +0 -22
- package/dist/typings/src/ast/nodes/Pattern.d.ts +0 -12
- package/dist/typings/src/ast/nodes/Program.d.ts +0 -7
- package/dist/typings/src/ast/nodes/Property.d.ts +0 -57
- package/dist/typings/src/ast/nodes/RestElement.d.ts +0 -21
- package/dist/typings/src/ast/nodes/ReturnStatement.d.ts +0 -10
- package/dist/typings/src/ast/nodes/SequenceExpression.d.ts +0 -12
- package/dist/typings/src/ast/nodes/SpreadElement.d.ts +0 -6
- package/dist/typings/src/ast/nodes/Statement.d.ts +0 -10
- package/dist/typings/src/ast/nodes/SwitchCase.d.ts +0 -9
- package/dist/typings/src/ast/nodes/SwitchStatement.d.ts +0 -13
- package/dist/typings/src/ast/nodes/TaggedTemplateExpression.d.ts +0 -13
- package/dist/typings/src/ast/nodes/TemplateElement.d.ts +0 -12
- package/dist/typings/src/ast/nodes/TemplateLiteral.d.ts +0 -10
- package/dist/typings/src/ast/nodes/ThisExpression.d.ts +0 -22
- package/dist/typings/src/ast/nodes/ThrowStatement.d.ts +0 -9
- package/dist/typings/src/ast/nodes/UnaryExpression.d.ts +0 -19
- package/dist/typings/src/ast/nodes/UnknownNode.d.ts +0 -5
- package/dist/typings/src/ast/nodes/UpdateExpression.d.ts +0 -16
- package/dist/typings/src/ast/nodes/VariableDeclaration.d.ts +0 -23
- package/dist/typings/src/ast/nodes/VariableDeclarator.d.ts +0 -15
- package/dist/typings/src/ast/nodes/WhileStatement.d.ts +0 -10
- package/dist/typings/src/ast/nodes/YieldExpression.d.ts +0 -9
- package/dist/typings/src/ast/nodes/index.d.ts +0 -69
- package/dist/typings/src/ast/nodes/shared/ClassNode.d.ts +0 -27
- package/dist/typings/src/ast/nodes/shared/Expression.d.ts +0 -42
- package/dist/typings/src/ast/nodes/shared/FunctionNode.d.ts +0 -42
- package/dist/typings/src/ast/nodes/shared/Node.d.ts +0 -169
- package/dist/typings/src/ast/nodes/shared/Pattern.d.ts +0 -3
- package/dist/typings/src/ast/nodes/shared/Statement.d.ts +0 -6
- package/dist/typings/src/ast/nodes/shared/VirtualObjectExpression.d.ts +0 -7
- package/dist/typings/src/ast/nodes/shared/disallowIllegalReassignment.d.ts +0 -6
- package/dist/typings/src/ast/nodes/shared/pureFunctions.d.ts +0 -4
- package/dist/typings/src/ast/scopes/BlockScope.d.ts +0 -12
- package/dist/typings/src/ast/scopes/CatchScope.d.ts +0 -13
- package/dist/typings/src/ast/scopes/FunctionScope.d.ts +0 -27
- package/dist/typings/src/ast/scopes/GlobalScope.d.ts +0 -6
- package/dist/typings/src/ast/scopes/ModuleScope.d.ts +0 -11
- package/dist/typings/src/ast/scopes/ParameterScope.d.ts +0 -16
- package/dist/typings/src/ast/scopes/ReturnValueScope.d.ts +0 -24
- package/dist/typings/src/ast/scopes/Scope.d.ts +0 -49
- package/dist/typings/src/ast/utils/extractNames.d.ts +0 -2
- package/dist/typings/src/ast/values.d.ts +0 -5
- package/dist/typings/src/ast/variables/ArgumentsVariable.d.ts +0 -30
- package/dist/typings/src/ast/variables/ExportDefaultVariable.d.ts +0 -19
- package/dist/typings/src/ast/variables/ExternalVariable.d.ts +0 -17
- package/dist/typings/src/ast/variables/GlobalVariable.d.ts +0 -12
- package/dist/typings/src/ast/variables/LocalVariable.d.ts +0 -51
- package/dist/typings/src/ast/variables/NamespaceVariable.d.ts +0 -23
- package/dist/typings/src/ast/variables/ParameterVariable.d.ts +0 -6
- package/dist/typings/src/ast/variables/ReplaceableInitializationVariable.d.ts +0 -33
- package/dist/typings/src/ast/variables/ThisVariable.d.ts +0 -4
- package/dist/typings/src/ast/variables/Variable.d.ts +0 -63
- package/dist/typings/src/ast/variables/VariableReassignmentTracker.d.ts +0 -25
- package/dist/typings/src/banner.d.ts +0 -0
- package/dist/typings/src/browser-entry.d.ts +0 -2
- package/dist/typings/src/finalisers/amd.d.ts +0 -21
- package/dist/typings/src/finalisers/cjs.d.ts +0 -20
- package/dist/typings/src/finalisers/es.d.ts +0 -17
- package/dist/typings/src/finalisers/iife.d.ts +0 -20
- package/dist/typings/src/finalisers/index.d.ts +0 -25
- package/dist/typings/src/finalisers/shared/esModuleExport.d.ts +0 -2
- package/dist/typings/src/finalisers/shared/getExportBlock.d.ts +0 -6
- package/dist/typings/src/finalisers/shared/getGlobalNameMaker.d.ts +0 -9
- package/dist/typings/src/finalisers/shared/getInteropBlock.d.ts +0 -6
- package/dist/typings/src/finalisers/shared/sanitize.d.ts +0 -2
- package/dist/typings/src/finalisers/shared/setupNamespace.d.ts +0 -7
- package/dist/typings/src/finalisers/shared/trimEmptyImports.d.ts +0 -5
- package/dist/typings/src/finalisers/shared/warnOnBuiltins.d.ts +0 -2
- package/dist/typings/src/finalisers/umd.d.ts +0 -21
- package/dist/typings/src/node-entry.d.ts +0 -5
- package/dist/typings/src/rollup/index.d.ts +0 -172
- package/dist/typings/src/utils/array.d.ts +0 -4
- package/dist/typings/src/utils/callIfFunction.d.ts +0 -1
- package/dist/typings/src/utils/collapseSourcemaps.d.ts +0 -11
- package/dist/typings/src/utils/defaults.d.ts +0 -6
- package/dist/typings/src/utils/deprecateOptions.d.ts +0 -9
- package/dist/typings/src/utils/dynamic-import-plugin.d.ts +0 -8
- package/dist/typings/src/utils/ensureArray.d.ts +0 -2
- package/dist/typings/src/utils/error.d.ts +0 -18
- package/dist/typings/src/utils/first.d.ts +0 -3
- package/dist/typings/src/utils/flushTime.d.ts +0 -5
- package/dist/typings/src/utils/fs.d.ts +0 -6
- package/dist/typings/src/utils/getCodeFrame.d.ts +0 -5
- package/dist/typings/src/utils/getExportMode.d.ts +0 -6
- package/dist/typings/src/utils/getIndentString.d.ts +0 -7
- package/dist/typings/src/utils/identifierHelpers.d.ts +0 -3
- package/dist/typings/src/utils/mergeOptions.d.ts +0 -21
- package/dist/typings/src/utils/object.d.ts +0 -9
- package/dist/typings/src/utils/path.d.ts +0 -6
- package/dist/typings/src/utils/promise.d.ts +0 -5
- package/dist/typings/src/utils/relativeId.d.ts +0 -1
- package/dist/typings/src/utils/sourceMappingURL.d.ts +0 -3
- package/dist/typings/src/utils/transform.d.ts +0 -16
- package/dist/typings/src/utils/transformBundle.d.ts +0 -8
- package/dist/typings/src/watch/chokidar.d.ts +0 -4
- package/dist/typings/src/watch/fileWatchers.d.ts +0 -23
- package/dist/typings/src/watch/index.d.ts +0 -48
- package/dist/typings/utils/array.d.ts +0 -4
- package/dist/typings/utils/dynamic-import-plugin.d.ts +0 -13
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import ExecutionPathOptions from "../ExecutionPathOptions";
|
|
2
|
-
import { ExpressionEntity } from "../nodes/shared/Expression";
|
|
3
|
-
export interface UnknownKey {
|
|
4
|
-
type: "UNKNOWN_KEY";
|
|
5
|
-
}
|
|
6
|
-
export declare type ObjectPathKey = string | UnknownKey;
|
|
7
|
-
export declare type ObjectPath = ObjectPathKey[];
|
|
8
|
-
export declare function isUnknownKey(key: ObjectPathKey): key is UnknownKey;
|
|
9
|
-
export declare const UNKNOWN_KEY: UnknownKey;
|
|
10
|
-
export declare type PathCallback = (
|
|
11
|
-
path: ObjectPath,
|
|
12
|
-
expression: ExpressionEntity
|
|
13
|
-
) => void;
|
|
14
|
-
export declare type PathPredicate = (
|
|
15
|
-
path: ObjectPath,
|
|
16
|
-
expression: ExpressionEntity
|
|
17
|
-
) => boolean;
|
|
18
|
-
export default class VariableReassignmentTracker {
|
|
19
|
-
private _initialExpression;
|
|
20
|
-
private _reassignedPathTracker;
|
|
21
|
-
constructor(initialExpression: ExpressionEntity);
|
|
22
|
-
reassignPath(path: ObjectPath, options: ExecutionPathOptions): void;
|
|
23
|
-
forEachAtPath(path: ObjectPath, callback: PathCallback): void;
|
|
24
|
-
someAtPath(path: ObjectPath, predicateFunction: PathPredicate): boolean;
|
|
25
|
-
}
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import Bundle from "../Bundle";
|
|
2
|
-
import { Bundle as MagicStringBundle } from "magic-string";
|
|
3
|
-
import { OutputOptions } from "../rollup/index";
|
|
4
|
-
export default function amd(
|
|
5
|
-
bundle: Bundle,
|
|
6
|
-
magicString: MagicStringBundle,
|
|
7
|
-
{
|
|
8
|
-
exportMode,
|
|
9
|
-
getPath,
|
|
10
|
-
indentString,
|
|
11
|
-
intro,
|
|
12
|
-
outro
|
|
13
|
-
}: {
|
|
14
|
-
exportMode: string;
|
|
15
|
-
indentString: string;
|
|
16
|
-
getPath: (name: string) => string;
|
|
17
|
-
intro: string;
|
|
18
|
-
outro: string;
|
|
19
|
-
},
|
|
20
|
-
options: OutputOptions
|
|
21
|
-
): any;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { OutputOptions } from "../rollup/index";
|
|
2
|
-
import { Bundle as MagicStringBundle } from "magic-string";
|
|
3
|
-
import Bundle from "../Bundle";
|
|
4
|
-
export default function cjs(
|
|
5
|
-
bundle: Bundle,
|
|
6
|
-
magicString: MagicStringBundle,
|
|
7
|
-
{
|
|
8
|
-
exportMode,
|
|
9
|
-
getPath,
|
|
10
|
-
intro,
|
|
11
|
-
outro
|
|
12
|
-
}: {
|
|
13
|
-
exportMode: string;
|
|
14
|
-
indentString: string;
|
|
15
|
-
getPath: (name: string) => string;
|
|
16
|
-
intro: string;
|
|
17
|
-
outro: string;
|
|
18
|
-
},
|
|
19
|
-
options: OutputOptions
|
|
20
|
-
): MagicStringBundle;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Bundle as MagicStringBundle } from "magic-string";
|
|
2
|
-
import Bundle from "../Bundle";
|
|
3
|
-
export default function es(
|
|
4
|
-
bundle: Bundle,
|
|
5
|
-
magicString: MagicStringBundle,
|
|
6
|
-
{
|
|
7
|
-
getPath,
|
|
8
|
-
intro,
|
|
9
|
-
outro
|
|
10
|
-
}: {
|
|
11
|
-
exportMode: string;
|
|
12
|
-
indentString: string;
|
|
13
|
-
getPath: (name: string) => string;
|
|
14
|
-
intro: string;
|
|
15
|
-
outro: string;
|
|
16
|
-
}
|
|
17
|
-
): any;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import Bundle from "../Bundle";
|
|
2
|
-
import { Bundle as MagicStringBundle } from "magic-string";
|
|
3
|
-
import { OutputOptions } from "../rollup/index";
|
|
4
|
-
export default function iife(
|
|
5
|
-
bundle: Bundle,
|
|
6
|
-
magicString: MagicStringBundle,
|
|
7
|
-
{
|
|
8
|
-
exportMode,
|
|
9
|
-
indentString,
|
|
10
|
-
intro,
|
|
11
|
-
outro
|
|
12
|
-
}: {
|
|
13
|
-
exportMode: string;
|
|
14
|
-
indentString: string;
|
|
15
|
-
getPath: (name: string) => string;
|
|
16
|
-
intro: string;
|
|
17
|
-
outro: string;
|
|
18
|
-
},
|
|
19
|
-
options: OutputOptions
|
|
20
|
-
): any;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import Bundle from "../Bundle";
|
|
2
|
-
import { Bundle as MagicStringBundle } from "magic-string";
|
|
3
|
-
import { OutputOptions } from "../rollup/index";
|
|
4
|
-
export declare type Finaliser = (
|
|
5
|
-
bundle: Bundle,
|
|
6
|
-
magicString: MagicStringBundle,
|
|
7
|
-
{
|
|
8
|
-
exportMode,
|
|
9
|
-
getPath,
|
|
10
|
-
indentString,
|
|
11
|
-
intro,
|
|
12
|
-
outro
|
|
13
|
-
}: {
|
|
14
|
-
exportMode: string;
|
|
15
|
-
indentString: string;
|
|
16
|
-
getPath: (name: string) => string;
|
|
17
|
-
intro: string;
|
|
18
|
-
outro: string;
|
|
19
|
-
},
|
|
20
|
-
options: OutputOptions
|
|
21
|
-
) => MagicStringBundle;
|
|
22
|
-
declare const _default: {
|
|
23
|
-
[format: string]: Finaliser;
|
|
24
|
-
};
|
|
25
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import Bundle from "../../Bundle";
|
|
2
|
-
import Module from "../../Module";
|
|
3
|
-
import { GlobalsOption } from "../../rollup/index";
|
|
4
|
-
import ExternalModule from "../../ExternalModule";
|
|
5
|
-
export default function getGlobalNameMaker(
|
|
6
|
-
globals: GlobalsOption,
|
|
7
|
-
bundle: Bundle,
|
|
8
|
-
fallback?: string
|
|
9
|
-
): (module: Module | ExternalModule) => string;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import Bundle from "../Bundle";
|
|
2
|
-
import { Bundle as MagicStringBundle } from "magic-string";
|
|
3
|
-
import { OutputOptions } from "../rollup/index";
|
|
4
|
-
export default function umd(
|
|
5
|
-
bundle: Bundle,
|
|
6
|
-
magicString: MagicStringBundle,
|
|
7
|
-
{
|
|
8
|
-
exportMode,
|
|
9
|
-
indentString,
|
|
10
|
-
getPath,
|
|
11
|
-
intro,
|
|
12
|
-
outro
|
|
13
|
-
}: {
|
|
14
|
-
exportMode: string;
|
|
15
|
-
indentString: string;
|
|
16
|
-
getPath: (name: string) => string;
|
|
17
|
-
intro: string;
|
|
18
|
-
outro: string;
|
|
19
|
-
},
|
|
20
|
-
options: OutputOptions
|
|
21
|
-
): any;
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { GenericConfigObject } from "../utils/mergeOptions";
|
|
2
|
-
import { ModuleJSON } from "../Module";
|
|
3
|
-
import { RawSourceMap } from "source-map";
|
|
4
|
-
import Program from "../ast/nodes/Program";
|
|
5
|
-
import { SourceMap } from "magic-string";
|
|
6
|
-
import { WatcherOptions } from "../watch/index";
|
|
7
|
-
export declare const VERSION = "<@VERSION@>";
|
|
8
|
-
export declare type SourceDescription = {
|
|
9
|
-
code: string;
|
|
10
|
-
map?: RawSourceMap;
|
|
11
|
-
ast?: Program;
|
|
12
|
-
};
|
|
13
|
-
export declare type ResolveIdHook = (
|
|
14
|
-
id: string,
|
|
15
|
-
parent: string
|
|
16
|
-
) => Promise<string | boolean | void> | string | boolean | void;
|
|
17
|
-
export declare type IsExternalHook = (
|
|
18
|
-
id: string,
|
|
19
|
-
parentId: string,
|
|
20
|
-
isResolved: boolean
|
|
21
|
-
) => Promise<boolean | void> | boolean | void;
|
|
22
|
-
export declare type LoadHook = (
|
|
23
|
-
id: string
|
|
24
|
-
) =>
|
|
25
|
-
| Promise<SourceDescription | string | void>
|
|
26
|
-
| SourceDescription
|
|
27
|
-
| string
|
|
28
|
-
| void;
|
|
29
|
-
export declare type TransformHook = (
|
|
30
|
-
code: string,
|
|
31
|
-
id: String
|
|
32
|
-
) => Promise<SourceDescription | string | void>;
|
|
33
|
-
export declare type TransformBundleHook = (
|
|
34
|
-
code: string,
|
|
35
|
-
options: OutputOptions
|
|
36
|
-
) => Promise<SourceDescription | string>;
|
|
37
|
-
export declare type ResolveDynamicImportHook = (
|
|
38
|
-
specifier: string | Node,
|
|
39
|
-
parentId: string
|
|
40
|
-
) => Promise<string | void> | string | void;
|
|
41
|
-
export interface Plugin {
|
|
42
|
-
name: string;
|
|
43
|
-
options?: (options: InputOptions) => void;
|
|
44
|
-
load?: LoadHook;
|
|
45
|
-
resolveId?: ResolveIdHook;
|
|
46
|
-
transform?: TransformHook;
|
|
47
|
-
transformBundle?: TransformBundleHook;
|
|
48
|
-
ongenerate?: (options: OutputOptions, source: SourceDescription) => void;
|
|
49
|
-
onwrite?: (options: OutputOptions, source: SourceDescription) => void;
|
|
50
|
-
resolveDynamicImport?: ResolveDynamicImportHook;
|
|
51
|
-
banner?: () => string;
|
|
52
|
-
footer?: () => string;
|
|
53
|
-
intro?: () => string;
|
|
54
|
-
outro?: () => string;
|
|
55
|
-
}
|
|
56
|
-
export interface TreeshakingOptions {
|
|
57
|
-
propertyReadSideEffects: boolean;
|
|
58
|
-
pureExternalModules: boolean;
|
|
59
|
-
}
|
|
60
|
-
export declare type ExternalOption = string[] | IsExternalHook;
|
|
61
|
-
export declare type GlobalsOption =
|
|
62
|
-
| {
|
|
63
|
-
[name: string]: string;
|
|
64
|
-
}
|
|
65
|
-
| ((name: string) => string);
|
|
66
|
-
export interface InputOptions {
|
|
67
|
-
input: string;
|
|
68
|
-
external?: ExternalOption;
|
|
69
|
-
plugins?: Plugin[];
|
|
70
|
-
onwarn?: WarningHandler;
|
|
71
|
-
cache?: {
|
|
72
|
-
modules: ModuleJSON[];
|
|
73
|
-
};
|
|
74
|
-
acorn?: {};
|
|
75
|
-
treeshake?: boolean | TreeshakingOptions;
|
|
76
|
-
context?: string;
|
|
77
|
-
moduleContext?:
|
|
78
|
-
| string
|
|
79
|
-
| ((id: string) => string)
|
|
80
|
-
| {
|
|
81
|
-
[id: string]: string;
|
|
82
|
-
};
|
|
83
|
-
legacy?: boolean;
|
|
84
|
-
watch?: WatcherOptions;
|
|
85
|
-
experimentalDynamicImport?: boolean;
|
|
86
|
-
pureExternalModules?: boolean;
|
|
87
|
-
preferConst?: boolean;
|
|
88
|
-
entry?: string;
|
|
89
|
-
transform?: TransformHook;
|
|
90
|
-
load?: LoadHook;
|
|
91
|
-
resolveId?: ResolveIdHook;
|
|
92
|
-
resolveExternal?: any;
|
|
93
|
-
}
|
|
94
|
-
export declare type ModuleFormat =
|
|
95
|
-
| "amd"
|
|
96
|
-
| "cjs"
|
|
97
|
-
| "es"
|
|
98
|
-
| "es6"
|
|
99
|
-
| "iife"
|
|
100
|
-
| "umd";
|
|
101
|
-
export interface OutputOptions {
|
|
102
|
-
file?: string;
|
|
103
|
-
format?: ModuleFormat;
|
|
104
|
-
name?: string;
|
|
105
|
-
globals?: GlobalsOption;
|
|
106
|
-
paths?: Record<string, string> | ((id: string) => string);
|
|
107
|
-
banner?: string;
|
|
108
|
-
footer?: string;
|
|
109
|
-
intro?: string;
|
|
110
|
-
outro?: string;
|
|
111
|
-
sourcemap?: boolean | "inline";
|
|
112
|
-
sourcemapFile?: string;
|
|
113
|
-
interop?: boolean;
|
|
114
|
-
extend?: boolean;
|
|
115
|
-
exports?: "default" | "named" | "none" | "auto";
|
|
116
|
-
amd?: {
|
|
117
|
-
id?: string;
|
|
118
|
-
define?: string;
|
|
119
|
-
};
|
|
120
|
-
indent?: boolean;
|
|
121
|
-
strict?: boolean;
|
|
122
|
-
freeze?: boolean;
|
|
123
|
-
legacy?: boolean;
|
|
124
|
-
noConflict?: boolean;
|
|
125
|
-
dest?: string;
|
|
126
|
-
moduleId?: string;
|
|
127
|
-
}
|
|
128
|
-
export interface RollupWarning {
|
|
129
|
-
message?: string;
|
|
130
|
-
code?: string;
|
|
131
|
-
loc?: {
|
|
132
|
-
file: string;
|
|
133
|
-
line: number;
|
|
134
|
-
column: number;
|
|
135
|
-
};
|
|
136
|
-
deprecations?: {
|
|
137
|
-
old: string;
|
|
138
|
-
new: string;
|
|
139
|
-
}[];
|
|
140
|
-
modules?: string[];
|
|
141
|
-
names?: string[];
|
|
142
|
-
source?: string;
|
|
143
|
-
importer?: string;
|
|
144
|
-
frame?: any;
|
|
145
|
-
missing?: string;
|
|
146
|
-
exporter?: string;
|
|
147
|
-
name?: string;
|
|
148
|
-
sources?: string[];
|
|
149
|
-
reexporter?: string;
|
|
150
|
-
guess?: string;
|
|
151
|
-
url?: string;
|
|
152
|
-
id?: string;
|
|
153
|
-
plugin?: string;
|
|
154
|
-
pos?: number;
|
|
155
|
-
pluginCode?: string;
|
|
156
|
-
}
|
|
157
|
-
export declare type WarningHandler = (warning: RollupWarning) => void;
|
|
158
|
-
export interface OutputBundle {
|
|
159
|
-
imports: string[];
|
|
160
|
-
exports: string[];
|
|
161
|
-
modules: ModuleJSON[];
|
|
162
|
-
generate: (
|
|
163
|
-
outputOptions: OutputOptions
|
|
164
|
-
) => Promise<{
|
|
165
|
-
code: string;
|
|
166
|
-
map: SourceMap;
|
|
167
|
-
}>;
|
|
168
|
-
write: (options: OutputOptions) => Promise<void>;
|
|
169
|
-
}
|
|
170
|
-
export default function rollup(
|
|
171
|
-
rawInputOptions: GenericConfigObject
|
|
172
|
-
): Promise<OutputBundle>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function callIfFunction<T>(thing: T | (() => T)): T;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../src/utils/collapseSourcemaps.d.ts" />
|
|
2
|
-
import Module from "../Module";
|
|
3
|
-
import { RawSourceMap } from "source-map";
|
|
4
|
-
import Bundle from "../Bundle";
|
|
5
|
-
export default function collapseSourcemaps(
|
|
6
|
-
bundle: Bundle,
|
|
7
|
-
file: string,
|
|
8
|
-
map: RawSourceMap,
|
|
9
|
-
modules: Module[],
|
|
10
|
-
bundleSourcemapChain: RawSourceMap[]
|
|
11
|
-
): RawSourceMap;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="acorn" />
|
|
2
|
-
import { PluginsObject, TokenType } from "acorn";
|
|
3
|
-
export default function wrapDynamicImportPlugin(acorn: {
|
|
4
|
-
tokTypes: {
|
|
5
|
-
[type: string]: TokenType;
|
|
6
|
-
};
|
|
7
|
-
plugins: PluginsObject;
|
|
8
|
-
}): (_moduleDynamicImportsReturnBinding: any[]) => void;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface RollupError {
|
|
2
|
-
message: string;
|
|
3
|
-
code?: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
url?: string;
|
|
6
|
-
id?: string;
|
|
7
|
-
loc?: {
|
|
8
|
-
file?: string;
|
|
9
|
-
line: number;
|
|
10
|
-
column: number;
|
|
11
|
-
};
|
|
12
|
-
stack?: string;
|
|
13
|
-
frame?: string;
|
|
14
|
-
pos?: number;
|
|
15
|
-
plugin?: string;
|
|
16
|
-
pluginCode?: string;
|
|
17
|
-
}
|
|
18
|
-
export default function error(props: Error | RollupError): void;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { WarningHandler } from "../../src/rollup/index";
|
|
2
|
-
import { Deprecation } from "./deprecateOptions";
|
|
3
|
-
export declare type GenericConfigObject = {
|
|
4
|
-
[key: string]: any;
|
|
5
|
-
};
|
|
6
|
-
export default function mergeOptions({
|
|
7
|
-
config,
|
|
8
|
-
command,
|
|
9
|
-
deprecateConfig,
|
|
10
|
-
defaultOnWarnHandler
|
|
11
|
-
}: {
|
|
12
|
-
config: GenericConfigObject;
|
|
13
|
-
command?: GenericConfigObject;
|
|
14
|
-
deprecateConfig?: GenericConfigObject;
|
|
15
|
-
defaultOnWarnHandler?: WarningHandler;
|
|
16
|
-
}): {
|
|
17
|
-
inputOptions: any;
|
|
18
|
-
outputOptions: any;
|
|
19
|
-
deprecations: Deprecation[];
|
|
20
|
-
optionError: string | null;
|
|
21
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const keys: (o: {}) => string[];
|
|
2
|
-
export declare function blank(): any;
|
|
3
|
-
export declare function forOwn<T>(
|
|
4
|
-
object: {
|
|
5
|
-
[key: string]: T;
|
|
6
|
-
},
|
|
7
|
-
func: (value: T, key: string) => void
|
|
8
|
-
): void;
|
|
9
|
-
export declare function assign<T, U>(target: T, source: U): T & U;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const absolutePath: RegExp;
|
|
2
|
-
export declare const relativePath: RegExp;
|
|
3
|
-
export declare function isAbsolute(path: string): boolean;
|
|
4
|
-
export declare function isRelative(path: string): boolean;
|
|
5
|
-
export declare function normalize(path: string): string;
|
|
6
|
-
export { basename, dirname, extname, relative, resolve } from "path";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function relativeId(id: string): any;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Graph from "../Graph";
|
|
2
|
-
import { RawSourceMap } from "source-map";
|
|
3
|
-
import { Plugin, SourceDescription } from "../rollup/index";
|
|
4
|
-
import Program from "../ast/nodes/Program";
|
|
5
|
-
export default function transform(
|
|
6
|
-
graph: Graph,
|
|
7
|
-
source: SourceDescription,
|
|
8
|
-
id: string,
|
|
9
|
-
plugins: Plugin[]
|
|
10
|
-
): Promise<{
|
|
11
|
-
code: string;
|
|
12
|
-
originalCode: string;
|
|
13
|
-
originalSourcemap: any;
|
|
14
|
-
ast: Program;
|
|
15
|
-
sourcemapChain: RawSourceMap[];
|
|
16
|
-
}>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { RawSourceMap } from "source-map";
|
|
2
|
-
import { OutputOptions, Plugin } from "../rollup/index";
|
|
3
|
-
export default function transformBundle(
|
|
4
|
-
code: string,
|
|
5
|
-
plugins: Plugin[],
|
|
6
|
-
sourcemapChain: RawSourceMap[],
|
|
7
|
-
options: OutputOptions
|
|
8
|
-
): Promise<string | void>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import * as fs from "fs";
|
|
3
|
-
import { WatchOptions, FSWatcher } from "chokidar";
|
|
4
|
-
import { Task } from "./index";
|
|
5
|
-
export declare function addTask(
|
|
6
|
-
id: string,
|
|
7
|
-
task: Task,
|
|
8
|
-
chokidarOptions: WatchOptions,
|
|
9
|
-
chokidarOptionsHash: string
|
|
10
|
-
): void;
|
|
11
|
-
export declare function deleteTask(
|
|
12
|
-
id: string,
|
|
13
|
-
target: Task,
|
|
14
|
-
chokidarOptionsHash: string
|
|
15
|
-
): void;
|
|
16
|
-
export default class FileWatcher {
|
|
17
|
-
fileExists: boolean;
|
|
18
|
-
fsWatcher: FSWatcher | fs.FSWatcher;
|
|
19
|
-
tasks: Set<Task>;
|
|
20
|
-
constructor(id: string, chokidarOptions: WatchOptions, dispose: () => void);
|
|
21
|
-
close(): void;
|
|
22
|
-
trigger(): void;
|
|
23
|
-
}
|