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
30 changes: 30 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## ✨ 작업 배경 [#](#background) <span id="background"></span>

<!-- 작업하게 된 이유/배경 설명 -->

<!-- ⚠️ 버그/오류의 경우, 문제를 정의 -->
<!-- 🆕 새로운 스펙의 경우, 스펙 설명 -->

<!-- 관련 이슈 링크 -->

✔️ Related issues #

<!-- Merge시 자동으로 close 하고 싶은 이슈가 있다면 -->
<!-- - Resolve # -->
<!-- - Fix # -->
<!-- - Close # -->

## 💻 작업 내용 [#](#work_detail) <span id="work_detail"></span>

<!-- 작업 내용 설명 -->

<!-- ### 🔑 Key changes - 주요 변화 -->
<!-- 주요 변화를 리스트업 -->

## 🏃 기능 동작 시연 [#](#prove) <span id="prove"></span>

<!-- 이미지, 영상, 시나리오 첨부 -->

## 💬 코멘트 [#](#comments) <span id="comments"></span>

<!-- 리뷰어에게 전달하고 싶은 사항, 리뷰 시 확인해야 하는 사항 등-->
Binary file modified .yarn/install-state.gz
Binary file not shown.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 dhlab-fe

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"types": "dist/index.d.ts",
"files": [
"dist",
"README.md"
"README.md",
"LICENSE"
],
"scripts": {
"build": "rollup -c",
Expand Down Expand Up @@ -37,8 +38,7 @@
"peerDependencies": {
"@tanstack/react-query": "^4.0.0 || ^5.0.0",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
"react-error-boundary": "^4.0.0"
"react-dom": "^17.0.0 || ^18.0.0"
},
"peerDependenciesMeta": {
"axios": {
Expand All @@ -49,6 +49,7 @@
}
},
"dependencies": {
"react-error-boundary": "^4.0.0",
"ts-pattern": "^5.0.0"
},
"devDependencies": {
Expand All @@ -63,12 +64,12 @@
"@testing-library/user-event": "^14.6.1",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@vitest/coverage-v8": "^3.2.4",
"axios": "^1.10.0",
"jsdom": "^26.1.0",
"ky": "^1.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.0",
"rollup": "^4.0.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"tslib": "^2.8.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
it,
vi,
} from "vitest";
import type { PartialErrorConfig } from "../../types/api-error";
import type { TPartialErrorConfig } from "../../types/api-error";
import { ApiErrorBoundary } from "../api-error-boundary";

// Mock HTTPError (실제 HTTPError를 사용하되 Response 객체 생성)
Expand Down Expand Up @@ -196,7 +196,7 @@ describe("ApiErrorBoundary Integration Tests", () => {

describe("커스텀 설정", () => {
it("커스텀 fallback 컴포넌트를 사용해야 함", async () => {
const customConfig: PartialErrorConfig = {
const customConfig: TPartialErrorConfig = {
404: {
type: "custom",
fallback: (
Expand All @@ -218,7 +218,7 @@ describe("ApiErrorBoundary Integration Tests", () => {
});

it("커스텀 fallback 함수를 사용해야 함", async () => {
const customConfig: PartialErrorConfig = {
const customConfig: TPartialErrorConfig = {
404: {
type: "custom",
fallback: (error, resetErrorBoundary) => (
Expand Down Expand Up @@ -307,7 +307,7 @@ describe("ApiErrorBoundary Integration Tests", () => {
describe("onError 콜백", () => {
it("에러 발생 시 onError 콜백이 호출되어야 함", async () => {
const onErrorSpy = vi.fn();
const customConfig: PartialErrorConfig = {
const customConfig: TPartialErrorConfig = {
404: {
type: "default",
message: "오류가 발생했습니다.",
Expand Down
Loading