Integrate babylon into babel workflow

This commit is contained in:
Daniel Tschinder 2017-10-14 20:04:20 +02:00
parent 52537410ef
commit 3b540e3f5a
No known key found for this signature in database
GPG Key ID: 46A883CAEC8A94BD
49 changed files with 685 additions and 5379 deletions

View File

@ -20,6 +20,9 @@ experimental/babel-preset-env/data
experimental/babel-preset-env/test/debug-fixtures
packages/babel-standalone/babel.js
packages/babel-standalone/babel.min.js
packages/babylon/build
packages/babylon/scripts
packages/babylon/test/expressions
# Prettier tries to insert trailing commas in function calls, which Node.js
# doesn't natively support. This causes an error when loading the Gulp tasks.

View File

@ -5,7 +5,8 @@
],
"rules": {
"curly": ["error", "multi-line"],
"prettier/prettier": ["error", { "trailingComma": "es5" }]
"prettier/prettier": ["error", { "trailingComma": "es5" }],
"no-case-declarations": "error"
},
"env": {
"node": true,

View File

@ -1,4 +1,5 @@
[ignore]
.*/build/.*
.*/packages/.*/lib
.*/packages/.*/test
.*/codemods/.*/lib
@ -21,5 +22,8 @@ lib/third-party-libs.js.flow
[options]
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
suppress_comment= \\(.\\|\n\\)*\\$FlowIssue
suppress_comment= \\(.\\|\n\\)*\\$FlowIgnore
suppress_type=$FlowFixMe
suppress_type=$FlowSubtype
esproposal.export_star_as=enable
module.name_mapper='^@babel\/\([a-zA-Z0-9_\-]+\)$' -> '<PROJECT_ROOT>/packages/babel-\1/src/index'

View File

@ -26,7 +26,7 @@ Choose one: is this a bug report or feature request?
var your => (code) => here;
```
### Babel Configuration (.babelrc, package.json, cli command)
### Babel/Babylon Configuration (.babelrc, package.json, cli command)
<!--- If describing a bug, tell us what your babel configuration looks like -->
```js
@ -57,6 +57,7 @@ var your => (code) => here;
| software | version(s)
| ---------------- | -------
| Babel |
| Babylon | <!-- This is only needed if you are using Babylon directly -->
| node |
| npm |
| Operating System |

View File

@ -1,5 +1,5 @@
<!--
Before making a PR please make sure to read our contributing guidelines
<!--
Before making a PR please make sure to read our contributing guidelines
https://github.com/babel/babel/blob/master/CONTRIBUTING.md
For issue references: Add a comma-separated list of a [closing word](https://help.github.com/articles/closing-issues-via-commit-messages/) followed by the ticket number fixed by the PR. It should be underlined in the preview if done correctly.
@ -8,11 +8,12 @@ For issue references: Add a comma-separated list of a [closing word](https://hel
| Q                       | A <!--(Can use an emoji 👍) -->
| ------------------------ | ---
| Fixed Issues? | `Fixes #1, Fixes #2` <!-- remove the (`) quotes to link the issues -->
| Patch: Bug Fix? |
| Major: Breaking Change? |
| Minor: New Feature? |
| Patch: Bug Fix? |
| Major: Breaking Change? |
| Minor: New Feature? |
| Tests Added + Pass? | Yes
| Documentation PR | <!-- If so, add `[skip ci]` to your commit message to skip CI -->
| Any Dependency Changes? |
| Any Dependency Changes? |
| License | MIT
<!-- Describe your changes below in as much detail as possible -->

4
.gitignore vendored
View File

@ -3,11 +3,12 @@
/packages/*/node_modules
*.log
*.cache
/build
/.eslintcache
/browser.js
/browser-polyfill.js
/runtime.js
/coverage
coverage
dist
/.package.json
package-lock.json
@ -35,3 +36,4 @@ packages/babel-standalone/babel.js
packages/babel-standalone/babel.min.js
/codemods/*/lib
/codemods/*/node_modules
/packages/babylon/build

View File

@ -19,15 +19,25 @@ env:
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
before_script:
- 'if [ "$JOB" = "babylon-flow-tests" ]; then make bootstrap-flow; fi'
- 'if [ "$JOB" = "babylon-test262-tests" ]; then make bootstrap-test262; fi'
script:
- 'if [ "$JOB" = "test" ]; then make test-ci; fi'
- 'if [ "$JOB" = "lint" ]; then make lint && make flow; fi'
- 'if [ "$JOB" = "babylon-flow-tests" ]; then make test-flow-ci; fi'
- 'if [ "$JOB" = "babylon-test262-tests" ]; then make test-test262-ci; fi'
matrix:
fast_finish: true
include:
- node_js: "node"
env: JOB=lint
- node_js: "node"
env: JOB=babylon-flow-tests
- node_js: "node"
env: JOB=babylon-test262-tests
notifications:
slack:

View File

@ -12,6 +12,7 @@
_Note: Gaps between patch versions are faulty, broken or test releases._
See [CHANGELOG - 6to5](/.github/CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
See [Babylon's CHANGELOG](packages/babylon/CHANGELOG.md) for the Babylon pre-7.0.0-beta.29 version changelog.
## 6.26.0 (2017-08-16)

View File

@ -17,14 +17,14 @@
# Contributing
> Before contributing, please read our [code of conduct](https://github.com/babel/babel/blob/master/CODE_OF_CONDUCT.md).
Contributions are always welcome, no matter how large or small.
Contributions are always welcome, no matter how large or small. Before
contributing, please read the
[code of conduct](https://github.com/babel/babel/blob/master/CODE_OF_CONDUCT.md).
## Not sure where to start?
- If you aren't just making a documentation change, you'll probably want to learn a bit about a few topics.
- [ASTs](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (Abstract Syntax Tree): The Babel AST [spec](https://github.com/babel/babylon/blob/master/ast/spec.md) is a bit different from [ESTree](https://github.com/estree/estree). The differences are listed [here](https://github.com/babel/babylon#output).
- [ASTs](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (Abstract Syntax Tree): The Babel AST [spec](https://github.com/babel/babel/tree/master/packages/babylon/blob/master/ast/spec.md) is a bit different from [ESTree](https://github.com/estree/estree). The differences are listed [here](https://github.com/babel/babel/tree/master/packages/babylon#output).
- Check out [`/doc`](https://github.com/babel/babel/tree/master/doc) for information about Babel's internals
- Check out [the Babel Plugin Handbook](https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#babel-plugin-handbook) - core plugins are written the same way as any other plugin!
- Check out [AST Explorer](http://astexplorer.net/#/scUfOmVOG5) to learn more about ASTs or make your own plugin in the browser
@ -146,7 +146,6 @@ $ BABEL_ENV=cov make build
$ ./scripts/test-cov.sh
```
#### Troubleshooting Tests
In case you're not able to reproduce an error on CI locally, it may be due to
@ -220,20 +219,33 @@ If the test requires a minimum Node version, you can add `minNodeVersion` (must
}
```
#### `babylon`
Writing tests for Babylon is very
similar to the other packages.
Inside the `packages/babylon/tests/fixtures` folder are categories/groupings of test fixtures (es2015, flow,
etc.). To add a test, create a folder under one of these groupings (or create a new one) with a
descriptive name, and add the following:
* Create an `actual.js` file that contains the code you want Babylon to parse.
* Add an `expected.json` file with the expected parser output. For added convenience, if there is no `expected.json` present, the test runner will generate one for you.
#### Bootstrapping expected output
For both `babel-plugin-x` and `babylon`, you can easily generate an `expected.js`/`expected.json` automatically by just providing `actual.js` and running the tests as you usually would.
```
// Example
- babylon
- test
- fixtures
- comments
- basic
- block-trailing-comment
- actual.js
- expected.json (will be generated if not created)
- packages
- babylon
- test
- fixtures
- comments
- basic
- block-trailing-comment
- actual.js
- expected.json (will be generated if not created)
```
### Debugging code
@ -273,8 +285,20 @@ The debugger starts at the first executed line of code, which is Mocha's first l
Click _Resume script execution_ <img src="https://i.imgur.com/TmYBn9d.png" alt="Resume script execution button." width="16"> to jump to the set breakpoint.
Note that the code shown in Chrome DevTools is compiled code and therefore differs.
## Creating a new plugin (`spec-new`)
> Example: https://github.com/babel/babylon/pull/541
- Create a new issue that describes the proposal (ex: [#538](https://github.com/babel/babylon/issues/538)). Include any relevant information like proposal repo/author, examples, parsing approaches, meeting notes, presentation slides, and more.
- The pull request should include:
- [ ] An update to the [plugins](https://github.com/babel/babel/tree/master/packages/babylon#plugins) part of the readme. Add a new entry to that list for the new plugin flag (and link to the proposal)
- [ ] If any new nodes or modifications need to be added to the AST, update [ast/spec.md](https://github.com/babel/babel/bloc/master/packages/babylon/ast/spec.md)
- [ ] Make sure you use the `this.hasPlugin("plugin-name-here")` check in Babylon so that your new plugin code only runs when that flag is turned on (not default behavior)
- [ ] Add failing/passing tests according to spec behavior
- Start working about the Babel transform itself!
## Internals
- AST spec ([babylon/ast/spec.md](https://github.com/babel/babylon/blob/master/ast/spec.md))
- AST spec ([babylon/ast/spec.md](https://github.com/babel/babel/tree/master/packages/babylon/blob/master/ast/spec.md))
- Versioning ([doc/design/versioning.md](https://github.com/babel/babel/blob/master/doc/design/versioning.md)
- Monorepo ([doc/design/monorepo.md](https://github.com/babel/babel/blob/master/doc/design/monorepo.md))
- Compiler environment support ([doc/design/compiler-environment-support.md](https://github.com/babel/babel/blob/master/doc/design/compiler-environment-support.md))

View File

@ -10,6 +10,7 @@ const newer = require("gulp-newer");
const babel = require("gulp-babel");
const watch = require("gulp-watch");
const gutil = require("gulp-util");
const filter = require("gulp-filter");
const gulp = require("gulp");
const path = require("path");
const merge = require("merge-stream");
@ -36,9 +37,11 @@ gulp.task("build", function() {
return merge(
sources.map(source => {
const base = path.join(__dirname, source);
const f = filter(["**", "!**/packages/babylon/**"]);
return gulp
.src(getGlobFromSource(source), { base: base })
.pipe(f)
.pipe(
plumber({
errorHandler: function(err) {
@ -129,6 +132,8 @@ function webpackBuild() {
},
},
],
// babylon is already bundled and does not require parsing
noParse: [/babylon\/lib/],
},
node: {
// Mock Node.js modules that Babel require()s but that we don't

View File

@ -1,4 +1,6 @@
MAKEFLAGS = -j1
FLOW_COMMIT = 4cc2b9f7fadf2e9e445ee9b7b980c65d69d3fbc0
TEST262_COMMIT = 1282e842febf418ca27df13fa4b32f7e5021b470
export NODE_ENV = test
@ -11,11 +13,17 @@ SOURCES = packages codemods experimental
build: clean
make clean-lib
# Build babylon before building all other projects
make build-babylon
./node_modules/.bin/gulp build
ifneq ("$(BABEL_ENV)", "cov")
make build-standalone
endif
build-babylon:
cd packages/babylon; \
./node_modules/.bin/rollup -c
build-standalone:
./node_modules/.bin/gulp build-babel-standalone
@ -67,6 +75,38 @@ test-ci-coverage:
./scripts/test-cov.sh
bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json
bootstrap-flow:
rm -rf ./build/flow
mkdir -p ./build
git clone --branch=master --single-branch --shallow-since=2017-01-01 https://github.com/facebook/flow.git ./build/flow
cd build/flow && git checkout $(FLOW_COMMIT)
test-flow:
node scripts/tests/flow/run_babylon_flow_tests.js
test-flow-ci:
make bootstrap
make test-flow
test-flow-update-whitelist:
node scripts/tests/flow/run_babylon_flow_tests.js --update-whitelist
bootstrap-test262:
rm -rf ./build/test262
mkdir -p ./build
git clone --branch=master --single-branch --shallow-since=2017-01-01 https://github.com/tc39/test262.git ./build/test262
cd build/test262 && git checkout $(TEST262_COMMIT)
test-test262:
node scripts/tests/test262/run_babylon_test262.js
test-test262-ci:
make bootstrap
make test-test262
test-test262-update-whitelist:
node scripts/tests/test262/run_babylon_test262.js --update-whitelist
publish:
git pull --rebase
make clean-lib

View File

@ -30,9 +30,11 @@
"eslint-config-babel": "^7.0.2",
"eslint-plugin-flowtype": "^2.20.0",
"eslint-plugin-prettier": "^2.2.0",
"flow-bin": "^0.53.1",
"flow-bin": "^0.57.3",
"graceful-fs": "^4.1.11",
"gulp": "^3.9.0",
"gulp-babel": "^8.0.0-beta.0",
"gulp-filter": "^5.0.1",
"gulp-newer": "^1.0.0",
"gulp-plumber": "^1.0.1",
"gulp-rename": "^1.2.2",
@ -54,6 +56,7 @@
"semver": "^5.0.0",
"through2": "^2.0.0",
"uglify-js": "^2.4.16",
"util.promisify": "^1.0.0",
"webpack": "^3.4.1",
"webpack-dependency-suite": "^2.4.4",
"webpack-stream": "^4.0.0"

View File

@ -1,5 +1,6 @@
// @flow
// $FlowIssue recursion?
export default class Plugin {
key: ?string;
manipulateOptions: ?Function;

View File

@ -126,6 +126,11 @@ export default function get(entryLoc): Array<Suite> {
execLoc = taskDir;
}
if (resolve.relative(expectLoc + "on")) {
expectLoc += "on";
expectLocAlias += "on";
}
const taskOpts = cloneDeep(suite.options);
const taskOptsLoc = resolve(taskDir + "/options");

View File

@ -1,2 +0,0 @@
test/fixtures
lib

View File

@ -1,31 +0,0 @@
{
"presets": [
["env", {
"loose": true,
"modules": false,
"targets": {
"node": "4.2"
}
}],
"flow"
],
"plugins": [
"external-helpers"
],
"env": {
"watch": {
"presets": [
["env", {
"loose": true,
"targets": {
"node": "current"
}
}],
"flow"
]
},
"test": {
"plugins": ["istanbul"]
}
}
}

View File

@ -1,11 +0,0 @@
root = true
[*]
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
[*.{js,json}]
indent_style = space
indent_size = 2

View File

@ -1,7 +0,0 @@
.nyc_output
build
coverage
lib
node_modules
test/expressions
test/fixtures

View File

@ -1,14 +1,6 @@
{
"root": true,
"extends": "babel",
"plugins": [
"prettier"
],
"extends": "../.eslintrc",
"rules": {
"prettier/prettier": ["error", { "trailingComma": "all" }],
"no-case-declarations": "error"
},
"env": {
"node": true
"curly": "off"
}
}

View File

@ -1,15 +0,0 @@
[ignore]
.*/lib/.*
.*/test/.*
.*/build/.*
[include]
[libs]
[options]
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
suppress_comment= \\(.\\|\n\\)*\\$FlowIssue
suppress_comment= \\(.\\|\n\\)*\\$FlowIgnore
suppress_type=$FlowFixMe
suppress_type=$FlowSubtype

View File

@ -1 +0,0 @@
* text eol=lf

View File

@ -1,35 +0,0 @@
<!--- Provide a general summary of the issue in the title above -->
### Input Code
<!--- If you're describing a bug, please let us know which sample code reproduces your problem -->
```js
var your => (code) => here;
```
### Babylon/Babel Configuration
<!--- If describing a bug, tell us what your babel configuration looks like -->
```js
{
"your": { "config": "here" }
}
```
### Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->
### Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
### Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
| software | version
| ---------------- | -------
| Babylon |
| node |
| npm |
| Operating System |

View File

@ -1,17 +0,0 @@
<!---
Before making a PR please make sure to read our contributing guidelines
https://github.com/babel/babylon/blob/master/CONTRIBUTING.md
-->
| Q | A
| ----------------- | ---
| Bug fix? | yes/no
| Breaking change? | yes/no
| New feature? | yes/no
| Deprecations? | yes/no
| Spec compliancy? | yes/no
| Tests added/pass? | yes/no
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
<!-- Describe your changes below in as much detail as possible -->

View File

@ -1,7 +0,0 @@
.nyc_output
build
coverage
lib
node_modules
npm-debug.log
.vscode

View File

@ -1,58 +0,0 @@
sudo: false
language: node_js
node_js:
- "8"
- "6"
- "4"
env:
global:
- PATH=$HOME/.yarn/bin:$PATH
- JOB=test
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.28.4
- yarn global add greenkeeper-lockfile@1
before_script:
- greenkeeper-lockfile-update
- 'if [ "$JOB" = "babel-test" ]; then make bootstrap-babel ; fi'
- 'if [ "$JOB" = "flow-test" ]; then make bootstrap-flow ; fi'
- 'if [ "$JOB" = "test262-test" ]; then make bootstrap-test262 ; fi'
- 'if [ "$JOB" = "test" ]; then yarn run build; fi'
script:
- 'if [ "$JOB" = "test" ]; then yarn test-only; fi'
- 'if [ "$JOB" = "lint" ]; then yarn run lint && yarn run flow; fi'
- 'if [ "$JOB" = "flow-test" ]; then make test-flow; fi'
- 'if [ "$JOB" = "babel-test" ]; then make test-babel; fi'
- 'if [ "$JOB" = "test262-test" ]; then make test-test262; fi'
- 'if [ "$JOB" = "test-coverage" ]; then yarn run test-coverage; fi'
matrix:
fast_finish: true
include:
- node_js: "lts/*"
env: JOB=test-coverage
- node_js: "lts/*"
env: JOB=lint
- node_js: "lts/*"
env: JOB=babel-test
- node_js: "lts/*"
env: JOB=flow-test
- node_js: node
env: JOB=test262-test
after_script:
- greenkeeper-lockfile-upload
after_success:
- 'if [ "$JOB" = "babel-test" ]; then bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json -F babel ; fi'
- 'if [ "$JOB" = "test-coverage" ]; then bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json -F babylon ; fi'
notifications:
slack: babeljs:5Wy4QX13KVkGy9CnU0rmvgeK
branches:
except:
- /^v\d+\.\d+\.\d+$/

View File

@ -1 +0,0 @@
workspaces-experimental true

View File

@ -1,13 +0,0 @@
# Contributor Code of Conduct
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)

View File

@ -1,138 +0,0 @@
# Contributing
Contributions are always welcome, no matter how large or small. Before
contributing, please read the
[code of conduct](https://github.com/babel/babel/blob/master/CODE_OF_CONDUCT.md).
## Resources
Check out the [babel-handbook](https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#asts) and [ASTExplorer](http://astexplorer.net/) for some info about contributing to this project regarding Abstract Syntax Trees (ASTs).
## Setup local env
> Install yarn beforehand: https://yarnpkg.com/en/docs/install
To start developing on Babylon you only need to install its dependencies:
```bash
git clone https://github.com/babel/babylon
cd babylon
yarn
```
## Tests
### Running tests locally
To run a build, tests and perform lint/flow checks:
```bash
yarn test
```
If you only want to run the tests:
```bash
yarn run test-only
```
Note, this does not actually run a build, so you may have to call `yarn run build` after
performing any changes.
### Running one test
To run only a single test, add `"only": true` to the `options.json` inside any test fixture folder (you may have to create the file if it doesn't exist).
For example, let's say we want to only run the test for the [`test/fixtures/comments/basic/shebang-import`](https://github.com/babel/babylon/tree/7.0/test/fixtures/comments/basic/shebang-import) fixture.
Add `"only": true` to its `options.json`:
```json
{
"sourceType": "module",
"only": true
}
```
Then, run the tests using the same command as before:
```bash
yarn run test-only
```
### Checking code coverage locally
To generate code coverage, be sure to set `BABEL_ENV=test` so that code is instrumented during
the rollup build.
```bash
BABEL_ENV=test yarn run build && yarn run test-coverage
```
### Writing tests
Writing tests for Babylon is very
[similar to Babel](https://github.com/babel/babel/blob/master/CONTRIBUTING.md#writing-tests).
Inside the `tests/fixtures` folder are categories/groupings of test fixtures (es2015, flow,
etc.). To add a test, create a folder under one of these groupings (or create a new one) with a
descriptive name, and add the following:
* Create an `actual.js` file that contains the code you want Babylon to parse.
* Add an `expected.json` file with the expected parser output. For added convenience, if
there is no `expected.json` present, the test runner will generate one for you.
## Cross repository changes
If you are making changes to Babylon which make it necessary to also change things in Babel
you will want to link both repositories together. This can be done by doing the following
(assuming you have both Babel and Babylon already checked out):
```bash
cd babylon/
yarn link
yarn run build
cd ../babel/
make bootstrap
yarn link babylon
cd packages/babel-core/
yarn link babylon
cd ../babel-template/
yarn link babylon
cd ../babel-traverse/
yarn link babylon
cd ../babel-generator/
yarn link babylon
cd ../babel-types/
yarn link babylon
cd ../..
make build
make test
```
From now on Babel will use your local checkout of Babylon for its tests.
## Creating a new plugin (`spec-new`)
> Example: https://github.com/babel/babylon/pull/541
- Create a new issue that describes the proposal (ex: [#538](https://github.com/babel/babylon/issues/538)). Include any relevant information like proposal repo/author, examples, parsing approaches, meeting notes, presentation slides, and more.
- The pull request should include:
- [ ] An update to the [#plugins](https://github.com/babel/babylon#plugins) part of the readme. Add a new entry to that list for the new plugin flag (and link to the proposal)
- [ ] If any new nodes or modifications need to be added to the AST, update [ast/spec.md](https://github.com/babel/babylon/blob/master/ast/spec.md)
- [ ] Make sure you use the `this.hasPlugin("plugin-name-here")` check so that your new plugin code only runs when that flag is turned on (not default behavior)
- [ ] Add failing/passing tests according to spec behavior
- [ ] Start working about the Babel transform itself!
## Publishing
```sh
# run lerna-changelog from global install and copy it
lerna-changelog
# create tag or specific one (ex: `npm version v7.0.0-beta.16`)
npm version patch
# push to github
git push --follow-tags
# publish (sometimes need `npm publish --tag=next`)
npm publish
# upload changelog to github releases, etc
```

View File

@ -1,47 +0,0 @@
MAKEFLAGS = -j1
TEST262_COMMIT = d9f62e4ccf11b2248c2045fb980bf4255621bab0
export NODE_ENV = test
# Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967
export FORCE_COLOR = true
.PHONY: make clean test test-only test-cov test-clean test-travis publish build bootstrap publish-core publish-runtime build-website build-core watch-core build-core-test clean-core prepublish
clean: ; rm -rf ./build
bootstrap-babel: clean
mkdir ./build
git clone --depth=1 --branch=master https://github.com/babel/babel.git ./build/babel
cd ./build/babel; \
make bootstrap
find ./build/babel/packages -type d -name 'babylon' -prune -exec rm -rf '{}' \; -exec ln -s '../../../../../' '{}' \;
test-babel:
BABEL_ENV=test yarn run build
# in case babel ever switches to nyc: filter its config out of package.json
cd ./build/babel; \
jq "del(.nyc)" package.json > package.nonyc.json; \
mv -f package.nonyc.json package.json; \
../../node_modules/.bin/nyc --no-instrument --no-source-map --reporter=json --report-dir ../../coverage node_modules/mocha/bin/_mocha `scripts/_get-test-directories.sh` --opts test/mocha.opts --compilers js:babel-register; \
bootstrap-flow: clean
mkdir ./build
git clone --depth=1 --branch=master https://github.com/facebook/flow.git ./build/flow
test-flow:
node scripts/run_flow_tests.js
test-flow-update-whitelist:
node scripts/run_flow_tests.js --update-whitelist
bootstrap-test262: clean
mkdir ./build
git clone https://github.com/tc39/test262.git ./build/test262
cd build/test262 && git checkout $(TEST262_COMMIT)
test-test262:
node scripts/run_test262.js
test-test262-update-whitelist:
node scripts/run_test262.js --update-whitelist

View File

@ -6,21 +6,11 @@
Babylon is a JavaScript parser used in <a href="https://github.com/babel/babel">Babel</a>.
</p>
<p align="center">
<a href="https://www.npmjs.com/package/babylon"><img alt="NPM Version" src="https://img.shields.io/npm/v/babylon.svg?style=flat"></a>
<a href="https://travis-ci.org/babel/babylon"><img alt="Travis Status" src="https://img.shields.io/travis/babel/babylon/master.svg?style=flat&label=travis"></a>
<a href="https://codecov.io/gh/babel/babylon"><img alt="Codecov Status" src="https://img.shields.io/codecov/c/github/babel/babylon/master.svg?style=flat"></a>
</p>
- The latest ECMAScript version enabled by default (ES2017).
- Comment attachment.
- Support for JSX, Flow, Typescript.
- Support for experimental language proposals (accepting PRs for anything at least [stage-0](https://github.com/tc39/proposals/blob/master/stage-0-proposals.md)).
## Contributing
Check out [contributing.md](https://github.com/babel/babylon/blob/master/CONTRIBUTING.md)
## Credits
Heavily based on [acorn](https://github.com/marijnh/acorn) and [acorn-jsx](https://github.com/RReverser/acorn-jsx),

View File

@ -1,4 +0,0 @@
coverage:
parsers:
javascript:
enable_partials: yes

View File

@ -9,9 +9,11 @@
"babel",
"javascript",
"parser",
"tc39",
"ecmascript",
"babylon"
],
"repository": "https://github.com/babel/babylon",
"repository": "https://github.com/babel/babel/tree/master/packages/babylon",
"main": "lib/index.js",
"files": [
"bin",
@ -21,82 +23,14 @@
"node": ">=4.2.0"
},
"devDependencies": {
"ava": "^0.22.0",
"babel-core": "7.0.0-alpha.18",
"babel-eslint": "8.0.1",
"babel-helper-fixtures": "7.0.0-alpha.18",
"babel-plugin-external-helpers": "7.0.0-alpha.18",
"babel-plugin-istanbul": "^4.1.4",
"babel-preset-env": "2.0.0-alpha.18",
"babel-preset-flow": "7.0.0-alpha.18",
"chalk": "^2.0.0",
"cross-env": "^5.0.0",
"eslint": "^4.0.0",
"eslint-config-babel": "^7.0.1",
"eslint-plugin-flowtype": "^2.34.0",
"eslint-plugin-prettier": "^2.1.2",
"flow-bin": "^0.56.0",
"graceful-fs": "^4.1.11",
"husky": "^0.14.1",
"lint-staged": "^4.0.0",
"nyc": "^11.0.3",
"prettier": "^1.5.2",
"rimraf": "^2.5.4",
"@babel/helper-fixtures": "7.0.0-beta.5",
"rollup": "^0.50.0",
"rollup-plugin-babel": "^3.0.1",
"rollup-plugin-babel": "^4.0.0-beta.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-watch": "^4.0.0",
"unicode-9.0.0": "~0.7.0",
"util.promisify": "^1.0.0"
"unicode-9.0.0": "~0.7.0"
},
"bin": {
"babylon": "./bin/babylon.js"
},
"scripts": {
"build": "yarn run clean && rollup -c",
"changelog": "git log `git describe --tags --abbrev=0`..HEAD --pretty=format:' * %s (%an)' | grep -v 'Merge pull request'",
"clean": "rimraf lib",
"flow": "flow",
"lint": "eslint src bin test",
"prepublish": "cross-env BABEL_ENV=production yarn run build",
"preversion": "yarn run test && npm run changelog",
"test": "yarn run lint && yarn run flow && yarn run build -- -m && yarn run test-only",
"test-only": "ava",
"test-coverage": "cross-env BABEL_ENV=test yarn run build && nyc --reporter=json --reporter=text yarn run test-only",
"watch": "yarn run clean && rollup -c --watch"
},
"nyc": {
"include": [
"src/**/*.js",
"bin/**/*.js"
],
"sourceMap": false,
"instrument": false
},
"ava": {
"files": [
"test/*.js"
],
"source": [
"src/**/*.js",
"bin/**/*.js"
]
},
"changelog": {
"repo": "babel/babylon",
"labels": {
"Tag: Breaking Change": ":boom: Breaking Change",
"Tag: Bug Fix": ":bug: Bug Fix",
"Tag: Docs": ":memo: Documentation",
"Tag: Internal": ":house: Internal",
"Tag: New Feature": ":rocket: New Feature",
"Tag: Polish": ":nail_care: Polish"
}
},
"lint-staged": {
"*.js": [
"eslint --format=codeframe --fix",
"git add"
]
}
}

View File

@ -7,5 +7,23 @@ export default {
file: "lib/index.js",
format: "cjs",
},
plugins: [babel(), nodeResolve()],
plugins: [
babel({
babelrc: false,
presets: [
[
"@babel/env",
{
loose: true,
modules: false,
targets: {
node: "4.2",
},
},
],
"@babel/flow",
],
}),
nodeResolve(),
],
};

View File

@ -1,24 +0,0 @@
// Use this to remove all "expected.json" in all tests.
const { existsSync, readdirSync, statSync, unlinkSync } = require("fs");
const { join } = require("path");
const rootPath = join(__dirname, "..", "test", "fixtures");
for (const fixtureName of readdirSync(rootPath)) {
const fixturePath = join(rootPath, fixtureName);
for (const suiteName of readdirSync(fixturePath)) {
const suitePath = join(fixturePath, suiteName);
if (!statSync(suitePath).isDirectory()) {
continue;
}
for (const testName of readdirSync(suitePath)) {
const testPath = join(suitePath, testName);
const expectedPath = join(testPath, "expected.json");
if (existsSync(expectedPath)) {
unlinkSync(expectedPath);
}
}
}
}

View File

@ -1,13 +0,0 @@
"use strict";
const exec = require("child_process").exec;
const runIfYarn = fn => {
exec("yarn -V", error => {
if (error === null) fn();
});
};
runIfYarn(() => {
console.log("`package.json` was changed. Running yarn...🐈");
exec("yarn");
});

View File

@ -40,7 +40,7 @@ tt.jsxTagEnd.updateContext = function(prevType) {
function isFragment(object: ?N.JSXElement): boolean {
return object
? object.type === "JSXOpeningFragment" ||
object.type === "JSXClosingFragment"
object.type === "JSXClosingFragment"
: false;
}

View File

@ -22,15 +22,15 @@ export type Comment = {
};
export interface NodeBase {
start: number,
end: number,
loc: SourceLocation,
range: [number, number],
leadingComments?: ?Array<Comment>,
trailingComments?: ?Array<Comment>,
innerComments?: ?Array<Comment>,
start: number;
end: number;
loc: SourceLocation;
range: [number, number];
leadingComments?: ?Array<Comment>;
trailingComments?: ?Array<Comment>;
innerComments?: ?Array<Comment>;
extra: { [key: string]: any },
extra: { [key: string]: any };
}
// Using a union type for `Node` makes type-checking too slow.

View File

@ -1,101 +0,0 @@
{
"type": "File",
"start": 0,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 18
}
},
"program": {
"type": "Program",
"start": 0,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 18
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 18
}
},
"expression": {
"type": "CallExpression",
"start": 0,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 17
}
},
"callee": {
"type": "Import",
"start": 0,
"end": 6,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 6
}
}
},
"arguments": [
{
"type": "StringLiteral",
"start": 7,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 16
}
},
"extra": {
"rawValue": "test.js",
"raw": "'test.js'"
},
"value": "test.js"
}
]
}
}
],
"directives": []
}
}

View File

@ -1,3 +1,4 @@
{
"throws": "Unexpected token, expected { (1:6)",
"plugins": []
}

View File

@ -1,3 +1,3 @@
{
"plugins": ["exportExtensions"]
"plugins": ["jsx", "flow", "exportExtensions"]
}

View File

@ -1,5 +1,4 @@
import test from "ava";
import { multiple as getFixtures } from "babel-helper-fixtures";
import { multiple as getFixtures } from "@babel/helper-fixtures";
export function runFixtureTests(fixturesPath, parseFunction) {
const fixtures = getFixtures(fixturesPath);
@ -7,18 +6,15 @@ export function runFixtureTests(fixturesPath, parseFunction) {
Object.keys(fixtures).forEach(function(name) {
fixtures[name].forEach(function(testSuite) {
testSuite.tests.forEach(function(task) {
const testFn = task.disabled
? test.skip
: task.options.only ? test.only : test;
const testFn = task.disabled ? it.skip : it;
testFn(name + "/" + testSuite.title + "/" + task.title, function(t) {
testFn(name + "/" + testSuite.title + "/" + task.title, function() {
try {
runTest(task, parseFunction);
t.pass();
} catch (err) {
const message =
name + "/" + task.actual.filename + ": " + err.message;
t.fail(message);
throw new Error(message);
}
});
});
@ -37,18 +33,15 @@ export function runThrowTestsWithEstree(fixturesPath, parseFunction) {
task.options.plugins = task.options.plugins || [];
task.options.plugins.push("estree");
const testFn = task.disabled
? test.skip
: task.options.only ? test.only : test;
const testFn = task.disabled ? it.skip : it;
testFn(name + "/" + testSuite.title + "/" + task.title, function(t) {
testFn(name + "/" + testSuite.title + "/" + task.title, function() {
try {
runTest(task, parseFunction);
t.pass();
} catch (err) {
const message =
name + "/" + task.actual.filename + ": " + err.message;
t.fail(message);
throw new Error(message);
}
});
});

File diff suppressed because it is too large Load Diff

View File

@ -3,9 +3,12 @@
const path = require("path");
const fs = require("fs");
const chalk = require("chalk");
const parse = require("..").parse;
const parse = require("../../../packages/babylon").parse;
const TESTS_FOLDER = path.join(__dirname, "../build/flow/src/parser/test/flow");
const TESTS_FOLDER = path.join(
__dirname,
"../../../build/flow/src/parser/test/flow"
);
const WHITELIST_PATH = path.join(__dirname, "./flow_tests_whitelist.txt");
const shouldUpdateWhitelist = process.argv.indexOf("--update-whitelist") > 0;
@ -118,7 +121,7 @@ const summary = {
success: [],
failure: [],
},
unrecognized: []
unrecognized: [],
};
const tests = get_tests(TESTS_FOLDER);
@ -140,8 +143,9 @@ tests.forEach(section => {
if (test.options) {
Object.keys(test.options).forEach(option => {
if (!test.options[option]) return;
if (!flowOptionsMapping[option])
if (!flowOptionsMapping[option]) {
throw new Error("Parser options not mapped " + option);
}
babylonOptions.plugins.push(flowOptionsMapping[option]);
});
}
@ -263,7 +267,6 @@ console.log(
// adds at the end of failing scripts
console.log();
if (shouldUpdateWhitelist) {
update_whitelist(summary);
console.log("\nWhitelist updated");

View File

@ -2,9 +2,9 @@
const path = require("path");
const chalk = require("chalk");
const utils = require("./run_test262_utils");
const utils = require("./run_babylon_test262_utils");
const testDir = path.join(__dirname, "..", "build", "test262", "test");
const testDir = path.join(__dirname, "../../../build/test262/test");
const whitelistFile = path.join(__dirname, "test262_whitelist.txt");
const plugins = ["asyncGenerators", "objectRestSpread", "optionalCatchBinding"];
const shouldUpdate = process.argv.indexOf("--update-whitelist") > -1;

View File

@ -7,10 +7,10 @@ const pfs = {
readFile: promisify(fs.readFile),
writeFile: promisify(fs.writeFile),
readdir: promisify(fs.readdir),
stat: promisify(fs.stat)
stat: promisify(fs.stat),
};
const parse = require("..").parse;
const parse = require("../../../packages/babylon").parse;
const modulePattern = /^\s*-\s*module\s*$|^\s*flags\s*:.*\bmodule\b/m;
const noStrictPattern = /^\s*-\s*noStrict\s*$|^\s*flags\s*:.*\bnoStrict\b/m;
@ -42,7 +42,7 @@ function readDirDeep(dirName) {
contents.map(function(name) {
return findTests(path.join(dirName, name));
})
).then(flatten)
).then(flatten);
});
}

View File

@ -696,7 +696,6 @@ language/statements/if/let-block-with-newline.js(default)
language/statements/if/let-identifier-with-newline.js(default)
language/statements/labeled/let-block-with-newline.js(default)
language/statements/labeled/value-yield-non-strict.js(default)
language/statements/let/syntax/identifier-let-allowed-as-lefthandside-expression-non-strict.js(default)
language/statements/while/let-block-with-newline.js(default)
language/statements/while/let-identifier-with-newline.js(default)
language/statements/with/let-block-with-newline.js(default)
@ -1285,3 +1284,247 @@ language/statements/class/fields-wrapped-in-sc-string-literal-names.js(strict mo
language/statements/labeled/let-identifier-with-newline.js(default)
language/statements/labeled/value-yield-non-strict-escaped.js(default)
language/statements/let/syntax/escaped-let.js(default)
built-ins/BigInt/asIntN/arithmetic.js(default)
built-ins/BigInt/asIntN/arithmetic.js(strict mode)
built-ins/BigInt/asIntN/bigint-tobigint.js(default)
built-ins/BigInt/asIntN/bigint-tobigint.js(strict mode)
built-ins/BigInt/asIntN/bits-toindex.js(default)
built-ins/BigInt/asIntN/bits-toindex.js(strict mode)
built-ins/BigInt/asIntN/order-of-steps.js(default)
built-ins/BigInt/asIntN/order-of-steps.js(strict mode)
built-ins/BigInt/asUintN/arithmetic.js(default)
built-ins/BigInt/asUintN/arithmetic.js(strict mode)
built-ins/BigInt/asUintN/bigint-tobigint.js(default)
built-ins/BigInt/asUintN/bigint-tobigint.js(strict mode)
built-ins/BigInt/asUintN/bits-toindex.js(default)
built-ins/BigInt/asUintN/bits-toindex.js(strict mode)
built-ins/BigInt/asUintN/order-of-steps.js(default)
built-ins/BigInt/asUintN/order-of-steps.js(strict mode)
built-ins/BigInt/new-target-throws.js(default)
built-ins/BigInt/new-target-throws.js(strict mode)
built-ins/BigInt/parseInt/all-decimal-digits.js(default)
built-ins/BigInt/parseInt/all-decimal-digits.js(strict mode)
built-ins/BigInt/parseInt/arg-number.js(default)
built-ins/BigInt/parseInt/arg-number.js(strict mode)
built-ins/BigInt/parseInt/arg-primitive-coercion.js(default)
built-ins/BigInt/parseInt/arg-primitive-coercion.js(strict mode)
built-ins/BigInt/parseInt/arg-string-obj.js(default)
built-ins/BigInt/parseInt/arg-string-obj.js(strict mode)
built-ins/BigInt/parseInt/binary-negative.js(default)
built-ins/BigInt/parseInt/binary-negative.js(strict mode)
built-ins/BigInt/parseInt/binary.js(default)
built-ins/BigInt/parseInt/binary.js(strict mode)
built-ins/BigInt/parseInt/decimal-negative.js(default)
built-ins/BigInt/parseInt/decimal-negative.js(strict mode)
built-ins/BigInt/parseInt/hex-prefix-lc.js(default)
built-ins/BigInt/parseInt/hex-prefix-lc.js(strict mode)
built-ins/BigInt/parseInt/hex-prefix-uc.js(default)
built-ins/BigInt/parseInt/hex-prefix-uc.js(strict mode)
built-ins/BigInt/parseInt/hex.js(default)
built-ins/BigInt/parseInt/hex.js(strict mode)
built-ins/BigInt/parseInt/leading-cr.js(default)
built-ins/BigInt/parseInt/leading-cr.js(strict mode)
built-ins/BigInt/parseInt/leading-ff.js(default)
built-ins/BigInt/parseInt/leading-ff.js(strict mode)
built-ins/BigInt/parseInt/leading-lf.js(default)
built-ins/BigInt/parseInt/leading-lf.js(strict mode)
built-ins/BigInt/parseInt/leading-ls.js(default)
built-ins/BigInt/parseInt/leading-ls.js(strict mode)
built-ins/BigInt/parseInt/leading-nbsp.js(default)
built-ins/BigInt/parseInt/leading-nbsp.js(strict mode)
built-ins/BigInt/parseInt/leading-ps.js(default)
built-ins/BigInt/parseInt/leading-ps.js(strict mode)
built-ins/BigInt/parseInt/leading-space.js(default)
built-ins/BigInt/parseInt/leading-space.js(strict mode)
built-ins/BigInt/parseInt/leading-tab.js(default)
built-ins/BigInt/parseInt/leading-tab.js(strict mode)
built-ins/BigInt/parseInt/leading-vt.js(default)
built-ins/BigInt/parseInt/leading-vt.js(strict mode)
built-ins/BigInt/parseInt/leading-ws.js(default)
built-ins/BigInt/parseInt/leading-ws.js(strict mode)
built-ins/BigInt/parseInt/octal-prefix.js(default)
built-ins/BigInt/parseInt/octal-prefix.js(strict mode)
built-ins/BigInt/parseInt/parseInt.js(default)
built-ins/BigInt/parseInt/parseInt.js(strict mode)
built-ins/BigInt/parseInt/radix-boolean.js(default)
built-ins/BigInt/parseInt/radix-boolean.js(strict mode)
built-ins/BigInt/parseInt/radix-int32.js(default)
built-ins/BigInt/parseInt/radix-int32.js(strict mode)
built-ins/BigInt/parseInt/radix-number-obj.js(default)
built-ins/BigInt/parseInt/radix-number-obj.js(strict mode)
built-ins/BigInt/parseInt/radix-primitive-coercion.js(default)
built-ins/BigInt/parseInt/radix-primitive-coercion.js(strict mode)
built-ins/BigInt/parseInt/radix-string.js(default)
built-ins/BigInt/parseInt/radix-string.js(strict mode)
built-ins/BigInt/parseInt/radix-undefined-or-null.js(default)
built-ins/BigInt/parseInt/radix-undefined-or-null.js(strict mode)
built-ins/BigInt/parseInt/radix-undefined.js(default)
built-ins/BigInt/parseInt/radix-undefined.js(strict mode)
built-ins/BigInt/parseInt/radix-zero.js(default)
built-ins/BigInt/parseInt/radix-zero.js(strict mode)
built-ins/BigInt/parseInt/trailing-code-point.js(default)
built-ins/BigInt/parseInt/trailing-code-point.js(strict mode)
built-ins/BigInt/prototype/toString/radix-2-to-36.js(default)
built-ins/BigInt/prototype/toString/radix-2-to-36.js(strict mode)
built-ins/BigInt/prototype/toString/radix-err.js(default)
built-ins/BigInt/prototype/toString/radix-err.js(strict mode)
built-ins/BigInt/prototype/toString/thisbigintvalue-not-valid-throws.js(default)
built-ins/BigInt/prototype/toString/thisbigintvalue-not-valid-throws.js(strict mode)
built-ins/BigInt/prototype/valueOf/return.js(default)
built-ins/BigInt/prototype/valueOf/return.js(strict mode)
built-ins/JSON/stringify/bigint-order.js(default)
built-ins/JSON/stringify/bigint-order.js(strict mode)
built-ins/JSON/stringify/bigint-replacer.js(default)
built-ins/JSON/stringify/bigint-replacer.js(strict mode)
built-ins/JSON/stringify/bigint-tojson.js(default)
built-ins/JSON/stringify/bigint-tojson.js(strict mode)
built-ins/JSON/stringify/bigint.js(default)
built-ins/JSON/stringify/bigint.js(strict mode)
built-ins/Number/bigint-conversion.js(default)
built-ins/Number/bigint-conversion.js(strict mode)
built-ins/Object/bigint.js(default)
built-ins/Object/bigint.js(strict mode)
built-ins/Object/setPrototypeOf/bigint.js(default)
built-ins/Object/setPrototypeOf/bigint.js(strict mode)
language/expressions/addition/bigint-arithmetic.js(default)
language/expressions/addition/bigint-arithmetic.js(strict mode)
language/expressions/addition/coerce-bigint-to-string.js(default)
language/expressions/addition/coerce-bigint-to-string.js(strict mode)
language/expressions/bitwise-not/bigint-non-primitive.js(default)
language/expressions/bitwise-not/bigint-non-primitive.js(strict mode)
language/expressions/bitwise-not/bigint.js(default)
language/expressions/bitwise-not/bigint.js(strict mode)
language/expressions/division/bigint-arithmetic.js(default)
language/expressions/division/bigint-arithmetic.js(strict mode)
language/expressions/division/bigint-complex-infinity.js(default)
language/expressions/division/bigint-complex-infinity.js(strict mode)
language/expressions/does-not-equals/bigint-and-bigint.js(default)
language/expressions/does-not-equals/bigint-and-bigint.js(strict mode)
language/expressions/does-not-equals/bigint-and-boolean.js(default)
language/expressions/does-not-equals/bigint-and-boolean.js(strict mode)
language/expressions/does-not-equals/bigint-and-incomparable-primitive.js(default)
language/expressions/does-not-equals/bigint-and-incomparable-primitive.js(strict mode)
language/expressions/does-not-equals/bigint-and-non-finite.js(default)
language/expressions/does-not-equals/bigint-and-non-finite.js(strict mode)
language/expressions/does-not-equals/bigint-and-number-extremes.js(default)
language/expressions/does-not-equals/bigint-and-number-extremes.js(strict mode)
language/expressions/does-not-equals/bigint-and-number.js(default)
language/expressions/does-not-equals/bigint-and-number.js(strict mode)
language/expressions/does-not-equals/bigint-and-object.js(default)
language/expressions/does-not-equals/bigint-and-object.js(strict mode)
language/expressions/does-not-equals/bigint-and-string.js(default)
language/expressions/does-not-equals/bigint-and-string.js(strict mode)
language/expressions/equals/bigint-and-bigint.js(default)
language/expressions/equals/bigint-and-bigint.js(strict mode)
language/expressions/equals/bigint-and-boolean.js(default)
language/expressions/equals/bigint-and-boolean.js(strict mode)
language/expressions/equals/bigint-and-incomparable-primitive.js(default)
language/expressions/equals/bigint-and-incomparable-primitive.js(strict mode)
language/expressions/equals/bigint-and-non-finite.js(default)
language/expressions/equals/bigint-and-non-finite.js(strict mode)
language/expressions/equals/bigint-and-number-extremes.js(default)
language/expressions/equals/bigint-and-number-extremes.js(strict mode)
language/expressions/equals/bigint-and-number.js(default)
language/expressions/equals/bigint-and-number.js(strict mode)
language/expressions/equals/bigint-and-object.js(default)
language/expressions/equals/bigint-and-object.js(strict mode)
language/expressions/equals/bigint-and-string.js(default)
language/expressions/equals/bigint-and-string.js(strict mode)
language/expressions/exponentiation/bigint-arithmetic.js(default)
language/expressions/exponentiation/bigint-arithmetic.js(strict mode)
language/expressions/exponentiation/bigint-exp-operator-negative-throws.js(default)
language/expressions/exponentiation/bigint-exp-operator-negative-throws.js(strict mode)
language/expressions/exponentiation/bigint-zero-base-zero-exponent.js(default)
language/expressions/exponentiation/bigint-zero-base-zero-exponent.js(strict mode)
language/expressions/greater-than/bigint-and-bigint.js(default)
language/expressions/greater-than/bigint-and-bigint.js(strict mode)
language/expressions/greater-than/bigint-and-non-finite.js(default)
language/expressions/greater-than/bigint-and-non-finite.js(strict mode)
language/expressions/greater-than/bigint-and-number-extremes.js(default)
language/expressions/greater-than/bigint-and-number-extremes.js(strict mode)
language/expressions/greater-than/bigint-and-number.js(default)
language/expressions/greater-than/bigint-and-number.js(strict mode)
language/expressions/greater-than-or-equal/bigint-and-bigint.js(default)
language/expressions/greater-than-or-equal/bigint-and-bigint.js(strict mode)
language/expressions/greater-than-or-equal/bigint-and-non-finite.js(default)
language/expressions/greater-than-or-equal/bigint-and-non-finite.js(strict mode)
language/expressions/greater-than-or-equal/bigint-and-number-extremes.js(default)
language/expressions/greater-than-or-equal/bigint-and-number-extremes.js(strict mode)
language/expressions/greater-than-or-equal/bigint-and-number.js(default)
language/expressions/greater-than-or-equal/bigint-and-number.js(strict mode)
language/expressions/less-than/bigint-and-bigint.js(default)
language/expressions/less-than/bigint-and-bigint.js(strict mode)
language/expressions/less-than/bigint-and-non-finite.js(default)
language/expressions/less-than/bigint-and-non-finite.js(strict mode)
language/expressions/less-than/bigint-and-number-extremes.js(default)
language/expressions/less-than/bigint-and-number-extremes.js(strict mode)
language/expressions/less-than/bigint-and-number.js(default)
language/expressions/less-than/bigint-and-number.js(strict mode)
language/expressions/less-than-or-equal/bigint-and-bigint.js(default)
language/expressions/less-than-or-equal/bigint-and-bigint.js(strict mode)
language/expressions/less-than-or-equal/bigint-and-non-finite.js(default)
language/expressions/less-than-or-equal/bigint-and-non-finite.js(strict mode)
language/expressions/less-than-or-equal/bigint-and-number-extremes.js(default)
language/expressions/less-than-or-equal/bigint-and-number-extremes.js(strict mode)
language/expressions/less-than-or-equal/bigint-and-number.js(default)
language/expressions/less-than-or-equal/bigint-and-number.js(strict mode)
language/expressions/logical-not/bigint.js(default)
language/expressions/logical-not/bigint.js(strict mode)
language/expressions/modulus/bigint-arithmetic.js(default)
language/expressions/modulus/bigint-arithmetic.js(strict mode)
language/expressions/modulus/bigint-modulo-zero.js(default)
language/expressions/modulus/bigint-modulo-zero.js(strict mode)
language/expressions/multiplication/bigint-arithmetic.js(default)
language/expressions/multiplication/bigint-arithmetic.js(strict mode)
language/expressions/postfix-decrement/bigint.js(default)
language/expressions/postfix-decrement/bigint.js(strict mode)
language/expressions/postfix-increment/bigint.js(default)
language/expressions/postfix-increment/bigint.js(strict mode)
language/expressions/prefix-decrement/bigint.js(default)
language/expressions/prefix-decrement/bigint.js(strict mode)
language/expressions/prefix-increment/bigint.js(default)
language/expressions/prefix-increment/bigint.js(strict mode)
language/expressions/strict-does-not-equals/bigint-and-bigint.js(default)
language/expressions/strict-does-not-equals/bigint-and-bigint.js(strict mode)
language/expressions/strict-does-not-equals/bigint-and-boolean.js(default)
language/expressions/strict-does-not-equals/bigint-and-boolean.js(strict mode)
language/expressions/strict-does-not-equals/bigint-and-incomparable-primitive.js(default)
language/expressions/strict-does-not-equals/bigint-and-incomparable-primitive.js(strict mode)
language/expressions/strict-does-not-equals/bigint-and-non-finite.js(default)
language/expressions/strict-does-not-equals/bigint-and-non-finite.js(strict mode)
language/expressions/strict-does-not-equals/bigint-and-number-extremes.js(default)
language/expressions/strict-does-not-equals/bigint-and-number-extremes.js(strict mode)
language/expressions/strict-does-not-equals/bigint-and-number.js(default)
language/expressions/strict-does-not-equals/bigint-and-number.js(strict mode)
language/expressions/strict-does-not-equals/bigint-and-object.js(default)
language/expressions/strict-does-not-equals/bigint-and-object.js(strict mode)
language/expressions/strict-does-not-equals/bigint-and-string.js(default)
language/expressions/strict-does-not-equals/bigint-and-string.js(strict mode)
language/expressions/strict-equals/bigint-and-bigint.js(default)
language/expressions/strict-equals/bigint-and-bigint.js(strict mode)
language/expressions/strict-equals/bigint-and-boolean.js(default)
language/expressions/strict-equals/bigint-and-boolean.js(strict mode)
language/expressions/strict-equals/bigint-and-incomparable-primitive.js(default)
language/expressions/strict-equals/bigint-and-incomparable-primitive.js(strict mode)
language/expressions/strict-equals/bigint-and-non-finite.js(default)
language/expressions/strict-equals/bigint-and-non-finite.js(strict mode)
language/expressions/strict-equals/bigint-and-number-extremes.js(default)
language/expressions/strict-equals/bigint-and-number-extremes.js(strict mode)
language/expressions/strict-equals/bigint-and-number.js(default)
language/expressions/strict-equals/bigint-and-number.js(strict mode)
language/expressions/strict-equals/bigint-and-object.js(default)
language/expressions/strict-equals/bigint-and-object.js(strict mode)
language/expressions/strict-equals/bigint-and-string.js(default)
language/expressions/strict-equals/bigint-and-string.js(strict mode)
language/expressions/subtraction/bigint-arithmetic.js(default)
language/expressions/subtraction/bigint-arithmetic.js(strict mode)
language/expressions/typeof/bigint.js(default)
language/expressions/typeof/bigint.js(strict mode)
language/expressions/unary-minus/bigint-non-primitive.js(default)
language/expressions/unary-minus/bigint-non-primitive.js(strict mode)
language/expressions/unary-minus/bigint.js(default)
language/expressions/unary-minus/bigint.js(strict mode)
language/expressions/unary-plus/bigint-throws.js(default)
language/expressions/unary-plus/bigint-throws.js(strict mode)
language/statements/for-in/identifier-let-allowed-as-lefthandside-expression-not-strict.js(default)

482
yarn.lock

File diff suppressed because it is too large Load Diff