Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport/fix/regenerator fixtures #6114

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,32 @@ _Note: Gaps between patch versions are faulty, broken or test releases._

See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.

## 6.25.0 (2017-06-08)

Just backporting a few things.

#### :rocket: New Feature
* `babel-plugin-transform-react-display-name`
* [#5780](https://github.com/babel/babel/pull/5780) Backport support for createReactClass with transform-react-display-name. ([@kentor](https://github.com/kentor))
* [#5554](https://github.com/babel/babel/pull/5554) Updated transform-react-display-name for createReactClass addon. ([@bvaughn](https://github.com/bvaughn))
* `babel-generator`, `babel-plugin-transform-flow-strip-types`, `babel-types`
* [#5653](https://github.com/babel/babel/pull/5653) Port flow object spread from #418 to 6.x. ([@kittens](https://github.com/kittens))

#### :bug: Bug Fix
* `babel-types`
* [#5770](https://github.com/babel/babel/pull/5770) Backport array & object pattern fixes to 6.x. ([@citycide](https://github.com/citycide))

#### :nail_care: Polish
* `babel-traverse`
* [#5615](https://github.com/babel/babel/pull/5615) Update deprecation warning on flow bindings. ([@kassens](https://github.com/kassens))

#### Committers: 5
- Bo Lingen ([citycide](https://github.com/citycide))
- Brian Vaughn ([bvaughn](https://github.com/bvaughn))
- Jan Kassens ([kassens](https://github.com/kassens))
- Kenneth Chung ([kentor](https://github.com/kentor))
- Sebastian McKenzie ([kittens](https://github.com/kittens))

## 6.24.0 (2017-03-13)

A quick release for 2 features:
Expand Down
16 changes: 9 additions & 7 deletions lerna.json
@@ -1,6 +1,6 @@
{
"lerna": "2.0.0-beta.23",
"version": "6.24.0",
"lerna": "2.0.0-beta.38",
"version": "6.25.0",
"changelog": {
"repo": "babel/babel",
"labels": {
Expand All @@ -16,10 +16,12 @@
"bootstrapConfig": {
"ignore": "babel-runtime"
},
"publishConfig": {
"ignore": [
"*.md",
"test/**"
]
"commands": {
"publish": {
"ignore": [
"*.md",
"test/**"
]
}
}
}
6 changes: 3 additions & 3 deletions packages/babel-cli/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-cli",
"version": "6.24.0",
"version": "6.24.1",
"description": "Babel command line.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
Expand All @@ -16,8 +16,8 @@
"compiler"
],
"dependencies": {
"babel-core": "^6.24.0",
"babel-register": "^6.24.0",
"babel-core": "^6.24.1",
"babel-register": "^6.24.1",
"babel-polyfill": "^6.23.0",
"babel-runtime": "^6.22.0",
"commander": "^2.8.1",
Expand Down
18 changes: 9 additions & 9 deletions packages/babel-core/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-core",
"version": "6.24.0",
"version": "6.25.0",
"description": "Babel compiler core.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
Expand All @@ -27,15 +27,15 @@
},
"dependencies": {
"babel-code-frame": "^6.22.0",
"babel-generator": "^6.24.0",
"babel-helpers": "^6.23.0",
"babel-generator": "^6.25.0",
"babel-helpers": "^6.24.1",
"babel-messages": "^6.23.0",
"babel-template": "^6.23.0",
"babel-template": "^6.25.0",
"babel-runtime": "^6.22.0",
"babel-register": "^6.24.0",
"babel-traverse": "^6.23.1",
"babel-types": "^6.23.0",
"babylon": "^6.11.0",
"babel-register": "^6.24.1",
"babel-traverse": "^6.25.0",
"babel-types": "^6.25.0",
"babylon": "^6.17.2",
"convert-source-map": "^1.1.0",
"debug": "^2.1.1",
"json5": "^0.5.0",
Expand All @@ -48,7 +48,7 @@
},
"devDependencies": {
"babel-helper-fixtures": "^6.22.0",
"babel-helper-transform-fixture-test-runner": "^6.24.0",
"babel-helper-transform-fixture-test-runner": "^6.24.1",
"babel-polyfill": "^6.23.0"
}
}
Expand Up @@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var foo = function () {
var _ref2 = _asyncToGenerator(regeneratorRuntime.mark(function _callee3() {
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
var bar = function () {
var _ref3 = _asyncToGenerator(regeneratorRuntime.mark(function _callee2() {
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
var baz;
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {
Expand Down Expand Up @@ -58,7 +58,7 @@ var Foo = function () {
_createClass(Foo, [{
key: "bar",
value: function () {
var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee() {
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
var baz;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
Expand All @@ -85,4 +85,4 @@ var Foo = function () {
return Foo;
}();

exports.default = Foo;
exports.default = Foo;
6 changes: 3 additions & 3 deletions packages/babel-generator/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-generator",
"version": "6.24.0",
"version": "6.25.0",
"description": "Turns an AST into code.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
Expand All @@ -13,7 +13,7 @@
"dependencies": {
"babel-messages": "^6.23.0",
"babel-runtime": "^6.22.0",
"babel-types": "^6.23.0",
"babel-types": "^6.25.0",
"detect-indent": "^4.0.0",
"jsesc": "^1.3.0",
"lodash": "^4.2.0",
Expand All @@ -22,6 +22,6 @@
},
"devDependencies": {
"babel-helper-fixtures": "^6.22.0",
"babylon": "^6.11.0"
"babylon": "^6.17.2"
}
}
5 changes: 5 additions & 0 deletions packages/babel-generator/src/generators/flow.js
Expand Up @@ -333,6 +333,11 @@ export function ObjectTypeProperty(node: Object) {
this.print(node.value, node);
}

export function ObjectTypeSpreadProperty(node: Object) {
this.token("...");
this.print(node.argument, node);
}

export function QualifiedTypeIdentifier(node: Object) {
this.print(node.qualification, node);
this.token(".");
Expand Down
8 changes: 4 additions & 4 deletions packages/babel-generator/src/index.js
Expand Up @@ -99,7 +99,7 @@ function findCommonStringDelimiter(code, tokens) {
return DEFAULT_STRING_DELIMITER;
}

const occurences = {
const occurrences = {
single: 0,
double: 0
};
Expand All @@ -112,15 +112,15 @@ function findCommonStringDelimiter(code, tokens) {

const raw = code.slice(token.start, token.end);
if (raw[0] === "'") {
occurences.single++;
occurrences.single++;
} else {
occurences.double++;
occurrences.double++;
}

checked++;
if (checked >= 3) break;
}
if (occurences.single > occurences.double) {
if (occurrences.single > occurrences.double) {
return "single";
} else {
return "double";
Expand Down
@@ -0,0 +1,7 @@
type U = {};
type V = {};
type T = { ...U, };
type T = { ...U, ...V };
type T = { p: V, ...U };
type T = { ...U, p: V, };
type T = { ...{}|{ p: V, }};
@@ -0,0 +1,7 @@
type U = {};
type V = {};
type T = { ...U };
type T = { ...U; ...V; };
type T = { p: V; ...U; };
type T = { ...U; p: V; };
type T = { ...{} | { p: V } };
6 changes: 3 additions & 3 deletions packages/babel-helper-bindify-decorators/package.json
@@ -1,13 +1,13 @@
{
"name": "babel-helper-bindify-decorators",
"version": "6.22.0",
"version": "6.24.1",
"description": "Helper function to bindify decorators",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-bindify-decorators",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-runtime": "^6.22.0",
"babel-traverse": "^6.22.0",
"babel-types": "^6.22.0"
"babel-traverse": "^6.24.1",
"babel-types": "^6.24.1"
}
}
@@ -1,13 +1,13 @@
{
"name": "babel-helper-builder-binary-assignment-operator-visitor",
"version": "6.22.0",
"version": "6.24.1",
"description": "Helper function to build binary assignment operator visitors",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-builder-binary-assignment-operator-visitor",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-helper-explode-assignable-expression": "^6.22.0",
"babel-helper-explode-assignable-expression": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-types": "^6.22.0"
"babel-types": "^6.24.1"
}
}
@@ -1,13 +1,13 @@
{
"name": "babel-helper-builder-conditional-assignment-operator-visitor",
"version": "6.22.0",
"version": "6.24.1",
"description": "Helper function to build conditional assignment operator visitors",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-builder-conditional-assignment-operator-visitor",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-helper-explode-assignable-expression": "^6.22.0",
"babel-helper-explode-assignable-expression": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-types": "^6.22.0"
"babel-types": "^6.24.1"
}
}
4 changes: 2 additions & 2 deletions packages/babel-helper-builder-react-jsx/package.json
@@ -1,13 +1,13 @@
{
"name": "babel-helper-builder-react-jsx",
"version": "6.23.0",
"version": "6.24.1",
"description": "Helper function to build react jsx",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-builder-react-jsx",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-runtime": "^6.22.0",
"babel-types": "^6.23.0",
"babel-types": "^6.24.1",
"esutils": "^2.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/babel-helper-call-delegate/package.json
@@ -1,14 +1,14 @@
{
"name": "babel-helper-call-delegate",
"version": "6.22.0",
"version": "6.24.1",
"description": "Helper function to call delegate",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-call-delegate",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-traverse": "^6.22.0",
"babel-traverse": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-types": "^6.22.0",
"babel-helper-hoist-variables": "^6.22.0"
"babel-types": "^6.24.1",
"babel-helper-hoist-variables": "^6.24.1"
}
}
6 changes: 3 additions & 3 deletions packages/babel-helper-define-map/package.json
@@ -1,14 +1,14 @@
{
"name": "babel-helper-define-map",
"version": "6.23.0",
"version": "6.24.1",
"description": "Helper function to define a map",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-define-map",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-runtime": "^6.22.0",
"lodash": "^4.2.0",
"babel-types": "^6.23.0",
"babel-helper-function-name": "^6.23.0"
"babel-types": "^6.24.1",
"babel-helper-function-name": "^6.24.1"
}
}
@@ -1,13 +1,13 @@
{
"name": "babel-helper-explode-assignable-expression",
"version": "6.22.0",
"version": "6.24.1",
"description": "Helper function to explode an assignable expression",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-explode-assignable-expression",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-traverse": "^6.22.0",
"babel-traverse": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-types": "^6.22.0"
"babel-types": "^6.24.1"
}
}
8 changes: 4 additions & 4 deletions packages/babel-helper-explode-class/package.json
@@ -1,14 +1,14 @@
{
"name": "babel-helper-explode-class",
"version": "6.22.0",
"version": "6.24.1",
"description": "Helper function to explode class",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-explode-class",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-runtime": "^6.22.0",
"babel-traverse": "^6.22.0",
"babel-types": "^6.22.0",
"babel-helper-bindify-decorators": "^6.22.0"
"babel-traverse": "^6.24.1",
"babel-types": "^6.24.1",
"babel-helper-bindify-decorators": "^6.24.1"
}
}
10 changes: 5 additions & 5 deletions packages/babel-helper-function-name/package.json
@@ -1,15 +1,15 @@
{
"name": "babel-helper-function-name",
"version": "6.23.0",
"version": "6.24.1",
"description": "Helper function to change the property 'name' of every function",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-function-name",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"babel-runtime": "^6.22.0",
"babel-types": "^6.23.0",
"babel-traverse": "^6.23.0",
"babel-helper-get-function-arity": "^6.22.0",
"babel-template": "^6.23.0"
"babel-types": "^6.24.1",
"babel-traverse": "^6.24.1",
"babel-helper-get-function-arity": "^6.24.1",
"babel-template": "^6.24.1"
}
}