这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
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
43 changes: 1 addition & 42 deletions .changeset/refactor-pinia-colada-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,4 @@ feat(pinia-colada): query options use `defineQueryOptions`

### Updated Pinia Colada query options

Pinia Colada query options now use `defineQueryOptions` to improve reactivity support. Instead of calling the query options function, you can use one of the following approaches.

### No params

```ts
useQuery(getPetsQuery);
```

### Constant

```ts
useQuery(getPetByIdQuery, () => ({
path: {
petId: 1,
},
}));
```

### Reactive

```ts
const petId = ref<number | null>(1);

useQuery(getPetByIdQuery, () => ({
path: {
petId: petId.value,
},
}));
```

### Properties

```ts
const petId = ref<number | null>(1);

useQuery(() => ({
...getPetByIdQuery({
path: { petId: petId.value as number },
}),
enabled: () => petId.value != null,
}));
```
Pinia Colada query options now use `defineQueryOptions` to improve reactivity support. Instead of calling the query options function, you can use one of the [following approaches](https://heyapi.dev/openapi-ts/migrating#updated-pinia-colada-query-options).
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Build library
run: pnpm build
- name: Build packages
run: pnpm build --filter="@hey-api/**"

- name: Run test coverage
run: pnpm test:coverage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
# prevent lockfile mismatch error
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build
- name: Build packages
run: pnpm build --filter="@hey-api/**"

- name: Generate GitHub App Token
id: app-token
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "0.17.4",
"@changesets/cli": "2.27.8",
"@changesets/cli": "2.29.7",
"@changesets/get-github-info": "0.6.0",
"@changesets/parse": "0.4.1",
"@changesets/types": "6.1.0",
Expand Down
Loading
Loading