Skip to content

Commit

Permalink
Merge pull request #2 from babel/master
Browse files Browse the repository at this point in the history
Sync with master
  • Loading branch information
yuri-karadzhov committed Jul 22, 2019
2 parents d8de635 + fced5ce commit 212a14e
Show file tree
Hide file tree
Showing 5,094 changed files with 136,568 additions and 26,110 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Expand Up @@ -34,15 +34,15 @@ jobs:
build:
working_directory: ~/babel
docker:
- image: circleci/node:10
- image: circleci/node:12
steps:
- checkout
- restore-cache: *restore-yarn-cache
- restore-cache: *restore-node-modules-cache
- run: yarn --version
- run: make test-ci-coverage
# Builds babel-standalone with the regular Babel config
- run: make build
- run: IS_PUBLISH=true make build
# test-ci-coverage doesn't test babel-standalone, as trying to gather coverage
# data for a JS file that's several megabytes large is bound to fail. Here,
# we just run the babel-standalone test separately.
Expand Down
5 changes: 4 additions & 1 deletion .editorconfig
Expand Up @@ -6,9 +6,12 @@ charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf

[*.{js,json}]
[*.{js,json,ts,tsx}]
indent_style = space
indent_size = 2

[Makefile]
indent_style = tab

[*.{md,markdown}]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .eslintignore
Expand Up @@ -5,8 +5,8 @@ package.json
lerna.json
packages/babel-runtime
!packages/babel-plugin-transform-runtime/scripts
!packages/babel-runtime-corejs2/core-js.js
packages/babel-runtime-corejs2
packages/babel-runtime-corejs3
packages/*/node_modules
packages/*/lib
packages/*/dist
Expand Down
16 changes: 13 additions & 3 deletions .eslintrc.json
@@ -1,7 +1,7 @@
{
"root": true,
"plugins": ["prettier", "@babel/development", "import"],
"extends": "babel",
"plugins": ["local-rules", "prettier"],
"rules": {
"prettier/prettier": "error"
},
Expand All @@ -12,8 +12,10 @@
{
"files": ["packages/*/src/**/*.js", "codemods/*/src/**/*.js"],
"rules": {
"local-rules/no-undefined-identifier": "error",
"local-rules/no-deprecated-clone": "error"
"@babel/development/no-undefined-identifier": "error",
"@babel/development/no-deprecated-clone": "error",
"import/no-extraneous-dependencies": "error",
"guard-for-in": "error"
}
},
{
Expand All @@ -26,6 +28,14 @@
"env": {
"jest": true
}
},
{
"files": ["packages/babel-plugin-*/src/index.js"],
"excludedFiles": ["packages/babel-plugin-transform-regenerator/**/*.js"],
"rules": {
"@babel/development/plugin-name": "error",
"eqeqeq": ["error", "always", { "null": "ignore" }]
}
}
]
}
13 changes: 6 additions & 7 deletions .flowconfig
@@ -1,11 +1,10 @@
[ignore]
.*/build/.*
.*/packages/.*/lib
.*/packages/.*/test
.*/codemods/.*/lib
.*/codemods/.*/test
.*/node_modules/conventional-changelog-core/
.*/node_modules/module-deps/
<PROJECT_ROOT>/build/.*
<PROJECT_ROOT>/packages/.*/lib
<PROJECT_ROOT>/packages/.*/test
<PROJECT_ROOT>/codemods/.*/lib
<PROJECT_ROOT>/codemods/.*/test
<PROJECT_ROOT>/node_modules/module-deps/

[include]
packages/*/src
Expand Down
12 changes: 6 additions & 6 deletions .github/CHANGELOG-6to5.md
Expand Up @@ -84,7 +84,7 @@
* More performance improvements.
* Parsing is now ~30% faster thanks to [marijnh/acorn@7264bc0178e7e6af7cfe02e9e0c6b26ee0e6007f](https://github.com/marijnh/acorn/commit/7264bc0178e7e6af7cfe02e9e0c6b26ee0e6007f).
* **New Feature**
* Optional `es6.blockScopingTDZ` is now completely functional and handles all edgecases.
* Optional `es6.blockScopingTDZ` is now completely functional and handles all edge cases.
* `super` in object literals.
* Tail call optimisation. Thanks [@RReverser](https://github.com/RReverser)!

Expand Down Expand Up @@ -474,7 +474,7 @@
* **Polish**
* Rest parameters now allocate the array before populating.
* **Internal**
* `for...in` loops have been changed to optimized `for` loops - better performance and no enumeration of protoype keys.
* `for...in` loops have been changed to optimized `for` loops - better performance and no enumeration of prototype keys.
* Parts of the code generator have now been optimized thanks to [gaearon](https://github.com/gaearon).

## 2.12.3
Expand Down Expand Up @@ -643,7 +643,7 @@

* **Bug Fix**
* Better handling of number literal property keys.
* Handle `NewExpression` paren insertion edegcases better.
* Handle `NewExpression` paren insertion edge cases better.
* **Internal**
* Fix incorrect AST node `identifier("this")`.
* Better `toIdentifier` method that handles reserved words.
Expand Down Expand Up @@ -850,7 +850,7 @@

## 1.14.10

* Fix let scoping unneccesary override.
* Fix let scoping unnecessary override.

## 1.14.6

Expand Down Expand Up @@ -973,7 +973,7 @@

## 1.12.21

* Fix unneccesary let scoping replacement.
* Fix unnecessary let scoping replacement.
* Add `commonInterop` module formatter. Thanks [@Naddiseo](https://github.com/Naddiseo).
* Fix `return` outside of function body bug. Thanks [@brentburg](https://github.com/brentburg).
* Add more flexible option types.
Expand Down Expand Up @@ -1020,7 +1020,7 @@

## 1.12.12

* Make scope tracker more reliable to handle all edgecases.
* Make scope tracker more reliable to handle all edge cases.

## 1.12.11

Expand Down
4 changes: 2 additions & 2 deletions .github/CHANGELOG-v4.md
Expand Up @@ -127,7 +127,7 @@
## 4.6.4

* **Bug Fix**
* Fix `ForOfStatement` not proplery inheriting labels.
* Fix `ForOfStatement` not properly inheriting labels.
* When in closure mode in block scoping transformer, properly check for variable shadowing.
* **New Feature**
* New `utility.inlineEnvironmentVariables` and `utility.inlineExpression` transformers.
Expand All @@ -153,7 +153,7 @@
* **Spec Compliancy**
* `for...of` now outputs in a lengthy `try...catch` this is to ensure spec compliancy in regards to iterator returns and abrupt completions. See [google/traceur-compiler#1773](https://github.com/google/traceur-compiler/issues/1773) and [babel/babel/#838](https://github.com/babel/babel/issues/838) for more information.
* **Polish**
* Rest parameters that are only refered to via number properties on member expressions are desugared into a direct `arguments` reference. Thanks [@neVERberleRfellerER](https://github.com/neVERberleRfellerER)!
* Rest parameters that are only referred to via number properties on member expressions are desugared into a direct `arguments` reference. Thanks [@neVERberleRfellerER](https://github.com/neVERberleRfellerER)!
* `$ babel` no longer exits on syntax errors.
* **Internal**
* Upgrade `browserify`.
Expand Down
13 changes: 6 additions & 7 deletions .github/CHANGELOG-v5.md
Expand Up @@ -262,8 +262,8 @@ Issues with publish process.
* Register labels as bindings to fix undeclared variable checks.
* **Polish**
* Remove unnecessary string binary expressions when transforming template literals.
* Support module live bindings in arbitary positions not in Program statement position.
* Throw error when attemping to replace a `Program` root node with another node not of type `Program`.
* Support module live bindings in arbitrary positions not in Program statement position.
* Throw error when attempting to replace a `Program` root node with another node not of type `Program`.
* Optimise rest parameters in spread element position and allocate rest array at the earliest common ancestor of all references.
* Generate original number representation when value was not changed.
* Check for invalid binding identifiers when generating inferred method names.
Expand Down Expand Up @@ -543,12 +543,12 @@ Issues with publish process.
* **Internal**
* Removed native inheritance support from classes.
* Added `replaceWithSourceString` path API.
* Split up `es3.propertyLiterals` and `es3.memberExpressionLiterals` transformers to `minfication.propertyLiterals` and `es3.memberExpressionLiterals`.
* Split up `es3.propertyLiterals` and `es3.memberExpressionLiterals` transformers to `minification.propertyLiterals` and `es3.memberExpressionLiterals`.

## 5.2.6

* **Internal**
* Fix transformer aliases being accidently set as deprecated ones.
* Fix transformer aliases being accidentally set as deprecated ones.
* Expose `Pipeline` as `TransformerPipeline` instead.

## 5.2.5
Expand Down Expand Up @@ -824,10 +824,10 @@ Issues with publish process.
* Save register cache on tick instead of `SIGINT`.
* Enable strict mode on babel-node eval flag.
* **Bug Fixes**
* Add support for live bindings. This change also increases the reliablity of export specifier renaming.
* Add support for live bindings. This change also increases the reliability of export specifier renaming.
* Add support for super update and non equals assignment expressions.
* Rename shadow constructor binding in classes.
* Seed next iteration bindings with previous fresh bindings when reassinging loop block scoped variables.
* Seed next iteration bindings with previous fresh bindings when reassigning loop block scoped variables.
* Fix new expression spread referencing the wrong constructor.
* Call `resolveModuleSource` on dynamic imports.
* Added `param` to list of duplicate declaration kinds.
Expand All @@ -836,4 +836,3 @@ Issues with publish process.
* ES7 Abstract References have been removed.
* Experimental option has been removed in favor of a stage option.
* Rename `returnUsedHelpers` to `metadataUsedHelpers`.

14 changes: 7 additions & 7 deletions .github/CHANGELOG-v6.md
Expand Up @@ -19,7 +19,7 @@

## 6.26.0 (2017-08-16)

> Backports for some folks (also other's when we accidently merged PRs from both 6.x/master)
> Backports for some folks (also other's when we accidentally merged PRs from both 6.x/master)
> Lesson learned: just use `master` and backport on another branch.

#### :eyeglasses: Spec Compliancy
Expand Down Expand Up @@ -1767,7 +1767,7 @@ typeof Symbol.prototype === 'object'
* [#3456](https://github.com/babel/babel/pull/3456) Use the real sourcemap API and handle input sourcemaps - Fixes [#7259](https://github.com/babel/babel/issues/7259). ([@loganfsmyth](https://github.com/loganfsmyth))
* [#4507](https://github.com/babel/babel/pull/4507) Only set options in cli if different from default. ([@danez](https://github.com/danez))

Fix an issue with defaults not being overidden. This was causing options like `comments: false` not to work correctly.
Fix an issue with defaults not being overridden. This was causing options like `comments: false` not to work correctly.

* [#4508](https://github.com/babel/babel/pull/4508) Support custom ports for V8 --inspect. ([@andykant](https://github.com/andykant))
* [#4562](https://github.com/babel/babel/pull/4562) Fixes [#2299](https://github.com/babel/babel/issues/2299): Prevent REPL from printing implicit 'use strict'. ([@hzoo](https://github.com/hzoo))
Expand Down Expand Up @@ -2084,15 +2084,15 @@ Also added more tests and will update Babel to use the new preset options after

## v6.13.1 (2016-08-04)

We had a regression in our new babel-preset-es2015@6.13.0 that made it unexpectedly backward-incompatible. This release introduces a new alternative plugin-options approach that is uglier but supports backward-compatiblity. Ideally new plugins would use the new `module.exports = function(babel, options){ }` approach and simple skip supporting `babel-core@<6.13.x`.
We had a regression in our new babel-preset-es2015@6.13.0 that made it unexpectedly backward-incompatible. This release introduces a new alternative plugin-options approach that is uglier but supports backward-compatibility. Ideally new plugins would use the new `module.exports = function(babel, options){ }` approach and simple skip supporting `babel-core@<6.13.x`.

#### Bug Fix
* `babel-core`, `babel-preset-es2015`
* [#3635](https://github.com/babel/babel/pull/3635) Fix backward-compatibility of babel-preset-es2015. ([@loganfsmyth](https://github.com/loganfsmyth))

## v6.13.0 (2016-08-04)

> Since the last release we've created https://github.com/babel/notes to track discussions on our slack and high level features/changes that could be added - definetely check it out if you're interested in Babel's development!
> Since the last release we've created https://github.com/babel/notes to track discussions on our slack and high level features/changes that could be added - definitely check it out if you're interested in Babel's development!

Some small but very important additions in this release:

Expand Down Expand Up @@ -3817,7 +3817,7 @@ Thanks to @samwgoldman for all the new flow support!
* **New Feature**
* Add support for `function.sent`.
* **Internal**
* Bump `invariant` depenency version.
* Bump `invariant` dependency version.
* **Polish**
* Infer filename from the base directory when resolving plugins and presets.
* Allow JSX pragma to be specified in line comments.
Expand Down Expand Up @@ -3887,7 +3887,7 @@ Thanks to @samwgoldman for all the new flow support!
## 6.1.2

* **Bug Fix**
* Fix bug where the parser wouldn't allow typed annotated default parametesr in arrow functions.
* Fix bug where the parser wouldn't allow typed annotated default parameters in arrow functions.
* Add existence check to `NodePath#has` to ensure safeness when making comparisons.
* Protect against replacing a class expression with a name inferred version that would
result in it never being transformed.
Expand Down Expand Up @@ -3976,7 +3976,7 @@ Thanks to @samwgoldman for all the new flow support!
* Fix SystemJS module formatter exporting function parameters.
* Ensure that invalid identifier JSX attribute keys are quoted when transforming to calls.
* Fix ES3 property literal plugin.
* Fix parameters after defaults in arrow functions refering to the wrong `arguments`.
* Fix parameters after defaults in arrow functions referring to the wrong `arguments`.

## 6.0.13

Expand Down
9 changes: 6 additions & 3 deletions .github/ISSUE_TEMPLATE/Bug_report.md
@@ -1,6 +1,9 @@
---
name: 馃悰 Bug Report
about: If something isn't working as expected 馃.
name: "\U0001F41B Bug Report"
about: "If something isn't working as expected \U0001F914."
title: ''
labels: 'i: bug, i: needs triage'
assignees: ''

---

Expand Down Expand Up @@ -31,7 +34,7 @@ A clear and concise description of what you expected to happen (or code).
- Babel version(s): [e.g. v6.0.0, v7.0.0-beta.34]
- Node/npm version: [e.g. Node 8/npm 5]
- OS: [e.g. OSX 10.13.4, Windows 10]
- Monorepo [e.g. yes/no/Lerna]
- Monorepo: [e.g. yes/no/Lerna]
- How you are using Babel: [e.g. `cli`, `register`, `loader`]

**Possible Solution**
Expand Down
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/Feature_request.md
@@ -1,6 +1,9 @@
---
name: 馃殌 Feature Request
about: I have a suggestion (and may want to implement it 馃檪)!
name: "\U0001F680 Feature Request"
about: "I have a suggestion (and may want to implement it \U0001F642)!"
title: ''
labels: 'i: enhancement, i: needs triage'
assignees: ''

---

Expand Down
10 changes: 7 additions & 3 deletions .github/ISSUE_TEMPLATE/Regression-v7.md
@@ -1,12 +1,16 @@
---
name: 馃挜 v7 Regression
about: Report an unexpected behavior in v7 from v6 (Check the upgrade guide first 鉁岋笍)
name: "\U0001F4A5 v7 Regression"
about: Report an unexpected behavior in v7 from v6 (Check the upgrade guide first
鉁岋笍)
title: ''
labels: 'i: bug, 7.x: regression, i: needs triage'
assignees: ''

---

# v7 Regression

> First check out: https://new.babeljs.io/docs/en/next/v7-migration.html
> First check out: https://babeljs.io/docs/en/v7-migration
> Also a partial upgrade tool: https://github.com/babel/babel-upgrade
**Potential Commit/PR that introduced the regression**
Expand Down
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/Support_question.md
@@ -1,6 +1,9 @@
---
name: 馃 Support Question
about: If you have a question 馃挰, please check out our Slack or StackOverflow!
name: "\U0001F917 Support Question"
about: "If you have a question \U0001F4AC, please check out our Slack or StackOverflow!"
title: ''
labels: 'i: question, i: needs triage'
assignees: ''

---

Expand Down
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE/Support_us.md
@@ -1,6 +1,10 @@
---
name: 馃 Support us on Babel
about: If you would like to support our efforts in maintaining this community-driven project 馃檶!
name: "\U0001F91D Support us on Babel"
about: "If you would like to support our efforts in maintaining this community-driven
project \U0001F64C!"
title: ''
labels: ''
assignees: ''

---

Expand Down

0 comments on commit 212a14e

Please sign in to comment.