8380 Commits

Author SHA1 Message Date
Zev Isert
2dd03e3ee9 Allow NodeJS v8.4 experimental HTTP2 (#6175)
* Allow NodeJS v8.4 experimental HTTP2

Native NodeJS HTTP/2 support experimental though, so might not be worth merging this

* Linter picked up on a line with only spaces

Removed the spaces
2017-09-02 00:42:45 +02:00
Logan Smyth
4f441ff27e Ignore the standalone output bundle so it will require() faster. 2017-09-01 15:31:29 -07:00
Justin Ridgewell
f7109658f9 Added --delete-dir-on-start option for babel (#6187)
* added --delete-dir-on-start option 

added --delete-dir-on-start-option to delete dir on start of compilation to remove deleted files from the orignial files from the --out-dir

* added option --delete-dir-on-start

added --delete-dir-on-start that option will delete the --out-dir before the compilation of code to remove the deleted files from the source from the out directory

* added --delete-dir-on-start option

added --delete-dir-on-start-option to delete dir on start of compilation to remove deleted files from the orignial files from the --out-dir

* bug removed deleting the correct dir

in the previous code, the source dir was deleted each time rather than deleting the out dir

* Remove shorthand

* Prevent babel-cli option from reaching babel-core

* Lint
2017-09-01 17:45:13 -04:00
Justin Ridgewell
f39811d271 Derived constructors don't always need a super (#6189) 2017-09-01 17:14:25 -04:00
Logan Smyth
fad9345c85 Revert Yarn workspace changes from #6056 for now.
Yarn currently fails to add the correct symlinks in some cases. See https://github.com/yarnpkg/yarn/issues/4289
2017-09-01 13:17:25 -07:00
Justin Ridgewell
1797ac5015 Update babylon and remove bad label tests (#6188) 2017-09-01 12:29:48 -04:00
Mateusz Burzyński
76161e0a73 Added new outputType - module - for build-external-helpers tool. Should help with tree-shaking story. It's strongly influenced by how the helpers are transformed by rollup-plugin-babel. (#5916) 2017-08-31 23:44:24 -04:00
Daniel Tschinder
ab30fa54cb Update debug to 3.0 (#6184) 2017-08-31 23:30:04 -04:00
Daniel Tschinder
44f6ff5e85 Update prettier, eslint + plugins, flow, husky and lint-staged (#6183) 2017-08-31 22:56:29 +02:00
Henry Zhu
6108bee4f9 update changelog labels [skip ci] 2017-08-31 15:59:05 -04:00
Daniel Tschinder
0189b38702
Merge branch '6.x' into 7.0
# Conflicts:
#	CONTRIBUTING.md
#	Makefile
#	README.md
#	lerna.json
#	lib/types.js
#	package.json
#	packages/babel-cli/package.json
#	packages/babel-code-frame/package.json
#	packages/babel-core/package.json
#	packages/babel-core/test/fixtures/transformation/misc/regression-2892/expected.js
#	packages/babel-generator/package.json
#	packages/babel-generator/src/generators/flow.js
#	packages/babel-generator/src/index.js
#	packages/babel-generator/test/fixtures/flow/declare-statements/expected.js
#	packages/babel-generator/test/fixtures/flow/object-literal-types/expected.js
#	packages/babel-generator/test/fixtures/flow/opaque-type-alias/expected.js
#	packages/babel-helper-bindify-decorators/package.json
#	packages/babel-helper-builder-binary-assignment-operator-visitor/package.json
#	packages/babel-helper-builder-conditional-assignment-operator-visitor/package.json
#	packages/babel-helper-builder-react-jsx/package.json
#	packages/babel-helper-call-delegate/package.json
#	packages/babel-helper-define-map/package.json
#	packages/babel-helper-explode-assignable-expression/package.json
#	packages/babel-helper-explode-class/package.json
#	packages/babel-helper-fixtures/package.json
#	packages/babel-helper-function-name/package.json
#	packages/babel-helper-get-function-arity/package.json
#	packages/babel-helper-hoist-variables/package.json
#	packages/babel-helper-optimise-call-expression/package.json
#	packages/babel-helper-plugin-test-runner/package.json
#	packages/babel-helper-regex/package.json
#	packages/babel-helper-remap-async-to-generator/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-async-generator-functions/package.json
#	packages/babel-plugin-transform-async-to-generator/package.json
#	packages/babel-plugin-transform-async-to-module-method/package.json
#	packages/babel-plugin-transform-class-constructor-call/package.json
#	packages/babel-plugin-transform-class-properties/package.json
#	packages/babel-plugin-transform-decorators/package.json
#	packages/babel-plugin-transform-es2015-block-scoping/package.json
#	packages/babel-plugin-transform-es2015-classes/package.json
#	packages/babel-plugin-transform-es2015-classes/test/fixtures/regression/T6755/expected.js
#	packages/babel-plugin-transform-es2015-computed-properties/package.json
#	packages/babel-plugin-transform-es2015-duplicate-keys/package.json
#	packages/babel-plugin-transform-es2015-function-name/package.json
#	packages/babel-plugin-transform-es2015-modules-amd/package.json
#	packages/babel-plugin-transform-es2015-modules-commonjs/package.json
#	packages/babel-plugin-transform-es2015-modules-commonjs/src/index.js
#	packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/interop/export-destructured/expected.js
#	packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/export-const-destructuring-object-default-params/expected.js
#	packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/export-const-destructuring-object-rest/expected.js
#	packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/export-const-destructuring-object/expected.js
#	packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/options.json
#	packages/babel-plugin-transform-es2015-modules-systemjs/package.json
#	packages/babel-plugin-transform-es2015-modules-umd/package.json
#	packages/babel-plugin-transform-es2015-object-super/package.json
#	packages/babel-plugin-transform-es2015-parameters/package.json
#	packages/babel-plugin-transform-es2015-shorthand-properties/package.json
#	packages/babel-plugin-transform-es2015-sticky-regex/package.json
#	packages/babel-plugin-transform-es2015-unicode-regex/package.json
#	packages/babel-plugin-transform-es5-property-mutators/package.json
#	packages/babel-plugin-transform-exponentiation-operator/package.json
#	packages/babel-plugin-transform-flow-comments/test/fixtures/flow-comments/opaque-type-alias/expected.js
#	packages/babel-plugin-transform-object-rest-spread/package.json
#	packages/babel-plugin-transform-object-rest-spread/src/index.js
#	packages/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-2/expected.js
#	packages/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested/expected.js
#	packages/babel-plugin-transform-proto-to-assign/package.json
#	packages/babel-plugin-transform-react-constant-elements/test/fixtures/constant-elements/regression-node-type-export-default/expected.js
#	packages/babel-plugin-transform-react-constant-elements/test/fixtures/constant-elements/regression-node-type-export/expected.js
#	packages/babel-plugin-transform-react-display-name/package.json
#	packages/babel-plugin-transform-react-display-name/src/index.js
#	packages/babel-plugin-transform-react-display-name/test/fixtures/display-name/assignment-expression/expected.js
#	packages/babel-plugin-transform-react-display-name/test/fixtures/display-name/nested/expected.js
#	packages/babel-plugin-transform-react-display-name/test/fixtures/display-name/object-property/expected.js
#	packages/babel-plugin-transform-react-display-name/test/fixtures/display-name/variable-declarator/expected.js
#	packages/babel-plugin-transform-react-jsx-compat/package.json
#	packages/babel-plugin-transform-react-jsx/package.json
#	packages/babel-plugin-transform-regenerator/package.json
#	packages/babel-plugin-transform-regenerator/test/fixtures/regression/6733/expected.js
#	packages/babel-plugin-transform-regenerator/test/fixtures/regression/T7041/expected.js
#	packages/babel-plugin-transform-regenerator/test/fixtures/variable-renaming/retain-lines/expected.js
#	packages/babel-plugin-transform-runtime/README.md
#	packages/babel-plugin-transform-runtime/test/fixtures/runtime/custom-runtime/expected.js
#	packages/babel-plugin-transform-runtime/test/fixtures/runtime/full/expected.js
#	packages/babel-plugin-transform-runtime/test/fixtures/runtime/regenerator-runtime/expected.js
#	packages/babel-plugin-transform-strict-mode/package.json
#	packages/babel-polyfill/package.json
#	packages/babel-preset-es2015/package.json
#	packages/babel-preset-es2016/package.json
#	packages/babel-preset-es2017/package.json
#	packages/babel-preset-latest/package.json
#	packages/babel-preset-react/package.json
#	packages/babel-preset-stage-0/package.json
#	packages/babel-preset-stage-1/package.json
#	packages/babel-preset-stage-2/package.json
#	packages/babel-preset-stage-3/package.json
#	packages/babel-register/README.md
#	packages/babel-register/package.json
#	packages/babel-runtime/package.json
#	packages/babel-template/package.json
#	packages/babel-traverse/package.json
#	packages/babel-traverse/src/scope/lib/renamer.js
#	packages/babel-traverse/test/evaluation.js
#	packages/babel-traverse/test/replacement.js
#	packages/babel-types/README.md
#	packages/babel-types/package.json
#	packages/babel-types/src/converters.js
#	packages/babel-types/src/definitions/core.js
#	packages/babel-types/src/definitions/es2015.js
#	packages/babel-types/src/definitions/flow.js
#	packages/babel-types/test/converters.js
#	packages/babel-types/test/validators.js
#	scripts/generate-interfaces.js
#	yarn.lock
2017-08-31 17:44:17 +02:00
Henry Zhu
b82b65a31e v7.0.0-alpha.20 v7.0.0-alpha.20 2017-08-30 15:02:49 -04:00
Justin Ridgewell
5e7fce3fe0 Update babylon (#6172) 2017-08-30 00:19:36 -04:00
Brandon Max
84580cc2d1 Refactor es2015-loose and es2015-no-commonjs presets to use preset op… (#6168) 2017-08-30 00:02:54 -04:00
Noah Lemen
d70603ffa9 re-add template literals tests, add ones that were missing (#6169) 2017-08-29 21:06:05 -04:00
Logan Smyth
d79a7920a1 Merge pull request #5586 from loganfsmyth/config-dependency-cycles
Handle cycles of plugins compiling themselves and .babelrc.js files loading themselves
2017-08-29 15:11:51 -07:00
Logan Smyth
2846e06db1 Add dependency cycle handing for plugins and config files. 2017-08-29 14:57:34 -07:00
Logan Smyth
beff7809ea Add debug() calls for config loading. 2017-08-29 14:57:33 -07:00
Henry Zhu
0a4f1b0a6e update babylon beta.22 (#6167) 2017-08-29 17:53:29 -04:00
Buu Nguyen
75861fac87 Fix bug replacement nodes not requeued (#5743) 2017-08-28 15:10:00 -06:00
Artem Yavorsky
b2b3d7944a Spec compatibility for iteratorClose condition. (#6094)
* for-of: IteratorClose spec compatibility.

See #3:
https://tc39.github.io/ecma262/#sec-iteratorclose

* Update spec fixtures for for-of.

* Fix IteratorClose case for remap-async-to-generator.

* Fix IteratorClose case for async-generator-function test output.

* Modify few tests according to iteratorClose fix.

* Fix iteratorClose for helpers.slicedToArray also.

* Update iteratorClose fixture for commonjs.
2017-08-28 13:39:02 -06:00
Henry Zhu
827d84536a Merge pull request #6156 from jridgewell/pr/5502
Fix overshadowing local binding
2017-08-28 13:38:21 -06: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
Noah Lemen
40805894c5 default to spec mode for template literal transform (#6098)
* spec/loose/default switch for template literal transform, update/re-org tests

* update readme

* flip if statements

* consolidate else/if

* readme wording modification, updates to examples
2017-08-28 12:57:09 -06:00
Henry Zhu
95dd16aeeb Merge pull request #6159 from jridgewell/pr/3701
Allow native Symbols as computed property names
2017-08-28 12:50:10 -06:00
Justin Ridgewell
ac6eda2709 Class instance properties define their own context (#6158) 2017-08-28 12:47:17 -06:00
Oliver Don
960151c876 Fix #4840: Alias class prototype for methods in loose mode (#5560)
* Fix #4840: Alias class prototype for methods in loose mode

* Cleanup
2017-08-26 21:15:45 -04:00
Justin Ridgewell
7795750862 Tests 2017-08-25 22:52:17 -04:00
Adam Miller
2d8fdf3045 Allow native Symbols as computed property names (#6705)
The for-in loop in helpers.defineEnumerableProperties doesn't iterate over Symbols.
If Object.getOwnPropertySymbols exists, include the discovered values when defining properties.
2017-08-25 22:33:51 -04:00
Justin Ridgewell
a70cda812c Remove old test 2017-08-25 19:52:15 -04:00
Justin Ridgewell
4b297907d1 Move fix into #checkBlockScopedCollisions 2017-08-25 19:23:11 -04:00
Moti Zilberman
48c114169f Move up check for binding kind "local"
This puts the check before the call to `checkBlockScopedCollisions`.
Fixes #4946.
2017-08-25 19:21:38 -04:00
Moti Zilberman
68786c4f0f Add test for issue #4946 2017-08-25 19:21:38 -04:00
Moti Zilberman
1ef5871300 Add tests for #5491 and related cases
The two function expression tests would fail before 6705de7. The
function declaration test was not a failing case but is added here for
completeness.
2017-08-25 19:21:38 -04:00
Moti Zilberman
c3e8715010 Mask existing "local" bindings when registering new binding
Fixes #5491.
2017-08-25 19:21:38 -04:00
Mauro Bringolf
d8b4073536 Consistent const violations (#6100)
* Changed updateExpression to report itself as violation instead of its argument

* Update getBindingIdentifiers to work with forXStatement and return proper node as violation

* Updated unaryExpression violation to be consistent with changes.
2017-08-24 21:19:02 -04: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
Noah Lemen
2db0c3ad1d linting: disallow t.identifier("undefined") in plugins (#6096)
* add new custom eslint rule, replace remaining t.identifier("undefined") with buildUndefinedNode(), update tests

* change no-undefined-identifier reporting descriptor
2017-08-24 15:43:01 -04:00
Nicolò Ribaudo
4577bd1b7c TypeParameterInstantiation params can be "Flow" nodes, not "FlowType" (#6140) 2017-08-22 23:11:02 -04:00
Daniel Lo Nigro
93cf26abca Fix babel-standalone for realz (#6137)
* Fix babel-standalone

* Fix infinite loop in Makefile (oops)

* Override Node.js module resolution to handle babel-core
2017-08-22 13:46:30 -07:00
Astha Sharma
62c22c7b5d Removed the deprecated jsx pragma detection code (#6145)
* Removed the deprecated jsx pragma detection code and the concerned tests that included jsx-pragma

* Removed extra tests

* Restored packages/babel-plugin-transform-react-jsx/test/fixtures/react/honor-custom-jsx-pragma-option/
2017-08-22 15:29:06 -04:00
Bryan Wain
63baaa7148 add --config-file option to CLI to pass in .babelrc location (#6133) 2017-08-22 13:58:24 -04:00
Justin Ridgewell
7e726a81e6 Complete export transform split (#6139)
They were each transforming the other's syntax (including namespace
transform would transform default, too, and vice-versa).
2017-08-21 14:15:40 -04:00
Ramiro Silveyra d'Avila
9e4e64dac9 Remove Flow support in React preset (#6118) 2017-08-21 10:48:18 -04:00
Daniel Lo Nigro
3569cb9922 Allow nightly Yarn builds to be used (#6138)
* Allow nightly Yarn builds to be used

Fixes:
```
C:\src\babel (fix-it-fix-it-fix-it-fix-it) (babel)
λ yarn
yarn install v1.0.0-20170811.1240
[1/5] Validating package.json...
error babel@: The engine "yarn" is incompatible with this module. Expected version ">=0.27.5".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
```

* Use Yarn 0.28.4 to fix build
2017-08-20 16:19:17 -07:00
Sangboak Lee
c6a094a9d2 Split export extensions into 2 different plugins, update stage presets (#6080) 2017-08-19 09:35:40 -04:00
Henry Zhu
cee4cde53e v6.26.0 v6.26.0 2017-08-16 11:54:08 -04:00
Henry Zhu
aa330999d0 update changelog 2017-08-16 11:39:05 -04:00
Henry Zhu
5749276d7e update deps 2017-08-16 10:21:19 -04:00
Henry Zhu
7b30f77954 Merge pull request #6111 from modosc/update-regenerator
Update regenerator
2017-08-16 10:17:59 -04:00