Skip to content

Commit

Permalink
chore: fix build-time warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdabbs committed Jun 8, 2024
1 parent 8f196b3 commit 500c7ef
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

# https://github.com/pnpm/action-setup
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 8.x.x

Expand All @@ -27,7 +27,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/Bundle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="vite/client" />
import { z } from 'zod'
import { Id, traitId } from './Id.js'
import { Property, propertySchema } from './Property.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "ISC",
"type": "module",
"scripts": {
"build": "vite build",
"build": "vite build --logLevel warn",
"cy:open": "cypress open",
"cy:run": "cypress run",
"dev": "vite",
Expand Down
8 changes: 8 additions & 0 deletions packages/viewer/public/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
color: #fff;
}

.example {
display: block;
box-sizing: border-box;
color: #212529;
font-family: SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
font-size: 14px;
margin: 0 0 1rem;
}
.example:hover {
cursor: pointer;
text-decoration: underline;
Expand Down
10 changes: 7 additions & 3 deletions packages/viewer/src/components/Search/Examples.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@
{#each examples as { label, search } (label)}
<article>
<h5>{label}</h5>
<pre
class="example"
<!-- TODO: we shouldn't need an on:click here -->
<a
href={`?q=${encodeURIComponent(search)}`}
on:click={() => select(search)}
on:keydown={() => select(search)}>{search}</pre>
class="example"
>
{search}
</a>
</article>
{/each}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@

<ul class="list-group suggestions">
{#each suggestions as property, i (property.id)}
<li
class="list-group-item {i === selected ? 'active' : ''}"
on:mouseover={() => onHover(i)}
on:focus={() => onHover(i)}
on:click={() => onClick(i)}
on:keydown={() => onClick(i)}
>
<Typeset body={property.name} />
<li class="list-group-item {i === selected ? 'active' : ''}">
<div
role="button"
tabindex={i}
on:mouseover={() => onHover(i)}
on:focus={() => onHover(i)}
on:click={() => onClick(i)}
on:keydown={() => onClick(i)}
>
<Typeset body={property.name} />
</div>
</li>
{/each}
</ul>
2 changes: 1 addition & 1 deletion packages/viewer/src/components/Shared/Link/Property.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Typeset } from '@/components/Shared'
import Typeset from '@/components/Shared/Typeset.svelte'
import { Id } from '@/models'
export let property: { id: number; name: string }
Expand Down
2 changes: 1 addition & 1 deletion packages/viewer/src/components/Shared/Link/Space.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import Typeset from '../Typeset.svelte'
import Typeset from '@/components/Shared/Typeset.svelte'
import { Id } from '@/models'
export let space: { id: number; name: string }
Expand Down
6 changes: 0 additions & 6 deletions packages/viewer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@
"public/*"
],
"compilerOptions": {
"baseUrl": ".",
"forceConsistentCasingInFileNames": true,
"paths": {
"@/*": ["./src/*"],
"$lib": ["./src/lib"],
"$lib/*": ["./src/lib/*"],
},
"sourceMap": true,
"strict": true,
"types": [
Expand Down

0 comments on commit 500c7ef

Please sign in to comment.