Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
TGlide committed Apr 25, 2024
1 parent 230ffa8 commit d1fb38d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,43 @@ jobs:
# - name: Run svelte-check
# run: pnpm check

Test:
runs-on: ubuntu-latest
name: Test
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Node.JS
uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8

# PNPM Store cache setup
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- run: pnpm test

Lint:
runs-on: ubuntu-latest
name: Lint
Expand Down
2 changes: 1 addition & 1 deletion packages/runed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dev": "pnpm sync && pnpm watch",
"build": "pnpm package",
"package": "svelte-kit sync && svelte-package && publint",
"test": "vitest",
"test": "vitest --run",
"test:watch": "vitest --watch",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"watch": "svelte-kit sync && svelte-package --watch"
Expand Down
6 changes: 2 additions & 4 deletions packages/runed/src/lib/functions/box/box.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,10 @@ function boxFlatten<R extends Record<string, unknown>>(boxes: R): BoxFlatten<R>
return Object.assign(acc, { [key]: b });
}

const value = $derived(b.value);

if (box.isWritableBox(b)) {
Object.defineProperty(acc, key, {
get() {
return value;
return b.value;
},
// eslint-disable-next-line ts/no-explicit-any
set(v: any) {
Expand All @@ -178,7 +176,7 @@ function boxFlatten<R extends Record<string, unknown>>(boxes: R): BoxFlatten<R>
} else {
Object.defineProperty(acc, key, {
get() {
return value;
return b.value;
},
});
}
Expand Down

0 comments on commit d1fb38d

Please sign in to comment.