diff --git a/packages/babel/src/transformation/file/index.js b/packages/babel/src/transformation/file/index.js index 0e9390f2ae..bef7bc07a1 100644 --- a/packages/babel/src/transformation/file/index.js +++ b/packages/babel/src/transformation/file/index.js @@ -26,37 +26,36 @@ import * as t from "../../types"; export default class File { constructor(opts = {}, pipeline) { - this.transformerDependencies = {}; - - this.dynamicImportTypes = {}; - this.dynamicImportIds = {}; - this.dynamicImports = []; - - this.declarations = {}; - this.usedHelpers = {}; - this.dynamicData = {}; - this.data = {}; - - this.metadata = { - modules: { - imports: [], - exports: { - exported: [], - specifiers: [] - } - } - }; - this.pipeline = pipeline; - this.log = new Logger(this, opts.filename || "unknown"); - this.opts = this.initOptions(opts); - this.ast = {}; + + this.log = new Logger(this, opts.filename || "unknown"); + this.opts = this.initOptions(opts); this.buildTransformers(); - - this.hub = new Hub(this); } + transformerDependencies = {}; + dynamicImportTypes = {}; + dynamicImportIds = {}; + dynamicImports = []; + declarations = {}; + usedHelpers = {}; + dynamicData = {}; + data = {}; + ast = {}; + + metadata = { + modules: { + imports: [], + exports: { + exported: [], + specifiers: [] + } + } + }; + + hub = new Hub(this); + /** * [Please add a description.] */ diff --git a/packages/babel/src/transformation/pipeline.js b/packages/babel/src/transformation/pipeline.js index 4c8a26e312..d316a2fc15 100644 --- a/packages/babel/src/transformation/pipeline.js +++ b/packages/babel/src/transformation/pipeline.js @@ -10,13 +10,11 @@ import File from "./file"; */ export default class Pipeline { - constructor() { - this.transformers = object(); - this.namespaces = object(); - this.deprecated = object(); - this.aliases = object(); - this.filters = []; - } + transformers = object(); + namespaces = object(); + deprecated = object(); + aliases = object(); + filters = []; /** * [Please add a description.]