This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: #2256 Differential Revision: D8850583 Pulled By: trueadm fbshipit-source-id: 2d2aaec25c6a1ccd1ec0c08c5e7e2a71f78ac2d8
- Loading branch information
1 parent
37d6924
commit e170c37
Showing
256 changed files
with
16,720 additions
and
2,158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ lib | |
underscore-with-tests.js | ||
flow-typed | ||
test/**/*.js | ||
babel.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* Copyright (c) 2017-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
|
||
module.exports = function (api) { | ||
api.cache(true); | ||
|
||
const plugins = [ | ||
"@babel/plugin-syntax-flow", | ||
"@babel/plugin-syntax-jsx", | ||
"@babel/plugin-transform-flow-strip-types", | ||
"@babel/plugin-transform-react-jsx", | ||
"@babel/plugin-transform-react-display-name", | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-proposal-object-rest-spread", | ||
]; | ||
|
||
// Webpack bundle | ||
if (process.env.NODE_ENV === "production") { | ||
return { | ||
presets: [ | ||
["@babel/env", { | ||
"targets": { | ||
"ie": "10", | ||
}, | ||
forceAllTransforms: true, | ||
}], | ||
"@babel/preset-flow", | ||
], | ||
plugins, | ||
}; | ||
} | ||
// Default | ||
return { | ||
presets: [ | ||
["@babel/env", { | ||
"targets": { | ||
"node": "6.10", | ||
} | ||
}], | ||
"@babel/preset-flow", | ||
], | ||
plugins, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// flow-typed signature: 88e150a250102d8b47b86c4a28175644 | ||
// flow-typed version: <<STUB>>/@babel/cli_v^7.0.0-beta.53/flow_v0.76.0 | ||
|
||
/** | ||
* This is an autogenerated libdef stub for: | ||
* | ||
* '@babel/cli' | ||
* | ||
* 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 | ||
*/ | ||
|
||
declare module '@babel/cli' { | ||
declare module.exports: any; | ||
} | ||
|
||
/** | ||
* 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/cli/bin/babel-external-helpers' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@babel/cli/bin/babel' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@babel/cli/lib/babel-external-helpers' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@babel/cli/lib/babel/dir' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@babel/cli/lib/babel/file' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@babel/cli/lib/babel/index' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@babel/cli/lib/babel/options' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@babel/cli/lib/babel/util' { | ||
declare module.exports: any; | ||
} | ||
|
||
// Filename aliases | ||
declare module '@babel/cli/bin/babel-external-helpers.js' { | ||
declare module.exports: $Exports<'@babel/cli/bin/babel-external-helpers'>; | ||
} | ||
declare module '@babel/cli/bin/babel.js' { | ||
declare module.exports: $Exports<'@babel/cli/bin/babel'>; | ||
} | ||
declare module '@babel/cli/index' { | ||
declare module.exports: $Exports<'@babel/cli'>; | ||
} | ||
declare module '@babel/cli/index.js' { | ||
declare module.exports: $Exports<'@babel/cli'>; | ||
} | ||
declare module '@babel/cli/lib/babel-external-helpers.js' { | ||
declare module.exports: $Exports<'@babel/cli/lib/babel-external-helpers'>; | ||
} | ||
declare module '@babel/cli/lib/babel/dir.js' { | ||
declare module.exports: $Exports<'@babel/cli/lib/babel/dir'>; | ||
} | ||
declare module '@babel/cli/lib/babel/file.js' { | ||
declare module.exports: $Exports<'@babel/cli/lib/babel/file'>; | ||
} | ||
declare module '@babel/cli/lib/babel/index.js' { | ||
declare module.exports: $Exports<'@babel/cli/lib/babel/index'>; | ||
} | ||
declare module '@babel/cli/lib/babel/options.js' { | ||
declare module.exports: $Exports<'@babel/cli/lib/babel/options'>; | ||
} | ||
declare module '@babel/cli/lib/babel/util.js' { | ||
declare module.exports: $Exports<'@babel/cli/lib/babel/util'>; | ||
} |
Oops, something went wrong.