-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update svelte and svelte kit * update vite and cypress * update jest * update svelte and svelte kit * update gh actions to node 22 * update gh actions to pnpm 9
- Loading branch information
1 parent
b687533
commit 5143cc0
Showing
42 changed files
with
1,786 additions
and
1,559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,15 +22,15 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
node-version: [22.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7 | ||
version: 9 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,14 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
node-version: [22.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.1.7 | ||
version: 9 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ | |
"tsconfig": "workspace:*" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,4 @@ | |
"tsconfig": "workspace:*" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,4 @@ | |
"tsconfig": "workspace:*" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,4 @@ | |
"tsconfig": "workspace:*" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,4 @@ | |
"@types/jsonwebtoken": "9.0.1" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,4 @@ | |
"tsconfig": "workspace:*" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,6 @@ pnpm-lock.yaml | |
package-lock.json | ||
yarn.lock | ||
|
||
*.timestamp-*.mjs | ||
*.timestamp-*.mjs | ||
|
||
./src/app.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
<script lang="ts"> | ||
let isWithin = false | ||
import { stopPropagation } from 'svelte/legacy' | ||
let isWithin = $state(false) | ||
function onGlobalClick() { | ||
isWithin = false; | ||
isWithin = false | ||
} | ||
</script> | ||
|
||
<svelte:document on:click={onGlobalClick} /> | ||
<svelte:document onclick={onGlobalClick} /> | ||
|
||
<article> | ||
<h2>Click Outside</h2> | ||
<button class="btn-primary" on:click|stopPropagation={() => isWithin = true}> | ||
<button class="btn-primary" onclick={stopPropagation(() => (isWithin = true))}> | ||
{isWithin ? 'Within' : 'Outside'} | ||
</button> | ||
</article> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,16 @@ | ||
<script lang="ts"> | ||
import { createCounter } from "./counter" | ||
import { createCounter } from './counter.svelte' | ||
let {count, increment, decrement, reset, set} = createCounter() | ||
let counter = createCounter() | ||
</script> | ||
|
||
<article> | ||
<h2>Counter</h2> | ||
<p>Count: {$count}</p> | ||
<p>Count: {counter.count}</p> | ||
<div class="flex"> | ||
<button class="btn-secondary" on:click={increment}> | ||
Increment | ||
</button> | ||
<button class="btn-secondary" on:click={decrement}> | ||
Decrement | ||
</button> | ||
<button class="btn-secondary" on:click={reset}> | ||
Reset | ||
</button> | ||
<button class="btn-secondary" on:click={() => set(5)}> | ||
Set 5 | ||
</button> | ||
<button class="btn-secondary" onclick={counter.increment}>Increment</button> | ||
<button class="btn-secondary" onclick={counter.decrement}>Decrement</button> | ||
<button class="btn-secondary" onclick={counter.reset}>Reset</button> | ||
<button class="btn-secondary" onclick={() => counter.set(5)}>Set 5</button> | ||
</div> | ||
</article> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
<script lang="ts"> | ||
let value = '' | ||
let debounced = '' | ||
let timer: ReturnType<typeof setTimeout> | ||
let value = $state('') | ||
let debounced = $state('') | ||
let timer: ReturnType<typeof setTimeout> | ||
const debounce = (func: () => void, delay = 300) => { | ||
clearTimeout(timer); | ||
clearTimeout(timer) | ||
timer = setTimeout(func, delay) | ||
} | ||
</script> | ||
|
||
<article> | ||
<h2>Debounce</h2> | ||
<input | ||
class="input" | ||
type="text" | ||
bind:value={value} | ||
on:keyup={() => debounce(() => debounced = value)} | ||
/> | ||
<input class="input" type="text" bind:value onkeyup={() => debounce(() => (debounced = value))} /> | ||
<p>Value: {value}</p> | ||
<p>Debounced: {debounced}</p> | ||
</article> | ||
</article> |
Oops, something went wrong.