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

chore: update to Jest v29 #9253

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ec23d1c
chore: update to Jest v27
SimenB Sep 14, 2022
e321b36
chore: update to Jest v28
SimenB Sep 14, 2022
6c2d556
chore: update to Jest v29
SimenB Sep 14, 2022
b9e4713
Update contributors.yml
SimenB Sep 14, 2022
ae925ba
Add missing `await` in errorElement example code in docs (#9828)
bobziroll Jan 7, 2023
50a6f10
docs(components/await): fix typo (#9835)
damianstasik Jan 8, 2023
cc9a5c4
Merge branch 'release-next'
brophdawg11 Jan 9, 2023
4390f8b
docs: fix build badge (#9877)
akamfoad Jan 11, 2023
4108c98
chore: sort contributors list
remix-cla-bot[bot] Jan 11, 2023
482b6a2
Update github New Issue workflow to mimic Remix (#9839)
brophdawg11 Jan 11, 2023
7b7498e
Fix issue templates
brophdawg11 Jan 11, 2023
0eeab90
Remove stack overflow from New Issue flow
brophdawg11 Jan 11, 2023
953948a
Remove trailing periods for consistency in new issue flow
brophdawg11 Jan 11, 2023
92fd305
docs(start/tutorial): fix links (#9874)
fyzhu Jan 11, 2023
f1c62c6
chore: sort contributors list
remix-cla-bot[bot] Jan 11, 2023
a80a62d
ci(release): sync with remix (#9813)
mcansh Jan 11, 2023
03b7f40
docs(README): v6 is stable, link to its documentation (#9889)
cassidoo Jan 12, 2023
5ee585f
chore: sort contributors list
remix-cla-bot[bot] Jan 12, 2023
bbaca1a
docs(components/form): Fix method case in action (#9893)
machour Jan 12, 2023
112ff05
chore: sort contributors list
remix-cla-bot[bot] Jan 12, 2023
ade4d45
Merge branch 'main' into update-jest
timdorr Jan 12, 2023
c061ece
Fix Jest upgrade issues
timdorr Jan 12, 2023
af34fb4
Fix for downstream whatwg-url issue
timdorr Jan 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 🐛 Bug Report
description: Something is wrong with React Router.
description: Something is wrong with React Router
title: "[Bug]: "
labels:
- bug
Expand All @@ -11,18 +11,20 @@ body:

Do you need some help?
======================
The issue tracker is meant for feature requests and bug reports only. This isn't the best place for
support or usage questions. Questions here don't have as much visibility as they do elsewhere. Before
you ask a question, here are some resources to get help first:
The issue tracker is meant for bug reports only. This isn't the best place for support
or usage questions. Questions here don't have as much visibility as they do elsewhere.
Before you ask a question, here are some resources to get help first:

- Read the docs: https://reactrouter.com
- Check out the list of frequently asked questions: https://reactrouter.com/start/faq
- Explore examples: https://reactrouter.com/start/examples
- Ask in chat: https://rmx.as/discord
- Look for/ask questions on Stack Overflow: https://stackoverflow.com/questions/tagged/react-router
- Ask in chat: https://discord.gg/6RyV8n8yyM

### Test Case Starter:
https://stackblitz.com/github/remix-run/react-router/tree/main/examples/basic?file=src/App.tsx
### Test Case Starters:

* [Using `<RouterProvider>`](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/data-router?file=src/App.tsx)
* [Using `<BrowserRouter>`](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/basic?file=src/App.tsx)
- type: input
attributes:
label: What version of React Router are you using?
Expand Down
12 changes: 9 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: 🤔 Support/Usage Question
url: https://stackoverflow.com/questions/tagged/react-router
about: This is a bug tracker, not a support system. For usage questions, please use Stack Overflow where there are a lot more people ready to help you out. Thanks!
- name: 💡 Feature Request
url: https://github.com/remix-run/react-router/discussions/new?category=proposals
about: If you've got an idea for a new feature in React Router, please open a new Discussion with the `Proposals` label
- name: 🤔 Usage Question (Github Discussions)
url: https://github.com/remix-run/remix/discussions/new?category=q-a
about: Open a Discussion in GitHub wih the `Q&A` label
- name: 💬 Remix Discord Channel
url: https://rmx.as/discord
about: Interact with other people using React Router and Remix 📀
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_isse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 📚 Documentation Issue
description: Something is wrong with the React Router docs
title: "[Docs]: "
labels:
- docs
body:
- type: markdown
attributes:
value: |
Thank you for contributing!

For documentation updates - we would happily accept PRs, so feel free to update and
open a PR to the `main` branch. Otherwise let us know in this issue what you felt
was missing or incorrect.

- type: textarea
attributes:
label: Describe what's incorrect/missing in the documentation
description: A concise description of what you expected to see in the docs
validations:
required: true
32 changes: 0 additions & 32 deletions .github/ISSUE_TEMPLATE/feature_request.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/postrelease.yml

This file was deleted.

71 changes: 50 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
name: 🕊 Release
name: 🦋 Changesets Release
on:
push:
branches:
- release
- "release-*"
- "!release-experimental"
- "!release-experimental-*"

concurrency: ${{ github.workflow }}-${{ github.ref }}

env:
CI: true
- "!release-manual"
- "!release-manual-*"

jobs:
release:
name: 🦋 Changesets Release
if: github.repository == 'remix-run/react-router'
runs-on: ubuntu-latest

outputs:
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
published: ${{ steps.changesets.outputs.published }}
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0

- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: ⎔ Setup Node
- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: yarn
cache: "yarn"

- name: 📥 Install dependencies
# even though this is called "npm-install" it does use yarn to install
# because we have a yarn.lock and caches efficiently.
uses: bahmutov/npm-install@v1
- name: 📥 Install deps
run: yarn --frozen-lockfile

- name: 🔐 Setup npm auth
run: |
Expand All @@ -52,16 +52,45 @@ jobs:
version: yarn run version
commit: "chore: Update version for release"
title: "chore: Update version for release"
publish: yarn release
publish: yarn run release
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN_SO_OTHER_ACTIONS_RUN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# comment:
# needs: [release]
# name: 📝 Comment on related issues and pull requests
# if: github.repository == 'remix-run/react-router'
# uses: remix-run/react-router/.github/workflows/release-comments.yml@main
# with:
# ref: ${{ github.ref }}
findPackage:
name: 🦋 Find Package
needs: [release]
runs-on: ubuntu-latest
if: github.repository == 'remix-run/react-router' && needs.release.outputs.published == 'true'
outputs:
package: ${{ steps.findPackage.outputs.package }}
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"

- id: findPackage
run: |
package=$(node ./scripts/release/find-release-from-changeset.js)
echo "package=${package}" >> $GITHUB_OUTPUT
env:
packageVersionToFollow: "react-router"
publishedPackages: ${{ needs.release.outputs.publishedPackages }}

comment:
name: 📝 Comment on related issues and pull requests
if: github.repository == 'remix-run/react-router' && needs.findPackage.outputs.package != ''
needs: [release, findPackage]
uses: ./.github/workflows/release-comments.yml
with:
ref: refs/tags/${{ needs.findPackage.outputs.package }}
packageVersionToFollow: "react-router"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[npm-badge]: https://img.shields.io/npm/v/react-router-dom.svg?style=flat-square
[npm]: https://www.npmjs.org/package/react-router-dom
[build-badge]: https://img.shields.io/github/workflow/status/remix-run/react-router/test/dev?style=flat-square
[build-badge]: https://img.shields.io/github/actions/workflow/status/remix-run/react-router/test.yml?branch=dev&style=square
[build]: https://github.com/remix-run/react-router/actions/workflows/test.yml

React Router is a lightweight, fully-featured routing library for the [React](https://reactjs.org) JavaScript library. React Router runs everywhere that React runs; on the web, on the server (using node.js), and on React Native.
Expand All @@ -11,7 +11,7 @@ If you're new to React Router, we recommend you start with [the tutorial](/docs/

If you're migrating to v6 from v5 (or v4, which is the same as v5), check out [the migration guide](/docs/upgrading/v5.md). If you're migrating from Reach Router, check out [the migration guide for Reach Router](/docs/upgrading/reach.md). If you need to find the code for v5, [it is on the `v5` branch](https://github.com/remix-run/react-router/tree/v5).

When v6 is stable we will publish the docs on our website.
Documentation for v6 can be found [on our website](https://reactrouter.com/).

## Contributing

Expand Down
6 changes: 6 additions & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- adil62
- afzalsayed96
- Ajayff4
- akamfoad
- alany411
- alexlbr
- AmRo045
Expand All @@ -24,6 +25,7 @@
- btav
- bvangraafeiland
- CanRau
- cassidoo
- chaance
- chasinhues
- chensokheng
Expand All @@ -33,6 +35,7 @@
- codeape2
- coryhouse
- cvbuelow
- damianstasik
- danielberndt
- dauletbaev
- david-crespo
Expand All @@ -49,6 +52,7 @@
- engpetermwangi
- FilipJirsak
- frontsideair
- fyzhu
- fz6m
- gianlucca
- gijo-varghese
Expand Down Expand Up @@ -99,6 +103,7 @@
- lqze
- lukerSpringTree
- m-shojaei
- machour
- Manc
- manzano78
- marc2332
Expand Down Expand Up @@ -135,6 +140,7 @@
- shamsup
- shihanng
- shivamsinghchahar
- SimenB
- SkayuX
- souzasmatheus
- srmagura
Expand Down
1 change: 0 additions & 1 deletion docs/components/await.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ function Book() {
>
<Reviews />
</Await>
/>
</React.Suspense>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions docs/components/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ The method will be available on [`request.method`][requestmethod] inside the rou
}}
action={async ({ request, params }) => {
switch (request.method) {
case "put": {
case "PUT": {
let formData = await request.formData();
let name = formData.get("projectName");
return fakeUpdateProject(name);
}
case "delete": {
case "DELETE": {
return fakeDeleteProject(params.id);
}
default: {
Expand Down
2 changes: 1 addition & 1 deletion docs/route/error-element.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Here's a "not found" case in a [loader][loader]:
if (res.status === 404) {
throw new Response("Not Found", { status: 404 });
}
const home = res.json();
const home = await res.json();
const descriptionHtml = parseMarkdown(
data.descriptionMarkdown
);
Expand Down
4 changes: 2 additions & 2 deletions docs/start/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ export default function Root() {
<nav>
<ul>
<li>
<a href={`contacts/1`}>Your Name</a>
<a href={`/contacts/1`}>Your Name</a>
</li>
<li>
<a href={`contacts/2`}>Your Friend</a>
<a href={`/contacts/2`}>Your Friend</a>
</li>
</ul>
</nav>
Expand Down
Loading