From 17f8e8e977110e0f2e3b9fac0310ad2b16bb5de0 Mon Sep 17 00:00:00 2001 From: laohan <120936337@qq.com> Date: Fri, 10 Dec 2021 10:13:03 +0800 Subject: [PATCH] Use `Pick` instead of `Omit` (#8374) Co-authored-by: Tim Dorr --- .github/workflows/format.yml | 42 ++++++ .github/workflows/test.yml | 6 - .github/workflows/website.yml | 8 +- contributors.yml | 6 + docs/api.md | 77 ++++++++++- docs/contributing.md | 2 +- docs/faq.md | 10 +- docs/getting-started/concepts.md | 6 +- docs/getting-started/installation.md | 6 +- docs/getting-started/overview.md | 6 +- docs/getting-started/tutorial.md | 6 +- docs/upgrading/reach.md | 12 +- docs/upgrading/v5.md | 4 +- packages/react-router-dom/index.tsx | 6 +- packages/react-router-native/index.tsx | 6 +- .../react-router/__tests__/useOutlet-test.tsx | 120 +++++++++++++++++- packages/react-router/index.tsx | 31 +++-- 17 files changed, 305 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000000..8c38503718 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,42 @@ +name: Format + +on: + push: + branches: + - main + +jobs: + format: + runs-on: ubuntu-latest + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: 14 + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Format + run: npm run format --if-present + + - name: Commit + run: | + git config --local user.email "github-actions@remix.run" + git config --local user.name "Remix Run Bot" + + git add . + if [ -z "$(git status --porcelain)" ]; then + echo "💿 no formatting changed" + exit 0 + fi + git commit -m "chore: format" -m "formatted $GITHUB_SHA" + git push + echo "💿 pushed formatting changes https://github.com/$GITHUB_REPOSITORY/commit/$(git rev-parse HEAD)" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b3dfb50db9..8c49cbef9f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,12 +22,6 @@ jobs: - name: Install dependencies run: yarn install --frozen-lockfile - - name: Check formatting - run: yarn format:check - - - name: Lint - run: yarn lint - - name: Build run: yarn build diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 2762b50ea0..f9e96bf770 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -22,4 +22,10 @@ jobs: url: "${{ secrets.DOCS_REFRESH_URL }}?ref=${{ github.ref }}" method: "POST" customHeaders: '{"Authorization": "${{ secrets.DOCS_REFRESH_TOKEN }}"}' - timeout: 60000 + + - name: Refresh the staging docs + uses: fjogeleit/http-request-action@v1.8.1 + with: + url: "${{ secrets.DOCS_STAGING_REFRESH_URL }}?ref=${{ github.ref }}" + method: "POST" + customHeaders: '{"Authorization": "${{ secrets.DOCS_REFRESH_TOKEN }}"}' diff --git a/contributors.yml b/contributors.yml index 80f60dfc4e..9f11163d97 100644 --- a/contributors.yml +++ b/contributors.yml @@ -1,14 +1,20 @@ +- Ajayff4 +- brockross - elylucas - hongji00 - JakubDrozd - jonkoops +- kentcdodds - kddnewton - kkirsche - markivancho - mcansh - noisypigeon +- elylucas +- liuhanqu - paulsmithkc - petersendidit +- RobHannay - shivamsinghchahar - timdorr - turansky diff --git a/docs/api.md b/docs/api.md index ae74e81257..09c0d70a93 100644 --- a/docs/api.md +++ b/docs/api.md @@ -90,7 +90,7 @@ interface BrowserRouterProps { `` is the recommended interface for running React Router in a web browser. A `` stores the current location in the browser's address bar using clean URLs and navigates using the browser's built-in history stack. -`` defaults to using the current [document's `defaultView`](https://developer.mozilla.org/en-US/docs/Web/API/Document/defaultView), but it may also be used to track changes to another's window's URL, in an `