diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml
index e875435..3c04b06 100644
--- a/.github/workflows/ci-cd.yml
+++ b/.github/workflows/ci-cd.yml
@@ -35,3 +35,13 @@ jobs:
uses: falcondev-it/.github/actions/pnpm-install@master
- run: pnpm run type-check
+
+ test:
+ name: 🧪 Unit Tests
+ needs: [type-check]
+ runs-on: ubuntu-latest
+ steps:
+ - name: pnpm install
+ uses: falcondev-it/.github/actions/pnpm-install@master
+
+ - run: pnpm run test
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 2336be0..47813fd 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -20,6 +20,8 @@ jobs:
steps:
- uses: actions/checkout@v4
+ with:
+ ref: ${{ inputs.ref }}
- uses: pnpm/action-setup@v3
with:
@@ -27,16 +29,16 @@ jobs:
- uses: actions/setup-node@v4
with:
- node-version: 20.x
+ node-version: 22.x
cache: pnpm
registry-url: https://registry.npmjs.org
- run: pnpm install --frozen-lockfile
- - name: build
+ - name: Build
run: pnpm build
- name: Publish
- run: pnpm publish
+ run: pnpm publish --no-git-checks --tag $(npx simple-dist-tag)
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5ae6876..a8abb7a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -59,3 +59,5 @@ jobs:
needs: [release]
uses: ./.github/workflows/deploy.yml
secrets: inherit
+ with:
+ ref: ${{ needs.release.outputs.RELEASE_REF }}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 5235a22..f940086 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -23,5 +23,6 @@
{
"mode": "auto"
}
- ]
+ ],
+ "typescript.tsdk": "node_modules/typescript/lib"
}
diff --git a/README.md b/README.md
index cb2961b..3b9e260 100644
--- a/README.md
+++ b/README.md
@@ -20,9 +20,10 @@ pnpm add @falcondev-oss/trpc-vue-query
```ts
import { createTRPCVueQueryClient } from '@falcondev-oss/trpc-vue-query'
-import type { AppRouter } from '../your_server/trpc'
import { VueQueryPlugin, useQueryClient } from '@tanstack/vue-query'
+import type { AppRouter } from '../your_server/trpc'
+
app.use(VueQueryPlugin)
app.use({
install(app) {
@@ -45,6 +46,7 @@ app.use({
```ts
import { createTRPCVueQueryClient } from '@falcondev-oss/trpc-vue-query'
+
import type { AppRouter } from '../your_server/trpc'
export function useTRPC() {
@@ -116,6 +118,7 @@ Setup `trpc-nuxt` as described in their [documentation](https://trpc-nuxt.vercel
import { createTRPCVueQueryClient } from '@falcondev-oss/trpc-vue-query'
import { useQueryClient } from '@tanstack/vue-query'
import { httpBatchLink } from 'trpc-nuxt/client'
+
import type { AppRouter } from '~/server/trpc/routers'
export default defineNuxtPlugin(() => {
diff --git a/docs/content/1.getting-started/1.index.md b/docs/content/1.getting-started/1.index.md
index 526683f..1ee0289 100644
--- a/docs/content/1.getting-started/1.index.md
+++ b/docs/content/1.getting-started/1.index.md
@@ -29,9 +29,10 @@ npm install @falcondev-oss/trpc-vue-query
```ts [main.ts]
import { createTRPCVueQueryClient } from '@falcondev-oss/trpc-vue-query'
-import type { AppRouter } from '../your_server/trpc'
import { VueQueryPlugin, useQueryClient } from '@tanstack/vue-query'
+import type { AppRouter } from '../your_server/trpc'
+
app.use(VueQueryPlugin)
app.use({
install(app) {
@@ -54,6 +55,7 @@ app.use({
```ts [composables/useTRPC.ts]
import { createTRPCVueQueryClient } from '@falcondev-oss/trpc-vue-query'
+
import type { AppRouter } from '../your_server/trpc'
export function useTRPC() {
@@ -69,6 +71,7 @@ Setup `trpc-nuxt` as described in their [documentation](https://trpc-nuxt.vercel
import { createTRPCVueQueryClient } from '@falcondev-oss/trpc-vue-query'
import { useQueryClient } from '@tanstack/vue-query'
import { httpBatchLink } from 'trpc-nuxt/client'
+
import type { AppRouter } from '~/server/trpc/routers'
export default defineNuxtPlugin(() => {
diff --git a/docs/content/1.getting-started/2.usage.md b/docs/content/1.getting-started/2.usage.md
index 71fefa4..48a1d61 100644
--- a/docs/content/1.getting-started/2.usage.md
+++ b/docs/content/1.getting-started/2.usage.md
@@ -31,7 +31,7 @@ You can pass options as the second argument to the `useQuery` function.
```vue
```
diff --git a/docs/content/composables/1.useQuery.md b/docs/content/composables/1.useQuery.md
index 834bd56..10202ad 100644
--- a/docs/content/composables/1.useQuery.md
+++ b/docs/content/composables/1.useQuery.md
@@ -29,7 +29,7 @@ You can pass any `@tanstack/vue-query` options as the second argument to the `us
```vue
```
diff --git a/docs/error.vue b/docs/error.vue
index 031efd6..c750ccc 100644
--- a/docs/error.vue
+++ b/docs/error.vue
@@ -1,6 +1,6 @@