Skip to content

ci: add link verification step to PR workflow #9267

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
main-branch-name: main
- name: Run Checks
run: pnpm run test:pr --parallel=3
- name: Verify Links
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this should be added to autofix.yml either instead or in addition to here. Autofix will commit the fixes to the branch.

Copy link
Collaborator Author

@manudeli manudeli Jun 12, 2025

Choose a reason for hiding this comment

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

Since this verify-links.ts only detects broken links but does not automatically fix them, I think it's more appropriate to keep it in ci.yml rather than autofix.yml. But please feel free to share if you had something else in mind

run: pnpm run verify-links
- name: Stop Nx Agents
if: ${{ always() }}
run: npx nx-cloud stop-all-agents
Expand Down
6 changes: 3 additions & 3 deletions docs/framework/react/guides/important-defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Out of the box, TanStack Query is configured with **aggressive but sane** defaul

- A Query that has a `staleTime` set is considered **fresh** until that `staleTime` has elapsed.

- set `staleTime` to e.g. `2 * 60 * 1000` to make sure data is read from the cache, without triggering any kinds of refetches, for 2 minutes, or until the Query is [invalidated manually](./query-invalidation.md).
- set `staleTime` to `Infinity` to never trigger a refetch until the Query is [invalidated manually](./query-invalidation.md).
- set `staleTime` to `'static'` to **never** trigger a refetch, even if the Query is [invalidated manually](./query-invalidation.md).
- set `staleTime` to e.g. `2 * 60 * 1000` to make sure data is read from the cache, without triggering any kinds of refetches, for 2 minutes, or until the Query is [invalidated manually](../query-invalidation.md).
- set `staleTime` to `Infinity` to never trigger a refetch until the Query is [invalidated manually](../query-invalidation.md).
- set `staleTime` to `'static'` to **never** trigger a refetch, even if the Query is [invalidated manually](../query-invalidation.md).

- Stale queries are refetched automatically in the background when:
- New instances of the query mount
Expand Down
5 changes: 3 additions & 2 deletions knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
"$schema": "https://unpkg.com/knip@5/schema.json",
"ignore": [
".pnpmfile.cjs",
"scripts/*.js",
"scripts/*.{j,t}s",
"**/root.*.config.*",
"**/ts-fixture/file.ts"
],
"ignoreDependencies": [
"@types/react",
"@types/react-dom",
"react",
"react-dom"
"react-dom",
"markdown-link-extractor"
],
"ignoreWorkspaces": ["examples/**", "integrations/**"],
"workspaces": {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"prettier:write": "pnpm run prettier --write",
"docs:generate": "node scripts/generateDocs.js",
"cipublish": "node scripts/publish.js",
"verify-links": "node scripts/verify-links.ts"
"verify-links": "pnpm tsx scripts/verify-links.ts"
Copy link
Collaborator Author

@manudeli manudeli Jun 11, 2025

Choose a reason for hiding this comment

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

We should use tsx because the node version(22.12.0) defined in .nvmrc is lower than the one that supports TypeScript natively.

},
"nx": {
"includedScripts": [
Expand Down Expand Up @@ -65,6 +65,7 @@
"react-dom": "^19.0.0",
"sherif": "^1.0.0",
"tsup": "^8.4.0",
"tsx": "^4.20.1",
"typescript": "5.8.3",
"typescript50": "npm:[email protected]",
"typescript51": "npm:[email protected]",
Expand Down
Loading
Loading