Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 #1423

Draft
wants to merge 57 commits into
base: main
Choose a base branch
from
Draft

v3 #1423

wants to merge 57 commits into from

Conversation

manudeli
Copy link
Member

@manudeli manudeli commented Jan 30, 2025

close #1108 close #1349 close #1325

Suspensive v3

PR Checklist

  • I did below actions if need
  1. I read the Contributing Guide
  2. I added documents and tests.

Copy link

coauthors bot commented Jan 30, 2025

People can be co-author:

Candidate Reasons Count Add this as commit message
@manudeli #1423 (comment) #1423 (comment) #1423 (review) #1423 (review) #1423 (comment) #1423 (comment) #1423 7 Co-authored-by: manudeli <[email protected]>
@codecov-commenter #1423 (comment) 1 Co-authored-by: codecov-commenter <[email protected]>

Copy link

vercel bot commented Jan 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2025 4:57pm
v1.suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2025 4:57pm
v2.suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2025 4:57pm
v3.suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2025 4:57pm
visualization.suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2025 4:57pm

Copy link

github-actions bot commented Jan 30, 2025

Size Change: -8.23 kB (-11.68%) 👏

Total Size: 62.2 kB

Filename Size Change
packages/react-dom/dist/FadeIn.cjs 2.16 kB +2 B (+0.09%)
packages/react-dom/dist/index.cjs 2.38 kB +2 B (+0.08%)
packages/react-dom/dist/useFadeIn.cjs 2.07 kB +2 B (+0.1%)
packages/react-query-4/dist/index.cjs 1.67 kB -187 B (-10.06%) 👏
packages/react-query-4/dist/index.js 387 B -7 B (-1.78%)
packages/react-query-4/dist/QueryErrorBoundary.cjs 0 B -1.12 kB (removed) 🏆
packages/react-query-4/dist/QueryErrorBoundary.js 0 B -142 B (removed) 🏆
packages/react-query-4/dist/queryOptions.js 136 B +1 B (+0.74%)
packages/react-query-4/dist/SuspenseInfiniteQuery.cjs 1.07 kB +14 B (+1.33%)
packages/react-query-4/dist/SuspenseQuery.cjs 1.06 kB +13 B (+1.25%)
packages/react-query-4/dist/useSuspenseInfiniteQuery.cjs 845 B +12 B (+1.44%)
packages/react-query-4/dist/useSuspenseQuery.cjs 838 B +14 B (+1.7%)
packages/react-query-5/dist/index.cjs 1.39 kB -367 B (-20.85%) 🎉
packages/react-query-5/dist/index.js 386 B -5 B (-1.28%)
packages/react-query-5/dist/QueryErrorBoundary.cjs 0 B -1.12 kB (removed) 🏆
packages/react-query-5/dist/QueryErrorBoundary.js 0 B -142 B (removed) 🏆
packages/react-query-5/dist/SuspenseQuery.js 136 B -1 B (-0.73%)
packages/react/dist/ClientOnly.cjs 1.07 kB +338 B (+46.05%) 🚨
packages/react/dist/DefaultProps.cjs 1.04 kB -9 B (-0.86%)
packages/react/dist/Delay.cjs 1.52 kB +292 B (+23.68%) 🚨
packages/react/dist/Delay.js 158 B -1 B (-0.63%)
packages/react/dist/DevMode.cjs 0 B -530 B (removed) 🏆
packages/react/dist/DevMode.js 0 B -131 B (removed) 🏆
packages/react/dist/ErrorBoundary.cjs 2.9 kB +172 B (+6.3%) 🔍
packages/react/dist/ErrorBoundary.js 205 B +1 B (+0.49%)
packages/react/dist/ErrorBoundaryGroup.cjs 1.64 kB +262 B (+19.04%) ⚠️
packages/react/dist/ErrorBoundaryGroup.js 196 B +1 B (+0.51%)
packages/react/dist/index.cjs 4.04 kB -269 B (-6.24%)
packages/react/dist/index.js 311 B -56 B (-15.26%) 👏
packages/react/dist/Suspense.cjs 1.44 kB +149 B (+11.53%) ⚠️
packages/react/dist/Suspensive.cjs 0 B -1.26 kB (removed) 🏆
packages/react/dist/Suspensive.js 0 B -175 B (removed) 🏆
packages/react/dist/wrap.cjs 0 B -3.77 kB (removed) 🏆
packages/react/dist/wrap.js 0 B -209 B (removed) 🏆
ℹ️ View Unchanged
Filename Size
packages/jotai/dist/Atom.cjs 660 B
packages/jotai/dist/Atom.js 115 B
packages/jotai/dist/AtomValue.cjs 647 B
packages/jotai/dist/AtomValue.js 120 B
packages/jotai/dist/index.cjs 753 B
packages/jotai/dist/index.js 158 B
packages/jotai/dist/SetAtom.cjs 645 B
packages/jotai/dist/SetAtom.js 118 B
packages/react-dom/dist/FadeIn.js 139 B
packages/react-dom/dist/index.js 176 B
packages/react-dom/dist/InView.cjs 2.12 kB
packages/react-dom/dist/InView.js 130 B
packages/react-dom/dist/useFadeIn.js 133 B
packages/react-dom/dist/useInView.cjs 1.89 kB
packages/react-dom/dist/useInView.js 120 B
packages/react-native/dist/index.cjs 619 B
packages/react-native/dist/index.js 122 B
packages/react-native/dist/TestText.cjs 612 B
packages/react-native/dist/TestText.js 119 B
packages/react-query-4/dist/infiniteQueryOptions.cjs 548 B
packages/react-query-4/dist/infiniteQueryOptions.js 144 B
packages/react-query-4/dist/Mutation.cjs 821 B
packages/react-query-4/dist/Mutation.js 132 B
packages/react-query-4/dist/mutationOptions.cjs 541 B
packages/react-query-4/dist/mutationOptions.js 137 B
packages/react-query-4/dist/PrefetchInfiniteQuery.cjs 722 B
packages/react-query-4/dist/PrefetchInfiniteQuery.js 155 B
packages/react-query-4/dist/PrefetchQuery.cjs 712 B
packages/react-query-4/dist/PrefetchQuery.js 147 B
packages/react-query-4/dist/QueryClientConsumer.cjs 665 B
packages/react-query-4/dist/QueryClientConsumer.js 140 B
packages/react-query-4/dist/queryOptions.cjs 540 B
packages/react-query-4/dist/SuspenseInfiniteQuery.js 155 B
packages/react-query-4/dist/SuspenseQueries.cjs 928 B
packages/react-query-4/dist/SuspenseQueries.js 149 B
packages/react-query-4/dist/SuspenseQuery.js 147 B
packages/react-query-4/dist/usePrefetchInfiniteQuery.cjs 648 B
packages/react-query-4/dist/usePrefetchInfiniteQuery.js 148 B
packages/react-query-4/dist/usePrefetchQuery.cjs 639 B
packages/react-query-4/dist/usePrefetchQuery.js 140 B
packages/react-query-4/dist/useSuspenseInfiniteQuery.js 148 B
packages/react-query-4/dist/useSuspenseQueries.cjs 837 B
packages/react-query-4/dist/useSuspenseQueries.js 142 B
packages/react-query-4/dist/useSuspenseQuery.js 140 B
packages/react-query-5/dist/infiniteQueryOptions.cjs 573 B
packages/react-query-5/dist/infiniteQueryOptions.js 144 B
packages/react-query-5/dist/Mutation.cjs 821 B
packages/react-query-5/dist/Mutation.js 132 B
packages/react-query-5/dist/mutationOptions.cjs 541 B
packages/react-query-5/dist/mutationOptions.js 137 B
packages/react-query-5/dist/PrefetchInfiniteQuery.cjs 647 B
packages/react-query-5/dist/PrefetchInfiniteQuery.js 145 B
packages/react-query-5/dist/PrefetchQuery.cjs 639 B
packages/react-query-5/dist/PrefetchQuery.js 137 B
packages/react-query-5/dist/QueryClientConsumer.cjs 663 B
packages/react-query-5/dist/QueryClientConsumer.js 140 B
packages/react-query-5/dist/queryOptions.cjs 563 B
packages/react-query-5/dist/queryOptions.js 136 B
packages/react-query-5/dist/SuspenseInfiniteQuery.cjs 833 B
packages/react-query-5/dist/SuspenseInfiniteQuery.js 145 B
packages/react-query-5/dist/SuspenseQueries.cjs 671 B
packages/react-query-5/dist/SuspenseQueries.js 139 B
packages/react-query-5/dist/SuspenseQuery.cjs 825 B
packages/react-query-5/dist/usePrefetchInfiniteQuery.cjs 577 B
packages/react-query-5/dist/usePrefetchInfiniteQuery.js 148 B
packages/react-query-5/dist/usePrefetchQuery.cjs 569 B
packages/react-query-5/dist/usePrefetchQuery.js 140 B
packages/react-query-5/dist/useSuspenseInfiniteQuery.cjs 577 B
packages/react-query-5/dist/useSuspenseInfiniteQuery.js 148 B
packages/react-query-5/dist/useSuspenseQueries.cjs 571 B
packages/react-query-5/dist/useSuspenseQueries.js 142 B
packages/react-query-5/dist/useSuspenseQuery.cjs 569 B
packages/react-query-5/dist/useSuspenseQuery.js 140 B
packages/react-query/dist/index.cjs 552 B
packages/react-query/dist/index.js 121 B
packages/react-query/dist/v4.cjs 550 B
packages/react-query/dist/v4.js 116 B
packages/react-query/dist/v5.cjs 550 B
packages/react-query/dist/v5.js 116 B
packages/react/dist/ClientOnly.js 141 B
packages/react/dist/DefaultProps.js 167 B
packages/react/dist/Suspense.js 171 B

compressed-size-action

@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 89.61039% with 8 lines in your changes missing coverage. Please review.

Project coverage is 76.04%. Comparing base (42406cf) to head (56ae4eb).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1423      +/-   ##
==========================================
- Coverage   76.16%   76.04%   -0.13%     
==========================================
  Files          74       71       -3     
  Lines         621      576      -45     
  Branches      135      124      -11     
==========================================
- Hits          473      438      -35     
+ Misses        141      133       -8     
+ Partials        7        5       -2     
Components Coverage Δ
@suspensive/react 97.77% <94.52%> (-2.23%) ⬇️
@suspensive/react-dom 95.60% <ø> (ø)
@suspensive/react-native 100.00% <ø> (ø)
@suspensive/react-query 83.47% <ø> (ø)
@suspensive/react-query-4 0.00% <0.00%> (ø)
@suspensive/react-query-5 0.00% <0.00%> (ø)
@suspensive/jotai 0.00% <ø> (ø)
@suspensive/codemods 63.47% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

changeset-bot bot commented Jan 30, 2025

🦋 Changeset detected

Latest commit: 56ae4eb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@suspensive/react-query-4 Patch
@suspensive/react-query-5 Patch
@suspensive/react Patch
@suspensive/react-dom Patch
@suspensive/react-query Patch
@suspensive/jotai Patch
@suspensive/codemods Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

…error (#1409)

🚧 This PR could make a huge difference, so please help us make sure this
change gets a very thorough review. 🚧

```tsx
const Throw = {
  Error: ({ message, after = 0, children }: PropsWithChildren<{ message: string; after?: number }>) => {
    const [isNeedThrow, setIsNeedThrow] = useState(after === 0)
    if (isNeedThrow) {
      throw new Error(message)
    }
    useTimeout(() => setIsNeedThrow(true), after)
    return <>{children}</>
  }
}

const Example = () => (
  <ErrorBoundary fallback={() => <>This is expected</>}>
    <ErrorBoundary
      fallback={() => (
        <Throw.Error message={ERROR_MESSAGE} after={100}>
          ErrorBoundary's fallback before error
        </Throw.Error>
      )}
    >
      <Throw.Error message={ERROR_MESSAGE} after={100}>
        ErrorBoundary's children before error
      </Throw.Error>
    </ErrorBoundary>
  </ErrorBoundary>
)
```

## Problem: ErrorBoundary's fallback can't be treated by parent
ErrorBoundary

<!--
    A clear and concise description of what this pr is about.
 -->
 
Thrown Error in fallback will be caught by ErrorBoundary self and then
expose fallback recursively 🥲
1. ErrorBoundary's children before error
2. ErrorBoundary's fallback before error
3. ErrorBoundary's fallback before error
4. ErrorBoundary's fallback before error
5. ... expose fallback self recursively ... 

## Solution: When we meet thrown error in fallback of ErrorBoundary wrap
it as InternalFallbackError, re-throw
InternalFallbackError.fallbackError, if it is InternalFallbackError

Thrown Error in fallback will be caught by parent ErrorBoundary 👍
1. ErrorBoundary's children before error
2. ErrorBoundary's fallback before error
3. This is expected 

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
5. I added documents and tests.

---------

Co-authored-by: Lee HyunJae (whale) <[email protected]>
Co-authored-by: lucas0530 <[email protected]>
Co-authored-by: HYUNGU KANG <[email protected]>
Co-authored-by: Brian Vaughn <[email protected]>
…l to sequential (#1488)

# Overview

<!--
    A clear and concise description of what this pr is about.
 -->

Fix file system conflicts during JSR publish by executing commands
sequentially instead of in parallel.

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.
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 next, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`next` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `next`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @suspensive/[email protected]

### Patch Changes

- [#1488](#1488)
[`71f8259`](71f8259)
Thanks [@kangju2000](https://github.com/kangju2000)! - fix: fix JSR
publish failures by changing execution flow from parallel to sequential

## @suspensive/[email protected]

### Patch Changes

-   Updated dependencies \[]:
    -   @suspensive/[email protected]
    -   @suspensive/[email protected]

## @suspensive/[email protected]



## @suspensive/[email protected]



## @suspensive/[email protected]



## @suspensive/[email protected]



## @suspensive/[email protected]
# Overview

add `mutationOptions` as an experimental API.

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: MinuKang <[email protected]>
Co-authored-by: bluejoyq <[email protected]>
Co-authored-by: Jonghyeon Ko <[email protected]>
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 next, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`next` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `next`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @suspensive/[email protected]

### Minor Changes

- [#1490](#1490)
[`a37dd3d`](a37dd3d)
Thanks [@gwansikk](https://github.com/gwansikk)! - feat(react-query):
add `mutationOptions`

## @suspensive/[email protected]

### Minor Changes

- [#1490](#1490)
[`a37dd3d`](a37dd3d)
Thanks [@gwansikk](https://github.com/gwansikk)! - feat(react-query):
add `mutationOptions`

## @suspensive/[email protected]

### Patch Changes

- Updated dependencies
\[[`a37dd3d`](a37dd3d)]:
    -   @suspensive/[email protected]
    -   @suspensive/[email protected]

## @suspensive/[email protected]



## @suspensive/[email protected]



## @suspensive/[email protected]



## @suspensive/[email protected]
# Overview

<!--
    A clear and concise description of what this pr is about.
 -->

Attempting to resolve JSR publishing issue. Testing with
@suspensive/react package first.

Related issues:
- jsr-io/jsr#526
- jsr-io/jsr#632
- jsr-io/jsr#24
- jsr-io/jsr/discussions/399 

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.
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 next, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`next` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `next`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @suspensive/[email protected]

### Patch Changes

- [#1494](#1494)
[`d13bd42`](d13bd42)
Thanks [@kangju2000](https://github.com/kangju2000)! - fix: Add React
import to jsr.json

## @suspensive/[email protected]

### Patch Changes

-   Updated dependencies \[]:
    -   @suspensive/[email protected]
    -   @suspensive/[email protected]

## @suspensive/[email protected]



## @suspensive/[email protected]



## @suspensive/[email protected]



## @suspensive/[email protected]



## @suspensive/[email protected]
…#1497)

# Overview

<!--
    A clear and concise description of what this pr is about.
 -->

Enhanced JSR synchronization script to optimize dependency management
and applied consistent formatting to all package jsr.json files.

Additionally, we need to add CI publishing permissions for all
`@suspensive` packages on JSR. Currently, only `@suspensive/react` has
CI publishing enabled. As mentioned in
#1485 (comment), we
need to link the remaining packages under the 'Publish from CI' section
on https://jsr.io/@suspensive.

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.
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 next, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`next` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `next`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @suspensive/[email protected]

### Patch Changes

- [#1497](#1497)
[`e400035`](e400035)
Thanks [@kangju2000](https://github.com/kangju2000)! - chore: improve
JSR imports sync with consistent dependency formatting

## @suspensive/[email protected]

### Patch Changes

- [#1497](#1497)
[`e400035`](e400035)
Thanks [@kangju2000](https://github.com/kangju2000)! - chore: improve
JSR imports sync with consistent dependency formatting

## @suspensive/[email protected]

### Patch Changes

- [#1497](#1497)
[`e400035`](e400035)
Thanks [@kangju2000](https://github.com/kangju2000)! - chore: improve
JSR imports sync with consistent dependency formatting

## @suspensive/[email protected]

### Patch Changes

- [#1497](#1497)
[`e400035`](e400035)
Thanks [@kangju2000](https://github.com/kangju2000)! - chore: improve
JSR imports sync with consistent dependency formatting

## @suspensive/[email protected]

### Patch Changes

- [#1497](#1497)
[`e400035`](e400035)
Thanks [@kangju2000](https://github.com/kangju2000)! - chore: improve
JSR imports sync with consistent dependency formatting

## @suspensive/[email protected]

### Patch Changes

- [#1497](#1497)
[`e400035`](e400035)
Thanks [@kangju2000](https://github.com/kangju2000)! - chore: improve
JSR imports sync with consistent dependency formatting

- Updated dependencies
\[[`e400035`](e400035)]:
    -   @suspensive/[email protected]
    -   @suspensive/[email protected]

## @suspensive/[email protected]

### Patch Changes

- [#1497](#1497)
[`e400035`](e400035)
Thanks [@kangju2000](https://github.com/kangju2000)! - chore: improve
JSR imports sync with consistent dependency formatting

## @suspensive/[email protected]

### Patch Changes

- [#1497](#1497)
[`e400035`](e400035)
Thanks [@kangju2000](https://github.com/kangju2000)! - chore: improve
JSR imports sync with consistent dependency formatting
# Overview

<!--
    A clear and concise description of what this pr is about.
 -->

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants