11661 Commits

Author SHA1 Message Date
Justin Ridgewell
023f8bd1cb
Move Logical Assignment Ops to Stage 1 (#7625) 2018-03-25 17:49:21 +01:00
Deven Bansod
c9b99af5a6 Remove assert.* from commented out assertions 2018-03-24 16:22:20 +05:30
Deven Bansod
c8d82d6483 Migrate all remaining fixtures to jest expect 2018-03-24 16:22:20 +05:30
Deven Bansod
db42a5d70f Migrate babel-preset-es2015 and -next-target tests to use jest expect 2018-03-24 16:22:19 +05:30
Deven Bansod
0856f89882 Migrate -transform-block-scoping and -transform-classes to jest expect 2018-03-24 16:22:18 +05:30
Deven Bansod
921702ef8c Migrate babel-plugin-proposal-do-expressions tests to jest-expect 2018-03-24 16:22:18 +05:30
Deven Bansod
8b57a3e3b9 Migrate a few packages' tests to use Jest Expect (see below)
* Migrate the following packages' tests:
    * babel-helper-annotate-as-pure
    * babel-helper-module-imports
    * babel-helper-transform-fixture-test-runner
    * babel-highlight
    * babel-node
    * babel-plugin-transform-modules-commonjs
    * babel-preset-env-standalone
    * babel-preset-env
    * babel-preset-es2015
    * babel-preset-react
    * babel-standalone
    * babel-template
    * babel-traverse
    * babel-types
2018-03-24 16:22:10 +05:30
Logan Smyth
21309cc8d4 Make these tests re-throw the same error to keep the trace. 2018-03-23 21:26:50 -07:00
Andy
19708e0154 TypeScript: support mapped type modifiers syntax (#7383) 2018-03-23 14:34:15 -04:00
Mateusz Burzyński
f98dff9189
Allow placeholders in JSXElements when parsing templates (#7583) 2018-03-23 09:27:51 +01:00
Brian Ng
840ba187a7
Prevent duplicate regex flags (#7617) 2018-03-22 10:25:26 -05:00
Sven SAULEAU
de00d939f0
fix: clean makefile 2018-03-22 10:29:25 +01:00
Brian Ng
e80488f1d5
Update to beta.42 (#7609) 2018-03-21 10:39:46 -05:00
Michał Pierzchała
81c1b49f6a Disable flow on transformClass, fix preset-env errors (#7605) 2018-03-20 18:42:11 -05:00
Justin Ridgewell
55bf55398a
Logical Assignment: ensure computed key isn't recomputed (#7604)
* Logical Assignment: ensure computed key isn't recomputed

* More tests
2018-03-20 23:06:09 +00:00
Daniel Tschinder
f0d681a238 Remove obsolete max-len eslint rule and reformat some stuff to fit (#7602) 2018-03-20 08:51:47 -05:00
Logan Smyth
6d6fe844fd
Centralize Babel's own compilation config to make it easier to follow. (#7599) 2018-03-19 21:49:17 -07:00
Logan Smyth
edb0a70e14 Run prettier to format all JSON. 2018-03-19 18:26:55 -07:00
Brian Ng
669f6b97b2
Tweak es2015-related plugin order in preset-env (#7586) 2018-03-19 14:19:42 -05:00
Michał Pierzchała
e2c5f25e97 Refactored quirky inheritance in babel-plugin-transform-classes (#7444)
* chore(plugin-transform-classes): refactor inheritance

* path some flow types

* remove unused export

* get rid of class

* temporarily rename to vanilla for diff readability

* more setState with minor adjustments

* rename 'private' methods

* explicit null check

* adjust import ordering

* Rename createConstructor -> maybeCreateConstructor

* Rename vanilla.js -> transformClass.js
2018-03-19 16:37:59 +01:00
Amin Marashi
8eee435cd6 Add RegExp support to include/exclude preset-env options (#7242)
* Add support for RegExp includes/excludes

* Keep the plugin order

* Detect invalid modules in regexp

* Add more tests for regexp

* Cover builtins, and unnormalized in the RegExp tests

* Remove babel-plugin- in all positions

* Change babel-plugin- prefix to string

* Add a test for the same module in include/exclude

* Handle partial matches explicitly

* Remove extra valid regexp check

* Optimise validation of plugins

* Optimise selecting the plugins

* Fix undefined include/exclude option

* Update documentation to reflect the new include matching

* Fix typo

* Apply reviews

Use regexp.test instead of string.match (slower)

Define flatten helper

Do not normalize babel-plugin anywhere in the string
2018-03-18 15:54:43 +01:00
Henry Zhu
d260bfaec4 v7.0.0-beta.42 v7.0.0-beta.42 2018-03-15 16:50:03 -04:00
Logan Smyth
c662c2ada2
Use strict namespace behavior for mjs files. (#7545) 2018-03-15 13:27:01 -07:00
Ben Wiley
b6e54800b4 Remove outdated spec deviation note [skip ci] (#7571)
`JSXText` was added to the JSX spec [here](https://github.com/facebook/jsx/pull/80).
2018-03-15 16:20:14 -04:00
Henry Zhu
ae210a46d1
Merge pull request #7562 from babel/pr/7534
Use helper-module-import inside preset-env
2018-03-15 16:19:03 -04:00
Logan Smyth
017d0e7078
Ensure that the backward-compat logic for plugin-utils copies over the version API properly. (#7580) 2018-03-15 11:45:53 -07:00
Josh Justice
b8d1d221f8 Rename actual/expected test files to input/output (#7578)
These files appear to have been missed in the update of test file naming from actual/expected.js to input/output.js. As a result, they were silently not being run. I've confirmed that they were not running, updated the names, then confirmed that they are running now.
2018-03-15 19:02:41 +01:00
Brian Ng
fed530f6bf
Use helper-module-import inside entry plugin too 2018-03-15 09:21:20 -05:00
Gaël Gillard
29d44193cd
Use helper-module-imports instead of custom import (#7457) 2018-03-15 09:21:19 -05:00
Melvin Groenhoff
82994ce087 Fix "Module build failed: Error: Cannot find module '@babel/types'" (#7575)
* @babel/template and @babel/types are dependencies instead of devDependencies (fixes #7573).

* Use @babel/types and @babel/template via @babel/core
2018-03-15 14:45:26 +01:00
Mateusz Burzyński
586d3b5929
Wrap wrapNativeSuper helpers in redefining functions for better tree-shakeability (#7188) 2018-03-14 23:48:33 +01:00
Mateusz Burzyński
d682e32529
Favour extends helper over objectWithoutProperties when whole object gets copied anyway (#7390) 2018-03-14 22:59:02 +01:00
Simon Kjellberg
07ab02f6b2 Fix incorrect value of _cache in _wrapNativeSuper (#7570)
The boolean expressions returns false in environments where Map is missing.
This change explicitly sets _cache to undefined in such cases, to ensure the cache methods will be ignored.
2018-03-14 16:37:51 -04:00
Nicolò Ribaudo
91a114f74a [transform-classes] Fix typo in _wrapNativeSuper helper 2018-03-14 19:23:10 +01:00
Nicolò Ribaudo
6d9887fc0f [typeof-symbol] Guard against undefined built-in globals 2018-03-14 19:23:10 +01:00
Henry Zhu
d2a3a8151e update to beta.41 (#7568) 2018-03-14 12:40:59 -05:00
Henry Zhu
270ea17fed v7.0.0-beta.41 v7.0.0-beta.41 2018-03-14 12:25:26 -04:00
Daniel Tschinder
da2aea31f5 Fix —require 2018-03-14 13:26:07 +01:00
Daniel Tschinder
1d69cd41ca Fix import of type ConfigItem (#7561)
It is also exported as type
2018-03-13 13:31:32 -05:00
Daniel Tschinder
a7ec312cfe Run node 9 on circleci and remove from travis (#7560) 2018-03-13 09:53:37 -04:00
Sven SAULEAU
6ff91cfdae
docs: [skip ci] fix proposal link text 2018-03-13 13:21:34 +01:00
Yael Hermon
dfb3795a97 update preset-env after build-data (#7543) 2018-03-12 20:49:52 -05:00
Logan Smyth
353d3199c2
Re-add TEST_ONLY and use Jest's -t for TEST_GREP. (#7556) 2018-03-12 15:12:39 -07:00
Haroen Viaene
bdd70c37e0 docs(babel-standalone): remove bower mention (#6588)
* docs(babel-standalone): remove bower mention

Since the package won't be downloadable as `@babel/standalone` it's best to just remove it, since it's pretty much deprecated as is. I left the other mention of babel-standalone-bower since I guess that's just the name and still useful in other cases

cc @daniel15 

reported in https://github.com/babel/babel/pull/6495#pullrequestreview-70980926

* Update README.md
2018-03-12 19:10:24 +01:00
Daniel Tschinder
9d2d499760
Replace lodash/map with array equivalent (#7550)
* Replace lodash/map with array equivalent

* Fix review comments
2018-03-12 11:03:03 +01:00
Yael Hermon
29807837bb preset-env - add Symbol.asyncIterator to shippedProposals builtIns (#7548)
* preset-env - add Symbol.asyncIterator to shippedProposals builtins

* fix typo
2018-03-11 16:29:22 -05:00
ngohoangthang
c14a6a7735 Fix "ran" to "run" for monorepo.md (#7547) [skip ci] 2018-03-11 13:12:34 +01:00
Daniel Tschinder
3a7881379a jest: ToEqual -> toBe 2018-03-10 11:48:09 +01:00
Deven Bansod
f3f0197890 Migrate babel-core tests to use jest-expect (#7513)
* Used codemods at: https://gist.github.com/devenbansod/03c5cff857661e076cbec72fcb2e7eb3 along with some manual intervention and review
2018-03-10 11:40:28 +01:00
Logan Smyth
8e030e28b3
Merge pull request #7538 from loganfsmyth/unambiguous-import-meta
Make 'sourceType:unambiguous' use 'module' when import.meta is used.
2018-03-09 15:00:13 -08:00