mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-09-11 14:46:37 +03:00
Summary: Release notes: upgrades Prepack to use Babel 7.0.0-beta.53 This is a big PR that updates all of Prepack to Babel 7. Babylon is now `babel/parser` and pretty much all of the the previous Babel packages are now located in scoped packages. I had to make a bunch of changes around Jest/Flow/Webpack to get this all working. The build times of building Prepack itself seem considerably faster (easily twice as fast locally). I followed most of the Babel 6 -> 7 upgrade guide from the Babel site in terms of changing nodes and type definitions to match the new ones. Pull Request resolved: https://github.com/facebook/prepack/pull/2256 Differential Revision: D8850583 Pulled By: trueadm fbshipit-source-id: 2d2aaec25c6a1ccd1ec0c08c5e7e2a71f78ac2d8
224 lines
6.7 KiB
JavaScript
224 lines
6.7 KiB
JavaScript
// flow-typed signature: e044f91300344c6b466bbb8596699612
|
|
// flow-typed version: <<STUB>>/babel-traverse_v^6.9.0/flow_v0.38.0
|
|
|
|
/**
|
|
* This is an autogenerated libdef stub for:
|
|
*
|
|
* 'babel-traverse'
|
|
*
|
|
* Fill this stub out by replacing all the `any` types.
|
|
*
|
|
* Once filled out, we encourage you to share your work with the
|
|
* community by sending a pull request to:
|
|
* https://github.com/flowtype/flow-typed
|
|
*/
|
|
|
|
import type { BabelNode, BabelNodeIdentifier } from "@babel/types";
|
|
|
|
declare module 'babel-traverse' {
|
|
declare export class BabelTraversePath {
|
|
getBindingIdentifierPaths(): { [key: string]: BabelTraversePath };
|
|
getBindingIdentifiers(): { [key: string]: BabelNodeIdentifier };
|
|
replaceWith(node: BabelNode): void;
|
|
remove(): void;
|
|
scope: BabelTraverseScope;
|
|
node: BabelNode;
|
|
parent: BabelNode;
|
|
parentPath: BabelTraversePath;
|
|
}
|
|
|
|
declare export class BabelTraverseScope {
|
|
hasBinding(name: string, noGlobals: boolean): boolean;
|
|
}
|
|
|
|
declare export default (
|
|
parent?: BabelNode | Array<BabelNode>,
|
|
opts?: Object,
|
|
scope: ?BabelTraverseScope,
|
|
state: Object,
|
|
parentPath?: BabelTraversePath,
|
|
) => void;
|
|
}
|
|
|
|
/**
|
|
* We include stubs for each file inside this npm package in case you need to
|
|
* require those files directly. Feel free to delete any files that aren't
|
|
* needed.
|
|
*/
|
|
declare module 'babel-traverse/lib/cache' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/context' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/hub' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/index' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/ancestry' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/comments' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/context' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/conversion' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/evaluation' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/family' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/index' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/inference/index' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/inference/inferer-reference' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/inference/inferers' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/introspection' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/lib/hoister' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/lib/removal-hooks' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/lib/virtual-types' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/modification' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/removal' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/path/replacement' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/scope/binding' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/scope/index' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/scope/lib/renamer' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
declare module 'babel-traverse/lib/visitors' {
|
|
declare module.exports: any;
|
|
}
|
|
|
|
// Filename aliases
|
|
declare module 'babel-traverse/lib/cache.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/cache'>;
|
|
}
|
|
declare module 'babel-traverse/lib/context.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/context'>;
|
|
}
|
|
declare module 'babel-traverse/lib/hub.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/hub'>;
|
|
}
|
|
declare module 'babel-traverse/lib/index.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/index'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/ancestry.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/ancestry'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/comments.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/comments'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/context.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/context'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/conversion.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/conversion'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/evaluation.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/evaluation'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/family.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/family'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/index.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/index'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/inference/index.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/inference/index'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/inference/inferer-reference.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/inference/inferer-reference'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/inference/inferers.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/inference/inferers'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/introspection.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/introspection'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/lib/hoister.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/lib/hoister'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/lib/removal-hooks.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/lib/removal-hooks'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/lib/virtual-types.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/lib/virtual-types'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/modification.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/modification'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/removal.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/removal'>;
|
|
}
|
|
declare module 'babel-traverse/lib/path/replacement.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/path/replacement'>;
|
|
}
|
|
declare module 'babel-traverse/lib/scope/binding.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/scope/binding'>;
|
|
}
|
|
declare module 'babel-traverse/lib/scope/index.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/scope/index'>;
|
|
}
|
|
declare module 'babel-traverse/lib/scope/lib/renamer.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/scope/lib/renamer'>;
|
|
}
|
|
declare module 'babel-traverse/lib/visitors.js' {
|
|
declare module.exports: $Exports<'babel-traverse/lib/visitors'>;
|
|
}
|