Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update contributing.md #16508

Merged
merged 5 commits into from
May 18, 2024
Merged

Update contributing.md #16508

merged 5 commits into from
May 18, 2024

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented May 17, 2024

Q                       A
Fixed Issues? Ref #16492 (comment)
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

In this PR we update the project's build requirements and promote the usage of yarn jest. Compared to make test-only, contributors can refer to Jest's docs for more cli options.

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also completely remove TEST_ONLY/TEST_GREP from our scripts?

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@babel-bot
Copy link
Collaborator

babel-bot commented May 17, 2024

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/56944

@JLHwung
Copy link
Contributor Author

JLHwung commented May 17, 2024

Can we also completely remove TEST_ONLY/TEST_GREP from our scripts?

Personally I don't use them either. @liuxingbaoyu Do you think they should be kept?

@liuxingbaoyu
Copy link
Member

liuxingbaoyu commented May 17, 2024

Thanks for mentioning! I didn't use them.

Copy link
Member

@liuxingbaoyu liuxingbaoyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +211 to +219
```sh
yarn run --inspect-brk jest -i babel-plugin-arrow-functions -t "destructuring parameters"
```

If you plan to stay long in the debugger (which you'll likely do!), you may increase the test timeout by the [Jest CLI `--testTimeout` option](https://jestjs.io/docs/cli#--testtimeoutnumber). For example to increase test timeout to 500 seconds

```sh
yarn run --inspect-brk jest -i babel-parser -t "my new test" --testTimeout=500000
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great example! Maybe --runInBand is useful here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well -i is actually an alias for --runInBand.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry missed it. :)


_Yarn_: Make sure that Yarn 1 is [installed](https://classic.yarnpkg.com/en/docs/install) with version >= `1.19.0`.
_Yarn_: Make sure that Yarn is [installed](https://yarnpkg.com/getting-started/install) with version `>=4.0.0`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be no actual installation of yarn v4 here, unfortunately the yarn official website only leaves the corepack tutorial.
Let's change the wording to something like configure to support yarn v4?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well upon the first timing running corepack enable yarn, corepack will download the latest yarn binary and "install" it anyway. Contributors should refer to the official yarn docs for how to install yarn, hence the updated link.

Therefore I think the current wording is fine, if we change it to something like "configure corepack to install yarn 4" but the yarn community one day decides to change their install recommendation, we will have to sync with them. For the time being, simply put "installed" seems sufficient.

@JLHwung JLHwung merged commit 0ee85cb into babel:main May 18, 2024
51 checks passed
@JLHwung JLHwung deleted the update-contributing-md branch May 18, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants