From 0e4cd3556ec24687ced642c3ccbed7c435d67d71 Mon Sep 17 00:00:00 2001 From: asmyshlyaev177 Date: Sat, 16 Nov 2024 16:48:13 +0400 Subject: [PATCH] ci: check for broken links in markdown --- .github/workflows/tests.yml | 460 +++++++++--------- .linkspector.yml | 18 + README.CN.md | 2 +- README.KO.md | 2 +- README.md | 6 +- package.json | 2 +- .../urlstate/next/useUrlState/useUrlState.ts | 2 +- .../react-router/useUrlState/useUrlState.ts | 2 +- .../urlstate/useUrlEncode/useUrlEncode.ts | 2 +- .../useUrlStateBase/useUrlStateBase.ts | 2 +- 10 files changed, 264 insertions(+), 234 deletions(-) create mode 100644 .linkspector.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a220ae1..e5b3fb0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: branches: [ master ] repository_dispatch: - types: [semantic-release] + types: [ semantic-release ] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -20,8 +20,22 @@ permissions: issues: write pull-requests: write jobs: + linkspector: + name: linkspector + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4 + - name: Run linkspector + uses: umbrelladocs/action-linkspector@fc382e19892aca958e189954912fe379a8df270c # pin@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + fail_on_error: true + config_file: .linkspector.yml + installtest: name: installtest + needs: [ linkspector ] timeout-minutes: 20 runs-on: ubuntu-24.04 container: @@ -35,50 +49,50 @@ jobs: pull-requests: write # to be able to comment on released pull requests id-token: write # to enable use of OIDC for npm provenance steps: - # - uses: google/wireit@setup-github-actions-caching/v2 - - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 - with: - egress-policy: audit + # - uses: google/wireit@setup-github-actions-caching/v2 + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false - - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 - with: - node-version-file: '.nvmrc' - - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-node-modules - with: - path: | - ./node_modules - key: modules-1-${{ hashFiles('./package-lock.json') }} - - name: Install dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm clean-install && npx playwright install --with-deps + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + with: + node-version-file: '.nvmrc' + - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-node-modules + with: + path: | + ./node_modules + key: modules-1-${{ hashFiles('./package-lock.json') }} + - name: Install dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm clean-install && npx playwright install --with-deps - - name: Test exports - run: npm run test:exports + - name: Test exports + run: npm run test:exports - - name: Unit tests - run: npm run test:unit - - name: Run codacy-coverage-reporter - uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1.3.0 - continue-on-error: true - with: - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - coverage-reports: coverage-reports/lcov.info - - name: Cache dependencies - uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - if: steps.cache-node-modules.outputs.cache-hit != 'true' - with: - path: | - ./node_modules - key: modules-1-${{ hashFiles('./package-lock.json') }} + - name: Unit tests + run: npm run test:unit + - name: Run codacy-coverage-reporter + uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1.3.0 + continue-on-error: true + with: + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + coverage-reports: coverage-reports/lcov.info + - name: Cache dependencies + uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + if: steps.cache-node-modules.outputs.cache-hit != 'true' + with: + path: | + ./node_modules + key: modules-1-${{ hashFiles('./package-lock.json') }} build: name: build - needs: [installtest] + needs: [ installtest ] timeout-minutes: 20 runs-on: ubuntu-24.04 container: @@ -92,47 +106,47 @@ jobs: HUSKY: 0 PLAYWRIGHT_BROWSERS_PATH: 0 steps: - - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 - with: - egress-policy: audit + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false - - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-node-modules - with: - path: | - ./node_modules - key: modules-1-${{ hashFiles('./package-lock.json') }} + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-node-modules + with: + path: | + ./node_modules + key: modules-1-${{ hashFiles('./package-lock.json') }} - - name: Install dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm clean-install && npx playwright install --with-deps + - name: Install dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm clean-install && npx playwright install --with-deps - - name: build packages - run: npx cross-env TEST=true npm run build:packages + - name: build packages + run: npx cross-env TEST=true npm run build:packages - - name: Cache dependencies - id: cache - uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - if: always() - with: - path: | - ./dist - ./packages/example-react-router6/dist - ./packages/example-react-router6/package.json - ./packages/example-react/dist - ./packages/example-react/package.json - ./packages/example-nextjs14/package.json - ./packages/example-nextjs14/.next - ./packages/example-nextjs15/package.json - ./packages/example-nextjs15/.next - key: modules-2-${{ github.sha }}-${{ github.run_id }} + - name: Cache dependencies + id: cache + uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + if: always() + with: + path: | + ./dist + ./packages/example-react-router6/dist + ./packages/example-react-router6/package.json + ./packages/example-react/dist + ./packages/example-react/package.json + ./packages/example-nextjs14/package.json + ./packages/example-nextjs14/.next + ./packages/example-nextjs15/package.json + ./packages/example-nextjs15/.next + key: modules-2-${{ github.sha }}-${{ github.run_id }} testint: - needs: [build] + needs: [ build ] name: testint runs-on: ubuntu-24.04 timeout-minutes: 30 @@ -141,99 +155,99 @@ jobs: strategy: fail-fast: false matrix: - shardIndex: [1, 2] - shardTotal: [2] + shardIndex: [ 1, 2 ] + shardTotal: [ 2 ] steps: - - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 - with: - egress-policy: audit + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false - - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-node-modules - with: - path: | - ./node_modules - key: modules-1-${{ hashFiles('./package-lock.json') }} + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-node-modules + with: + path: | + ./node_modules + key: modules-1-${{ hashFiles('./package-lock.json') }} - - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache - with: - path: | - ./dist - ./packages/example-react-router6/dist - ./packages/example-react-router6/package.json - ./packages/example-react/dist - ./packages/example-react/package.json - ./packages/example-nextjs14/package.json - ./packages/example-nextjs14/.next - ./packages/example-nextjs15/package.json - ./packages/example-nextjs15/.next - key: modules-2-${{ github.sha }}-${{ github.run_id }} + - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache + with: + path: | + ./dist + ./packages/example-react-router6/dist + ./packages/example-react-router6/package.json + ./packages/example-react/dist + ./packages/example-react/package.json + ./packages/example-nextjs14/package.json + ./packages/example-nextjs14/.next + ./packages/example-nextjs15/package.json + ./packages/example-nextjs15/.next + key: modules-2-${{ github.sha }}-${{ github.run_id }} - - name: Run Playwright tests - run: | - npm run start:ci & \ - npx wait-on http://localhost:3000 && \ - npx wait-on http://localhost:3001 && \ - npm run test:int:ci -- --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} - - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - if: always() - with: - name: blob-report-${{ matrix.shardIndex }} - path: blob-report - retention-days: 5 + - name: Run Playwright tests + run: | + npm run start:ci & \ + npx wait-on http://localhost:3000 && \ + npx wait-on http://localhost:3001 && \ + npm run test:int:ci -- --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + if: always() + with: + name: blob-report-${{ matrix.shardIndex }} + path: blob-report + retention-days: 5 merge-reports: # Merge reports after playwright-tests, even if some shards have failed - if: ${{ always() && contains(needs.*.result, 'failure') }} - needs: [testint] + if: ${{ always() && contains(needs.*.result, 'failure') }} + needs: [ testint ] runs-on: ubuntu-24.04 steps: - - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 - with: - egress-policy: audit + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 - with: - node-version-file: '.nvmrc' + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + with: + node-version-file: '.nvmrc' - - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-node-modules - with: - path: | - ./node_modules - key: modules-1-${{ hashFiles('./package-lock.json') }} - - name: Install dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm clean-install + - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-node-modules + with: + path: | + ./node_modules + key: modules-1-${{ hashFiles('./package-lock.json') }} + - name: Install dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm clean-install - - name: Download blob reports from GitHub Actions Artifacts - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 - with: - path: all-blob-reports - pattern: blob-report-* - merge-multiple: true + - name: Download blob reports from GitHub Actions Artifacts + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + path: all-blob-reports + pattern: blob-report-* + merge-multiple: true - - name: Merge into HTML Report - run: npx playwright merge-reports --reporter html ./all-blob-reports + - name: Merge into HTML Report + run: npx playwright merge-reports --reporter html ./all-blob-reports - - name: Upload HTML report - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - with: - name: html-report--attempt-${{ github.run_attempt }} - path: playwright-report - retention-days: 14 + - name: Upload HTML report + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: html-report--attempt-${{ github.run_attempt }} + path: playwright-report + retention-days: 14 release: name: release - needs: [testint] + needs: [ testint ] if: github.ref == 'refs/heads/master' timeout-minutes: 20 runs-on: ubuntu-24.04 @@ -245,87 +259,85 @@ jobs: pull-requests: write # to be able to comment on released pull requests id-token: write # to enable use of OIDC for npm provenance steps: - - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 - with: - egress-policy: audit + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false - - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 - with: - node-version-file: '.nvmrc' - registry-url: 'https://registry.npmjs.org' - - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-node-modules - with: - path: | - ./node_modules - key: modules-1-${{ hashFiles('./package-lock.json') }} + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + with: + node-version-file: '.nvmrc' + registry-url: 'https://registry.npmjs.org' + - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-node-modules + with: + path: | + ./node_modules + key: modules-1-${{ hashFiles('./package-lock.json') }} - - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache - with: - path: | - ./dist - ./packages/example-react-router6/dist - ./packages/example-react-router6/package.json - ./packages/example-react/dist - ./packages/example-react/package.json - ./packages/example-nextjs14/package.json - ./packages/example-nextjs14/.next - ./packages/example-nextjs15/package.json - ./packages/example-nextjs15/.next - key: modules-2-${{ github.sha }}-${{ github.run_id }} + - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache + with: + path: | + ./dist + ./packages/example-react-router6/dist + ./packages/example-react-router6/package.json + ./packages/example-react/dist + ./packages/example-react/package.json + ./packages/example-nextjs14/package.json + ./packages/example-nextjs14/.next + ./packages/example-nextjs15/package.json + ./packages/example-nextjs15/.next + key: modules-2-${{ github.sha }}-${{ github.run_id }} - - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies - run: npm audit signatures - # - name: Debug - # run: echo `pwd` && echo `ls -a` + - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies + run: npm audit signatures + # - name: Debug + # run: echo `pwd` && echo `ls -a` - - name: git config - run: git config --global --add safe.directory /__w/state-in-url/state-in-url - - name: Initialize Git user - run: | + - name: git config + run: git config --global --add safe.directory /__w/state-in-url/state-in-url + - name: Initialize Git user + run: | git config --global user.email "github-release-bot@example.com" git config --global user.name "Release Workflow" - - name: Initialise the NPM config - run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release - + - name: Initialise the NPM config + run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - cleanup: - name: cleanup - needs: [release, merge-reports] - runs-on: ubuntu-24.04 - if: always() && github.ref == 'refs/heads/master' - timeout-minutes: 10 - permissions: - # See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id - actions: write - contents: read - steps: - - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 - with: - egress-policy: audit + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release + # cleanup: + # name: cleanup + # needs: [release, merge-reports] + # runs-on: ubuntu-24.04 + # if: always() && github.ref == 'refs/heads/master' + # timeout-minutes: 10 + # permissions: + # # See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + # actions: write + # contents: read + # steps: + # - name: Harden Runner + # uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + # with: + # egress-policy: audit - - name: Check out code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + # - name: Check out code + # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Cleanup - run: | - set +e - echo "Deleting caches..." - gh cache delete modules-2-${{ github.sha }}-${{ github.run_id }} - echo "Done" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Cleanup + # run: | + # set +e + # echo "Deleting caches..." + # gh cache delete modules-2-${{ github.sha }}-${{ github.run_id }} + # echo "Done" + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.linkspector.yml b/.linkspector.yml new file mode 100644 index 0000000..ac2bb69 --- /dev/null +++ b/.linkspector.yml @@ -0,0 +1,18 @@ +dirs: + - ./ + - ./packages/urlstate + +files: + - README.md + +excludedDirs: + - ./packages/example-nextjs14 + - ./packages/example-nextjs15 + - ./packages/example-react + - ./packages/example-react-router6 + - ./packages/shared + +useGitIgnore: true + +# doesn't work correctly +# modifiedFilesOnly: true diff --git a/README.CN.md b/README.CN.md index cde4d68..8e61786 100644 --- a/README.CN.md +++ b/README.CN.md @@ -89,7 +89,7 @@ pnpm add state-in-url ## Next.js的useUrlState钩子 -[文档](packages/urlstate/next/useUrlState#api) +[文档](packages/urlstate/next/useUrlState) `useUrlState`是一个为Next.js应用程序设计的自定义React钩子,使客户端组件之间的通信变得简单。它允许你共享任何复杂的状态并将其与URL搜索参数同步,提供了一种在页面重新加载之间持久化状态并通过URL共享应用程序状态的方法。 diff --git a/README.KO.md b/README.KO.md index a3e9a64..747821d 100644 --- a/README.KO.md +++ b/README.KO.md @@ -96,7 +96,7 @@ pnpm add state-in-url ## Next.js용 useUrlState 훅 -[문서](packages/urlstate/next/useUrlState#api) +[문서](packages/urlstate/next/useUrlState) `useUrlState`는 Next.js 애플리케이션을 위한 사용자 정의 React 훅으로, 클라이언트 컴포넌트 간의 통신을 쉽게 만듭니다. 복잡한 상태를 공유하고 URL 검색 매개변수와 동기화할 수 있게 해주어, 페이지 새로고침 시 상태를 유지하고 URL을 통해 애플리케이션 상태를 공유할 수 있습니다. diff --git a/README.md b/README.md index 9ffbd14..01b53e6 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Share if it useful for you.
- + ## Why use `state-in-url`? Store any user state in query parameters; imagine JSON in a browser URL, while keeping types and structure of data, e.g. numbers will be decoded as numbers not strings, objects and arrays supported. @@ -136,7 +136,7 @@ All components that use the same `state` object are automatically synchronized. ### useUrlState hook for Next.js -[Full API Docs](packages/urlstate/next/useUrlState#api) +[Full API Docs](packages/urlstate/next/useUrlState) [React-Router example](#useurlstate-hook-for-react-router) @@ -450,7 +450,7 @@ function SettingsComponent() { API is same as for Next.js version, except can pass options from [NavigateOptions](https://github.com/remix-run/react-router/blob/bc693ed9f39170bda13b9e1b282fb8e9d5925f66/packages/react-router/lib/context.ts#L99) type. -[API Docs](packages/urlstate/react-router/useUrlState#api) +[API Docs](packages/urlstate/react-router/useUrlState) #### Example diff --git a/package.json b/package.json index 989060d..ac469eb 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "reinstall": "npm run cleanup && npm install", "setup": "playwright install --with-deps", "prepack": "npm run build && cp package.json dist/package.json && npm run build:demo", - "pin-gh-deps": "pin-github-action .github/workflows/tests.yml", + "pin-gh-deps": "pin-github-action -i .github/workflows/tests.yml", "prepare": "npx husky" }, "wireit": { diff --git a/packages/urlstate/next/useUrlState/useUrlState.ts b/packages/urlstate/next/useUrlState/useUrlState.ts index 503ae1a..6ec5955 100644 --- a/packages/urlstate/next/useUrlState/useUrlState.ts +++ b/packages/urlstate/next/useUrlState/useUrlState.ts @@ -65,7 +65,7 @@ export function useUrlState({ * // same as setState(form) with setUrl(form) * ``` * - * * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/next/useUrlState#api} + * * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/next/useUrlState} */ export function useUrlState( defaultState: T, diff --git a/packages/urlstate/react-router/useUrlState/useUrlState.ts b/packages/urlstate/react-router/useUrlState/useUrlState.ts index dc7d71d..c83803d 100644 --- a/packages/urlstate/react-router/useUrlState/useUrlState.ts +++ b/packages/urlstate/react-router/useUrlState/useUrlState.ts @@ -64,7 +64,7 @@ export function useUrlState({ * // same as setState(form) with setUrl(form) * ``` * - * * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/react-router/useUrlState#api} + * * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/react-router/useUrlState} */ export function useUrlState( defaultState: T, diff --git a/packages/urlstate/useUrlEncode/useUrlEncode.ts b/packages/urlstate/useUrlEncode/useUrlEncode.ts index 00d4458..fe8025d 100644 --- a/packages/urlstate/useUrlEncode/useUrlEncode.ts +++ b/packages/urlstate/useUrlEncode/useUrlEncode.ts @@ -21,7 +21,7 @@ import { type JSONCompatible, typeOf } from "../utils"; * parse('name=Tom'); * ``` * - * * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/useUrlEncode#api} + * * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/useUrlEncode} */ export function useUrlEncode(stateShape: T) { const stringify = React.useCallback( diff --git a/packages/urlstate/useUrlStateBase/useUrlStateBase.ts b/packages/urlstate/useUrlStateBase/useUrlStateBase.ts index f9cef28..5d88a28 100644 --- a/packages/urlstate/useUrlStateBase/useUrlStateBase.ts +++ b/packages/urlstate/useUrlStateBase/useUrlStateBase.ts @@ -40,7 +40,7 @@ import { * * ``` * - * * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/integrations/packages/urlstate/useUrlStateBase#api} + * * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/integrations/packages/urlstate/useUrlStateBase} */ export function useUrlStateBase(