Skip to content

Commit eea156b

Browse files
nicolo-ribaudoJLHwung
authored andcommitted
Migrate from "master" branch to "main" (#11715)
* Remove dead link * Use consistent "homepage" url in package.json * Update md links * Update comment link in parser d.ts * Add comment in gitpod config * Update circleci config * Update PULL_REQUEST_TEMPLATE * Update badges * Trigger CI * Update 404 link
1 parent e498bee commit eea156b

File tree

17 files changed

+63
-55
lines changed

17 files changed

+63
-55
lines changed

.circleci/config.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
steps:
7272
- checkout
7373
- run:
74-
name: Sync with latest master branch (only on PRs)
74+
name: Sync with latest main branch (only on PRs)
7575
command: |
7676
if [ -n "$CIRCLE_PULL_REQUEST" ]
7777
then
@@ -92,8 +92,8 @@ jobs:
9292
npm i tap-mocha-reporter --save-dev
9393
node lib/download-node
9494
- run:
95-
name: Download master branch Test262 artifact
96-
command: node lib/download-master-artifact ~/master.tap
95+
name: Download main branch Test262 artifact
96+
command: node lib/download-main-artifact ~/test262-main.tap
9797
<<: *test262_workdir
9898
- run:
9999
name: Run Test262
@@ -106,10 +106,10 @@ jobs:
106106
cat ~/test262.tap | $(npm bin)/tap-mocha-reporter spec || true
107107
<<: *test262_workdir
108108
- run:
109-
name: Compare previous master branch & current job results
109+
name: Compare previous main branch & current job results
110110
command: |
111111
mkdir -p ~/test-results/test262
112-
node lib/compare-results ~/master.tap ~/test262.tap | tee ~/diff.tap
112+
node lib/compare-results ~/test262-main.tap ~/test262.tap | tee ~/diff.tap
113113
<<: *test262_workdir
114114
- store_artifacts: *artifact_test262_diff_tap
115115
- run:
@@ -171,28 +171,36 @@ workflows:
171171
build-standalone:
172172
jobs:
173173
- build-standalone
174-
test262-master:
174+
test262:
175175
jobs:
176176
- test262:
177177
filters:
178178
branches:
179179
only:
180-
- master
181-
test262:
180+
- main
181+
- next-8-dev
182+
- next-8-rebased
183+
test262-pr:
182184
jobs:
183185
- approve-test262-run:
184186
type: approval
185187
filters:
186188
branches:
187189
ignore:
190+
- main
188191
- master
192+
- next-8-dev
193+
- next-8-rebased
189194
- test262:
190195
requires:
191196
- approve-test262-run
192197
filters:
193198
branches:
194199
ignore:
200+
- main
195201
- master
202+
- next-8-dev
203+
- next-8-rebased
196204
e2e:
197205
jobs:
198206
- publish-verdaccio

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
Before making a PR, please read our contributing guidelines
3-
https://github.com/babel/babel/blob/master/CONTRIBUTING.md
3+
https://github.com/babel/babel/blob/main/CONTRIBUTING.md
44
55
Please note that the Babel Team requires two approvals before merging most PRs.
66

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ tasks:
2424
github:
2525
# https://www.gitpod.io/docs/prebuilds/#configure-prebuilds
2626
prebuilds:
27-
master: true
27+
master: true # enable for the default branch (even if it's not named "master")
2828
branches: true
2929
pullRequests: true
3030
pullRequestsFromForks: true

CONTRIBUTING.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
# Contributing
1818

19-
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).
19+
Contributions are always welcome, no matter how large or small! Before contributing, please read the [code of conduct](https://github.com/babel/babel/blob/main/CODE_OF_CONDUCT.md).
2020

2121
If you want an already configured online IDE to contribute to Babel, you can use [Gitpod](https://gitpod.io/#https://github.com/babel/babel)!
2222

2323
## Not sure where to start?
2424

2525
- If you aren't just making a documentation change, you'll probably want to learn a bit about a few topics.
26-
- [ASTs](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (Abstract Syntax Tree): The Babel AST [spec](https://github.com/babel/babel/blob/master/packages/babel-parser/ast/spec.md) is a bit different from [ESTree](https://github.com/estree/estree). The differences are listed [here](https://babeljs.io/docs/en/next/babel-parser.html#output).
27-
- Check out [`/doc`](https://github.com/babel/babel/tree/master/doc) for information about Babel's internals
26+
- [ASTs](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (Abstract Syntax Tree): The Babel AST [spec](https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md) is a bit different from [ESTree](https://github.com/estree/estree). The differences are listed [here](https://babeljs.io/docs/en/next/babel-parser.html#output).
27+
- Check out [`/doc`](https://github.com/babel/babel/tree/main/doc) for information about Babel's internals
2828
- 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!
2929
- Check out [AST Explorer](http://astexplorer.net/#/scUfOmVOG5) to learn more about ASTs or make your own plugin in the browser
3030
- When you feel ready to jump into the Babel source code, a good place to start is to look for issues tagged with [help wanted](https://github.com/babel/babel/labels/help%20wanted) and/or [good first issue](https://github.com/babel/babel/labels/good%20first%20issue).
@@ -106,7 +106,7 @@ If you just want to run all tests:
106106
$ make test-only
107107
```
108108

109-
When working on an issue, you will most likely want to focus on a particular [packages](https://github.com/babel/babel/tree/master/packages). Using `TEST_ONLY` will only run tests for that specific package.
109+
When working on an issue, you will most likely want to focus on a particular [packages](https://github.com/babel/babel/tree/main/packages). Using `TEST_ONLY` will only run tests for that specific package.
110110

111111
```sh
112112
$ TEST_ONLY=babel-cli make test
@@ -137,7 +137,7 @@ To enable the Node.js debugger added in v6.3.0, set the `TEST_DEBUG` environment
137137
$ TEST_DEBUG=true make test
138138
```
139139

140-
You can combine `TEST_DEBUG` with `TEST_GREP` or `TEST_ONLY` to debug a subset of tests. If you plan to stay long in the debugger (which you'll likely do!), you may increase the test timeout by editing [test/mocha.opts](https://github.com/babel/babel/blob/master/test/mocha.opts).
140+
You can combine `TEST_DEBUG` with `TEST_GREP` or `TEST_ONLY` to debug a subset of tests. If you plan to stay long in the debugger (which you'll likely do!), you may increase the test timeout by editing [test/testSetupFile.js](https://github.com/babel/babel/blob/main/test/testSetupFile.js).
141141

142142
To overwrite any test fixtures when fixing a bug or anything, add the env variable `OVERWRITE=true`
143143

@@ -165,26 +165,26 @@ In case you're locally getting errors which are not on the CI, it may be due to
165165

166166
### Writing tests
167167

168-
Most packages in [`/packages`](https://github.com/babel/babel/tree/master/packages) have a `test` folder, however some tests might be in other packages or in [`/packages/babel-core`](https://github.com/babel/babel/tree/master/packages/babel-core/test/fixtures).
168+
Most packages in [`/packages`](https://github.com/babel/babel/tree/main/packages) have a `test` folder, however some tests might be in other packages or in [`/packages/babel-core`](https://github.com/babel/babel/tree/main/packages/babel-core/test/fixtures).
169169

170170
#### `@babel/plugin-x`
171171

172172
All the Babel plugins (and other packages) that have a `/test/fixtures` are written in a similar way.
173173

174-
For example, in [`@babel/plugin-transform-exponentiation-operator/test`](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-exponentiation-operator/test):
174+
For example, in [`@babel/plugin-transform-exponentiation-operator/test`](https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-exponentiation-operator/test):
175175

176-
- There is an `index.js` file. It imports our [test helper](https://github.com/babel/babel/tree/master/packages/babel-helper-plugin-test-runner). (You don't have to worry about this).
177-
- There can be multiple folders under [`/fixtures`](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures)
176+
- There is an `index.js` file. It imports our [test helper](https://github.com/babel/babel/tree/main/packages/babel-helper-plugin-test-runner). (You don't have to worry about this).
177+
- There can be multiple folders under [`/fixtures`](https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-exponentiation-operator/test/fixtures)
178178

179-
- There is an [`options.json`](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/options.json) file whose function is similar to a `.babelrc` file, allowing you to pass in the plugins and settings you need for your tests.
179+
- There is an [`options.json`](https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/options.json) file whose function is similar to a `.babelrc` file, allowing you to pass in the plugins and settings you need for your tests.
180180
- For this test, we only need the relevant plugin, so it's just `{ "plugins": ["@babel/plugin-transform-exponentiation-operator"] }`.
181181
- If necessary, you can have an `options.json` with different options in each subfolder.
182182

183183
- In each subfolder, you can organize your directory structure by categories of tests. (Example: these folders can be named after the feature you are testing or can reference the issue number they fix)
184184
- Generally, there are two kinds of tests for plugins
185-
  - The first is a simple test of the input and output produced by running Babel on some code. We do this by creating an [`input.js`](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/binary/input.js) file and an [`output.js`](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/binary/output.js) file. This kind of test only works in sub-subdirectories of `/fixtures`, i.e. `/fixtures/exponentian-operator/binary/input.js` and **not** `/fixtures/exponentian-operator/input.js`.
185+
  - The first is a simple test of the input and output produced by running Babel on some code. We do this by creating an [`input.js`](https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/binary/input.js) file and an [`output.js`](https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/binary/output.js) file. This kind of test only works in sub-subdirectories of `/fixtures`, i.e. `/fixtures/exponentian-operator/binary/input.js` and **not** `/fixtures/exponentian-operator/input.js`.
186186
- If you need to expect an error, you can ignore creating the `output.js` file and pass a new `throws` key to the `options.json` that contains the error string that is created.
187-
- The second and preferred type is a test that actually evaluates the produced code and asserts that certain properties are true or false. We do this by creating an [`exec.js`](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/comprehensive/exec.js) file.
187+
- The second and preferred type is a test that actually evaluates the produced code and asserts that certain properties are true or false. We do this by creating an [`exec.js`](https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/comprehensive/exec.js) file.
188188

189189
In a fixture test, you simply write out the code you want to transform in `input.js`.
190190

@@ -310,16 +310,16 @@ Note that the code shown in Chrome DevTools is compiled code and therefore diffe
310310
311311
- 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.
312312
- The pull request should include:
313-
- [ ] An update to the [plugins](https://github.com/babel/babel/tree/master/packages/babel-parser#plugins) part of the readme. Add a new entry to that list for the new plugin flag (and link to the proposal)
314-
- [ ] If any new nodes or modifications need to be added to the AST, update [ast/spec.md](https://github.com/babel/babel/blob/master/packages/babel-parser/ast/spec.md)
313+
- [ ] An update to the [plugins](https://github.com/babel/babel/tree/main/packages/babel-parser#plugins) part of the readme. Add a new entry to that list for the new plugin flag (and link to the proposal)
314+
- [ ] If any new nodes or modifications need to be added to the AST, update [ast/spec.md](https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md)
315315
- [ ] Make sure you use the `this.hasPlugin("plugin-name-here")` check in the babel parser so that your new plugin code only runs when that flag is turned on (not default behavior)
316316
- [ ] Add failing/passing tests according to spec behavior
317317
- Start working about the Babel transform itself!
318318

319319
## Internals
320320

321-
- AST spec ([babel-parser/ast/spec.md](https://github.com/babel/babel/blob/master/packages/babel-parser/ast/spec.md))
322-
- Versioning ([doc/design/versioning.md](https://github.com/babel/babel/blob/master/doc/design/versioning.md))
323-
- Monorepo ([doc/design/monorepo.md](https://github.com/babel/babel/blob/master/doc/design/monorepo.md))
324-
- Compiler environment support ([doc/design/compiler-environment-support.md](https://github.com/babel/babel/blob/master/doc/design/compiler-environment-support.md))
325-
- Compiler assumptions ([doc/design/compiler-assumptions.md](https://github.com/babel/babel/blob/master/doc/design/compiler-assumptions.md))
321+
- AST spec ([babel-parser/ast/spec.md](https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md))
322+
- Versioning ([doc/design/versioning.md](https://github.com/babel/babel/blob/main/doc/design/versioning.md))
323+
- Monorepo ([doc/design/monorepo.md](https://github.com/babel/babel/blob/main/doc/design/monorepo.md))
324+
- Compiler environment support ([doc/design/compiler-environment-support.md](https://github.com/babel/babel/blob/main/doc/design/compiler-environment-support.md))
325+
- Compiler assumptions ([doc/design/compiler-assumptions.md](https://github.com/babel/babel/blob/main/doc/design/compiler-assumptions.md))

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
<a href="https://www.npmjs.com/package/babel-core"><img alt="v6 npm Downloads" src="https://img.shields.io/npm/dm/babel-core.svg?maxAge=43200&label=v6%20downloads"></a>
1717
</p>
1818
<p align="center">
19-
<a href="https://travis-ci.com/babel/babel"><img alt="Travis Status" src="https://img.shields.io/travis/com/babel/babel/master.svg?label=travis&maxAge=43200"></a>
20-
<a href="https://circleci.com/gh/babel/babel"><img alt="CircleCI Status" src="https://img.shields.io/circleci/project/github/babel/babel/master.svg?label=circle&maxAge=43200"></a>
21-
<a href="https://codecov.io/github/babel/babel"><img alt="Coverage Status" src="https://img.shields.io/codecov/c/github/babel/babel/master.svg?maxAge=43200"></a>
19+
<a href="https://travis-ci.com/babel/babel"><img alt="Travis Status" src="https://img.shields.io/travis/com/babel/babel/main.svg?label=travis&maxAge=43200"></a>
20+
<a href="https://circleci.com/gh/babel/babel"><img alt="CircleCI Status" src="https://img.shields.io/circleci/project/github/babel/babel/main.svg?label=circle&maxAge=43200"></a>
21+
<a href="https://codecov.io/github/babel/babel"><img alt="Coverage Status" src="https://img.shields.io/codecov/c/github/babel/babel/main.svg?maxAge=43200"></a>
2222
<a href="https://slack.babeljs.io/"><img alt="Slack Status" src="https://slack.babeljs.io/badge.svg"></a>
2323
<a href="https://twitter.com/intent/follow?screen_name=babeljs"><img alt="Follow on Twitter" src="https://img.shields.io/twitter/follow/babeljs.svg?style=social&label=Follow"></a>
2424
</p>
@@ -75,7 +75,7 @@ Babel is a tool that helps you write code in the latest version of JavaScript. W
7575
});
7676
```
7777

78-
Try it out at our [REPL](https://babeljs.io/repl/build/master#?code_lz=NoRgNATGDMC6B0BbAhgBwBQDsAEBeAfNjgNTYgCUA3EA&lineWrap=true&presets=es2015%2Ces2016%2Ces2017&version=7.0.0-beta.2).
78+
Try it out at our [REPL](https://babeljs.io/repl/build/main#?code_lz=NoRgNATGDMC6B0BbAhgBwBQDsAEBeAfNjgNTYgCUA3EA&lineWrap=true&presets=es2015%2Ces2016%2Ces2017&version=7.0.0-beta.2).
7979

8080
## FAQ
8181

doc/ast/spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The [AST specification](https://github.com/babel/babel/blob/master/packages/babel-parser/ast/spec.md) has been moved to the babel parser package, `packages/babel-parser`.
1+
The [AST specification](https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md) has been moved to the babel parser package, `packages/babel-parser`.

eslint/babel-eslint-parser/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @babel/eslint-parser [![npm](https://img.shields.io/npm/v/@babel/eslint-parser.svg)](https://www.npmjs.com/package/@babel/eslint-parser) [![travis](https://img.shields.io/travis/babel/@babel/eslint-parser/master.svg)](https://travis-ci.org/babel/@babel/eslint-parser) [![npm-downloads](https://img.shields.io/npm/dm/@babel/eslint-parser.svg)](https://www.npmjs.com/package/@babel/eslint-parser)
1+
# @babel/eslint-parser [![npm](https://img.shields.io/npm/v/@babel/eslint-parser.svg)](https://www.npmjs.com/package/@babel/eslint-parser) [![travis](https://img.shields.io/travis/babel/@babel/eslint-parser/main.svg)](https://travis-ci.org/babel/@babel/eslint-parser) [![npm-downloads](https://img.shields.io/npm/dm/@babel/eslint-parser.svg)](https://www.npmjs.com/package/@babel/eslint-parser)
22

33

44
## This project is still experimental and will be released with Babel v8. You can track our progress [here](https://github.com/babel/babel/issues/10752)! Please use [babel-eslint](https://github.com/babel/babel-eslint) in the meantime.
@@ -18,7 +18,7 @@ ESLint allows for the use of [custom parsers](https://eslint.org/docs/developer-
1818
transformed into an [ESTree](https://github.com/estree/estree)-compliant structure that ESLint can understand. All location info such as line numbers,
1919
columns is also retained so you can track down errors with ease.
2020

21-
**Note:** ESLint's core rules do not support experimental syntax and may therefore not work as expected when using `@babel/eslint-parser`. Please use the companion [`@babel/eslint-plugin`](https://github.com/babel/babel/tree/master/eslint/babel-eslint-plugin) plugin for core rules that you have issues with.
21+
**Note:** ESLint's core rules do not support experimental syntax and may therefore not work as expected when using `@babel/eslint-parser`. Please use the companion [`@babel/eslint-plugin`](https://github.com/babel/babel/tree/main/eslint/babel-eslint-plugin) plugin for core rules that you have issues with.
2222

2323
## Usage
2424

eslint/babel-eslint-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"bugs": {
1414
"url": "https://github.com/babel/babel/issues"
1515
},
16-
"homepage": "https://github.com/babel/babel/tree/master/eslint/babel-eslint-parser",
16+
"homepage": "https://babeljs.io/",
1717
"engines": {
1818
"node": ">=10.9"
1919
},

eslint/babel-eslint-plugin-development/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
"bugs": {
3333
"url": "https://github.com/babel/babel/issues"
3434
},
35-
"homepage": "https://github.com/babel/babel/tree/master/eslint/babel-eslint-plugin-development"
35+
"homepage": "https://babeljs.io/"
3636
}

eslint/babel-eslint-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"bugs": {
2525
"url": "https://github.com/babel/babel/issues"
2626
},
27-
"homepage": "https://github.com/babel/babel/tree/master/eslint/babel-eslint-plugin",
27+
"homepage": "https://babeljs.io/",
2828
"peerDependencies": {
2929
"@babel/eslint-parser": "0.0.0",
3030
"eslint": ">=6.0.0"

packages/babel-parser/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
> - :house: [Internal]
1010
> - :nail_care: [Polish]
1111
12-
> Semver Policy: https://github.com/babel/babel/tree/master/packages/babel-parser#semver
12+
> Semver Policy: https://github.com/babel/babel/tree/main/packages/babel-parser#semver
1313
1414
_Note: Gaps between patch versions are faulty, broken or test releases._
1515

16-
See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog.
16+
See the [Babel Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) for the pre-6.8.0 version Changelog.
1717

1818
## 6.17.1 (2017-05-10)
1919

0 commit comments

Comments
 (0)