Skip to content

Commit 68956c0

Browse files
committed
Merge remote-tracking branch 'origin/main' into serhalp/cmdk-palette
2 parents 8e868d4 + 8d9fa5c commit 68956c0

File tree

15 files changed

+594
-90
lines changed

15 files changed

+594
-90
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ jobs:
111111
run: pnpm vp test --project nuxt --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
112112

113113
- name: ⬆︎ Upload coverage reports to Codecov
114-
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
114+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
115115
with:
116116
report_type: test_results
117117
env:
118118
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
119119

120120
- name: ⬆︎ Upload coverage reports to Codecov
121-
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
121+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
122122
env:
123123
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
124124

CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pnpm npmx-connector # Start the real connector (requires npm login)
120120
pnpm mock-connector # Start the mock connector (no npm login needed)
121121

122122
# Code Quality
123-
pnpm lint # Run linter (oxlint + oxfmt)
123+
pnpm vp run lint # Run linter (oxlint + oxfmt)
124124
pnpm lint:fix # Auto-fix lint issues
125125
pnpm test:types # TypeScript type checking
126126

@@ -469,13 +469,13 @@ npmx.dev uses [@nuxtjs/i18n](https://i18n.nuxtjs.org/) for internationalization.
469469

470470
The following scripts help manage translation files. `en.json` is the reference locale.
471471

472-
| Command | Description |
473-
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
474-
| `pnpm i18n:check [locale]` | Compares `en.json` with other locale files. Shows missing and extra keys. Optionally filter output by locale (e.g. `pnpm i18n:check ja-JP`). |
475-
| `pnpm i18n:check:fix [locale]` | Same as check, but adds missing keys to other locales with English placeholders. |
476-
| `pnpm i18n:report` | Audits translation keys against code usage in `.vue` and `.ts` files. Reports missing keys (used in code but not in locale), unused keys (in locale but not in code), and dynamic keys. |
477-
| `pnpm i18n:report:fix` | Removes unused keys from `en.json` and all other locale files. |
478-
| `pnpm i18n:schema` | Generates a JSON Schema from `en.json` at `i18n/schema.json`. Locale files reference this schema for IDE validation and autocompletion. |
472+
| Command | Description |
473+
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
474+
| `pnpm i18n:check:fix [locale]` | Compares `en.json` with other locale files and adds missing keys with English placeholders. Optionally filter output by locale (e.g. `pnpm i18n:check:fix ja-JP`). |
475+
| `pnpm i18n:report:fix` | Removes unused keys from `en.json` and all other locale files. |
476+
| `pnpm vp run i18n:check [locale]` | Same as check:fix, but only show missing and extra keys. |
477+
| `pnpm vp run i18n:report` | Audits translation keys against code usage in `.vue` and `.ts` files. Reports missing keys (used in code but not in locale), unused keys (in locale but not in code), and dynamic keys. |
478+
| `pnpm vp run i18n:schema` | Generates a JSON Schema from `en.json` at `i18n/schema.json`. Locale files reference this schema for IDE validation and autocompletion. |
479479

480480
### Adding a new locale
481481

@@ -511,7 +511,7 @@ Check [Pluralization rule callback](https://vue-i18n.intlify.dev/guide/essential
511511
We track the current progress of translations with [Lunaria](https://lunaria.dev/) on this site: https://i18n.npmx.dev/
512512
If you see any outdated translations in your language, feel free to update the keys to match the English version.
513513

514-
Use `pnpm i18n:check` and `pnpm i18n:check:fix` to verify and fix your locale (see [i18n commands](#i18n-commands) above for details).
514+
Use `pnpm i18n:check:fix` to fix your locale (see [i18n commands](#i18n-commands) above for details).
515515

516516
#### Country variants (advanced)
517517

@@ -599,7 +599,7 @@ See how `es`, `es-ES`, and `es-419` are configured in [config/i18n.ts](./config/
599599
- Use `common.*` for shared strings (loading, retry, close, etc.)
600600
- Use component-specific prefixes: `package.card.*`, `settings.*`, `nav.*`
601601
- Do not use dashes (`-`) in translation keys; always use underscore (`_`): e.g., `privacy_policy` instead of `privacy-policy`
602-
- **Always use static string literals as translation keys.** Our i18n scripts (`pnpm i18n:report`) rely on static analysis to detect unused and missing keys. Dynamic keys cannot be analyzed and will be flagged as errors.
602+
- **Always use static string literals as translation keys.** Our i18n scripts (`pnpm i18n:report:fix`) rely on static analysis to detect unused and missing keys. Dynamic keys cannot be analyzed and will be flagged as errors.
603603

604604
**Bad:**
605605

app/components/Compare/FacetBarChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const config = computed<VueUiHorizontalBarConfig>(() => {
131131
csv: false,
132132
altCopy: true,
133133
},
134-
buttonTitle: {
134+
buttonTitles: {
135135
img: $t('package.trends.download_file', { fileType: 'PNG' }),
136136
svg: $t('package.trends.download_file', { fileType: 'SVG' }),
137137
altCopy: $t('package.trends.copy_alt.button_label'),

app/components/LandingLogo.vue

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<script setup lang="ts">
2+
defineProps<{
3+
class?: string
4+
}>()
5+
6+
const { env } = useAppConfig().buildInfo
7+
8+
onPrehydrate(el => {
9+
const isKawaii = new URLSearchParams(window.location.search).has('kawaii')
10+
const date = new Intl.DateTimeFormat('en-US', {
11+
timeZone: 'America/Los_Angeles',
12+
month: '2-digit',
13+
day: '2-digit',
14+
}).format(new Date())
15+
const isTKawaii = date === '03/31'
16+
17+
if (!isKawaii && !isTKawaii) return
18+
19+
const normalLogo = el.querySelector<HTMLElement>('#npmx-index-h1-logo-normal')
20+
const kawaiiLogo = el.querySelector<HTMLElement>('#npmx-index-h1-logo-kawaii')
21+
const tkawaiiLogo = el.querySelector<HTMLElement>('#npmx-index-h1-logo-tkawaii')
22+
const logoEnv = el.querySelector<HTMLElement>('#npmx-index-h1-logo-env')
23+
const logoTagline = el.querySelector<HTMLElement>('#npmx-index-tagline')
24+
25+
if (!normalLogo || !kawaiiLogo || !tkawaiiLogo || !logoEnv || !logoTagline) return
26+
27+
if (isTKawaii) {
28+
tkawaiiLogo.style.display = 'block'
29+
} else {
30+
kawaiiLogo.style.display = 'block'
31+
}
32+
normalLogo.style.display = 'none'
33+
logoEnv.style.display = 'none'
34+
logoTagline.style.display = 'none'
35+
})
36+
</script>
37+
38+
<template>
39+
<div class="flex flex-col items-center justify-center">
40+
<h1
41+
dir="ltr"
42+
class="relative flex items-center justify-center gap-2 header-logo font-mono text-5xl sm:text-7xl md:text-8xl font-medium tracking-tight mb-6 motion-safe:animate-fade-in motion-safe:animate-fill-both"
43+
>
44+
<img
45+
id="npmx-index-h1-logo-kawaii"
46+
width="400"
47+
class="hidden mb-8 motion-safe:animate-fade-in motion-safe:animate-scale-in motion-safe:hover:scale-105 motion-safe:transition w-80 sm:w-100"
48+
src="/extra/npmx-cute.svg"
49+
:alt="$t('alt_logo_kawaii')"
50+
:class="class"
51+
/>
52+
<img
53+
id="npmx-index-h1-logo-tkawaii"
54+
width="400"
55+
class="hidden mb-8 motion-safe:animate-fade-in motion-safe:animate-scale-in motion-safe:hover:scale-105 motion-safe:transition w-80 sm:w-100"
56+
src="/extra/npmx-cute-transgender.svg"
57+
:alt="$t('alt_logo_kawaii')"
58+
:class="class"
59+
/>
60+
<AppLogo id="npmx-index-h1-logo-normal" :class="class" />
61+
<span
62+
id="npmx-index-h1-logo-env"
63+
aria-hidden="true"
64+
class="text-sm sm:text-base md:text-lg transform-origin-br font-mono tracking-widest text-accent absolute -bottom-4 -inset-ie-1.5"
65+
>
66+
{{ env === 'release' ? 'alpha' : env }}
67+
</span>
68+
</h1>
69+
<p
70+
id="npmx-index-tagline"
71+
class="text-fg-muted text-lg sm:text-xl max-w-xl mb-12 lg:mb-14 motion-safe:animate-slide-up motion-safe:animate-fill-both delay-100"
72+
>
73+
{{ $t('tagline') }}
74+
</p>
75+
</div>
76+
</template>

app/pages/index.vue

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ async function search() {
88
startSearch()
99
}
1010
11-
const { env } = useAppConfig().buildInfo
12-
1311
useSeoMeta({
1412
title: () => $t('seo.home.title'),
1513
ogTitle: () => $t('seo.home.title'),
@@ -32,25 +30,7 @@ defineOgImageComponent('Default', {
3230
<header
3331
class="flex-1 flex flex-col items-center justify-center text-center pt-20 pb-4 md:pb-8 lg:pb-20"
3432
>
35-
<h1
36-
dir="ltr"
37-
class="relative flex items-center justify-center gap-2 header-logo font-mono text-5xl sm:text-7xl md:text-8xl font-medium tracking-tight mb-6 motion-safe:animate-fade-in motion-safe:animate-fill-both"
38-
>
39-
<AppLogo class="w-42 h-auto sm:w-58 md:w-70" />
40-
<span
41-
aria-hidden="true"
42-
class="text-sm sm:text-base md:text-lg transform-origin-br font-mono tracking-widest text-accent absolute -bottom-4 -inset-ie-1.5"
43-
>
44-
{{ env === 'release' ? 'alpha' : env }}
45-
</span>
46-
</h1>
47-
48-
<p
49-
class="text-fg-muted text-lg sm:text-xl max-w-xl mb-12 lg:mb-14 motion-safe:animate-slide-up motion-safe:animate-fill-both"
50-
style="animation-delay: 0.1s"
51-
>
52-
{{ $t('tagline') }}
53-
</p>
33+
<LandingLogo class="w-42 h-auto sm:w-58 md:w-70" />
5434
<search
5535
class="w-full max-w-2xl motion-safe:animate-slide-up motion-safe:animate-fill-both"
5636
style="animation-delay: 0.2s"

i18n/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1632,5 +1632,6 @@
16321632
"message": "Accessibility matters to us, and we would love you to follow us in this vision. When using mentioned media, ensure there is enough contrast against the background, and don't go smaller than 24px. If you need any other resources or additional information about the project, feel free to reach us at {link}.",
16331633
"discord_link_text": "chat.npmx.dev"
16341634
}
1635-
}
1635+
},
1636+
"alt_logo_kawaii": "A cute, rounded, and colorful version of the npmx logo."
16361637
}

0 commit comments

Comments
 (0)