Skip to content

Commit 5457d9c

Browse files
authored
Merge branch 'main' into feat/resolve-40
2 parents caeaebd + 67b1322 commit 5457d9c

97 files changed

Lines changed: 8199 additions & 4185 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#secure password, can use openssl rand -hex 32
1+
# secure password, can use `openssl rand -hex 32`
22
NUXT_SESSION_PASSWORD=""
33

4-
#HMAC secret for image proxy URL signing, can use openssl rand -hex 32
5-
NUXT_IMAGE_PROXY_SECRET=""
4+
# HMAC secret for image-proxy and OG image URL signing, can use `openssl rand -hex 32`
5+
NUXT_IMAGE_PROXY_SECRET=""

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ jobs:
114114
steps:
115115
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
116116

117+
- name: 👑 Fix Git ownership
118+
run: git config --global --add safe.directory /__w/npmx.dev/npmx.dev
119+
117120
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1
118121
with:
119122
node-version: lts/*

.github/workflows/dependency-diff.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ jobs:
3535
with:
3636
mode: artifact
3737
detect-replacements: 'true'
38-
duplicate-threshold: '4'
38+
# Too noisy. Disabling until this can report on duplicate CHANGES in this PR.
39+
duplicate-threshold: '999'
3940
dependency-threshold: '15'
4041
size-threshold: '200000'
4142

.github/workflows/stale.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Stale Issues and PRs
2+
3+
on:
4+
schedule:
5+
# Run daily at 2 AM UTC
6+
- cron: '0 2 * * *'
7+
workflow_dispatch: # Allow manual trigger
8+
9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
13+
jobs:
14+
stale-bugs:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f
18+
with:
19+
days-before-issue-stale: 30
20+
days-before-issue-close: 7
21+
days-before-pr-stale: -1
22+
days-before-pr-close: -1
23+
remove-stale-when-updated: true
24+
only-issue-types: 'bug'
25+
stale-issue-label: 'stale'
26+
close-issue-label: 'stale'
27+
operations-per-run: 500
28+
29+
stale-prs:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f
33+
with:
34+
days-before-issue-stale: -1
35+
days-before-issue-close: -1
36+
days-before-pr-stale: 30
37+
days-before-pr-close: 7
38+
remove-stale-when-updated: true
39+
stale-pr-label: 'stale'
40+
close-pr-label: 'stale'
41+
operations-per-run: 500

.nuxtrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
setups.@nuxt/test-utils="4.0.0"
1+
setups.@nuxt/test-utils="4.0.2"

.storybook/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import npmxDark from './theme'
1111
initialize()
1212

1313
// @ts-expect-error - dynamic global name
14-
globalThis.defineOgImageComponent = fn()
14+
globalThis.defineOgImage = fn()
1515

1616
// Subscribe to locale changes from storybook-i18n addon (once, outside decorator)
1717
let currentI18nInstance: any = null

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ Ideally, extract utilities into separate files so they can be unit tested. 🙏
348348

349349
### Internal linking
350350

351-
Always use **object syntax with named routes** for internal navigation. This makes links resilient to URL structure changes and provides type safety via `unplugin-vue-router`.
351+
Always use **object syntax with named routes** for internal navigation. This makes links resilient to URL structure changes and provides type safety with the [typedPages Nuxt option](https://nuxt.com/docs/4.x/guide/going-further/experimental-features#typedpages).
352352

353353
```vue
354354
<!-- Good: named route -->

app/app.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ if (import.meta.client) {
127127
useEventListener(document, 'click', handleModalLightDismiss)
128128
}
129129
}
130+
131+
// title and description will be inferred
132+
// this will be overridden by upstream pages that use different templates
133+
defineOgImage('Page.takumi', {}, { alt: 'npmx — a fast, modern browser for the npm registry' })
130134
</script>
131135

132136
<template>

app/components/Chart/SplitSparkline.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ const props = defineProps<{
3131
3232
const { locale } = useI18n()
3333
const colorMode = useColorMode()
34-
const numberFormatter = useNumberFormatter({
35-
maximumFractionDigits: 0,
36-
})
34+
const numberFormatter = useNumberFormatter()
3735
const resolvedMode = shallowRef<'light' | 'dark'>('light')
3836
const rootEl = shallowRef<HTMLElement | null>(null)
3937
const palette = getPalette('')

app/components/OgBrand.vue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<script setup lang="ts">
2+
const props = withDefaults(
3+
defineProps<{
4+
height?: number
5+
}>(),
6+
{
7+
height: 60,
8+
},
9+
)
10+
11+
const width = computed(() => Math.round(props.height * (602 / 170)))
12+
</script>
13+
14+
<template>
15+
<img
16+
src="/logo.svg"
17+
alt="npmx"
18+
:width="width"
19+
:height="height"
20+
:style="{ width: `${width}px`, height: `${height}px` }"
21+
/>
22+
</template>

0 commit comments

Comments
 (0)