109 Commits

Author SHA1 Message Date
Logan Smyth
158e9fbfd7 Represent helpers as simple modules. 2017-09-12 22:15:16 -07:00
Logan Smyth
1e750a945c Convert CommonJS to use new shared implementation. 2017-09-12 17:17:41 -07:00
Henry Zhu
1c13250807 v7.0.0-beta.0 2017-09-11 23:01:41 -04:00
Ben Newman
c4f6a7a06f Add failing test case for object rest after array rest, and fix it. (#6213)
* Add failing test case for object rest after array rest.

Discovered while upgrading https://github.com/meteor/babel to Babel 7.

The error is:

  1) babel-plugin-transform-object-rest-spread/object rest with array rest:
     TypeError: /Users/ben/dev/babel/packages/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/with-array-rest/actual.js: Property id of VariableDeclarator expected node to be of a type ["LVal"] but instead got null
      at Object.validate (packages/babel-types/lib/definitions/index.js:73:13)
      at validate (packages/babel-types/lib/index.js:460:9)
      at Object.builder (packages/babel-types/lib/index.js:428:7)
      at Object.RestElement (packages/babel-plugin-transform-object-rest-spread/lib/index.js:157:41)
      at NodePath._call (packages/babel-traverse/lib/path/context.js:53:20)
      at NodePath.call (packages/babel-traverse/lib/path/context.js:40:17)
      at NodePath.visit (packages/babel-traverse/lib/path/context.js:84:12)
      ...

* Fix object rest following array rest. (#6213)

* Avoid treating array ...rest elements as object ...rest properties.

* Also avoid treating ...rest parameters as object ...rest properties.

Returning early if the parent was an ArrayPattern was not quite enough,
since a RestElement can appear as a parameter in a Function as well.

* Move RestElement parent check earlier in visitor method.
2017-09-11 11:16:14 -04:00
Henry Zhu
b82b65a31e v7.0.0-alpha.20 2017-08-30 15:02:49 -04:00
Justin Ridgewell
3e487f89ab Don't merge test options. (#6157)
* Don't merge test options.

Particularly, I don't want `lodash/merge` to merge my specific plugins
with the general test plugins. It led to odd behavior where I could
enable a loose transform in my specific test, just to have it overridden
by the test fixture's general options.

* Need options
2017-08-28 13:36:03 -06:00
Mateusz Burzyński
3c4f19a28d Adjusted Object Rest/Spread tests to use only allowed syntax from the latest spec (#6102) 2017-08-24 15:50:43 -04:00
Henry Zhu
79f4956948 v7.0.0-alpha.19 2017-08-07 18:21:08 -04:00
Brian Ng
9dd65c809f
fixes 2017-08-03 22:27:30 -05:00
Logan Smyth
d86ae2fb84
Remove _blockHoist usage from param processing. 2017-08-03 20:56:50 -05:00
Logan Smyth
18084db7cf
Fix an ordering bug in object-rest-spread. 2017-08-03 20:56:24 -05:00
Henry Zhu
79c6814d65 v7.0.0-alpha.18 2017-08-03 18:20:36 -04:00
Henry Zhu
0f823beeb1 Newlines in fixtures (#6044)
* write newlines for fixtures

* rerun fixtures
2017-08-02 15:35:29 -04:00
Henry Zhu
9322fd0458 v7.0.0-alpha.17 2017-07-26 08:38:44 -04:00
Henry Zhu
7f1cd44d60 v7.0.0-alpha.16 2017-07-25 17:35:35 -04:00
Peeyush Kushwaha
4a35243118 Non string computed keys in object-rest-spread (#5757) 2017-07-25 09:46:52 -05:00
Justin Ridgewell
63204ae51e Remove maybePopFromStatements (#5945)
It prevented you from pushing into the `params` of a function.

```js
fnpath.pushContainer("params", t.identifier("memo"))
```
2017-07-18 14:55:33 -04:00
Henry Zhu
a0f0411abf v7.0.0-alpha.15 2017-07-11 23:35:22 -04:00
Henry Zhu
03f249430a v7.0.0-alpha.14 2017-07-11 22:53:09 -04:00
Henry Zhu
8460b4c62f v7.0.0-alpha.13 2017-07-11 22:27:56 -04:00
Daniel Tschinder
b3372a572d Remove whitespace generation (#5833)
* Remove whitespace generation and rely on default printing

Changes to printing:
* Add newline after last empty SwitchCase
* Add newlines around block comments if they are non-flow comments or contain newlines

* Fix a few more fixtures
2017-06-27 21:57:02 -05:00
Brian Ng
e4b35f680d
Run prettier 2017-06-27 12:15:00 -05:00
Henry Zhu
123dce5fcd Hardcode to double quotes, indent to 2 spaces (#5824) 2017-06-05 22:14:37 -05:00
Henry Zhu
c5bad22767 v7.0.0-alpha.12 2017-05-31 17:11:39 -04:00
Henry Zhu
ce976bba2a v7.0.0-alpha.11 2017-05-31 16:43:30 -04:00
Henry Zhu
9b44cef691 v7.0.0-alpha.10 2017-05-25 15:17:07 -04:00
Brian Ng
32c4cdf016
339-spread-obj-pattern-assignable 2017-05-23 08:43:15 -05:00
Brian Ng
79c1eed8c1 Fix incorrect property ordering with obj rest spread on nested (#5685) 2017-05-02 14:04:37 -04:00
Christopher Karper
14ed03127c Fix object destructuring in param arrays (#5650) 2017-04-20 10:45:45 -04:00
Henry Zhu
62375cdf12 v7.0.0-alpha.9 2017-04-18 10:41:30 -04:00
Henry Zhu
25ae8c8554 v7.0.0-alpha.8 2017-04-17 15:12:31 -04:00
Henry Zhu
c732f5e1d0 v7.0.0-alpha.7 2017-04-05 17:13:26 -04:00
Henry Zhu
f3ef03abfd use caret for devDeps 2017-03-27 16:32:13 -04:00
Henry Zhu
7a1ccf076c Misc (#5545)
* normalize npmignores

* fixup eslint ignore, etc

* lint

* remove unused

* rm from gitignore

* use strict
2017-03-25 21:46:16 -04:00
Henry Zhu
ab68800e06 v7.0.0-alpha.3 2017-03-23 15:49:01 -04:00
Henry Zhu
230712e091 Internal: back to fixed, publish everything (#5436) 2017-03-08 22:56:00 -05:00
Brian Ng
0336cab757 Fix transform-object-rest-spread README [skip ci] (#5409) 2017-03-07 16:41:49 -05:00
Brian Ng
8a82cc060a Run new lint rules (#5413) 2017-03-04 10:46:01 -05:00
Henry Zhu
11e54a6bd3 v7.0.0-alpha.1 2017-03-02 16:04:47 -05:00
Henry Zhu
3ff77a61e4 Update babylon beta 3 (#5394)
* Update babylon to v7-beta.3

* convert RestProperty/SpreadProperty to RestElement/SpreadElement

* add virtual types to make it easier to upgrade
2017-02-28 16:58:19 -05:00
Henry Zhu
696e63c58b Merge pull request #5380 from babel/extra-do + 6.x commits 2017-02-25 18:48:27 -05:00
Sven SAULEAU
eb9d699ce9 style: [skip ci] lint code snippets in md (#5379) 2017-02-25 12:19:29 -05:00
Logan Smyth
4ee385e96c Avoid usage of exports/module.exports/require(). 2017-02-21 16:52:42 -08:00
Daniel Tschinder
28853bf190 Fix for-await printing (#5322)
Only the first for-await was correctly printed all subsequent for-await statements
where printed as for-of as the variable op was changed inside the buildForXStatement
2017-02-15 17:43:06 -05:00
Daniel Tschinder
7c62278dcd [7.0] Change for-await to use new AST (#5321) 2017-02-15 17:29:09 -05:00
Daniel Tschinder
6c03cb0783
Merge branch 'master' into merge-master
# Conflicts:
#	lerna.json
#	packages/babel-cli/package.json
#	packages/babel-core/package.json
#	packages/babel-generator/package.json
#	packages/babel-helper-builder-react-jsx/package.json
#	packages/babel-helper-function-name/package.json
#	packages/babel-helper-optimise-call-expression/package.json
#	packages/babel-helper-replace-supers/package.json
#	packages/babel-helper-transform-fixture-test-runner/package.json
#	packages/babel-helpers/package.json
#	packages/babel-plugin-transform-class-properties/package.json
#	packages/babel-plugin-transform-es2015-block-scoping/package.json
#	packages/babel-plugin-transform-es2015-classes/package.json
#	packages/babel-plugin-transform-es2015-modules-commonjs/package.json
#	packages/babel-plugin-transform-es2015-modules-systemjs/package.json
#	packages/babel-plugin-transform-es2015-modules-umd/package.json
#	packages/babel-plugin-transform-es2015-parameters/package.json
#	packages/babel-plugin-transform-react-jsx/package.json
#	packages/babel-register/package.json
#	packages/babel-template/package.json
#	packages/babel-traverse/package.json
#	packages/babel/package.json
2017-02-14 12:46:23 +01:00
Logan Smyth
48573f1fb4 v6.23.0 2017-02-13 17:14:12 -08:00
Henry Zhu
9083bd6283 Merge branch 'master' into 7.0 2017-02-09 18:36:02 -05:00
Logan Smyth
b845f2b69d Re-enable the max-len ESLint rule. (#5265) 2017-02-04 11:07:15 -05:00
Kai Cataldo
e09ea222c9 Remove babel-runtime from packages' dependencies (#5218) 2017-01-27 09:04:35 -05:00