Skip to content

Commit

Permalink
docs(suspensive.org): update docs for cli
Browse files Browse the repository at this point in the history
  • Loading branch information
gwansikk committed Jul 4, 2024
1 parent 3f5339f commit 129dcc0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"motivation": { "title": "Why need to use?" },
"installation": { "title": "Installation" },
"command-line-interface": { "title": "Command-Line Interface" },
"support-both-tanstack-query-v4-and-5": { "title": "Support both TanStack Query v4 and 5" },
"migrate-to-v2": { "title": "Migrating to v2" },
"--- API Reference": {
"type": "separator",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"motivation": { "title": "어떤 이유로 사용하나요?" },
"installation": { "title": "설치하기" },
"command-line-interface": { "title": "Command-Line Interface" },
"support-both-tanstack-query-v4-and-5": { "title": "TanStack Query v4, 5를 모두 지원" },
"migrate-to-v2": { "title": "v2로 마이그레이션하기" },
"--- API Reference": {
"type": "separator",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { Callout } from '@/components'

# Command-Line Interface (CLI)
# Support both TanStack Query v4 and 5

The Command-Line Interface (CLI) of @suspensive/react-query is a tool designed to address compatibility issues with @tanstack/react-query. With this tool, you can verify compatibility with @tanstack/react-query and switch to a compatible version of @suspensive/react-query if necessary.
As of version 2.2.0, @suspensive/react-query supports both versions 4 and 5 of @tanstack/react-query.

<Callout type="info">The CLI is still an experimental feature and may not function as intended.</Callout>

## When to Use It
Internally, it consists of @suspensive/react-query-4 and @suspensive/react-query-5, which correspond to the respective versions of @tanstack/react-query. (In this document, these version-specific packages are referred to as "module") The CLI automatically detects the installed version of @tanstack/react-query in your environment and uses the compatible module.

Starting from version 2.2.0, @suspensive/react-query supports both versions 4 and 5 of @tanstack/react-query.
## Command-Line Interface (CLI)

Internally, it consists of @suspensive/react-query-4 and @suspensive/react-query-5, which correspond to the respective versions of @tanstack/react-query. (In this document, these version-specific packages are referred to as modules.) The CLI automatically detects the installed version of @tanstack/react-query in your environment and uses the compatible version.
The Command-Line Interface (CLI) of @suspensive/react-query is a tool designed to address compatibility issues with @tanstack/react-query. Using commands, you can verify compatibility with @tanstack/react-query and switch to a compatible version of @suspensive/react-query.

If a compatibility issue with @tanstack/react-query causes an error, the CLI can be used to resolve the issue. However, it is rare to need to use the CLI, as @suspensive/react-query will automatically use the correct version upon installation.

<Callout type="info">The CLI is still an experimental feature and may not function as intended.</Callout>

## Getting Started

The CLI is included in the @suspensive/react-query package. No additional installation is required, and you can use it directly with the following command.
Expand All @@ -22,7 +22,7 @@ The CLI is included in the @suspensive/react-query package. No additional instal
npx suspensive-react-query
```

Or simply use the short command `srq`
Or simply use the short command `srq`.

```bash
npx srq
Expand Down Expand Up @@ -94,7 +94,7 @@ The versions are compatible.

### switch

Changes the @suspensive/react-query module to match the specified version of @tanstack/react-query. For instance, if using @tanstack/react-query v5 and encountering an error, you can switch to the compatible module with:
Changes the @suspensive/react-query module to match the specified version of @tanstack/react-query. For instance, if using @tanstack/react-query v5 and encountering an error, you can switch to the compatible module with.

```bash
npx suspensive-react-query switch 5
Expand All @@ -110,7 +110,7 @@ npx suspensive-react-query fix

## Troubleshooting

If you encounter version-related errors during the build process, you can specify the version to use in `package.json` as follows. To ensure the correct version is used during build, you can add the following script:
If you encounter version-related errors during the build process, you can specify the version to use in `package.json` as follows. To ensure the correct version is used during build, you can add the following script.

```json
{
Expand All @@ -120,7 +120,7 @@ If you encounter version-related errors during the build process, you can specif
}
```

Alternatively, to lock in a specific version, you can set the script like this:
Alternatively, to lock in a specific version, you can set the script like this.

```json
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { Callout } from '@/components'

# Command-Line Interface (CLI)
# TanStack Query v4, 5를 모두 지원

@suspensive/react-query의 Command-Line Interface (CLI)는 @tanstack/react-query와의 호환성 문제를 해결하기 위한 도구입니다. 명령어를 통해 @tanstack/react-query와의 호환 여부를 확인하고, @suspensive/react-query의 호환되는 버전으로 변경할 수 있습니다.

<Callout type="info">CLI는 아직 실험적인 기능이며, 의도대로 동작하지 않을 수 있습니다.</Callout>
@suspensive/react-query는 v2.2.0 버전 이후로 @tanstack/react-query의 v4와 v5를 모두 지원합니다.

## 언제 사용하나요?
내부적으로 @tanstack/react-query 버전에 대응하는 @suspensive/react-query-4@suspensive/react-query-5로 구성되어 있습니다. (대응되는 버전 패키지를 해당 문서에서는 "모듈"이라고 부르겠습니다.) 사용자 환경에 설치된 @tanstack/react-query 버전을 감지하여 자동으로 호환되는 모듈을 사용합니다.

@suspensive/react-query는 v2.2.0 버전 이후로 @tanstack/react-query의 v4와 v5를 모두 지원합니다.
## Command-Line Interface (CLI)

내부적으로 @tanstack/react-query 버전에 대응하는 @suspensive/react-query-4@suspensive/react-query-5로 구성되어 있습니다. (대응되는 버전 패키지를 해당 문서에서는 모듈이라고 부르겠습니다.) 사용자 환경에 설치된 @tanstack/react-query 버전을 자동으로 감지하여 호환되는 버전을 사용합니다.
@suspensive/react-query의 Command-Line Interface (CLI)는 @tanstack/react-query와의 호환성 문제를 해결하기 위한 도구입니다. 명령어를 통해 @tanstack/react-query와의 호환 여부를 확인하고, @suspensive/react-query호환되는 버전으로 변경할 수 있습니다.

특수한 이유로 @tanstack/react-query와 호환되지 않아 에러가 발생하면, CLI를 통해 문제를 해결할 수 있습니다. 하지만 실제로 CLI를 사용할 일은 드물며, @suspensive/react-query 설치 시 자동으로 알맞은 버전을 사용합니다.

<Callout type="info">CLI는 아직 실험적인 기능이며, 의도대로 동작하지 않을 수 있습니다.</Callout>

## 시작하기

CLI는 @suspensive/react-query 패키지에 포함되어 있습니다. 추가적인 설치는 필요 없으며, 아래 명령어를 통해 바로 사용할 수 있습니다.
Expand Down

0 comments on commit 129dcc0

Please sign in to comment.