diff --git a/.all-contributorsrc b/.all-contributorsrc deleted file mode 100644 index ce8789914..000000000 --- a/.all-contributorsrc +++ /dev/null @@ -1,29 +0,0 @@ -{ - "projectName": "react-virtual", - "projectOwner": "tannerlinsley", - "repoType": "github", - "repoHost": "https://github.com", - "files": [ - "README.md" - ], - "imageSize": 100, - "commit": false, - "commitConvention": "none", - "contributors": [ - { - "login": "tannerlinsley", - "name": "Tanner Linsley", - "avatar_url": "https://avatars0.githubusercontent.com/u/5580297?v=4", - "profile": "https://tannerlinsley.com", - "contributions": [ - "code", - "ideas", - "example", - "maintenance", - "review" - ] - }, - ], - "contributorsPerLine": 7, - "skipCi": true -} diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 7fde532a6..000000000 --- a/.babelrc +++ /dev/null @@ -1,28 +0,0 @@ -{ - "presets": [ - [ - "@babel/env", - { - "modules": false, - "loose": true, - "exclude": ["@babel/plugin-transform-regenerator"] - } - ], - "@babel/react" - ], - "plugins": ["babel-plugin-transform-async-to-promises"], - "env": { - "test": { - "presets": [ - [ - "@babel/env", - { - "modules": "commonjs", - "loose": true, - "exclude": ["@babel/plugin-transform-regenerator"] - } - ] - ] - } - } -} diff --git a/.browserslistrc b/.browserslistrc deleted file mode 100644 index 41bcaa1d3..000000000 --- a/.browserslistrc +++ /dev/null @@ -1,9 +0,0 @@ -# Browsers we support -> 0.5% -Chrome >= 73 -ChromeAndroid >= 75 -Firefox >= 67 -Edge >= 17 -IE 11 -Safari >= 12.1 -iOS >= 11.3 \ No newline at end of file diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 000000000..24b402d40 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json", + "changelog": [ + "@changesets/changelog-github", + { "repo": "TanStack/virtual", "disableThanks": true } + ], + "commit": false, + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "fixed": [], + "linked": [], + "ignore": [], + "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { + "onlyUpdatePeerDependentsWhenOutOfRange": true + } +} diff --git a/.claude/scheduled_tasks.lock b/.claude/scheduled_tasks.lock new file mode 100644 index 000000000..65a8008aa --- /dev/null +++ b/.claude/scheduled_tasks.lock @@ -0,0 +1 @@ +{"sessionId":"e402bf71-ca74-4aa5-856c-da0c2053caab","pid":78596,"procStart":"Sat May 16 20:13:35 2026","acquiredAt":1779000018499} \ No newline at end of file diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 9d08a1a82..000000000 --- a/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 3d3ed29bb..000000000 --- a/.eslintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parser": "babel-eslint", - "extends": ["react-app", "prettier"], - "env": { - "es6": true - }, - "parserOptions": { - "sourceType": "module" - }, - "rules": { - "react-hooks/exhaustive-deps": [ - "warn", - { "additionalHooks": "(useIsomorphicLayoutEffect)" } - ] - } -} diff --git a/.gitattributes b/.gitattributes index dfe077042..5a0d5e480 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ # Auto detect text files and perform LF normalization -* text=auto +* text=auto eol=lf diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..ec3767088 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,6 @@ +.github/ @TanStack/tanstack-core +.nx/ @TanStack/tanstack-core +nx.json @TanStack/tanstack-core +.changeset/config.json @TanStack/tanstack-core +scripts/ @TanStack/tanstack-core +.npmrc @TanStack/tanstack-core \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 508727c12..fd99b3b17 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1 @@ github: tannerlinsley -custom: https://youtube.com/tannerlinsley diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..d8f8d4b31 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,126 @@ +name: πŸ› Bug Report +description: Report a reproducible bug or regression +body: + - type: markdown + attributes: + value: | + Thank you for reporting an issue :pray:. + + This issue tracker is for reporting reproducible bugs or regression's found in [tanstack-virtual](https://github.com/tanstack/virtual) + If you have a question about how to achieve or implement something and are struggling, please post a question + inside of tanstack-virtual's [Discussions tab](https://github.com/tanstack/virtual/discussions) instead of filing an issue. + + Before submitting a new bug/issue, please check the links below to see if there is a solution or question posted there already: + - tanstack-virtual's [Discussions tab](https://github.com/tanstack/virtual/discussions) + - tanstack-virtual's [Open Issues](https://github.com/tanstack/virtual/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) + - tanstack-virtual's [Closed Issues](https://github.com/tanstack/virtual/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed) + + The more information you fill in, the better the community can help you. + + - type: textarea + id: description + attributes: + label: Describe the bug + description: Provide a clear and concise description of the challenge you are running into. + validations: + required: true + - type: input + id: link + attributes: + label: Your minimal, reproducible example + description: | + Please add a link to a minimal reproduction. + Note: + - Your bug may get fixed much faster if we can run your code and it doesn't have dependencies other than React. + - To create a shareable code example for web, you can use CodeSandbox (https://codesandbox.io/s/new) or Stackblitz (https://stackblitz.com/). + - Please make sure the example is complete and runnable without prior dependencies and free of unnecessary abstractions + - Feel free to fork any of the official CodeSandbox examples to reproduce your issue: https://github.com/tanstack/virtual/tree/main/examples/ + - For React Native, you can use: https://snack.expo.dev/ + - For TypeScript related issues only, a TypeScript Playground link might be sufficient: https://www.typescriptlang.org/play + - Please read these tips for providing a minimal example: https://stackoverflow.com/help/mcve. + placeholder: | + e.g. Code Sandbox, Stackblitz, Expo Snack or TypeScript playground + validations: + required: true + - type: textarea + id: steps + attributes: + label: Steps to reproduce + description: Describe the steps we have to take to reproduce the behavior. + placeholder: | + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + description: Provide a clear and concise description of what you expected to happen. + placeholder: | + As a user, I expected **_ behavior but i am seeing _** + validations: + required: true + - type: dropdown + attributes: + options: + - Every time + - Often + - Sometimes + - Only once + label: How often does this bug happen? + description: | + Following the repro steps above, how easily are you able to reproduce this bug? + options: - Every time - Often - Sometimes - Only once + - type: textarea + id: screenshots_or_videos + attributes: + label: Screenshots or Videos + description: | + If applicable, add screenshots or a video to help explain your problem. + For more information on the supported file image/file types and the file size limits, please refer + to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files + placeholder: | + You can drag your video or image files inside of this editor ↓ + - type: textarea + id: platform + attributes: + label: Platform + description: | + Please let us know which Operting System, Browser and Browser version you were using when the issue occurred. + placeholder: | + - OS: [e.g. macOS, Windows, Linux, iOS, Android] - Browser: [e.g. Chrome, Safari, Firefox, React Native] - Version: [e.g. 91.1] + validations: + required: true + - type: input + id: library-version + attributes: + label: tanstack-virtual version + description: | + Please let us know the exact version of tanstack-virtual you were using when the issue occurred. Please don't just put in "latest", as this is subject to change. + placeholder: | + e.g. v3.30.1 + validations: + required: true + - type: input + id: ts-version + attributes: + label: TypeScript version + description: | + If you are using TypeScript, please let us know the exact version of TypeScript you were using when the issue occurred. + placeholder: | + e.g. v5.2.2 + - type: textarea + id: additional + attributes: + label: Additional context + description: Add any other context about the problem here. + - type: checkboxes + id: agrees-to-terms + attributes: + label: Terms & Code of Conduct + description: By submitting this issue, you agree to follow our Code of Conduct and can verify that you have followed the requirements outlined above to the best of your ability. + options: + - label: I agree to follow this project's Code of Conduct + required: true + - label: I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed. + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..4ec47ee22 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: πŸ€” Feature Requests & Questions + url: https://github.com/TanStack/virtual/discussions + about: Please ask and answer questions here. + - name: πŸ’¬ Community Chat + url: https://discord.gg/mQd7egN + about: A dedicated discord server hosted by TanStack + - name: πŸ¦‹ TanStack Bluesky + url: https://bsky.app/profile/tanstack.com + about: Stay up to date with new releases of our libraries diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..e6556d7f3 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ +## 🎯 Changes + + + +## βœ… Checklist + +- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/virtual/blob/main/CONTRIBUTING.md). +- [ ] I have tested this code locally with `pnpm run test:pr`. + +## πŸš€ Release Impact + +- [ ] This change affects published code, and I have generated a [changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md). +- [ ] This change is docs/CI/dev-only (no release). diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 000000000..aa175e3b7 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "configMigration": true, + "extends": [ + "config:recommended", + "group:allNonMajor", + "schedule:weekly", + ":approveMajorUpdates", + ":automergeMinor", + ":disablePeerDependencies", + ":maintainLockFilesMonthly", + ":semanticCommits", + ":semanticCommitTypeAll(chore)" + ], + "ignorePresets": [":ignoreModulesAndTests"], + "labels": ["dependencies"], + "rangeStrategy": "bump", + "postUpdateOptions": ["pnpmDedupe"], + "ignoreDeps": ["@types/node", "node", "typescript"] +} diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 000000000..42dedc15c --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,33 @@ +name: autofix.ci # needed to securely identify the workflow + +on: + pull_request: + push: + branches: [main, alpha, beta] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + autofix: + name: autofix + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Setup Tools + uses: tanstack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main + - name: Fix formatting + run: pnpm format + - name: Apply fixes + uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef + with: + commit-message: 'ci: apply automated fixes' diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 000000000..77ff5e14d --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,76 @@ +name: PR + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +env: + NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} + +permissions: + contents: read + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + persist-credentials: false + - name: Setup Tools + uses: tanstack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main + - name: Get base and head commits for `nx affected` + uses: nrwl/nx-set-shas@3e9ad7370203c1e93d109be57f3b72eb0eb511b1 # v4.4.0 + with: + main-branch-name: main + - name: Install Playwright browsers + run: pnpm exec playwright install chromium + - name: Run Checks + run: pnpm run test:pr + preview: + name: Preview + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Setup Tools + uses: tanstack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main + - name: Build Packages + run: pnpm run build:all + - name: Publish Previews + run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*' + provenance: + name: Provenance + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Check Provenance + uses: danielroe/provenance-action@41bcc969e579d9e29af08ba44fcbfdf95cee6e6c # v0.1.1 + with: + fail-on-downgrade: true + version-preview: + name: Version Preview + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Setup Tools + uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main + - name: Changeset Preview + uses: TanStack/config/.github/changeset-preview@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..f4d4e4998 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: Release + +on: + push: + branches: [main, alpha, beta] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +env: + NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} + +permissions: + contents: read + +jobs: + release: + name: Release + if: github.repository_owner == 'TanStack' + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + persist-credentials: false + - name: Setup Tools + uses: tanstack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main + - name: Install Playwright browsers + run: pnpm exec playwright install chromium + - name: Run Tests + run: pnpm run test:ci + - name: Run Changesets (version or publish) + id: changesets + uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0 + with: + version: pnpm run changeset:version + publish: pnpm run changeset:publish + commit: 'ci: Version Packages' + title: 'ci: Version Packages' + - name: Comment on PRs about release + if: steps.changesets.outputs.published == 'true' + uses: TanStack/config/.github/comment-on-release@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main + with: + published-packages: ${{ steps.changesets.outputs.publishedPackages }} diff --git a/.github/workflows/size-comments.yml b/.github/workflows/size-comments.yml deleted file mode 100644 index 5bb07f016..000000000 --- a/.github/workflows/size-comments.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Compressed Size - -on: [pull_request] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2-beta - with: - fetch-depth: 1 - - uses: preactjs/compressed-size-action@v1 - with: - repo-token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.github/workflows/test-and-publish.yml b/.github/workflows/test-and-publish.yml deleted file mode 100644 index 23e0bc112..000000000 --- a/.github/workflows/test-and-publish.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: react-virtual tests - -on: - push: - branches: - - 'master' - pull_request: - -jobs: - test: - name: 'node ${{ matrix.node }} ${{ matrix.os }} ' - runs-on: '${{ matrix.os }}' - strategy: - matrix: - os: [ubuntu-latest] - node: [12, 10] - steps: - - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node }} - - uses: actions/checkout@v2 - with: - fetch-depth: 1 - - run: npm i -g yarn - - run: yarn --frozen-lockfile - - run: yarn test:ci - - publish-module: - name: 'Publish Module to NPM' - needs: test - if: github.ref == 'refs/heads/master' #publish only when merged in master, not on PR - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - run: npm i -g yarn - - run: yarn --frozen-lockfile - - run: npx semantic-release@17 - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - GH_TOKEN: ${{secrets.GH_TOKEN}} diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 000000000..3b69d6598 --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,24 @@ +name: GitHub Actions Security Analysis + +on: + push: + branches: [main] + pull_request: + branches: ['**'] + +permissions: {} + +jobs: + zizmor: + name: zizmor + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Run zizmor + uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3 + with: + advanced-security: false + annotations: true diff --git a/.gitignore b/.gitignore index b6802db06..36fee5501 100644 --- a/.gitignore +++ b/.gitignore @@ -3,13 +3,13 @@ # dependencies node_modules +package-lock.json +yarn.lock # builds build -dist -artifacts -.rpt2_cache coverage +dist # misc .DS_Store @@ -25,4 +25,28 @@ yarn-debug.log* yarn-error.log* .history size-plugin.json +stats-hydration.json +stats.json stats.html +.vscode/settings.json + +*.log +.cache +.idea +.nx/cache +.nx/workspace-data +.pnpm-store +.tsup +.svelte-kit + +vite.config.js.timestamp-* +vite.config.ts.timestamp-* + +# Playwright test artifacts +test-results/ +playwright-report/ +*.log +**/*.tsbuildinfo + +# Marko Run generated route types +.marko-run/ diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..268c392d3 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +provenance=true diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..b40402760 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24.8.0 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..6534da938 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,9 @@ +**/.next +**/.nx/cache +**/.svelte-kit +**/build +**/coverage +**/dist +**/docs +**/codemods/**/__testfixtures__ +pnpm-lock.yaml diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index cb8705fef..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "workbench.colorCustomizations": { - "titleBar.activeBackground": "#885cff", // change this color! - "titleBar.inactiveBackground": "#885cff", // change this color! - "titleBar.activeForeground": "#ffffff", // change this color! - "titleBar.inactiveForeground": "#ffffff" // change this color! - } -} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 42f942c11..532efc03b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,11 +2,11 @@ ## Questions -If you have questions about implementation details, help or support, then please use our dedicated community forum at [Github Discussions](https://github.com/tannerlinsley/react-virtual/discussions) **PLEASE NOTE:** If you choose to instead open an issue for your question, your issue will be immediately closed and redirected to the forum. +If you have questions about implementation details, help or support, then please use our dedicated community forum at [GitHub Discussions](https://github.com/TanStack/virtual/discussions) **PLEASE NOTE:** If you choose to instead open an issue for your question, your issue will be immediately closed and redirected to the forum. ## Reporting Issues -If you have found what you think is a bug, please [file an issue](https://github.com/tannerlinsley/react-virtual/issues/new). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [Github Discussions](https://github.com/tannerlinsley/react-virtual/discussions) +If you have found what you think is a bug, please [file an issue](https://github.com/TanStack/virtual/issues/new/choose). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [GitHub Discussions](https://github.com/TanStack/virtual/discussions) ## Suggesting new features @@ -16,92 +16,146 @@ If you are here to suggest a feature, first create an issue if it does not alrea If you have been assigned to fix an issue or develop a new feature, please follow these steps to get started: -- Fork this repository -- Install dependencies by running `$ yarn` -- Link `react-virtual` locally by running `$ yarn link` -- Auto-build files as you edit by running `$ yarn start` -- Implement your changes and tests to files in the `src/` directory and corresponding test files -- To run examples, follow their individual directions. Usually this is just `$ yarn && yarn start`. -- To run examples using your local build, link to the local `react-virtual` by running `$ yarn link react-virtual` from the example's directory -- Document your changes in the appropriate doc page -- Git stage your required changes and commit (see below commit guidelines) -- Submit PR for review +- Fork this repository. +- Install dependencies -## Commit message conventions + ```bash + pnpm install + ``` -`react-virtual` is using [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines). + - We use [pnpm](https://pnpm.io/) v9 for package management (run in case of pnpm-related issues). -We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. + ```bash + corepack enable && corepack prepare + ``` -### Commit Message Format + - We use [nvm](https://github.com/nvm-sh/nvm) to manage node versions - please make sure to use the version mentioned in `.nvmrc` -Each commit message consists of a **header**, a **body** and a **footer**. The header has a special -format that includes a **type**, a **scope** and a **subject**: + ```bash + nvm use + ``` +- Build all packages. + + ```bash + pnpm build:all + ``` + +- Run development server. + + ```bash + pnpm run watch + ``` + +- Implement your changes and tests to files in the `src/` directory and corresponding test files. +- Document your changes in the appropriate doc page. +- Git stage your required changes and commit (see below commit guidelines). +- Submit PR for review. + +### Editing the docs locally and previewing the changes + +The documentations for all the TanStack projects are hosted on [tanstack.com](https://tanstack.com), which is a TanStack Start application (https://github.com/TanStack/tanstack.com). You need to run this app locally to preview your changes in the `TanStack/virtual` docs. + +> [!NOTE] +> The website fetches the doc pages from GitHub in production, and searches for them at `../virtual/docs` in development. Your local clone of `TanStack/virtual` needs to be in the same directory as the local clone of `TanStack/tanstack.com`. + +You can follow these steps to set up the docs for local development: + +1. Make a new directory called `tanstack`. + +```sh +mkdir tanstack ``` -(): - - - -