Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli committed Jul 14, 2024
1 parent 09cc244 commit d8bd14c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 36 deletions.
2 changes: 0 additions & 2 deletions configs/tsup/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Options } from 'tsup'

export const options: Options = {
clean: true,
banner: { js: '"use client"' },
format: ['cjs', 'esm'],
target: ['chrome51', 'firefox53', 'edge18', 'safari11', 'ios11', 'opera38', 'es6', 'node14'],
Expand All @@ -12,7 +11,6 @@ export const options: Options = {
}

export const scriptOptions: Options = {
clean: true,
format: ['cjs'],
target: ['chrome51', 'firefox53', 'edge18', 'safari11', 'ios11', 'opera38', 'es6', 'node14'],
entry: ['src/scripts/*.{ts,tsx}', '!**/*.{spec,test,test-d,bench}.*'],
Expand Down
34 changes: 17 additions & 17 deletions docs/suspensive.org/src/pages/docs/react/ErrorBoundary.en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const ErrorAfter2s = () => {

useEffect(() => {
setTimeout(() => {
setAsyncState({ isError: true, error: { status: 401, message: 'unauthorized' } })
setAsyncState({ isError: true, error: new Error('error made by Error') })
}, 2000)
}, [])

Expand Down Expand Up @@ -197,7 +197,7 @@ export const ErrorAfter2s = () => {

useEffect(() => {
setTimeout(() => {
setAsyncState({ isError: true, error: { status: 401, message: 'unauthorized' } })
setAsyncState({ isError: true, error: new Error('error made by Error') })
}, 2000)
}, [])

Expand Down Expand Up @@ -351,7 +351,7 @@ export const ErrorAfter2s = () => {

useEffect(() => {
setTimeout(() => {
setAsyncState({ isError: true, error: { status: 401, message: 'unauthorized' } })
setAsyncState({ isError: true, error: new Error('error made by Error') })
}, 2000)
}, [])

Expand Down Expand Up @@ -380,10 +380,10 @@ import { useState, useEffect, createElement } from 'react'

export const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={false}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<CustomErrorAfter2s />
</ErrorBoundary>
Expand All @@ -401,10 +401,10 @@ import { useState, useEffect, createElement } from 'react'

export const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={CustomError}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<CustomErrorAfter2s />
</ErrorBoundary>
Expand All @@ -422,10 +422,10 @@ import { useState, useEffect, createElement } from 'react'

export const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={(error) => error instanceof CustomError}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<CustomErrorAfter2s />
</ErrorBoundary>
Expand All @@ -445,10 +445,10 @@ import { useState, useEffect, createElement } from 'react'

const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={[false, CustomError, (error) => error instanceof CustomError]}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<CustomErrorAfter2s />
</ErrorBoundary>
Expand All @@ -465,10 +465,10 @@ import { useState, useEffect, createElement } from 'react'

export const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={CustomError}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<CustomErrorAfter2s />
</ErrorBoundary>
Expand All @@ -495,7 +495,7 @@ export const CustomErrorAfter2s = () => {
setTimeout(() => {
setAsyncState({
isError: true,
error: () => new CustomError("Error made by CustomError Constructor")
error: () => new CustomError("error made by CustomError")
});
}, 2000);
}, []);
Expand All @@ -520,10 +520,10 @@ import { useState, useEffect, createElement } from 'react'

export const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={CustomError}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<ErrorAfter2s />
</ErrorBoundary>
Expand All @@ -546,7 +546,7 @@ export const ErrorAfter2s = () => {

useEffect(() => {
setTimeout(() => {
setAsyncState({ isError: true, error: { status: 400, message: 'Error made by ErrorConstructor' } })
setAsyncState({ isError: true, error: new Error('error made by Error') })
}, 2000)
}, [])

Expand Down
34 changes: 17 additions & 17 deletions docs/suspensive.org/src/pages/docs/react/ErrorBoundary.ko.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const ErrorAfter2s = () => {

useEffect(() => {
setTimeout(() => {
setAsyncState({ isError: true, error: { status: 401, message: 'unauthorized' } })
setAsyncState({ isError: true, error: new Error('error made by Error') })
}, 2000)
}, [])

Expand Down Expand Up @@ -202,7 +202,7 @@ export const ErrorAfter2s = () => {

useEffect(() => {
setTimeout(() => {
setAsyncState({ isError: true, error: { status: 401, message: 'unauthorized' } })
setAsyncState({ isError: true, error: new Error('error made by Error') })
}, 2000)
}, [])

Expand Down Expand Up @@ -355,7 +355,7 @@ export const ErrorAfter2s = () => {

useEffect(() => {
setTimeout(() => {
setAsyncState({ isError: true, error: { status: 401, message: 'unauthorized' } })
setAsyncState({ isError: true, error: new Error('error made by Error') })
}, 2000)
}, [])

Expand Down Expand Up @@ -384,10 +384,10 @@ import { useState, useEffect, createElement } from 'react'

export const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={false}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<CustomErrorAfter2s />
</ErrorBoundary>
Expand All @@ -405,10 +405,10 @@ import { useState, useEffect, createElement } from 'react'

export const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={CustomError}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<CustomErrorAfter2s />
</ErrorBoundary>
Expand All @@ -426,10 +426,10 @@ import { useState, useEffect, createElement } from 'react'

export const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={(error) => error instanceof CustomError}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<CustomErrorAfter2s />
</ErrorBoundary>
Expand All @@ -449,10 +449,10 @@ import { useState, useEffect, createElement } from 'react'

const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={[false, CustomError, (error) => error instanceof CustomError]}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<CustomErrorAfter2s />
</ErrorBoundary>
Expand All @@ -469,10 +469,10 @@ import { useState, useEffect, createElement } from 'react'

export const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={CustomError}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<CustomErrorAfter2s />
</ErrorBoundary>
Expand Down Expand Up @@ -500,7 +500,7 @@ export const CustomErrorAfter2s = () => {
setTimeout(() => {
setAsyncState({
isError: true,
error: () => new CustomError("Error made by CustomError Constructor")
error: () => new CustomError("error made by CustomError")
});
}, 2000);
}, []);
Expand All @@ -526,10 +526,10 @@ import { useState, useEffect, createElement } from 'react'

export const Example = () => {
return (
<ErrorBoundary fallback={({ error }) => <>{error.message} of Parent</>}>
<ErrorBoundary fallback={({ error }) => <>Parent ErrorBoundary fallback: {error.message}</>}>
<ErrorBoundary
shouldCatch={CustomError}
fallback={({ error }) => <>{error.message} of Child</>}
fallback={({ error }) => <>Child ErrorBoundary fallback: {error.message}</>}
>
<ErrorAfter2s />
</ErrorBoundary>
Expand All @@ -552,7 +552,7 @@ export const ErrorAfter2s = () => {

useEffect(() => {
setTimeout(() => {
setAsyncState({ isError: true, error: { status: 400, message: 'Error made by ErrorConstructor' } })
setAsyncState({ isError: true, error: new Error('error made by Error') })
}, 2000)
}, [])

Expand Down

0 comments on commit d8bd14c

Please sign in to comment.