From fd8e6f042a20d9b1b7e054e6d645767c40ffac32 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Mon, 22 Sep 2025 11:11:45 +0900 Subject: [PATCH 1/5] ci: introduce changesets --- .changeset/config.json | 13 + .github/pull_request_template.md | 9 + .github/workflows/release.yml | 24 +- CONTRIBUTING.md | 76 +---- integrations/angular-cli-20/package.json | 3 +- package.json | 6 +- pnpm-lock.yaml | 386 ++++++++++++++++++++++- scripts/publish.ts | 119 ------- 8 files changed, 410 insertions(+), 226 deletions(-) create mode 100644 .changeset/config.json create mode 100644 .github/pull_request_template.md delete mode 100644 scripts/publish.ts diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000000..0e32a8b571 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", + "changelog": [ + "@svitejs/changesets-changelog-github-compact", + { "repo": "TanStack/query" } + ], + "commit": false, + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "fixed": [], + "linked": [] +} diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..285efb166a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,9 @@ +## ๐ŸŽฏ Changes + + + +## โœ… Checklist + +- [ ] I have followed the steps listed in the [Contributing guide](https://github.com/TanStack/config/blob/main/CONTRIBUTING.md). +- [ ] I have tested and linted this code locally. +- [ ] I have generated a [changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) for this PR, or this PR should not release a new version. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f2028696d..7be582de2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,6 @@ -name: ci +name: Release on: - workflow_dispatch: - inputs: - tag: - description: override release tag - required: false push: branches: [main, alpha, beta, rc, v4] @@ -19,6 +14,7 @@ env: permissions: contents: write id-token: write + pull-requests: write jobs: release: @@ -39,16 +35,16 @@ jobs: - name: Stop Nx Agents if: ${{ always() }} run: npx nx-cloud stop-all-agents - - name: Publish - run: | - git config --global user.name 'Tanner Linsley' - git config --global user.email 'tannerlinsley@users.noreply.github.com' - npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" - pnpm run cipublish + - name: Run Changesets (version or publish) + uses: changesets/action@v1.5.3 + with: + version: pnpm run changeset:version + publish: pnpm run changeset:publish + commit: 'ci: Version Packages' + title: 'ci: Version Packages' env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - TAG: ${{ inputs.tag }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v4.6.0 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cb7ff182cc..2d90db264c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -155,79 +155,9 @@ You can use Gitpod (An Online Open Source VS Code like IDE which is free for Ope [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/TanStack/query) -## Commit message conventions +## Changesets -`TanStack/query` is using [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines). - -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**. - -### Commit Message Format - -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**: - -```text -(): - - - -