Skip to content

Commit 3741e09

Browse files
authored
Merge branch 'main' into subgrid
2 parents 1ea3ae9 + 84714f5 commit 3741e09

4 files changed

Lines changed: 21 additions & 9 deletions

File tree

app/pages/index.vue

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ import { debounce } from 'perfect-debounce'
44
const searchQuery = shallowRef('')
55
const searchInputRef = useTemplateRef('searchInputRef')
66
const { focused: isSearchFocused } = useFocus(searchInputRef)
7+
const frameworks = ref([
8+
{ name: 'nuxt', package: 'nuxt' },
9+
{ name: 'vue', package: 'vue' },
10+
{ name: 'react', package: 'react' },
11+
{ name: 'svelte', package: 'svelte' },
12+
{ name: 'vite', package: 'vite' },
13+
{ name: 'next', package: 'next' },
14+
{ name: 'astro', package: 'astro' },
15+
{ name: 'typescript', package: 'typescript' },
16+
{ name: 'Angular', package: '@angular/core' },
17+
])
718
819
async function search() {
920
const query = searchQuery.value.trim()
@@ -114,18 +125,15 @@ defineOgImageComponent('Default', {
114125
style="animation-delay: 0.3s"
115126
>
116127
<ul class="flex flex-wrap items-center justify-center gap-x-6 gap-y-3 list-none m-0 p-0">
117-
<li
118-
v-for="pkg in ['nuxt', 'vue', 'react', 'svelte', 'vite', 'next', 'astro', 'typescript']"
119-
:key="pkg"
120-
>
128+
<li v-for="framework in frameworks" :key="framework.name">
121129
<NuxtLink
122-
:to="{ name: 'package', params: { package: [pkg] } }"
130+
:to="{ name: 'package', params: { package: [framework.package] } }"
123131
class="link-subtle font-mono text-sm inline-flex items-center gap-2 group"
124132
>
125133
<span
126134
class="w-1 h-1 rounded-full bg-accent group-hover:bg-fg transition-colors duration-200"
127135
/>
128-
{{ pkg }}
136+
{{ framework.name }}
129137
</NuxtLink>
130138
</li>
131139
</ul>

nuxt.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ export default defineNuxtConfig({
248248
noUnusedLocals: true,
249249
},
250250
},
251+
sharedTsConfig: {
252+
include: ['../test/unit/shared/**/*.ts'],
253+
},
251254
nodeTsConfig: {
252255
compilerOptions: {
253256
allowImportingTsExtensions: true,

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default defineConfig<ConfigOptions>({
1616
command: 'pnpm start:playwright:webserver',
1717
url: baseURL,
1818
reuseExistingServer: false,
19-
timeout: 120_000,
19+
timeout: 240_000,
2020
},
2121
use: {
2222
baseURL,

test/unit/shared/types/index.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { describe, expect, it } from 'vitest'
2-
import type { NpmPackage, NpmSearchResponse } from '../../../../shared/types'
2+
import type { Packument, NpmSearchResponse } from '../../../../shared/types'
33

44
describe('npm registry types', () => {
55
it('should correctly type a package response', () => {
6-
const pkg: NpmPackage = {
6+
const pkg: Packument = {
77
'_id': 'test-package',
88
'_rev': '1-abc123',
99
'name': 'test-package',
@@ -59,6 +59,7 @@ describe('npm registry types', () => {
5959
],
6060
total: 1,
6161
time: '2024-01-01T00:00:00.000Z',
62+
isStale: false,
6263
}
6364

6465
expect(response.total).toBe(1)

0 commit comments

Comments
 (0)