@uiwwsw/react-query-helper 1.2.7 โ†’ 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,46 @@
1
+ # Changelog
2
+
3
+ ## 2.0.1
4
+
5
+ The v2.0.0 tag was not published to npm. This release includes all of the 2.0.0
6
+ changes below, including the breaking changes for applications upgrading from 1.x.
7
+
8
+ - Simplify Korean/English onboarding and move detailed configuration and recipes into reference guides.
9
+ - Introduce the Q symbol, light/dark README banners, and documented brand assets.
10
+ - Add regression tests for documentation links, SVG assets, and generated/typechecked README examples.
11
+ - Refresh release guidance and source-install examples for 2.0.1.
12
+
13
+ ## 2.0.0
14
+
15
+ ### Breaking Changes
16
+
17
+ - Require TanStack Query >=5.102.8 <6. Node 22 remains the minimum CLI runtime.
18
+ - Generated path keys now include filenames. Query/infinite keys use separate kind segments and nested argument tuples. Invalidate persisted 1.x caches and update manually constructed keys.
19
+ - Remove forced infinite cache/stale times and disabled focus refetching. QueryClient defaults now apply.
20
+ - Single-array mutation payloads are passed intact. Direct multi-argument helpers require an explicit mapper or tuple mode.
21
+ - Refuse to overwrite output without this generator's ownership marker. Move legacy generated files aside and regenerate.
22
+ - Built-in generation rejects private imports, invalid identifiers, duplicate names and invalid configuration.
23
+
24
+ ### Fixed
25
+
26
+ - Starter configs no longer reference missing plugins or assume an application alias.
27
+ - Correct InfiniteData, pageParam, select, default error, cache data-tag and optimistic rollback inference.
28
+ - Forward query/mutation context, including QueryClient and AbortSignal, to custom callbacks.
29
+ - Convert synchronous callback failures to rejected promises.
30
+ - Support default/local alias exports, skip ambient declarations and duplicate overload signatures.
31
+ - Preserve optional multi-argument mutation fields and handle rest/destructured parameters using tuples.
32
+ - Include source filenames in cache prefixes and avoid unused/colliding helper imports.
33
+ - Honor empty artifact lists and provide per-function artifact selection.
34
+ - Load TypeScript/CommonJS configs and plugins with relative imports through Jiti; validate options and plugin contracts.
35
+ - Exclude output directories from source scans; support standard ignore globs; detect symlink and output collisions.
36
+ - Reconcile only owned stale files after a successful analysis, avoid unchanged writes, serialize watch passes and recover after errors.
37
+ - Wait for watcher readiness and reconcile startup edits before announcing that watch is active.
38
+ - Report generation failures with nonzero exit codes; add explicit config selection and read-only output checks.
39
+
40
+ ### Maintenance
41
+
42
+ - Replace the Bun-only build with a Node/esbuild build; preserve a browser-safe runtime and NodeNext-compatible declarations.
43
+ - Use one npm lockfile; remove obsolete scripts, the fs placeholder dependency and Bun ambient types.
44
+ - Add runtime, CLI, emitted-code, type-inference and installed-package tests.
45
+ - Add Node 22/24 CI and pre-publish tests, consumer checks, tag/version validation and provenance.
46
+ - Rewrite Korean/English documentation with usage, limitations and migration steps.
package/README.md CHANGED
@@ -1,329 +1,168 @@
1
1
  <p align="center">
2
- <img src="https://raw.githubusercontent.com/uiwwsw/react-query-helper/main/assets/logo.svg" alt="React Query Helper Logo" width="160" />
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/uiwwsw/react-query-helper/main/assets/readme-hero-dark.svg" />
4
+ <img src="https://raw.githubusercontent.com/uiwwsw/react-query-helper/main/assets/readme-hero.svg" alt="React Query Helper: Your API. Query-ready. TypeScript in, reusable options out." width="1120" />
5
+ </picture>
3
6
  </p>
4
7
 
5
8
  <h1 align="center">React Query Helper</h1>
6
9
 
7
10
  <p align="center">
8
- <a href="README_EN.md">๐Ÿ‡บ๐Ÿ‡ธ English</a> ยท <strong>๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ตญ์–ด</strong>
11
+ API ํ•จ์ˆ˜๋Š” ๊ทธ๋Œ€๋กœ. ๋ฐ˜๋ณต๋˜๋Š” ์ฟผ๋ฆฌ ์„ค์ •์€ ์ƒ์„ฑํ•˜์„ธ์š”.<br />
12
+ TypeScript ํ•จ์ˆ˜์—์„œ TanStack Query v5์˜ ํƒ€์ž… ์•ˆ์ „ํ•œ ์˜ต์…˜ ํŒฉํ† ๋ฆฌ๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
9
13
  </p>
10
14
 
11
15
  <p align="center">
12
- <a href="https://www.npmjs.com/package/@uiwwsw/react-query-helper"><img src="https://img.shields.io/npm/v/@uiwwsw/react-query-helper.svg?color=2563eb" alt="npm version" /></a>
13
- <a href="https://www.npmjs.com/package/@uiwwsw/react-query-helper"><img src="https://img.shields.io/npm/dm/@uiwwsw/react-query-helper.svg?color=9333ea" alt="npm downloads" /></a>
14
- <a href="https://bundlephobia.com/package/@uiwwsw/react-query-helper"><img src="https://img.shields.io/bundlephobia/minzip/@uiwwsw/react-query-helper.svg?color=10b981" alt="bundle size" /></a>
15
- <a href="https://github.com/uiwwsw/react-query-helper/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-10b981.svg" alt="license" /></a>
16
- <a href="https://www.npmjs.com/package/@uiwwsw/react-query-helper"><img src="https://img.shields.io/npm/types/@uiwwsw/react-query-helper.svg?color=3178c6" alt="types" /></a>
17
- </p>
18
- <p align="center">
19
- <a href="https://github.com/uiwwsw/react-query-helper"><img src="https://img.shields.io/github/stars/uiwwsw/react-query-helper?style=social" alt="github stars" /></a>
16
+ <a href="https://www.npmjs.com/package/@uiwwsw/react-query-helper"><img src="https://img.shields.io/npm/v/%40uiwwsw%2Freact-query-helper?style=flat-square&amp;label=npm&amp;color=133c35" alt="Published npm version" /></a>
17
+ <a href="https://github.com/uiwwsw/react-query-helper/actions/workflows/ci.yml"><img src="https://github.com/uiwwsw/react-query-helper/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI status on main" /></a>
18
+ <a href="https://github.com/uiwwsw/react-query-helper/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-f38466?style=flat-square" alt="MIT license" /></a>
20
19
  </p>
20
+
21
21
  <p align="center">
22
- <img src="https://img.shields.io/badge/Node.js-%3E%3D18.0-000000.svg?logo=node.js" alt="node version" />
23
- <img src="https://img.shields.io/badge/Bun-ready-f97316.svg?logo=bun" alt="bun ready" />
22
+ <a href="#quick-start">๋น ๋ฅธ ์‹œ์ž‘</a> ยท
23
+ <a href="https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md">์„ค์ •๊ณผ ์˜ˆ์ œ</a> ยท
24
+ <a href="https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md#1x์—์„œ-์ด์ „">1.x์—์„œ ์ด์ „</a> ยท
25
+ <a href="https://github.com/uiwwsw/react-query-helper/blob/main/README_EN.md">English</a>
24
26
  </p>
25
27
 
26
- > React Query Helper๋Š” TypeScript API ํ•จ์ˆ˜๋กœ๋ถ€ํ„ฐ React Query ํ›…๊ณผ ์˜ต์…˜ ๊ฐ์ฒด๋ฅผ ์ž๋™ ์ƒ์„ฑํ•ด ์ฃผ๋Š” CLI ๋„๊ตฌ์ž…๋‹ˆ๋‹ค. ์„ค์ •๋งŒ ํ•ด๋‘๋ฉด ๋ฐ˜๋ณต์ ์ธ ํ›… ์ž‘์„ฑ ์‹œ๊ฐ„์„ ์ ˆ์•ฝํ•˜๊ณ  ํ”„๋กœ์ ํŠธ ์ „์ฒด์— ๊ฑธ์ณ ์ผ๊ด€๋œ ๋ฐ์ดํ„ฐ ํŒจ์นญ ๊ทœ์น™์„ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
27
-
28
- ๊ธฐ๋ณธ์ ์œผ๋กœ ๊ฐ ํŒŒ์ผ์˜ `export`๋œ ํ•จ์ˆ˜๋งŒ ์ƒ์„ฑ ๋Œ€์ƒ์œผ๋กœ ๋ถ„์„ํ•ฉ๋‹ˆ๋‹ค.
28
+ > **๋ฒ„์ „ ์•ˆ๋‚ด:** ์ด ๋ฌธ์„œ๋Š” **2.x** ๊ธฐ์ค€์ž…๋‹ˆ๋‹ค. ์‹ค์ œ ๊ฒŒ์‹œ ๋ฒ„์ „์€ ์œ„ npm ๋ฐฐ์ง€์—์„œ ํ™•์ธํ•˜์„ธ์š”. 1.x๋ฅผ ์‚ฌ์šฉ ์ค‘์ด๋ผ๋ฉด [1.3.0 ๋ฌธ์„œ](https://github.com/uiwwsw/react-query-helper/blob/v1.3.0/README.md)์™€ [๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ๊ฐ€์ด๋“œ](https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md#1x์—์„œ-์ด์ „)๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”. ์•„์ง ๊ฒŒ์‹œ๋˜์ง€ ์•Š์€ ๋ณ€๊ฒฝ์€ [์†Œ์Šค์—์„œ ์„ค์น˜](https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md#npm-๊ฒŒ์‹œ-์ „-์†Œ์Šค์—์„œ-์„ค์น˜ํ•˜๊ธฐ)ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
29
29
 
30
- ---
30
+ ## ๋ฌด์—‡์„ ์ค„์—ฌ์ฃผ๋‚˜์š”?
31
31
 
32
- ## ๋ชฉ์ฐจ
32
+ ๊ฐ™์€ API๋ฅผ ์ปดํฌ๋„ŒํŠธ, prefetch, ์บ์‹œ ์กฐํšŒ์—์„œ ์‚ฌ์šฉํ•  ๋•Œ ๋ฐ˜๋ณต๋˜๋Š” ํ‚ค์™€ ์˜ต์…˜ ๊ตฌ์„ฑ์„ ์ค„์ž…๋‹ˆ๋‹ค.
33
+ **ํ›…์ด๋‚˜ HTTP ํด๋ผ์ด์–ธํŠธ๋ฅผ ์ƒˆ๋กœ ๋งŒ๋“ค์ง€ ์•Š์Šต๋‹ˆ๋‹ค.** ๊ธฐ์กด API ํ•จ์ˆ˜์™€ TanStack Query๋ฅผ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
33
34
 
34
- - [์ฃผ์š” ํŠน์ง•](#์ฃผ์š”-ํŠน์ง•)
35
- - [๋น ๋ฅธ ์‹œ์ž‘](#๋น ๋ฅธ-์‹œ์ž‘)
36
- - [์„ค์น˜](#์„ค์น˜)
37
- - [์ดˆ๊ธฐ ์„ค์ • ํŒŒ์ผ ์ƒ์„ฑ](#์ดˆ๊ธฐ-์„ค์ •-ํŒŒ์ผ-์ƒ์„ฑ)
38
- - [์ฝ”๋“œ ์ƒ์„ฑ ์‹คํ–‰](#์ฝ”๋“œ-์ƒ์„ฑ-์‹คํ–‰)
39
- - [CLI ๋ช…๋ น์–ด](#cli-๋ช…๋ น์–ด)
40
- - [์„ค์ • ์˜ต์…˜](#์„ค์ •-์˜ต์…˜)
41
- - [์ƒ์„ฑ ๊ฒฐ๊ณผ ์˜ˆ์‹œ](#์ƒ์„ฑ-๊ฒฐ๊ณผ-์˜ˆ์‹œ)
42
- - [ํ—ฌํผ ๊ฒฝ๋กœ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•](#ํ—ฌํผ-๊ฒฝ๋กœ-์ปค์Šคํ„ฐ๋งˆ์ด์ง•)
43
- - [๋ฒ ์ŠคํŠธ ํ”„๋ž™ํ‹ฐ์Šค](#๋ฒ ์ŠคํŠธ-ํ”„๋ž™ํ‹ฐ์Šค)
44
- - [์Šคํƒ€ ํžˆ์Šคํ† ๋ฆฌ](#์Šคํƒ€-ํžˆ์Šคํ† ๋ฆฌ)
45
- - [๊ธฐ์—ฌ](#๊ธฐ์—ฌ)
46
- - [๋ผ์ด์„ ์Šค](#๋ผ์ด์„ ์Šค)
35
+ | ์ง์ ‘ ๊ด€๋ฆฌํ•˜๋˜ ๊ฒƒ | ์ƒ์„ฑ ํ›„ |
36
+ | -------------------------- | --------------------------------------------------------- |
37
+ | ๊ณณ๊ณณ์— ํฉ์–ด์ง„ ์ฟผ๋ฆฌ ํ‚ค | ํŒŒ์ผ ๊ฒฝ๋กœยทํ•จ์ˆ˜๋ช…ยท์ธ์ž๋ฅผ ๋ฐ˜์˜ํ•œ ํ‚ค |
38
+ | ๊ฐ™์€ ์š”์ฒญ์„ ์œ„ํ•œ ๋ฐ˜๋ณต ์˜ต์…˜ | `useQuery`, `useSuspenseQuery`, fetch/prefetch์—์„œ ์žฌ์‚ฌ์šฉ |
39
+ | API์™€ ๋ณ„๋„๋กœ ์œ ์ง€ํ•˜๋Š” ํƒ€์ž… | ์ธ์žยท์‘๋‹ตยท`select`ยท์บ์‹œ ๋ฐ์ดํ„ฐ ํƒ€์ž… ์ถ”๋ก  |
40
+ | API ๋ณ€๊ฒฝ ํ›„ ์ƒ์„ฑ ํŒŒ์ผ ์ •๋ฆฌ | watch ์žฌ์ƒ์„ฑ, ์˜ค๋ž˜๋œ ์†Œ์œ  ํŒŒ์ผ ์ •๋ฆฌ, CI์˜ `--check` |
47
41
 
48
- ## ์ฃผ์š” ํŠน์ง•
42
+ ๊ธฐ๋ณธ ์บ์‹ฑ ์ •์ฑ…๊ณผ ์žฌ์‹œ๋„๋Š” TanStack Query/`QueryClient`๋ฅผ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.
43
+ ์ด๋ฆ„ ๊ธฐ๋ฐ˜ ์ƒ์„ฑ ๊ทœ์น™์€ [์„ค์ •์œผ๋กœ ์žฌ์ •์˜](https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md#์ƒ์„ฑ-๊ทœ์น™)ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
49
44
 
50
- - **์„ค์ • ๊ธฐ๋ฐ˜ ์ž๋™ํ™”**: `rqh.config.ts`๋งŒ ๊ตฌ์„ฑํ•˜๋ฉด API ๋””๋ ‰ํ† ๋ฆฌ ๊ฐ์ง€๋ถ€ํ„ฐ ์ถœ๋ ฅ ๋””๋ ‰ํ† ๋ฆฌ ์ง€์ •๊นŒ์ง€ ๋ชจ๋‘ ์ž๋™ํ™”๋ฉ๋‹ˆ๋‹ค.
51
- - **์ดˆ๊ธฐํ™” ์ง€์›**: `react-query-helper --init`์œผ๋กœ ๊ธฐ๋ณธ ์„ค์ • ํŒŒ์ผ์„ ๋ฐ”๋กœ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
52
- - **๋Ÿฐํƒ€์ž„/๊ฐœ๋ฐœ ๋ถ„๋ฆฌ**: generate/watch/config ๋กœ๋”ฉ์€ ๊ฐœ๋ฐœ ์‹œ์  ์ „์šฉ์ด๊ณ , ์ƒ์„ฑ๋œ ๊ฒฐ๊ณผ๊ฐ€ ์ฐธ์กฐํ•˜๋Š” ๋Ÿฐํƒ€์ž„ helper ์—”ํŠธ๋ฆฌ์—๋Š” `fs` ๊ฐ™์€ Node ์ „์šฉ ์ฝ”๋“œ๊ฐ€ ํฌํ•จ๋˜์ง€ ์•Š๋„๋ก ๋ถ„๋ฆฌ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
53
- - **Watch & Generate ๋ชจ๋“œ**: ๊ฐœ๋ฐœ ์ค‘ ์‹ค์‹œ๊ฐ„ ๊ฐ์‹œ(`--watch`), ์ดˆ๊ธฐ ์„ธํŒ…์ด๋‚˜ ์žฌ์ƒ์„ฑ ์‹œ ์ผ๊ด„ ์ƒ์„ฑ(`--generate`)์„ ๋ชจ๋‘ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.
54
- - **์ผ๊ด€๋œ ์˜ต์…˜ ๊ด€๋ฆฌ**: `queryOption`, `mutationOption`, `infiniteOption` ์œ ํ‹ธ๋ฆฌํ‹ฐ๋กœ ์ „์—ญ ์บ์‹ฑ ์ „๋žต๊ณผ ์—๋Ÿฌ ํ•ธ๋“ค๋ง์„ ํ†ต์ผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
55
- - **Prettier ํ†ตํ•ฉ**: ์ƒ์„ฑ๋œ ํŒŒ์ผ์€ ์ž๋™์œผ๋กœ ํฌ๋งทํŒ…๋˜์–ด ์ฝ”๋“œ ๋ฆฌ๋ทฐ ์‹œ ๋ถˆํ•„์š”ํ•œ ๋ณ€๊ฒฝ์„ ์ค„์ž…๋‹ˆ๋‹ค.
56
- - **ํ—ฌํผ import ๊ฒฝ๋กœ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•**: `templateDir`๋กœ ์ƒ์„ฑ ์ฝ”๋“œ๊ฐ€ ์ฐธ์กฐํ•  ํ—ฌํผ ๋ชจ๋“ˆ ๊ฒฝ๋กœ๋ฅผ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
57
- - **๋ณด์ˆ˜์ ์ธ infinite ๊ธฐ๋ณธ๊ฐ’**: `infiniteOption`์€ ์•ˆ์ „ํ•œ ๊ธฐ๋ณธ ์˜ต์…˜๋งŒ ์ œ๊ณตํ•˜๊ณ , ์‹ค์ œ `pageParam` ์ฒ˜๋ฆฌ ๊ทœ์น™์€ ํ˜ธ์ถœ๋ถ€์—์„œ override ํ•˜๋„๋ก ์„ค๊ณ„๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
45
+ <a id="quick-start"></a>
58
46
 
59
47
  ## ๋น ๋ฅธ ์‹œ์ž‘
60
48
 
61
- ### ์„ค์น˜
49
+ ### 1. ์„ค์น˜ํ•˜๊ณ  ์ดˆ๊ธฐํ™”
62
50
 
63
- ```bash
64
- bun add @uiwwsw/react-query-helper
65
- # ๋˜๋Š”
66
- npm install --save-dev @uiwwsw/react-query-helper
51
+ ```sh
52
+ npm install @uiwwsw/react-query-helper@^2 @tanstack/react-query react
53
+ npx @uiwwsw/react-query-helper init
67
54
  ```
68
55
 
69
- ### ์ดˆ๊ธฐ ์„ค์ • ํŒŒ์ผ ์ƒ์„ฑ
56
+ ์ƒ์„ฑ ์ฝ”๋“œ๊ฐ€ ์ด ํŒจํ‚ค์ง€๋ฅผ importํ•˜๋ฏ€๋กœ `-D`๊ฐ€ ์•„๋‹Œ ์ผ๋ฐ˜ dependency๋กœ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.
57
+ React์™€ TanStack Query๊ฐ€ ์ด๋ฏธ ์„ค์น˜๋˜์–ด ์žˆ๋‹ค๋ฉด ํ•„์š”ํ•œ ์˜์กด์„ฑ๋งŒ ์ถ”๊ฐ€ํ•˜์„ธ์š”.
70
58
 
71
- ์„ค์น˜ ํ›„ ์•„๋ž˜ ๋ช…๋ น์œผ๋กœ ๋ฃจํŠธ์— `rqh.config.ts`๋ฅผ ์ž๋™ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
59
+ ### 2. API ๊ฒฝ๋กœ ์ง€์ •
72
60
 
73
- ```bash
74
- npx @uiwwsw/react-query-helper --init
75
- # ๋˜๋Š”
76
- bunx @uiwwsw/react-query-helper --init
77
- ```
78
-
79
- ์ด๋ฏธ ํ”„๋กœ์ ํŠธ์— ์„ค์น˜ํ•œ ๋’ค๋ผ๋ฉด ์•„๋ž˜์ฒ˜๋Ÿผ ์‹คํ–‰ํ•ด๋„ ๋ฉ๋‹ˆ๋‹ค.
80
-
81
- ```bash
82
- npx react-query-helper --init
83
- # ๋˜๋Š”
84
- npm exec react-query-helper -- --init
85
- ```
86
-
87
- ์ƒ์„ฑ๋˜๋Š” ํŒŒ์ผ ์˜ˆ์‹œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.
61
+ `init`์ด ๋งŒ๋“  `rqh.config.ts`์˜ ๊ฒฝ๋กœ๋ฅผ ์•ฑ ๊ตฌ์กฐ์— ๋งž์ถฅ๋‹ˆ๋‹ค.
62
+ ๋ณ„๋„ ํ”Œ๋Ÿฌ๊ทธ์ธ์ด๋‚˜ alias ์„ค์ • ์—†์ด ์‹œ์ž‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
88
63
 
89
64
  ```ts
90
65
  // rqh.config.ts
91
66
  import type { AutoQueryConfig } from "@uiwwsw/react-query-helper/config";
92
67
 
93
- const config: AutoQueryConfig = {
94
- sourceDir: "./libs", // API ํ•จ์ˆ˜๋“ค์ด ์œ„์น˜ํ•œ ๊ฒฝ๋กœ
95
- outputDir: "./src/options", // ์ƒ์„ฑ๋œ ์ฝ”๋“œ๊ฐ€ ์ €์žฅ๋  ๊ฒฝ๋กœ
96
- ignoredFiles: ["domain.ts", "adaptor.ts"],
97
- templateDir: "@uiwwsw/react-query-helper",
98
- sourceImportAlias: "@/libs",
99
- analyzer: {
100
- exportFilter: "exported-only",
101
- functionMatchMode: "all",
102
- includeNames: [],
103
- excludeNames: [],
104
- },
105
- template: {
106
- enabledArtifacts: ["query", "mutation", "infinite"],
107
- keyStyle: "path",
108
- },
109
- };
110
-
111
- export default config;
112
- ```
113
-
114
- ### ์ฝ”๋“œ ์ƒ์„ฑ ์‹คํ–‰
115
-
116
- `package.json`์— ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ถ”๊ฐ€ํ•œ ๋’ค CLI๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.
117
-
118
- ```jsonc
119
- // package.json
120
- {
121
- "scripts": {
122
- "init:rqh": "react-query-helper --init",
123
- "watch": "react-query-helper --watch",
124
- "generate": "react-query-helper --generate"
125
- }
126
- }
127
- ```
128
-
129
- ```bash
130
- bun run watch # ์‹ค์‹œ๊ฐ„ ๋ณ€๊ฒฝ ๊ฐ์ง€
131
- bun run generate # ์ „์ฒด ํŒŒ์ผ ์ผ๊ด„ ์ƒ์„ฑ
132
- # ๋˜๋Š”
133
- npm exec react-query-helper -- --generate
134
- ```
135
-
136
- ## CLI ๋ช…๋ น์–ด
137
-
138
- | ๋ช…๋ น์–ด | ์„ค๋ช… |
139
- | --- | --- |
140
- | `react-query-helper --init` | ๋ฃจํŠธ์— ๊ธฐ๋ณธ `rqh.config.ts` ํŒŒ์ผ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฏธ ์žˆ์œผ๋ฉด ๋ฎ์–ด์“ฐ์ง€ ์•Š์Šต๋‹ˆ๋‹ค. |
141
- | `react-query-helper --watch` | `sourceDir`๋ฅผ ๊ฐ์‹œํ•˜์—ฌ ๋ณ€๊ฒฝ๋  ๋•Œ๋งˆ๋‹ค ์ฝ”๋“œ๋ฅผ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค. |
142
- | `react-query-helper --generate` | `sourceDir` ๋‚ด ๋ชจ๋“  API ํŒŒ์ผ์„ ๋ถ„์„ํ•˜๊ณ  ํ•œ ๋ฒˆ์— ์ฝ”๋“œ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. |
143
- | `react-query-helper --help` | ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ชจ๋“  ์˜ต์…˜์„ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. |
144
-
145
- ## ์„ค์ • ์˜ต์…˜
146
-
147
- | ์˜ต์…˜ | ํ•„์ˆ˜ | ์„ค๋ช… |
148
- | --- | --- | --- |
149
- | `sourceDir` | โœ… | API ํ•จ์ˆ˜๊ฐ€ ํฌํ•จ๋œ TypeScript ๋””๋ ‰ํ† ๋ฆฌ (๋ฃจํŠธ ๊ธฐ์ค€ ๊ฒฝ๋กœ) |
150
- | `outputDir` | โœ… | ์ƒ์„ฑ๋œ ํ›…๊ณผ ์˜ต์…˜ ํŒŒ์ผ์ด ์ €์žฅ๋  ๋””๋ ‰ํ† ๋ฆฌ |
151
- | `ignoredFiles` | โŒ | ์ฝ”๋“œ ์ƒ์„ฑ์—์„œ ์ œ์™ธํ•  ํŒŒ์ผ/๊ฒฝ๋กœ ํŒจํ„ด ๋ฐฐ์—ด (`domain.ts`, `**/*.spec.ts`, `admin/internal/**`) |
152
- | `templateDir` | โŒ | ์ƒ์„ฑ๋œ ์ฝ”๋“œ์—์„œ `queryOption` ๊ณ„์—ด์„ import ํ•  ๋ชจ๋“ˆ ๊ฒฝ๋กœ ๋˜๋Š” ์ƒ๋Œ€ ๋””๋ ‰ํ† ๋ฆฌ |
153
- | `sourceImportAlias` | โŒ | API ํ•จ์ˆ˜ import๋ฅผ ์ƒ๋Œ€๊ฒฝ๋กœ ๋Œ€์‹  alias๋กœ ์ƒ์„ฑํ•  ๋•Œ ์‚ฌ์šฉํ•  prefix (`@/apis` ๋“ฑ) |
154
- | `analyzer` | โŒ | ์–ด๋–ค ํ•จ์ˆ˜๋ฅผ ์ฝ์„์ง€ ํ•„ํ„ฐ๋งํ•˜๋Š” ์„ค์ • (`exported-only`, `async-only`, include/exclude ๋“ฑ) |
155
- | `template` | โŒ | ์–ด๋–ค ์•„ํ‹ฐํŒฉํŠธ๋ฅผ ์ƒ์„ฑํ• ์ง€์™€ ์ด๋ฆ„ ๊ทœ์น™์„ ์ œ์–ดํ•˜๋Š” ์„ค์ • |
156
-
157
- ## Infinite Query ๊ธฐ๋ณธ๊ฐ’
158
-
159
- `infiniteOption`์€ API๋งˆ๋‹ค ํŽ˜์ด์ง€๋„ค์ด์…˜ ๊ทœ์น™์ด ๋‹ค๋ฅด๊ธฐ ๋•Œ๋ฌธ์—, ๊ธฐ๋ณธ ๊ตฌํ˜„์—์„œ๋Š” `pageParam`์„ ์ž๋™ ๋ณ‘ํ•ฉํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
160
-
161
- ํ•„์š”ํ•œ ๊ฒฝ์šฐ ์ƒ์„ฑ๋œ ์˜ต์…˜์„ ํŽผ์นœ ๋’ค `queryFn`, `getNextPageParam`, `initialPageParam`์„ ์ง์ ‘ override ํ•ด์„œ ์‚ฌ์šฉํ•˜์„ธ์š”.
162
-
163
- ```ts
164
- const usersInfinite = {
165
- ...getUsersInfiniteQueryOption({ page: 1 }),
166
- initialPageParam: 1,
167
- queryFn: ({ pageParam }) => getUsers({ page: pageParam }),
168
- getNextPageParam: (lastPage) => lastPage.nextPage,
169
- };
170
- ```
171
-
172
- ## ๋ฐฐํฌ ๋ฐฉ์‹
173
-
174
- GitHub Actions์˜ npm ๋ฐฐํฌ๋Š” ์ด์ œ `main` ํ‘ธ์‹œ๊ฐ€ ์•„๋‹ˆ๋ผ `v*` ํƒœ๊ทธ ํ‘ธ์‹œ ๋˜๋Š” ์ˆ˜๋™ ์‹คํ–‰์—์„œ๋งŒ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค.
175
-
176
- ์˜ˆ์‹œ:
177
-
178
- ```bash
179
- git tag v1.0.3
180
- git push origin v1.0.3
68
+ export default {
69
+ sourceDir: "./libs",
70
+ outputDir: "./src/options",
71
+ ignoredFiles: ["domain.ts", "adaptor.ts", "**/*.test.ts", "**/*.spec.ts"],
72
+ template: { artifactStrategy: "smart" },
73
+ } satisfies AutoQueryConfig;
181
74
  ```
182
75
 
183
- ## ์ƒ์„ฑ ๊ฒฐ๊ณผ ์˜ˆ์‹œ
76
+ ์‹ค์ œ API ํ•จ์ˆ˜๋ฅผ ํ•ด๋‹น ๋””๋ ‰ํ† ๋ฆฌ์— ๋‘์„ธ์š”. ์•„๋ž˜๋Š” ํ๋ฆ„์„ ํ™•์ธํ•˜๊ธฐ ์œ„ํ•œ ๊ฐ„๋‹จํ•œ ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค.
184
77
 
185
78
  ```ts
186
79
  // libs/users/api.ts
187
- export const getUser = async (id: string) => {
188
- return { id, name: `User ${id}` };
189
- };
190
-
191
- export const createUser = async (name: string) => {
192
- return { id: Date.now().toString(), name };
193
- };
80
+ export const getUser = async (id: string) => ({ id, name: "Ada" });
194
81
  ```
195
82
 
196
- ```ts
197
- // src/options/users/apiOptions.ts (์ž๋™ ์ƒ์„ฑ)
198
- import { createUser, getUser } from "../../../libs/users/api";
199
- import {
200
- infiniteOption,
201
- mutationOption,
202
- queryOption,
203
- } from "@uiwwsw/react-query-helper";
204
-
205
- export const getUserKey = ["users", "getUser"] as const;
206
- export const getUserQueryOption = queryOption(getUserKey, getUser);
207
- export const getUserMutationOption = mutationOption(getUserKey, getUser);
208
- export const getUserInfiniteQueryOption = infiniteOption(getUserKey, getUser);
209
-
210
- export const createUserKey = ["users", "createUser"] as const;
211
- export const createUserQueryOption = queryOption(createUserKey, createUser);
212
- export const createUserMutationOption = mutationOption(createUserKey, createUser);
213
- export const createUserInfiniteQueryOption = infiniteOption(
214
- createUserKey,
215
- createUser
216
- );
217
- ```
218
-
219
- ## ํ—ฌํผ ๊ฒฝ๋กœ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•
220
-
221
- ์กฐ์ง ๊ณต์šฉ ํ—ฌํผ๋ฅผ ๋”ฐ๋กœ ๋‘๊ณ  ์žˆ๋‹ค๋ฉด `templateDir`๋กœ ์ƒ์„ฑ ์ฝ”๋“œ์˜ import ๊ฒฝ๋กœ๋ฅผ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
222
-
223
- ๋˜ํ•œ `template` / `analyzer` ์„ค์ •์œผ๋กœ ํ˜„์žฌ ํŒ€ ๊ตฌ์กฐ์— ๋งž๊ฒŒ ์ƒ์„ฑ ๊ทœ์น™์„ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
83
+ ### 3. ์ƒ์„ฑํ•˜๊ณ  ์‚ฌ์šฉ
224
84
 
225
- ```ts
226
- const config: AutoQueryConfig = {
227
- sourceDir: "./libs",
228
- outputDir: "./src/options",
229
- analyzer: {
230
- functionMatchMode: "async-only",
231
- excludeNames: ["debugHelper"],
232
- },
233
- template: {
234
- enabledArtifacts: ["query"],
235
- keyStyle: "function-only",
236
- outputNames: {
237
- query: "CustomQueryOption",
238
- },
239
- },
240
- };
85
+ ```sh
86
+ npx @uiwwsw/react-query-helper generate
241
87
  ```
242
88
 
243
- ๋” ๊ฐ•ํ•˜๊ฒŒ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•ํ•˜๋ ค๋ฉด ์™ธ๋ถ€ ๋ชจ๋“ˆ๋„ ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
89
+ `src/options/users/apiOptions.ts`์— `getUserKey`, `getUserQueryOption`,
90
+ `getUserInfiniteQueryOption`์ด ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค. **์ƒ์„ฑ ํŒŒ์ผ ๋Œ€์‹  ์›๋ณธ API๋ฅผ ์ˆ˜์ •ํ•˜์„ธ์š”.**
91
+ ๋ฌดํ•œ ์ฟผ๋ฆฌ ํŒฉํ† ๋ฆฌ๋„ ์ƒ์„ฑ๋˜์ง€๋งŒ ์‹ค์ œ ํŽ˜์ด์ง€๋„ค์ด์…˜ ์„ค์ •์€ API์— ๋งž๊ฒŒ ๋ณ„๋„๋กœ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
244
92
 
245
- ```ts
246
- const config: AutoQueryConfig = {
247
- sourceDir: "./libs",
248
- outputDir: "./src/options",
249
- customAnalyzerPath: "./rqh.analyzer.mjs",
250
- customTemplatePath: "./rqh.template.mjs",
251
- };
252
- ```
93
+ ```tsx
94
+ // src/UserName.tsx
95
+ import { useQuery } from "@tanstack/react-query";
96
+ import { getUserQueryOption } from "./options/users/apiOptions";
253
97
 
254
- - `customAnalyzerPath`: ํŒŒ์ผ์„ ์ฝ๊ณ  ์›ํ•˜๋Š” ํ•จ์ˆ˜ ๋ฉ”ํƒ€ ๋ชฉ๋ก์„ ์ง์ ‘ ๋ฐ˜ํ™˜
255
- - `customTemplatePath`: ์ตœ์ข… ์ƒ์„ฑ ์ฝ”๋“œ ๋ฌธ์ž์—ด์„ ์ง์ ‘ ๋ฐ˜ํ™˜
256
-
257
- ์˜ˆ์‹œ `rqh.analyzer.mjs`:
258
-
259
- ```js
260
- export function analyzeFile(filePath, config) {
261
- // ์—ฌ๊ธฐ์„œ AST๋ฅผ ์ง์ ‘ ํŒŒ์‹ฑํ•˜๊ฑฐ๋‚˜,
262
- // ํŒŒ์ผ๋ช… ๊ทœ์น™ / ํ•จ์ˆ˜๋ช… ๊ทœ์น™์„ ์ž์œ ๋กญ๊ฒŒ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
263
- return [
264
- {
265
- name: "getUser",
266
- parameters: ["params"],
267
- isAsync: true,
268
- isExported: true,
269
- },
270
- ];
271
- }
272
- ```
98
+ export function UserName({ id }: { id: string }) {
99
+ const user = useQuery(
100
+ getUserQueryOption.withOptions(
101
+ { staleTime: 60_000, select: (data) => data.name },
102
+ id,
103
+ ),
104
+ );
273
105
 
274
- ์˜ˆ์‹œ `rqh.template.mjs`:
275
-
276
- ```js
277
- export function generateOptionsCode({ functionInfos, importPath }) {
278
- const names = functionInfos.map((info) => info.name).join(", ");
279
- return `import { ${names} } from "${importPath}";\nexport const customGenerated = true;\n`;
106
+ if (user.isPending) return <p>Loading...</p>;
107
+ if (user.isError) return <p>{user.error.message}</p>;
108
+ return <p>{user.data}</p>;
280
109
  }
281
110
  ```
282
111
 
283
- ์–ธ์ œ custom analyzer๋ฅผ ์“ฐ๋ฉด ๋˜๋ƒ๋ฉด:
284
- - built-in analyzer ์„ค์ •๋งŒ์œผ๋กœ ์ถฉ๋ถ„ํ•œ ๊ฒฝ์šฐ
285
- - `exported-only`, `async-only`, ์ด๋ฆ„ include/exclude, ์•„ํ‹ฐํŒฉํŠธ on/off ์ •๋„
286
- - custom analyzer๊ฐ€ ํ•„์š”ํ•œ ๊ฒฝ์šฐ
287
- - ํ•จ์ˆ˜ ์„ ์–ธ์ด ๋ž˜ํ•‘๋˜์–ด ์žˆ๊ฑฐ๋‚˜
288
- - factory/higher-order ๊ตฌ์กฐ๋ฅผ ์“ฐ๊ฑฐ๋‚˜
289
- - ํŒ€ ์ „์šฉ ๊ทœ์น™์œผ๋กœ ํ•จ์ˆ˜ ํ›„๋ณด๋ฅผ ๋ฝ‘์•„์•ผ ํ•˜๊ฑฐ๋‚˜
290
- - ๊ธฐ๋ณธ AST ๊ทœ์น™๋ณด๋‹ค ๋” ๋ณต์žกํ•œ generic ํŒจํ„ด์„ ๊ฐ•์ œํ•˜๊ณ  ์‹ถ์„ ๋•Œ
291
-
292
- ์ฆ‰ ์ด์ œ๋Š” ๊ธฐ๋ณธ ๊ทœ์น™์„ ์กฐ๊ธˆ ๋ฐ”๊พธ๋Š” ์ˆ˜์ค€์ด ์•„๋‹ˆ๋ผ, ํŒ€ ์ „์šฉ ์ƒ์„ฑ๊ธฐ์ฒ˜๋Ÿผ ํ™•์žฅํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
112
+ ์•ฑ ์ƒ์œ„์— `QueryClientProvider`๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ์œ„์˜ `user.data`๋Š” `select`์— ๋”ฐ๋ผ
113
+ `string`์œผ๋กœ ์ถ”๋ก ๋ฉ๋‹ˆ๋‹ค. ์˜ต์…˜์€ ํ›… ๋ฐ”๊นฅ์—์„œ๋„ ์žฌ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
293
114
 
294
115
  ```ts
295
- const config: AutoQueryConfig = {
296
- sourceDir: "./libs",
297
- outputDir: "./src/options",
298
- templateDir: "./src/query-helpers",
299
- };
116
+ // ๊ธฐ์กด QueryClient ์ธ์Šคํ„ด์Šค client์—์„œ
117
+ await client.prefetchQuery(getUserQueryOption("u1"));
118
+ const cached = client.getQueryData(getUserQueryOption("u1").queryKey);
119
+ // { id: string; name: string } | undefined
300
120
  ```
301
121
 
302
- ์˜ˆ๋ฅผ ๋“ค์–ด ์ƒ์„ฑ ํŒŒ์ผ์€ ๊ธฐ๋ณธ ํŒจํ‚ค์ง€ ๋Œ€์‹  ์•„๋ž˜์ฒ˜๋Ÿผ ์ง€์ •ํ•œ ๊ฒฝ๋กœ๋ฅผ import ํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.
122
+ ### 4. ๊ฐœ๋ฐœ ํ๋ฆ„์— ์—ฐ๊ฒฐ
303
123
 
304
- ```ts
305
- import {
306
- queryOption,
307
- mutationOption,
308
- infiniteOption,
309
- } from "./src/query-helpers";
124
+ ```json
125
+ {
126
+ "scripts": {
127
+ "query:generate": "react-query-helper generate",
128
+ "query:watch": "react-query-helper watch",
129
+ "query:check": "react-query-helper generate --check"
130
+ }
131
+ }
310
132
  ```
311
133
 
312
- ## ๋ฒ ์ŠคํŠธ ํ”„๋ž™ํ‹ฐ์Šค
134
+ ๊ฐœ๋ฐœํ•  ๋•Œ๋Š” `npm run query:watch`, ์•ฑ CI์—์„œ๋Š” `npm run query:check`๋ฅผ ์‹คํ–‰ํ•˜์„ธ์š”.
135
+ check๋Š” ํŒŒ์ผ์„ ์ˆ˜์ •ํ•˜์ง€ ์•Š๊ณ  ๋ˆ„๋ฝยท๋ณ€๊ฒฝยท์˜ค๋ž˜๋œ ๊ฒฐ๊ณผ๋ฅผ ๋ฐœ๊ฒฌํ•˜๋ฉด ์ข…๋ฃŒ ์ฝ”๋“œ 1์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
136
+ ์ƒ์„ฑ๋ฌผ์„ ์ปค๋ฐ‹ํ•˜์ง€ ์•Š๋Š” ํ”„๋กœ์ ํŠธ๋ผ๋ฉด CI์—์„œ `query:generate` ํ›„ ์•ฑ ํƒ€์ž… ๊ฒ€์‚ฌ๋ฅผ ์‹คํ–‰ํ•˜์„ธ์š”.
313
137
 
314
- - **ํ•˜๋‚˜์˜ API = ํ•˜๋‚˜์˜ ํ›…** ๊ตฌ์กฐ๋ฅผ ์œ ์ง€ํ•˜๋ฉด ์บ์‹œ ํ‚ค ๊ด€๋ฆฌ๊ฐ€ ์‰ฌ์›Œ์ง‘๋‹ˆ๋‹ค.
315
- - ์ƒ์„ฑ๋œ ํŒŒ์ผ์€ ๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ(Git)์— ์ปค๋ฐ‹ํ•˜์—ฌ ๋ฐฐํฌ ์‹œ ์ž๋™ ์ƒ์„ฑ ๊ณผ์ •์„ ํ”ผํ•˜์„ธ์š”.
316
- - `queryOption` ์œ ํ‹ธ ํ•จ์ˆ˜์—์„œ ๊ธ€๋กœ๋ฒŒ ์˜ต์…˜(`staleTime`, `retry`, `refetchOnWindowFocus`)์„ ์ •์˜ํ•˜๋ฉด ํŒ€ ์ „์ฒด ๊ทœ์น™์„ ์†์‰ฝ๊ฒŒ ํ†ต์ผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
317
- - Watch ๋ชจ๋“œ ์‚ฌ์šฉ ์‹œ IDE ์ €์žฅ ํฌ๋งทํ„ฐ์™€ ์ถฉ๋Œ์ด ์—†๋„๋ก ์ €์žฅ ์‹œ์  ํฌ๋งทํŒ…์„ ๋งž์ถฐ ์ฃผ์„ธ์š”.
138
+ ## ํ•„์š”ํ•œ ์˜ˆ์ œ ์ฐพ๊ธฐ
318
139
 
319
- ## ์Šคํƒ€ ํžˆ์Šคํ† ๋ฆฌ
140
+ | ํ•˜๊ณ  ์‹ถ์€ ์ผ | ๊ฐ€์ด๋“œ |
141
+ | ----------------------------------- | --------------------------------------------------------------------------------------------------------------- |
142
+ | ์„ค์ • ํŒŒ์ผ, ๊ฒฝ๋กœ, ignore glob ๋ณ€๊ฒฝ | [์„ค์ •](https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md#์„ค์ •) |
143
+ | ํ•จ์ˆ˜๋ณ„ query/mutation ์ƒ์„ฑ ์ œ์–ด | [์ƒ์„ฑ ๊ทœ์น™๊ณผ ์บ์‹œ ํ‚ค](https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md#์ƒ์„ฑ-๊ทœ์น™) |
144
+ | mutation ์ธ์ž, ์ทจ์†Œ, ์˜ต์…˜ ํ™•์žฅ | [๋Ÿฐํƒ€์ž„ ์˜ต์…˜](https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md#๋Ÿฐํƒ€์ž„-์˜ต์…˜) |
145
+ | ์ปค์„œ ํŽ˜์ด์ง€๋„ค์ด์…˜๊ณผ `maxPages` | [๋ฌดํ•œ ์ฟผ๋ฆฌ](https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md#๋ฌดํ•œ-์ฟผ๋ฆฌ) |
146
+ | ๊ธฐ์กด 1.x ํ”„๋กœ์ ํŠธ ์—…๊ทธ๋ ˆ์ด๋“œ | [๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ์ฒดํฌ๋ฆฌ์ŠคํŠธ](https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md#1x์—์„œ-์ด์ „) |
147
+ | ์ง€์›ํ•˜์ง€ ์•Š๋Š” ๋ฌธ๋ฒ•, ์ปค์Šคํ…€ ํ”Œ๋Ÿฌ๊ทธ์ธ | [์ง€์› ๋ฒ”์œ„์™€ ํ™•์žฅ](https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md#๋ฒ”์œ„์™€-ํ™•์žฅ) |
148
+ | ํ…Œ์ŠคํŠธ, ๋กœ์ปฌ ์„ค์น˜, npm ๋ฐฐํฌ ์„ค์ • | [๊ฐœ๋ฐœ๊ณผ ๋ฐฐํฌ](https://github.com/uiwwsw/react-query-helper/blob/main/docs/REFERENCE.md#๊ฐœ๋ฐœ๊ณผ-๋ฐฐํฌ) |
149
+ | ์ด๋ฒˆ ๊ฐœ์„ ์˜ ๊ทผ๊ฑฐ์™€ ๋‚จ์€ ํ•œ๊ณ„ | [์ €์žฅ์†Œ ๊ฒ€ํ†  ๊ธฐ๋ก](https://github.com/uiwwsw/react-query-helper/blob/main/docs/REVIEW.md) |
320
150
 
321
- [![Star History Chart](https://api.star-history.com/svg?repos=uiwwsw/react-query-helper&type=Date)](https://star-history.com/#uiwwsw/react-query-helper&Date)
151
+ ## ์ง€์› ํ™˜๊ฒฝ๊ณผ ์ฃผ์˜์ 
322
152
 
323
- ## ๊ธฐ์—ฌ
153
+ | ๊ตฌ๋ถ„ | ์ง€์› ๊ธฐ์ค€ |
154
+ | -------------- | -------------------------------------------------- |
155
+ | Node.js | CLI/๋นŒ๋“œ์— 22 ์ด์ƒ, CI๋Š” 22/24 |
156
+ | React | 18/19 |
157
+ | TanStack Query | `>=5.102.8 <6` |
158
+ | TypeScript | 5.8 ์ด์ƒ, ์ƒ์„ฑ ์ฝ”๋“œ๋Š” TS ๋ฒˆ๋“ค๋Ÿฌ์šฉ |
159
+ | ๋ธŒ๋ผ์šฐ์ € | ๋ฃจํŠธ import๋Š” ๋ธŒ๋ผ์šฐ์ €์šฉ, Node ๋„๊ตฌ๋Š” ๋ณ„๋„ subpath |
324
160
 
325
- ๋ฒ„๊ทธ ์ œ๋ณด, ๊ธฐ๋Šฅ ์ œ์•ˆ, ๋ฌธ์„œ ๊ฐœ์„  ๋“ฑ ๋ชจ๋“  ๊ธฐ์—ฌ๋ฅผ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค. ์ด์Šˆ๋ฅผ ๋“ฑ๋กํ•˜๊ฑฐ๋‚˜ Pull Request๋ฅผ ๋ณด๋‚ด ์ฃผ์„ธ์š”.
161
+ - **2.x๋Š” ํ˜ธํ™˜์„ฑ์„ ๊นจ๋Š” ๋ณ€๊ฒฝ์ž…๋‹ˆ๋‹ค.** ๊ธฐ์กด ์ƒ์„ฑ ํŒŒ์ผ์„ ์˜ฎ๊ธด ๋’ค ์žฌ์ƒ์„ฑํ•˜๊ณ , ์ˆ˜๋™ ํ‚ค์™€ persisted cache๋ฅผ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ํ•˜์„ธ์š”.
162
+ - API ์ธ์ž๋Š” ์บ์‹œ ํ‚ค์— ํฌํ•จ๋ฉ๋‹ˆ๋‹ค. ์ง๋ ฌํ™” ๊ฐ€๋Šฅํ•œ ๊ฐ’๋งŒ ์ „๋‹ฌํ•˜๊ณ  ํ† ํฐยท์ธ์ฆ ํ—ค๋”๋Š” ๋„ฃ์ง€ ๋งˆ์„ธ์š”.
163
+ - ํŽ˜์ด์ง€๋„ค์ด์…˜๊ณผ ์š”์ฒญ ์ทจ์†Œ๋Š” ์ž๋™ ์ถ”์ธกํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์ปค์„œ ๋งคํ•‘๊ณผ `AbortSignal` ์ „๋‹ฌ์€ API์— ๋งž์ถฐ ์„ค์ •ํ•˜์„ธ์š”.
164
+ - ์ตœ์ƒ์œ„ ํ•จ์ˆ˜๊ฐ€ ๊ธฐ๋ณธ ๋Œ€์ƒ์ž…๋‹ˆ๋‹ค. re-export barrel, ๋ฉ”์„œ๋“œ, ๋ชจ๋“  generic/overload ๊ด€๊ณ„๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฒ”์šฉ TypeScript ๋ณ€ํ™˜๊ธฐ๋Š” ์•„๋‹™๋‹ˆ๋‹ค.
326
165
 
327
- ## ๋ผ์ด์„ ์Šค
166
+ [๋ณ€๊ฒฝ ์ด๋ ฅ](https://github.com/uiwwsw/react-query-helper/blob/main/CHANGELOG.md) ยท [๋กœ๊ณ ์™€ ๋ธŒ๋žœ๋“œ ์ž์‚ฐ](https://github.com/uiwwsw/react-query-helper/blob/main/assets/README.md) ยท [MIT License](https://github.com/uiwwsw/react-query-helper/blob/main/LICENSE)
328
167
 
329
- ์ด ํ”„๋กœ์ ํŠธ๋Š” [MIT ๋ผ์ด์„ ์Šค](LICENSE)๋ฅผ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.
168
+ ๋…๋ฆฝ์ ์ธ ์ปค๋ฎค๋‹ˆํ‹ฐ ๋„๊ตฌ์ด๋ฉฐ React ๋˜๋Š” TanStack์˜ ๊ณต์‹ ํ”„๋กœ์ ํŠธ๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค.