Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Oct 26, 2023
1 parent b421f55 commit 988198b
Show file tree
Hide file tree
Showing 27 changed files with 2,871 additions and 1,695 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ AutoImport({
// targets to transform
include: [
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
/\.vue$/, /\.vue\?vue/, // .vue
/\.vue$/,
/\.vue\?vue/, // .vue
/\.md$/, // .md
],

Expand Down
15 changes: 15 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// @ts-check
import antfu from '@antfu/eslint-config'

export default antfu(
{
ignores: [
'test/fixtures*',
],
},
{
rules: {
// overrides
},
},
)
8 changes: 4 additions & 4 deletions examples/solid-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
},
"dependencies": {
"solid-app-router": "^0.4.2",
"solid-js": "^1.7.7"
"solid-js": "^1.8.3"
},
"devDependencies": {
"typescript": "^5.1.6",
"vite": "^4.3.9",
"vite-plugin-solid": "^2.7.0"
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vite-plugin-solid": "^2.7.2"
}
}
4 changes: 3 additions & 1 deletion examples/solid-js/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ function App() {
<header className="App-header">
<p>
<button type="button" onClick={() => setCount(count => count + 1)}>
count is: {count}
count is:
{' '}
{count}
</button>
</p>
</header>
Expand Down
3 changes: 2 additions & 1 deletion examples/solid-js/src/views/PageA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const PageA: Component = () => {
href={`/detail/${new Date().getTime()}?q=${new Date().getTime()
% item}`}
>
Detail-{item}
Detail-
{item}
</NavLink>
</nav>
</li>
Expand Down
15 changes: 12 additions & 3 deletions examples/solid-js/src/views/PageB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@ const PageB: Component = () => {
<main>
<h2>Who are we?</h2>
<p>That feels like an existential question, don&apos;t you think?</p>
<p>path: {location.pathname}</p>
<p>params id: {id}</p>
<p>query q: {query.q}</p>
<p>
path:
{location.pathname}
</p>
<p>
params id:
{id}
</p>
<p>
query q:
{query.q}
</p>
</main>
<nav>
<NavLink href="/">Home</NavLink>
Expand Down
12 changes: 6 additions & 6 deletions examples/solid-js/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"compilerOptions": {
"strict": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"module": "ESNext",
"moduleResolution": "node",
"types": [
"vite/client",
"unplugin-icons/types/solid"
]
],
"strict": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
}
}
33 changes: 18 additions & 15 deletions examples/vite-astro/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@ import vue from '@astrojs/vue'
import AutoImport from 'unplugin-auto-import/astro'
import svelte from '@astrojs/svelte'
import react from '@astrojs/react'

// https://astro.build/config
export default defineConfig({
integrations: [vue({
reactivityTransform: true,
}),
svelte(),
react(),
AutoImport({
imports: [
'vue',
'vue/macros',
'svelte',
'svelte/store',
'react',
],
dts: './src/auto-imports.d.ts',
})],
integrations: [
vue({
reactivityTransform: true,
}),
svelte(),
react(),
AutoImport({
imports: [
'vue',
'vue/macros',
'svelte',
'svelte/store',
'react',
],
dts: './src/auto-imports.d.ts',
}),
],
})
12 changes: 6 additions & 6 deletions examples/vite-astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"astro": "astro"
},
"devDependencies": {
"@astrojs/react": "^2.2.1",
"@astrojs/svelte": "^3.1.0",
"@astrojs/vue": "^2.2.1",
"astro": "^2.7.4",
"@astrojs/react": "^3.0.4",
"@astrojs/svelte": "^4.0.3",
"@astrojs/vue": "^3.0.2",
"astro": "^3.3.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"svelte": "^4.0.4",
"svelte": "^4.2.2",
"unplugin-auto-import": "workspace:*",
"vue": "^3.3.4"
"vue": "^3.3.7"
}
}
5 changes: 4 additions & 1 deletion examples/vite-astro/src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ export function Card() {
const [state, setState] = useState(0)
return (
<>
<h1>React: {state}</h1>
<h1>
React:
{state}
</h1>
<button onClick={() => setState(state + 1)}>
Add
</button>
Expand Down
8 changes: 4 additions & 4 deletions examples/vite-astro/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"compilerOptions": {
"jsx": "preserve",
// Enable top-level await, and other modern ESM features.
"target": "ESNext",
"jsx": "preserve",
"module": "ESNext",
// Enable node-style module resolution, for things like npm package imports.
"moduleResolution": "node",
// Enable JSON imports.
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
"noEmit": true,
// Enable stricter transpilation for better output.
"isolatedModules": true
}
}
20 changes: 10 additions & 10 deletions examples/vite-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
},
"dependencies": {
"ahooks": "^3.7.8",
"i18next": "^23.2.7",
"i18next": "^23.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^13.0.1",
"react-router": "^6.14.1",
"react-router-dom": "^6.14.1"
"react-i18next": "^13.3.1",
"react-router": "^6.17.0",
"react-router-dom": "^6.17.0"
},
"devDependencies": {
"@iconify-json/logos": "*",
"@svgr/core": "^8.0.0",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"@svgr/core": "^8.1.0",
"@types/react": "^18.2.32",
"@types/react-dom": "^18.2.14",
"@vitejs/plugin-react-refresh": "^1.3.6",
"typescript": "^5.1.6",
"typescript": "^5.2.2",
"unplugin-auto-import": "workspace:*",
"unplugin-icons": "^0.16.3",
"vite": "^4.3.9"
"unplugin-icons": "^0.17.1",
"vite": "^4.5.0"
}
}
8 changes: 5 additions & 3 deletions examples/vite-react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ function App() {

return (
<div className="App">
<IconLogosReact style={{ fontSize: '3em' }}/>
<IconLogosReact style={{ fontSize: '3em' }} />
<header className="App-header">
<h1>{t('welcome')}</h1>
<p>
<button type="button" onClick={() => setCount(count => count + 1)}>
count is: {count}
count is:
{' '}
{count}
</button>
</p>
</header>
<Routes>
<Route path="/" element={<MainLayout />} >
<Route path="/" element={<MainLayout />}>
<Route path="/list" element={<PageA />} />
<Route path="/detail/:id" element={<PageB />} />
</Route>
Expand Down
5 changes: 4 additions & 1 deletion examples/vite-react/src/views/PageA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ function PageA() {
{[13, 14, 15].map(n => (
<li key={n}>
<nav>
<Link to={`/detail/${new Date().getTime()}?q=${new Date().getTime() % n}`}>Detail-{n}</Link>
<Link to={`/detail/${new Date().getTime()}?q=${new Date().getTime() % n}`}>
Detail-
{n}
</Link>
</nav>
</li>
))}
Expand Down
19 changes: 14 additions & 5 deletions examples/vite-react/src/views/PageB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@ function PageB() {
<main>
<h2>Who are we?</h2>
<p>
That feels like an existential question, don&apos;t you
think?
That feels like an existential question, don&apos;t you
think?
</p>
<p>
path:
{location.pathname}
</p>
<p>
params id:
{id}
</p>
<p>
query q:
{query.get('q')}
</p>
<p>path: {location.pathname}</p>
<p>params id: {id}</p>
<p>query q: {query.get('q')}</p>
</main>
<nav>
<Link to="/">Home</Link>
Expand Down
20 changes: 10 additions & 10 deletions examples/vite-react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"compilerOptions": {
"target": "ESNext",
"jsx": "react",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": false,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react",
"types": [
"unplugin-icons/types/react"
]
],
"allowJs": false,
"strict": true,
"noEmit": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": false,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": false
},
"include": ["./src"]
}
16 changes: 8 additions & 8 deletions examples/vite-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.2",
"@tsconfig/svelte": "^5.0.0",
"svelte": "^4.0.4",
"svelte-check": "^3.4.4",
"@sveltejs/vite-plugin-svelte": "^2.4.6",
"@tsconfig/svelte": "^5.0.2",
"svelte": "^4.2.2",
"svelte-check": "^3.5.2",
"svelte-preprocess": "^5.0.4",
"tslib": "^2.6.0",
"typescript": "^5.1.6",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"unplugin-auto-import": "workspace:*",
"vite": "^4.3.9",
"vite-plugin-inspect": "^0.7.32"
"vite": "^4.5.0",
"vite-plugin-inspect": "^0.7.40"
}
}
2 changes: 1 addition & 1 deletion examples/vite-svelte/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"extends": "@tsconfig/svelte/tsconfig.json",
"compilerOptions": {
"target": "esnext",
"baseUrl": ".",
"module": "esnext",
"resolveJsonModule": true,
"baseUrl": ".",
/**
* Typecheck JS in `.svelte` and `.js` files by default.
* Disable checkJs if you'd like to use dynamic types in JS.
Expand Down
Loading

0 comments on commit 988198b

Please sign in to comment.