From 4ec2a195e5dfc9ad85f493e7668db831455933c6 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Sun, 29 Oct 2023 18:57:13 +0900 Subject: [PATCH 1/2] feat(react): update useErrorBoundary from experimental to stable (#255) fix #200 # Overview I updated @suspensive/react's useErrorBoundary to stable from experimental ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md) 2. I added documents and tests. --- .changeset/long-steaks-grin.md | 5 +++++ docs/src/pages/docs/react/ErrorBoundary.en.mdx | 2 +- docs/src/pages/docs/react/ErrorBoundary.ko.mdx | 2 +- packages/react/src/ErrorBoundary.tsx | 3 --- websites/visualization/src/app/CommonLayout.tsx | 2 -- .../app/react/{experimental => }/useErrorBoundary/page.tsx | 0 6 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 .changeset/long-steaks-grin.md rename websites/visualization/src/app/react/{experimental => }/useErrorBoundary/page.tsx (100%) diff --git a/.changeset/long-steaks-grin.md b/.changeset/long-steaks-grin.md new file mode 100644 index 000000000..8a026a0ff --- /dev/null +++ b/.changeset/long-steaks-grin.md @@ -0,0 +1,5 @@ +--- +"@suspensive/react": minor +--- + +feat(react): useErrorBoundary to stable from experimental diff --git a/docs/src/pages/docs/react/ErrorBoundary.en.mdx b/docs/src/pages/docs/react/ErrorBoundary.en.mdx index 80c6e6721..124a35239 100644 --- a/docs/src/pages/docs/react/ErrorBoundary.en.mdx +++ b/docs/src/pages/docs/react/ErrorBoundary.en.mdx @@ -178,7 +178,7 @@ const Example = ( ## useErrorBoundary -useErrorBoundary is experimental feature, this interfaces could be changed +### useErrorBoundary().setError In children of ``, we can use useErrorBoundary().setError to make `` aware of the Error without throw. diff --git a/docs/src/pages/docs/react/ErrorBoundary.ko.mdx b/docs/src/pages/docs/react/ErrorBoundary.ko.mdx index 5ff5b0e78..f111c08fd 100644 --- a/docs/src/pages/docs/react/ErrorBoundary.ko.mdx +++ b/docs/src/pages/docs/react/ErrorBoundary.ko.mdx @@ -178,7 +178,7 @@ const Example = ( ## useErrorBoundary -useErrorBoundary는 실험 기능이므로 이 인터페이스는 변경될 수 있습니다. +### useErrorBoundary().setError ``의 children에서 useErrorBoundary().setError을 사용해 throw 없이도 ``에서 Error를 알도록 할 수 있습니다. diff --git a/packages/react/src/ErrorBoundary.tsx b/packages/react/src/ErrorBoundary.tsx index 724a06705..f3dd0932e 100644 --- a/packages/react/src/ErrorBoundary.tsx +++ b/packages/react/src/ErrorBoundary.tsx @@ -144,9 +144,6 @@ export const withErrorBoundary = = const ErrorBoundaryContext = createContext<({ reset: () => void } & ErrorBoundaryState) | null>(null) -/** - * @experimental This is experimental feature. - */ export const useErrorBoundary = () => { const [state, setState] = useState>({ isError: false, diff --git a/websites/visualization/src/app/CommonLayout.tsx b/websites/visualization/src/app/CommonLayout.tsx index 32d5056cd..0aad2586f 100644 --- a/websites/visualization/src/app/CommonLayout.tsx +++ b/websites/visualization/src/app/CommonLayout.tsx @@ -10,8 +10,6 @@ export const CommonLayout = ({ children }: PropsWithChildren) => { return ( <> - 🔗 Experimental Feature: useErrorBoundary - 🔗 Experimental Feature: Await {children} ) diff --git a/websites/visualization/src/app/react/experimental/useErrorBoundary/page.tsx b/websites/visualization/src/app/react/useErrorBoundary/page.tsx similarity index 100% rename from websites/visualization/src/app/react/experimental/useErrorBoundary/page.tsx rename to websites/visualization/src/app/react/useErrorBoundary/page.tsx From 5749faa5f51e4ea8dd79a0beac0fd5d9e3de0a9f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 29 Oct 2023 19:00:47 +0900 Subject: [PATCH 2/2] chore: version packages (#277) This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @suspensive/react@1.18.0 ### Minor Changes - 4ec2a19: feat(react): useErrorBoundary to stable from experimental ## @suspensive/react-query@1.18.0 ### Patch Changes - Updated dependencies [4ec2a19] - @suspensive/react@1.18.0 Co-authored-by: Jonghyeon Ko Co-authored-by: Chanhyuk Park Co-authored-by: Minsoo Kim --- .changeset/long-steaks-grin.md | 5 ----- packages/react-query/CHANGELOG.md | 7 +++++++ packages/react-query/package.json | 4 ++-- packages/react/CHANGELOG.md | 6 ++++++ packages/react/package.json | 2 +- pnpm-lock.yaml | 4 ++-- websites/visualization/package.json | 4 ++-- 7 files changed, 20 insertions(+), 12 deletions(-) delete mode 100644 .changeset/long-steaks-grin.md diff --git a/.changeset/long-steaks-grin.md b/.changeset/long-steaks-grin.md deleted file mode 100644 index 8a026a0ff..000000000 --- a/.changeset/long-steaks-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@suspensive/react": minor ---- - -feat(react): useErrorBoundary to stable from experimental diff --git a/packages/react-query/CHANGELOG.md b/packages/react-query/CHANGELOG.md index 5555ddbbe..63921e4d8 100644 --- a/packages/react-query/CHANGELOG.md +++ b/packages/react-query/CHANGELOG.md @@ -1,5 +1,12 @@ # @suspensive/react-query +## 1.18.0 + +### Patch Changes + +- Updated dependencies [4ec2a19] + - @suspensive/react@1.18.0 + ## 1.17.7 ### Patch Changes diff --git a/packages/react-query/package.json b/packages/react-query/package.json index acf9c69cb..c3e2bb8b7 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -1,6 +1,6 @@ { "name": "@suspensive/react-query", - "version": "1.17.7", + "version": "1.18.0", "description": "Useful helpers for @tanstack/react-query with suspense", "keywords": [ "suspensive", @@ -71,7 +71,7 @@ "tsd": "^0.28.1" }, "peerDependencies": { - "@suspensive/react": "workspace:^1.17.7", + "@suspensive/react": "workspace:^1.18.0", "@tanstack/react-query": "^4", "react": "^16.8 || ^17 || ^18" }, diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index ab1795a1e..8d6536d13 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @suspensive/react +## 1.18.0 + +### Minor Changes + +- 4ec2a19: feat(react): useErrorBoundary to stable from experimental + ## 1.17.7 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index b84593438..fb4a85843 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@suspensive/react", - "version": "1.17.7", + "version": "1.18.0", "description": "Useful interfaces for React Suspense", "keywords": [ "suspensive", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f99566ace..56719801e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -340,13 +340,13 @@ importers: specifier: ^1.3.9 version: 1.3.9(@emotion/react@11.11.0)(react@18.2.0) '@suspensive/react': - specifier: workspace:1.17.7 + specifier: workspace:1.18.0 version: link:../../packages/react '@suspensive/react-await': specifier: workspace:0.0.3 version: link:../../packages/react-await '@suspensive/react-query': - specifier: workspace:1.17.7 + specifier: workspace:1.18.0 version: link:../../packages/react-query '@tanstack/react-query': specifier: ^4.29.5 diff --git a/websites/visualization/package.json b/websites/visualization/package.json index 2956fcf8d..07e5288c4 100644 --- a/websites/visualization/package.json +++ b/websites/visualization/package.json @@ -30,9 +30,9 @@ "@emotion/react": "^11.10.8", "@emotion/styled": "^11.10.8", "@jsxcss/emotion": "^1.3.9", - "@suspensive/react": "workspace:1.17.7", + "@suspensive/react": "workspace:1.18.0", "@suspensive/react-await": "workspace:0.0.3", - "@suspensive/react-query": "workspace:1.17.7", + "@suspensive/react-query": "workspace:1.18.0", "@tanstack/react-query": "^4.29.5", "@tanstack/react-query-devtools": "^4.29.5", "@vercel/analytics": "^1.1.1",