* Don't use args rest/spread to hoist super method calls
* Hoist this in hoisted super method calls
* Make the code more readable
Review by edoardocavazza
* fix: should not remove let binding even it is wrapped in closure
Fixes#10339
* fix: remove bindings defined in blockScope when wrapped in closure
* Move test assertions to the top level to ensure that they run
This adds lots of missing declarations to the types of @babel/types,
including many utility functions useful to plugin authors.
With the typescript types, I tried to make them as useful as possible
for control flow analysis / inference, but Flow doesn't seem to
support overloads and I'm not as familiar with it anyway so it has
simpler types.
* build: add build-babel-types task
* chore: revamp Makefile to for parallel builds
* chore: style fix
* chore: skip install step as we handle yarn in makefile
* test job execution order
When users see errors like
```
Duplicate plugin/preset detected.
If you'd like to use two separate instances of a plugin,
they need separate names, e.g.
plugins: [
['some-plugin', {}],
['some-plugin', {}, 'some unique name'],
]
```
It can be difficult to determine the source of the conflict, especially
in a larger build system.
This commit outputs what is known about the plugins that actually
conflict, which can be helpful for users to determine the root cause of
the conflict.
Partially addresses #9778
* fix: typo
* declare name for flow interface
* add test case for export overload function, typescript
* test: add test
Fixes#10044
* test: update test
* test(flow): add multiple declarations regression test
* re-enable flow test case
# Conflicts:
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/def-site-variance/input.js
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-declare-statements/input.js
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-interfaces-module-and-script/input.js
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-iterator/input.js
* test: disable two flow dupl-decl test
* fix: do not declare name for declare function until we figure out a better way
* test: duplicate declare function and function would not throw
* Add windows to travis
* Update
* Do not use sh file on windows
* Fix whitespace
* Unify command
* ./ doesn't work on windows
* Remove all ./ usages
* Run windows test before others
* fix: normalize filename when generating sources
sources should be URL.
* fix: replace normalized path to cwd
* chore: add nodePlatform task options
* fix: normalize preset-env filename output
* chore: replace normalized path to CWD on win32 platform
* limit transform-react-source to run on linux and darwin
* test: escapeRegExp on testcases
* test: add test for babel --filename on windows
* test: double babel-node/cli test timeout
* chore: workaround windows build does not stop
* chore: remove redundant condition
* refactor: rename `nodePlatform` to `os`
* Add test
* Add nonOctalDecimal verification
* Update regex and code style
* Refactor non octal detection
* Add numeric separator test
* Disallow numeric separators in non octals
* Update whitelist
* Better test naming
* Disallow numeric separators in non oct for all numbers
* Specific error above the general error
* Add test for invalid leading zero in num separator
* Add start position to error
* [parser] Disallow numeric separator in unicode scape sequences (#10460)
* raise error only when numeric separator plugin is set
* Adds argument for checking numeric separator
* Fix condition for readability
* Add test for hex escape sequence and rephrase error message
* Remove exposure for allowNumSeparator in readHexChar method
* 🚀 added check to disallow super.private variable access and test case added
* ♻️ change the other linting change back to how it was
* ♻️ change the other linting change back to how it was
* ♻️ added newline at the end test output.json file
* ♻️ changed the linting style to the way it was
* ♻️ updated error message, removed super private member access test cases from whitelist of flow and test 262 suite
* ♻️ added newline in output.json
* Disallow static fields named `constructor` in a class
- Disallowed static fields named `constructor` in a class (previously only non-static were disallowed)
- Updated the text for the error for one consolidated warning, for both static and non-static fields
- Added a test
- Updated an existing test in the `flow` test suite of the parser to reflect the parse error.
Strangely, the test used to pass and started failing when inlining the `isNonstaticConstructor` method, without any changes.
In that test, `constructor` was a field, so in theory it should never have passed.
Would appreciate some feedback on this, as I'm not 100% sure if this is somehow related to Flow
* Update test262 whitelist
* Add comment and fix && operator