* 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.
* Fix output directory if filename is given
* Add test for relative output path
* Add option to define output dir relative to input
* Add tests for --copy-files
* Test error handling for wrong arguments
* Redeclaring a variable counts as a modification.
Fixes#6217.
* Remove "existing" logic from Binding.
Was added in #5745, but no longer triggered since 6536e605a.
They were not needed since c4fb3fe742c61ee2dd0ab1b1197a254d3c9f6a55
because now each files declare a new class
instead of adding method to the existing one.
* Add support for class private methods
This commit adds parser support for the TC39 Stage 2 Private Methods
proposal.
This commit also changes "key" in ClassPrivateProperty from an
Identifier to a PrivateName, as well as disallowing #constructor as a
valid private field name.
* Add tests for string literal get/set/async
These should be treated as regular methods and not special get/set/async
behaviour.
* Add tests for class private methods
This also removes a test from the Test262 whitelist that failed before
the changes for private methods support and now passes.
* Modify class private prop tests for PrivateName
* Add class private prop tests for #constructor
* Fix existing ASI test case failure
* 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/
* Added JSX_ANNOTATION_REGEX
* Reverted the tests for jsx-pragma-options and removed those which throw deprecated message
* Fix bad Scope#parent caching
Now, we traverse the path until we find a parent scope.
Fixes#6057.
* Fix bad merge
* Remove cached data
* I need to stop using Github editor
* Fix infinite loops due to scopable paths being moved up
This reverts the former fix done in #5743 and always requeues
BlockStatements when they get created.
This also fixes a bug in babel-generator which would indent code
even though no comments are present.
* 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
* 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
I can never remember the syntax and end up coming here to copy/paste this snippet all the time.
I assume other people want to as well, or at least make it clear for newbs that this can be used with Node without them having to scroll.