Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: avajs/ava
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a1afbe347d9636b033129fc7cc49ab18bcdc9d70
Choose a base ref
...
head repository: avajs/ava
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9bc615e2c93b264b98bac009a897c09d59f72bc4
Choose a head ref
Loading
Showing 1,089 changed files with 42,113 additions and 31,467 deletions.
12 changes: 12 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"all": true,
"exclude": [
"{coverage,examples,media,test,test-d,test-tap,types}/**",
"*.config.cjs",
"*.d.ts"
],
"reporter": [
"html",
"lcov"
]
}
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
* text=auto
*.js text eol=lf
* text=auto eol=lf
*.ai binary
*.psd binary
File renamed without changes.
72 changes: 72 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing to AVA

✨ Thanks for contributing to AVA! ✨

Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

Translations: [Español](https://github.com/avajs/ava-docs/blob/master/es_ES/contributing.md), [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/contributing.md), [Italiano](https://github.com/avajs/ava-docs/blob/master/it_IT/contributing.md), [日本語](https://github.com/avajs/ava-docs/blob/master/ja_JP/contributing.md), [Português](https://github.com/avajs/ava-docs/blob/master/pt_BR/contributing.md), [Русский](https://github.com/avajs/ava-docs/blob/master/ru_RU/contributing.md), [简体中文](https://github.com/avajs/ava-docs/blob/master/zh_CN/contributing.md)

## How can I contribute?

### Improve documentation

As a user of AVA you're the perfect candidate to help us improve our documentation. Typo corrections, error fixes, better explanations, more examples, etc. Open issues for things that could be improved. [Help translate our docs.](https://github.com/avajs/ava-docs) Anything. Even improvements to this document.

Use the [`scope:documentation` label](https://github.com/avajs/ava/labels/scope%3Adocumentation) to find suggestions for what we'd love to see more documentation on.

### Improve issues

Some issues are created with missing information, not reproducible, or plain invalid. Help make them easier to resolve. Handling issues takes a lot of time that we could rather spend on fixing bugs and adding features.

### Give feedback on issues

We're always looking for more opinions on discussions in the issue tracker. It's a good opportunity to influence the future direction of AVA.

The [`needs triage`](https://github.com/avajs/ava/labels/needs%20triage) and [`question`](https://github.com/avajs/ava/labels/question) labels are a good place to find ongoing discussions.

### Help out

You can use issue labels to discover issues you could help out with:

* [`blocked` issues](https://github.com/avajs/ava/labels/blocked) need help getting unstuck
* [`bug` issues](https://github.com/avajs/ava/labels/bug) are known bugs we'd like to fix
* [`enhancement` issues](https://github.com/avajs/ava/labels/enhancement) are features we're open to including
* [`performance` issues](https://github.com/avajs/ava/labels/performance) track ideas on how to improve AVA's performance

The [`help wanted`](https://github.com/avajs/ava/labels/help%20wanted) and [`good for beginner`](https://github.com/avajs/ava/labels/good%20for%20beginner) labels are especially useful.

You may find an issue is assigned. Please double-check before starting on this issue because somebody else is likely already working on it.

We'd like to fix [`priority` issues](https://github.com/avajs/ava/labels/priority) first. We'd love to see progress on [`low-priority` issues](https://github.com/avajs/ava/labels/low%20priority) too. [`future` issues](https://github.com/avajs/ava/labels/future) are those that we'd like to get to, but not anytime soon. Please check before working on these since we may not yet want to take on the burden of supporting those features.

Read on for tips on contributing code.

### Hang out and chat

We're using [GitHub Discussions](https://github.com/avajs/ava/discussions). Jump in there and lurk, talk to us, and help others.

## Contributing code

Once you find an issue you'd like to work on leave a comment so others are aware. We'll then assign you to the issue.

Of course you can work on things that do not yet have an issue. However if you're going to be putting in a lot of effort it's best to discuss it first.

When you're ready to get feedback on your work, open a [draft pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests). It's fine if the work's not yet done, but please do let us know what's remaining. This lets reviewers know not to nit-pick small details or point out improvements you already know you need to make.

Reviewing large pull requests can take a lot of time. Time that may not always be available. Smaller pull requests may land more quickly. If you're introducing a new feature think about how it might be broken up. It's OK to land features as [opt-in experiments](https://github.com/avajs/ava/blob/master/docs/06-configuration.md#experiments). These require less documentation and test coverage.

Try and avoid making breaking changes. Those take more time to ship. Instead make the new behavior opt-in. This way your feature can ship, and you can use it, on its own schedule.

Non-experimental features should be accompanied with tests and documentation.

Don't include unrelated changes in your pull request. Make sure tests pass on your machine by running `npm test`. You can run specific test files as well using `npx tap test-tap/{file}.js` or `npx test-ava test/{file}.js`.

When you make a pull request please use a clear and descriptive title. Be specific about what's changed and why.

Please make sure the *Allow edits from maintainers* box is checked. That way we can make certain minor changes ourselves, allowing your pull request to be merged sooner.

You might be asked to make changes to your pull request. There's never a need to open another pull request. Push more commits to your existing branch. We'll squash them when we merge the PR.

Dependencies are managed using `npm`. Only update dependencies when needed for your pull request. Don't rebuild the lockfile.

And finally, have fun!
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Bug Report
about: If something isn't working the way you expect it to
labels: needs triage
---

Please provide details about:

* What you're trying to do
* What happened
* What you expected to happen

Please share relevant sample code. Or better yet, provide a link to a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example).

We'll also need your AVA configuration (in `package.json` or `ava.config.*` configuration files) and how you're invoking AVA. Share the installed AVA version (get it by running `npx ava --version`).
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Discussions
url: https://github.com/avajs/ava/discussions
about: Questions? Ideas? Something to share?
- name: TypeScript compilation
url: https://github.com/avajs/typescript/issues
about: Report a bug with AVA's TypeScript integration
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Feature Request
about: Suggestions for new or different behavior
labels: question
---

Please provide details about:

* What you're trying to do
* Why you can't use AVA for this
* And maybe how you think AVA could handle this
71 changes: 0 additions & 71 deletions .github/issue_template.md

This file was deleted.

5 changes: 0 additions & 5 deletions .github/pull_request_template.md

This file was deleted.

114 changes: 114 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Install and test AVA
on:
push:
branches:
- main
pull_request:
paths-ignore:
- "*.md"
- "docs/**"
- "media/**"
jobs:
nodejs:
name: Node.js
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [^12.22, ^14.17, ^16.4, ^17]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Enable symlinks
if: matrix.os == 'windows-latest'
run: |
git config core.symlinks true
git reset --hard
- run: rm .npmrc
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Upgrade npm
run: npm install --global npm@^8.1.2
- run: npm install --no-audit
- run: npm run cover
- uses: codecov/codecov-action@v2
with:
files: coverage/lcov.info
name: ${{ matrix.os }}/${{ matrix.node-version }}

typescript:
name: TypeScript compatibility
runs-on: ubuntu-latest
strategy:
matrix:
ts-version: [~4.4, ~4.5]
steps:
- uses: actions/checkout@v2
- run: rm .npmrc
- uses: actions/setup-node@v2
with:
node-version: ^12.22
cache: npm
- name: Upgrade npm
run: npm install --global npm@^8.1.2
- run: npm install --no-audit
- run: npm i typescript@${TS_VERSION}
env:
TS_VERSION: ${{ matrix.ts-version }}
- run: npm ls typescript
continue-on-error: true
- run: npx tsd

lockfile_churn:
name: Test package-lock for unexpected modifications
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rm .npmrc
- uses: actions/setup-node@v2
with:
node-version: ^12.22
cache: npm
- name: Upgrade npm
run: if [[ "$(npm -v)" != "8.1.2" ]]; then npm install --global npm@8.1.2; fi
- run: npm install --no-audit --lockfile-version=3
- name: Test package-lock for unexpected modifications
run: |
npm -v
checksum=$(md5sum package-lock.json)
npm install --package-lock-only --no-audit
if ! echo ${checksum} | md5sum --quiet -c -; then
echo "package-lock.json was modified unexpectedly. Please rebuild it using npm@$(npm -v) and commit the changes."
exit 1
fi
without_lockfile:
name: Install dependencies without using a lockfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rm .npmrc
- uses: actions/setup-node@v2
with:
node-version: ^12.22
- name: Upgrade npm
run: npm install --global npm@^8.1.2
- run: npm install --no-shrinkwrap --no-audit
- run: npm run cover

xo:
name: Lint source files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rm .npmrc
- uses: actions/setup-node@v2
with:
node-version: ^16.4
cache: npm
- name: Upgrade npm
run: npm install --global npm@^8.1.2
- run: npm install --no-audit
- run: npx xo
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
.nyc_output
coverage
bench/.results
types/generated.d.ts
/coverage
/media/**/node_modules/
/node_modules/
/test-tap/**/node_modules/
/test/**/fixtures/**/node_modules/*/
/examples/**/node_modules/
7 changes: 0 additions & 7 deletions .iron-node.js

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lockfile-version=3
11 changes: 11 additions & 0 deletions .taprc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
browser: false
coverage: false
files:
- "test-tap/*.js"
- "test-tap/reporters/*.js"
- "test-tap/integration/*.js"
flow: false
jobs: 2
jsx: false
timeout: 300
ts: false
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

Loading