Skip to content

Commit

Permalink
6.0.0
Browse files Browse the repository at this point in the history
I'm extremely stupid and didn't commit as I go. To anyone reading this
I'm extremely sorry. A lot of these changes are very broad and I plan on
releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm
afraid I couldn't wait. If you're ever in London I'll buy you a beer
(or assorted beverage!) to make up for it, also I'll kiss your feet and
give you a back massage, maybe.
  • Loading branch information
sebmck committed Oct 29, 2015
1 parent 3974dd7 commit ae7d536
Show file tree
Hide file tree
Showing 1,501 changed files with 16,381 additions and 19,690 deletions.
14 changes: 14 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[ignore]

[include]

[libs]
lib/file.js
lib/parser.js
lib/types.js

[options]
strip_root=true

[version]
0.16.0
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ watch: clean

lint:
node node_modules/.bin/eslint packages/*/src
#flow check

clean: test-clean
rm -rf coverage
rm -rf packages/*/lib packages/babel-core/templates.json

test-clean:
rm -rf packages/*/test/tmp
Expand All @@ -45,7 +45,7 @@ publish:
make test
node scripts/publish.js
make clean
./scripts/build-website.sh
#./scripts/build-website.sh

bootstrap:
npm install
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.8.23
5.8.33
9 changes: 9 additions & 0 deletions doc/design/compiler-assumptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Compiler assumptions

Babel and it's associated official transforms make some assumptions about your code. These
assumptions are only made as they're either **impossible** to take into consideration or
are extremely exotic.

- `undefined`, `NaN` and `Infinity` have not been externally redefined.
- Built-in objects such as `Object`, `Array`, `String`, `Number`, `Boolean` etc have not been redefined.
- Standard methods on built-ins have not been redefined in a way that breaks the original contract.
Empty file.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
"babel": "5.8.21",
"babel-eslint": "^4.0.6",
"babel-plugin-flow-comments": "^1.0.9",
"browserify": "^11.0.0",
"browserify": "^11.2.0",
"bundle-collapser": "^1.2.1",
"chai": "^2.2.0",
"chalk": "^1.1.0",
"derequire": "^2.0.2",
"es5-shim": "^4.1.7",
"eslint": "^1.1.0",
"fs-readdir-recursive": "^0.1.2",
Expand Down Expand Up @@ -81,7 +82,8 @@
"no-process-exit": 0,
"camelcase": 0,
"no-console": 0,
"no-constant-condition": 0
"no-constant-condition": 0,
"no-inner-declarations": 0
},
"env": {
"node": true
Expand Down
87 changes: 1 addition & 86 deletions packages/README.md
Original file line number Diff line number Diff line change
@@ -1,88 +1,3 @@
# Woah, what's going on here?

A monorepo, muhahahahahaha. See the [monorepo design doc](/doc/design/monorepo.md) for reasoning. Here's an explanation for each package listed:

## `babylon`

## `babel-core`

#### `babel-cli`

#### `babel-types`

#### `babel-code-frame`

#### `babel-messages`

#### `babel-polyfill`

#### `babel-runtime`

#### `babel-traverse`

#### `babel-plugin-*`

- `babel-plugin-auxiliary-comments`
- `babel-plugin-external-helpers`
- `babel-plugin-transform-async-functions`
- `babel-plugin-transform-async-to-bluebird-coroutines`
- `babel-plugin-transform-async-to-generator`
- `babel-plugin-transform-class-properties`
- `babel-plugin-transform-comprehensions`
- `babel-plugin-transform-constant-folding`
- `babel-plugin-transform-dead-code-elimination`
- `babel-plugin-transform-decorators`
- `babel-plugin-transform-do-expressions`
- `babel-plugin-transform-es2015-arrow-functions`
- `babel-plugin-transform-es2015-block-scoped-functions`
- `babel-plugin-transform-es2015-block-scoping`
- `babel-plugin-transform-es2015-classes`
- `babel-plugin-transform-es2015-computed-properties`
- `babel-plugin-transform-es2015-constants`
- `babel-plugin-transform-es2015-destructuring`
- `babel-plugin-transform-es2015-for-of`
- `babel-plugin-transform-es2015-function-name`
- `babel-plugin-transform-es2015-literals`
- `babel-plugin-transform-es2015-modules-amd`
- `babel-plugin-transform-es2015-modules-commonjs`
- `babel-plugin-transform-es2015-modules-systemjs`
- `babel-plugin-transform-es2015-modules-umd`
- `babel-plugin-transform-es2015-object-super`
- `babel-plugin-transform-es2015-parameters`
- `babel-plugin-transform-es2015-shorthand-properties`
- `babel-plugin-transform-es2015-spread`
- `babel-plugin-transform-es2015-sticky-regex`
- `babel-plugin-transform-es2015-tail-call`
- `babel-plugin-transform-es2015-template-literals`
- `babel-plugin-transform-es2015-unicode-regex`
- `babel-plugin-transform-es3-member-expression-literals`
- `babel-plugin-transform-es3-property-literals`
- `babel-plugin-transform-es5-property-mutators`
- `babel-plugin-transform-eval`
- `babel-plugin-transform-exponentiation-operator`
- `babel-plugin-transform-export-extensions`
- `babel-plugin-transform-flow-strip-types`
- `babel-plugin-transform-function-bind`
- `babel-plugin-transform-inline-environment-variables`
- `babel-plugin-transform-jscript`
- `babel-plugin-transform-member-expression-literals`
- `babel-plugin-transform-merge-sibling-variables`
- `babel-plugin-transform-minify-booleans`
- `babel-plugin-transform-node-env-inline`
- `babel-plugin-transform-object-assign`
- `babel-plugin-transform-object-rest-spread`
- `babel-plugin-transform-object-set-prototype-of-to-assign`
- `babel-plugin-transform-property-literals`
- `babel-plugin-transform-proto-to-assign`
- `babel-plugin-transform-react-compat-jsx`
- `babel-plugin-transform-react-constant-elements`
- `babel-plugin-transform-react-display-name`
- `babel-plugin-transform-react-inline-elements`
- `babel-plugin-transform-react-jsx`
- `babel-plugin-transform-remove-console`
- `babel-plugin-transform-remove-debugger`
- `babel-plugin-transform-runtime`
- `babel-plugin-transform-simplify-comparison-operators`
- `babel-plugin-transform-trailing-function-commas`
- `babel-plugin-transform-undeclared-variables-check`
- `babel-plugin-transform-undefined-to-void`
A monorepo, muhahahahahaha. See the [monorepo design doc](/doc/design/monorepo.md) for reasoning.
2 changes: 1 addition & 1 deletion packages/babel-cli/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("babel-core");
throw new Error("Use the `babel-core` package not `babel`.");
20 changes: 10 additions & 10 deletions packages/babel-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "babel",
"version": "5.8.23",
"name": "babel-cli",
"version": "5.10.32",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"author": "Sebastian McKenzie <[email protected]>",
"homepage": "https://babeljs.io/",
"license": "MIT",
"repository": "babel/babel",
"preferGlobal": true,
"dependencies": {
"babel-core": "^5.6.21",
"babel-polyfill": "^5.0.0",
"babel-core": "^5.10.32",
"babel-polyfill": "^5.10.32",
"chokidar": "^1.0.0",
"commander": "^2.6.0",
"commander": "^2.8.1",
"convert-source-map": "^1.1.0",
"fs-readdir-recursive": "^0.1.0",
"glob": "^5.0.5",
Expand All @@ -20,13 +20,13 @@
"path-exists": "^1.0.0",
"path-is-absolute": "^1.0.0",
"slash": "^1.0.0",
"source-map": "^0.4.0",
"v8flags": "^2.0.10"
"source-map": "^0.5.0",
"v8flags": "^2.0.10",
"babel-runtime": "^5.10.32"
},
"bin": {
"babel": "./bin/babel.js",
"babel-node": "./bin/babel-node.js",
"babel-external-helpers": "./bin/babel-external-helpers.js",
"babel-plugin": "./bin/babel-plugin.js"
"babel-external-helpers": "./bin/babel-external-helpers.js"
}
}
}
36 changes: 17 additions & 19 deletions packages/babel-cli/src/_babel-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ let program = new commander.Command("babel-node");

program.option("-e, --eval [script]", "Evaluate script");
program.option("-p, --print [code]", "Evaluate script and print result");
program.option("-i, --ignore [regex]", "Ignore all files that match this regex when using the require hook");
program.option("-o, --only [globs]", "");
program.option("-i, --ignore [globs]", "");
program.option("-x, --extensions [extensions]", "List of extensions to hook into [.es6,.js,.es,.jsx]");
program.option("-w, --plugins [string]", "TODO", util.list);
program.option("-b, --presets [string]", "TODO", util.list);
program.option("-w, --plugins [string]", "", util.list);
program.option("-b, --presets [string]", "", util.list);

let pkg = require("../package.json");
program.version(pkg.version);
Expand All @@ -28,24 +29,24 @@ program.parse(process.argv);
//

register({
extensions: program.extensions,
optional: program.optional,
ignore: program.ignore,
plugins: program.plugins,
presets: program.presets,
extensions: program.extensions,
ignore: program.ignore,
only: program.only,
plugins: program.plugins,
presets: program.presets,
});

//

let replPlugin = new babel.Plugin("repl", {
let replPlugin = () => ({
visitor: {
ModuleDeclaration() {
throw this.errorWithNode("Modules aren't supported in the REPL");
ModuleDeclaration(path) {
throw path.buildCodeFrameError("Modules aren't supported in the REPL");
},

VariableDeclaration(node) {
if (node.kind !== "var") {
throw this.errorWithNode("Only `var` variables are supported in the REPL");
VariableDeclaration(path) {
if (path.node.kind !== "var") {
throw path.buildCodeFrameError("Only `var` variables are supported in the REPL");
}
}
}
Expand All @@ -59,11 +60,8 @@ let _eval = function (code, filename) {

code = babel.transform(code, {
filename: filename,
blacklist: program.blacklist,
whitelist: program.whitelist,
optional: program.optional,
stage: program.stage,
plugins: [replPlugin]
presets: program.presets,
plugins: (program.plugins || []).concat([replPlugin])
}).code;

return vm.runInThisContext(code, {
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-cli/src/babel-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (argSeparator > -1) {
babelArgs = babelArgs.slice(0, argSeparator);
}

getV8Flags(function (v8Flags) {
getV8Flags(function (err, v8Flags) {
babelArgs.forEach(function(arg){
let flag = arg.split("=")[0];

Expand Down
Loading

0 comments on commit ae7d536

Please sign in to comment.