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

feat!: Svelte 5 #723

Merged
merged 16 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

steps:
- name: Checkout with tags
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ matrix.packages.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Checkout

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
id: pnpm-install
with:
run_install: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-without-versioning.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
node-version-file: .nvmrc

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
id: pnpm-install
with:
run_install: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
node-version-file: .nvmrc

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
id: pnpm-install
with:
run_install: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
id: pnpm-install
with:
run_install: false
Expand Down
2 changes: 1 addition & 1 deletion apps/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@repo/database": "workspace:*",
"dotenv-cli": "^7.4.4",
"dotenv-cli": "^8.0.0",
"drizzle-orm": "^0.38.1",
"postgres": "^3.4.5",
"tsx": "^4.19.2"
Expand Down
14 changes: 7 additions & 7 deletions apps/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "storybook dev -p 6006",
"dev": "storybook dev -p 5342",
"build": "storybook build",
"check": "svelte-check --tsconfig ./tsconfig.json",
"lint": "eslint . && prettier --check \"src/**/*.mdx\"",
Expand All @@ -18,22 +18,22 @@
"@storybook/addon-essentials": "^8.4.7",
"@storybook/addon-interactions": "^8.4.7",
"@storybook/addon-links": "^8.4.7",
"@storybook/addon-svelte-csf": "^4.2.0",
"@storybook/addon-svelte-csf": "^5.0.0-next.21",
"@storybook/addon-themes": "^8.4.7",
"@storybook/blocks": "^8.4.7",
"@storybook/svelte": "^8.4.7",
"@storybook/svelte-vite": "^8.4.7",
"@storybook/test": "^8.4.7",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@tsconfig/svelte": "^5.0.4",
"eslint": "^9.16.0",
"eslint": "^9.17.0",
"sass-embedded": "^1.83.0",
"storybook": "^8.4.7",
"svelte": "^4.2.18",
"svelte": "^5.15.0",
"svelte-check": "^4.1.1",
"tailwindcss": "^3.4.16",
"tailwindcss": "^3.4.17",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"vite": "^6.0.3"
"vite": "^6.0.5"
}
}
20 changes: 10 additions & 10 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev",
"dev": "vite dev --clearScreen false",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
Expand All @@ -21,24 +21,24 @@
"devDependencies": {
"@playwright/test": "^1.49.1",
"@repo/config": "workspace:^",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/kit": "^2.11.1",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"@sveltejs/adapter-node": "^5.2.11",
"@sveltejs/kit": "^2.15.0",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@typescript-eslint/eslint-plugin": "^8.18.2",
"@typescript-eslint/parser": "^8.18.2",
"autoprefixer": "^10.4.20",
"drizzle-orm": "^0.38.1",
"eslint": "^9.16.0",
"eslint": "^9.17.0",
"postcss": "^8.4.49",
"postgres": "^3.4.5",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.2",
"svelte": "^4.2.18",
"svelte": "^5.15.0",
"svelte-check": "^4.1.1",
"tailwindcss": "^3.4.16",
"tailwindcss": "^3.4.17",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"vite": "^5.4.11",
"vite": "^6.0.5",
"vitest": "^2.1.8"
}
}
12 changes: 10 additions & 2 deletions apps/web/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<script>
<script lang="ts">
import '@repo/ui/css'

import type { Snippet } from 'svelte'

interface Props {
children: Snippet
}

let { children }: Props = $props()
</script>

<slot />
{@render children()}
7 changes: 0 additions & 7 deletions apps/web/src/routes/+page.server.ts

This file was deleted.

12 changes: 7 additions & 5 deletions apps/web/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { Input } from '@repo/ui/input'
import { RecommendedTag } from '@repo/ui/recommended-tag'

let counter = 0
let counter = $state(0)

const onButtonClick = () => {
counter++
Expand All @@ -17,7 +17,7 @@

<h1>Web</h1>

<Button on:click="{onButtonClick}">Button</Button>
<Button onclick={onButtonClick}>Button</Button>

{counter}

Expand All @@ -30,15 +30,17 @@
<Chip>รหัสผ่าน</Chip>
<Chip
closable
onClose="{() => {
onClose={() => {
console.log('close')
}}">Closable</Chip
}}
>
Closable
</Chip>
<DayChip day="SA" />
<GenedChip type="SC" />

<h1>Testtsetst</h1>
<CourseCard recommended="{true}" class="mt-4" />
<CourseCard recommended={true} class="mt-4" />

<h1>RecommendedTag</h1>
<RecommendedTag />
Expand Down
4 changes: 1 addition & 3 deletions apps/web/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-auto'
import adapter from '@sveltejs/adapter-node'
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'

/** @type {import('@sveltejs/kit').Config} */
Expand All @@ -7,8 +7,6 @@ const config = {
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(),
},
Expand Down
5 changes: 4 additions & 1 deletion apps/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ export default defineConfig({
},
},
server: {
port: 5173,
port: 5343,
fs: {
allow: ['../../packages/ui/src'],
},
},
preview: {
port: 4343,
},
})
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"build": "turbo run build",
"dev": "turbo run dev",
"lint": "turbo run --continue lint",
"format": "turbo run --continue format"
"format": "turbo run --continue format",
"storybook:dev": "turbo run --filter=@app/storybook dev"
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.10",
"@changesets/cli": "^2.27.11",
"@repo/config": "workspace:^",
"@types/eslint": "^9.6.1",
"eslint": "^9.16.0",
"eslint": "^9.17.0",
"prettier": "^3.4.2",
"turbo": "^2.3.3"
},
"packageManager": "pnpm@9.15.0"
"packageManager": "pnpm@9.15.1"
}
14 changes: 6 additions & 8 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"format": "eslint . --fix"
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"@typescript-eslint/eslint-plugin": "^8.18.2",
"@typescript-eslint/parser": "^8.18.2",
"eslint-config-prettier": "^9.1.0",
"eslint-config-turbo": "^2.3.3",
"eslint-plugin-prettier": "^5.2.1",
Expand All @@ -20,12 +20,10 @@
"prettier-plugin-svelte": "^3.3.2"
},
"devDependencies": {
"@eslint/js": "^9.16.0",
"@types/eslint": "^9.6.1",
"@types/eslint__js": "^8.42.3",
"eslint": "^9.16.0",
"globals": "^15.13.0",
"@eslint/js": "^9.17.0",
"eslint": "^9.17.0",
"globals": "^15.14.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.0"
"typescript-eslint": "^8.18.2"
}
}
2 changes: 1 addition & 1 deletion packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/cli-progress": "^3.11.6",
"@types/node": "^22.10.2",
"cli-progress": "^3.12.0",
"dotenv-cli": "^7.4.4",
"dotenv-cli": "^8.0.0",
"drizzle-kit": "^0.30.0",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
Expand Down
19 changes: 10 additions & 9 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,25 @@
},
"scripts": {
"lint": "eslint .",
"format": "eslint . --fix"
"format": "eslint . --fix",
"postinstall": "node scripts/patch-sb-csf.js"
},
"devDependencies": {
"@repo/config": "workspace:^",
"@storybook/addon-svelte-csf": "^4.2.0",
"@storybook/addon-svelte-csf": "^5.0.0-next.21",
"@storybook/svelte": "^8.4.7",
"@sveltejs/adapter-node": "^5.2.10",
"@sveltejs/kit": "^2.11.1",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"svelte": "^4.2.18",
"@sveltejs/adapter-node": "^5.2.11",
"@sveltejs/kit": "^2.15.0",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"svelte": "^5.15.0",
"vitest": "^2.1.8"
},
"dependencies": {
"bits-ui": "^0.22.0",
"clsx": "^2.1.1",
"lucide-svelte": "^0.468.0",
"tailwind-merge": "^2.5.5",
"lucide-svelte": "^0.469.0",
"tailwind-merge": "^2.6.0",
"tailwind-variants": "^0.3.0",
"tailwindcss": "^3.4.16"
"tailwindcss": "^3.4.17"
}
}
Loading
Loading