Skip to content

Commit

Permalink
Merge branch '7.0'
Browse files Browse the repository at this point in the history
* 7.0: (37 commits)
  resolved conflicts
  [7.0] Switch decorators-legacy to decorators in the Stage 1 Preset (babel#5318) (babel#5319)
  [7.0] Replacing current decorators with decorators-legacy (babel#5290)
  Add Node 7 to CI (babel#5165)
  [7.0] remove standalone babel package (babel#5293)
  .gitignore for test [skip ci]
  update yarn
  use lerna@2-beta.37 (babel#5254)
  [7.0] Run Babel's unittests in a custom sandbox (take 2). (babel#5263)
  [7.0] Remove quotes option (babel#5154)
  [7.0] List babylon plugins instead of * in babel-generator tests (babel#5231)
  Remove babel-runtime from packages' dependencies (babel#5218)
  Bump `detect-indent`. (babel#5226)
  [7.0] Add legacy-decorators to stage-1. Fixes babel#5220 (babel#5225)
  [7.0] Use lerna's --independent mode + changes (fixes babel#5221)
  [7.0] Bump `home-or-tmp` for `babel-register`. (babel#5189)
  [7.0] Added yarn.lock (babel#5175)
  [7.0] Remove old babel-runtime code (babel#5187)
  [7.0] Drop support for Node 5 (babel#5186)
  Remove path-is-absolute in favor of builtin path.isAbsolute (babel#5179)
  ...
  • Loading branch information
hulkish committed May 2, 2017
2 parents a615a00 + a770716 commit a503ca9
Show file tree
Hide file tree
Showing 194 changed files with 6,780 additions and 931 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ git:
sudo: false
language: node_js
cache:
yarn: true
directories:
- node_modules
node_js:
- '7'
- '6'
- '5'
- '4'
- '0.12'

env:
- JOB=test
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Feel free to check out the `#discussion`/`#development` channels on our [slack](

**Note:** Versions `< 5.1.10` can't be built.

Babel is built for node 0.10 and up but we develop using node 6. Make sure you are on npm 3.
Babel is built for node 4 and up but we develop using node 6. Make sure you are on npm 3.

You can check this with `node -v` and `npm -v`.

Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ publish:

bootstrap:
make clean-all
npm install
yarn
./node_modules/.bin/lerna bootstrap
make build
cd packages/babel-runtime; \
npm install; \
node scripts/build-dist.js
10 changes: 9 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
machine:
node:
version:
0.10.46
6

dependencies:
pre:
- curl -o- -L https://yarnpkg.com/install.sh | bash
cache_directories:
- ~/.yarn-cache
override:
- yarn

test:
override:
Expand Down
5 changes: 2 additions & 3 deletions doc/design/compiler-environment-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

**NOTE:** Compiler support does not dictate the runtime requirements of compiled code.

## Supported environments
## Officially supported environments

The Babel compiler is **only** supported in these environments:

- Modern browsers such as Chrome, Firefox, Safari, Edge etc.
- Node 0.10+
- Node.js 4 and upper versions

## Unsupported environments

Expand All @@ -17,7 +17,6 @@ to:
- Rhino
- Nashorn
- Internet Explorer
- ...

**NOTE:** If Babel works in any of the unsupported environments, it is purely
coincidental and has no bearing on future compatibility. Use at your own risk.
8 changes: 3 additions & 5 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lerna": "2.0.0-beta.23",
"version": "6.24.0",
"lerna": "2.0.0-beta.37",
"version": "independent",
"changelog": {
"repo": "babel/babel",
"labels": {
Expand All @@ -13,9 +13,7 @@
"tag: internal": ":house: Internal"
}
},
"bootstrapConfig": {
"ignore": "babel-runtime"
},
"cacheDir": ".changelog",
"publishConfig": {
"ignore": [
"*.md",
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
"babel-plugin-istanbul": "^2.0.1",
"babel-plugin-transform-class-properties": "^6.6.0",
"babel-plugin-transform-flow-strip-types": "^6.3.13",
"babel-plugin-transform-runtime": "^6.3.13",
"babel-preset-es2015": "^6.13.2",
"babel-preset-stage-0": "^6.0.0",
"babel-register": "^6.14.0",
"babel-runtime": "^6.0.0",
"browserify": "^13.1.1",
"bundle-collapser": "^1.2.1",
"chai": "^3.5.0",
Expand All @@ -36,7 +34,7 @@
"gulp-plumber": "^1.0.1",
"gulp-util": "^3.0.7",
"gulp-watch": "^4.3.5",
"lerna": "2.0.0-beta.23",
"lerna": "2.0.0-beta.37",
"lerna-changelog": "^0.2.0",
"lodash": "^4.2.0",
"mocha": "^3.0.0",
Expand All @@ -63,8 +61,6 @@
"stage-0"
],
"plugins": [
"./scripts/add-module-exports",
"transform-runtime",
"transform-class-properties",
"transform-flow-strip-types"
],
Expand Down
2 changes: 0 additions & 2 deletions packages/babel-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
"babel-core": "^6.24.0",
"babel-register": "^6.24.0",
"babel-polyfill": "^6.23.0",
"babel-runtime": "^6.22.0",
"commander": "^2.8.1",
"convert-source-map": "^1.1.0",
"fs-readdir-recursive": "^1.0.0",
"glob": "^7.0.0",
"lodash": "^4.2.0",
"output-file-sync": "^1.1.0",
"path-is-absolute": "^1.0.0",
"slash": "^1.0.0",
"source-map": "^0.5.0",
"v8flags": "^2.0.10"
Expand Down
3 changes: 1 addition & 2 deletions packages/babel-cli/src/_babel-node.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pathIsAbsolute from "path-is-absolute";
import commander from "commander";
import Module from "module";
import { inspect } from "util";
Expand Down Expand Up @@ -123,7 +122,7 @@ if (program.eval || program.print) {

// make the filename absolute
const filename = args[0];
if (!pathIsAbsolute(filename)) args[0] = path.join(process.cwd(), filename);
if (!path.isAbsolute(filename)) args[0] = path.join(process.cwd(), filename);

// add back on node and concat the sliced args
process.argv = ["node"].concat(args);
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-core/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("./lib/api/node.js");
module.exports = require("./lib/index.js");
4 changes: 1 addition & 3 deletions packages/babel-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
"babel-helpers": "^6.23.0",
"babel-messages": "^6.23.0",
"babel-template": "^6.23.0",
"babel-runtime": "^6.22.0",
"babel-register": "^6.24.0",
"babel-register": "^6.23.0",
"babel-traverse": "^6.23.1",
"babel-types": "^6.23.0",
"babylon": "^6.11.0",
Expand All @@ -41,7 +40,6 @@
"json5": "^0.5.0",
"lodash": "^4.2.0",
"minimatch": "^3.0.2",
"path-is-absolute": "^1.0.0",
"private": "^0.1.6",
"slash": "^1.0.0",
"source-map": "^0.5.0"
Expand Down
4 changes: 1 addition & 3 deletions packages/babel-core/register.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
/* eslint max-len: 0 */
// TODO: eventually deprecate this console.trace("use the `babel-register` package instead of `babel-core/register`");
module.exports = require("babel-register");
throw new Error("`babel-core/register` has been moved to `babel-register`.");
112 changes: 0 additions & 112 deletions packages/babel-core/src/api/browser.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import fs from "fs";

export { default as File } from "../transformation/file";
export { default as options } from "../transformation/file/options/config";
export { default as buildExternalHelpers } from "../tools/build-external-helpers";
export { default as File } from "./transformation/file";
export { default as options } from "./transformation/file/options/config";
export { default as buildExternalHelpers } from "./tools/build-external-helpers";
export { default as template } from "babel-template";
export { default as resolvePlugin } from "../helpers/resolve-plugin";
export { default as resolvePreset } from "../helpers/resolve-preset";
export { version } from "../../package";
export { default as resolvePlugin } from "./helpers/resolve-plugin";
export { default as resolvePreset } from "./helpers/resolve-preset";
export { version } from "../package";

import * as util from "../util";
import * as util from "./util";
export { util };

import * as messages from "babel-messages";
Expand All @@ -20,14 +20,14 @@ export { t as types };
import traverse from "babel-traverse";
export { traverse };

import OptionManager from "../transformation/file/options/option-manager";
import OptionManager from "./transformation/file/options/option-manager";
export { OptionManager };

export function Plugin(alias) {
throw new Error(`The (${alias}) Babel 5 plugin is being run with Babel 6.`);
}

import Pipeline from "../transformation/pipeline";
import Pipeline from "./transformation/pipeline";
export { Pipeline };

const pipeline = new Pipeline;
Expand Down
24 changes: 13 additions & 11 deletions packages/babel-core/src/store.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
export default class Store extends Map {
export default class Store {
constructor() {
super();
this.dynamicData = {};
this._map = new Map();
this._map.dynamicData = {};
}

dynamicData: Object;

setDynamic(key, fn) {
this.dynamicData[key] = fn;
this._map.dynamicData[key] = fn;
}

set(key: string, val) {
this._map.set(key, val);
}

get(key: string): any {
if (this.has(key)) {
return super.get(key);
if (this._map.has(key)) {
return this._map.get(key);
} else {
if (Object.prototype.hasOwnProperty.call(this.dynamicData, key)) {
const val = this.dynamicData[key]();
this.set(key, val);
if (Object.prototype.hasOwnProperty.call(this._map.dynamicData, key)) {
const val = this._map.dynamicData[key]();
this._map.set(key, val);
return val;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import type Logger from "../logger";
import resolve from "../../../helpers/resolve";
import json5 from "json5";
import isAbsolute from "path-is-absolute";
import path from "path";
import fs from "fs";

Expand Down Expand Up @@ -50,7 +49,7 @@ class ConfigChainBuilder {
findConfigs(loc) {
if (!loc) return;

if (!isAbsolute(loc)) {
if (!path.isAbsolute(loc)) {
loc = path.join(process.cwd(), loc);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as context from "../../../api/node";
import * as context from "../../../index";
import type Logger from "../logger";
import Plugin from "../../plugin";
import * as messages from "babel-messages";
Expand Down
7 changes: 0 additions & 7 deletions packages/babel-core/test/_browser.js

This file was deleted.

0 comments on commit a503ca9

Please sign in to comment.