Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/prevent-recursiv…
Browse files Browse the repository at this point in the history
…e-fallback-throw-error
  • Loading branch information
manudeli committed Jan 13, 2025
2 parents be9e879 + eb2423b commit adfd79e
Show file tree
Hide file tree
Showing 26 changed files with 1,366 additions and 1,435 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img src="https://github.com/toss/suspensive/blob/main/assets/logo_background_star.png?raw=true" alt="Suspensive Libraries Logo - TypeScript/JavaScript packages to use React Suspense easily." width="600" />
<h1 align="center">Suspensive</h1>
</a>
<p style="font-size:18px;">Manage asynchronous operations, timing, error handling, detecting intersection of elements, and caching easily</p>
<p style="font-size:18px;">All in one for React Suspense</p>
</div>

<div align="center">
Expand Down
2 changes: 1 addition & 1 deletion configs/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"main": "index.js",
"module": "index.js",
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage"
"clean": "rimraf ./dist && rimraf ./coverage && rimraf ./node_modules"
},
"dependencies": {
"@cspell/eslint-plugin": "^8.16.1",
Expand Down
2 changes: 1 addition & 1 deletion configs/tsup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"ci:eslint": "eslint \"**/*.{ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"clean": "rimraf ./dist && rimraf ./coverage && rimraf ./node_modules",
"prepack": "pnpm build"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions docs/suspensive.org/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"build": "next build",
"ci:eslint": "eslint \"**/*.{ts,tsx,cts,mts,mdx}\"",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./.next",
"clean": "rimraf ./.next && rimraf ./node_modules",
"dev": "next dev -p 4000",
"start": "next start -p 4000"
},
Expand All @@ -31,8 +31,8 @@
"d3": "^7.9.0",
"motion": "^11.13.5",
"next": "catalog:",
"nextra": "^3.2.5",
"nextra-theme-docs": "^3.2.5",
"nextra": "^3.3.1",
"nextra-theme-docs": "^3.3.1",
"react": "catalog:react19",
"react-dom": "catalog:react19",
"remark-sandpack": "^0.0.5",
Expand Down
10 changes: 6 additions & 4 deletions docs/suspensive.org/src/components/Callout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { Callout as NextraCallout } from 'nextra/components'
import type { ComponentProps } from 'react'
import type { ComponentPropsWithoutRef } from 'react'

interface CalloutProps
extends Omit<ComponentProps<typeof NextraCallout>, 'type'> {
type CalloutProps = Omit<
ComponentPropsWithoutRef<typeof NextraCallout>,
'type'
> & {
type:
| 'deprecated'
| 'experimental'
| ComponentProps<typeof NextraCallout>['type']
| ComponentPropsWithoutRef<typeof NextraCallout>['type']
}

export const Callout = ({ type, ...props }: CalloutProps) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,17 @@ export const PostListItem = (props: Post) => {
```

```tsx queries.ts
import { queryOptions } from '@suspensive/react-query'
import { infiniteQueryOptions } from '@suspensive/react-query'
import { getInfinitePosts } from './api'

export const postsInfiniteQueryOptions = () =>
queryOptions({
infiniteQueryOptions({
queryKey: ['posts'],
queryFn: ({ pageParam = 1 }) => getInfinitePosts(pageParam),
getNextPageParam: (lastPage, allPages) =>
lastPage.skip + lastPage.limit < lastPage.total
? allPages.length + 1
: undefined,
})
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,17 @@ export const PostListItem = (props: Post) => {
```

```tsx queries.ts
import { queryOptions } from '@suspensive/react-query'
import { infiniteQueryOptions } from '@suspensive/react-query'
import { getInfinitePosts } from './api'

export const postsInfiniteQueryOptions = () =>
queryOptions({
infiniteQueryOptions({
queryKey: ['posts'],
queryFn: ({ pageParam = 1 }) => getInfinitePosts(pageParam),
getNextPageParam: (lastPage, allPages) =>
lastPage.skip + lastPage.limit < lastPage.total
? allPages.length + 1
: undefined,
})
```

Expand Down
2 changes: 1 addition & 1 deletion examples/next-streaming-react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "next build",
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./.next",
"clean": "rimraf ./.next && rimraf ./node_modules",
"dev": "next dev -p 4100",
"start": "next start -p 4100"
},
Expand Down
13 changes: 1 addition & 12 deletions examples/react-native-playground/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,7 @@
"output": "static",
"favicon": "./assets/images/favicon.png"
},
"plugins": [
"expo-router",
[
"expo-splash-screen",
{
"image": "./assets/images/splash-icon.png",
"imageWidth": 200,
"resizeMode": "contain",
"backgroundColor": "#ffffff"
}
]
],
"plugins": ["expo-router"],
"experiments": {
"typedRoutes": true
}
Expand Down
14 changes: 2 additions & 12 deletions examples/react-native-playground/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import { Slot } from 'expo-router'
import * as SplashScreen from 'expo-splash-screen'
import { StatusBar } from 'expo-status-bar'
import { Providers } from '@/src/providers'
import 'react-native-reanimated'

SplashScreen.preventAutoHideAsync()
import 'react'

export default function RootLayout() {
return (
<Providers>
<StatusBar style="auto" />
<Slot />
</Providers>
)
return <Slot />
}
8 changes: 4 additions & 4 deletions examples/react-native-playground/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import 'react'
import { TestText } from '@suspensive/react-native'
import { Fragment } from 'react'
import { Text } from 'react-native'
import { Text, View } from 'react-native'

export default function Page() {
return (
<Fragment>
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<TestText />
<Text>Suspensive</Text>
</Fragment>
</View>
)
}
24 changes: 4 additions & 20 deletions examples/react-native-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,32 @@
"android": "expo start --android",
"ci:eslint": "eslint \"**/*.{ts,tsx,cts,mts}\"",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./.expo && rimraf ./node_modules && rimraf ./expo-env.d.ts",
"ios": "expo start --ios",
"reset-project": "node ./scripts/reset-project.js",
"start": "expo start",
"test": "jest --watchAll",
"web": "expo start --web"
},
"dependencies": {
"@expo/vector-icons": "catalog:react19",
"@react-navigation/bottom-tabs": "catalog:react19",
"@react-navigation/native": "catalog:react19",
"@suspensive/react-native": "workspace:*",
"expo": "catalog:react19",
"expo-blur": "catalog:react19",
"expo-constants": "catalog:react19",
"expo-font": "catalog:react19",
"expo-haptics": "catalog:react19",
"expo-linking": "catalog:react19",
"expo-router": "catalog:react19",
"expo-splash-screen": "catalog:react19",
"expo-status-bar": "catalog:react19",
"expo-symbols": "catalog:react19",
"expo-system-ui": "catalog:react19",
"expo-web-browser": "catalog:react19",
"react": "catalog:react19",
"react-dom": "catalog:react19",
"react-native": "catalog:react19",
"react-native-gesture-handler": "catalog:react19",
"react-native-reanimated": "catalog:react19",
"react-native-safe-area-context": "catalog:react19",
"react-native-screens": "catalog:react19",
"react-native-web": "catalog:react19",
"react-native-webview": "catalog:react19"
"react-native-web": "catalog:react19"
},
"devDependencies": {
"@babel/core": "^7.26.0",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.14",
"@types/react": "catalog:react19",
"@types/react-test-renderer": "^19.0.0",
"jest": "catalog:",
"jest-expo": "catalog:react19",
"react-test-renderer": "19.0.0",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
},
"jest": {
"preset": "jest-expo"
Expand Down
84 changes: 0 additions & 84 deletions examples/react-native-playground/scripts/reset-project.js

This file was deleted.

20 changes: 0 additions & 20 deletions examples/react-native-playground/src/providers.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion examples/visualization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "next build",
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./.next",
"clean": "rimraf ./.next && rimraf ./node_modules",
"dev": "next dev -p 4001",
"start": "next start -p 4001"
},
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"start": "turbo run start"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.1",
"@arethetypeswrong/cli": "^0.17.2",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.10",
"@commitlint/cli": "^19.6.0",
"@changesets/cli": "^2.27.11",
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
Expand All @@ -56,18 +56,18 @@
"@vitest/coverage-v8": "^2.1.8",
"@vitest/ui": "^2.1.8",
"broken-link-checker": "^0.7.8",
"eslint": "^9.16.0",
"eslint": "^9.17.0",
"husky": "^9.1.7",
"jsdom": "^25.0.1",
"knip": "^5.39.2",
"lint-staged": "^15.2.10",
"jsdom": "^26.0.0",
"knip": "^5.42.0",
"lint-staged": "^15.3.0",
"ms": "3.0.0-canary.1",
"packlint": "^0.2.4",
"playwright": "^1.49.0",
"playwright": "^1.49.1",
"prettier": "^3.4.2",
"publint": "^0.2.12",
"rimraf": "^6.0.1",
"sherif": "^1.0.2",
"sherif": "^1.1.1",
"tsup": "^8.3.5",
"turbo": "^2.3.3",
"typescript": "^5.7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"ci:publint": "publint --strict",
"ci:test": "vitest run --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"clean": "rimraf ./dist && rimraf ./coverage && rimraf ./node_modules",
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/jotai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"ci:publint": "publint --strict",
"ci:test": "vitest run --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"clean": "rimraf ./dist && rimraf ./coverage && rimraf ./node_modules",
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
Expand Down
Loading

0 comments on commit adfd79e

Please sign in to comment.