Skip to content

Commit fd73473

Browse files
authored
chore: release v0.7.0 (#2299)
2 parents 36311e0 + f4061b3 commit fd73473

36 files changed

+1765
-142
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

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const config = {
99
'storybook-i18n',
1010
],
1111
framework: '@storybook-vue/nuxt',
12-
staticDirs: ['./.public'],
12+
staticDirs: ['./.public', { from: '../public', to: '/' }],
1313
features: {
1414
backgrounds: false,
1515
},

.storybook/preview-head.html

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,61 @@
11
<style>
2+
/* Load Geist fonts to match the production app (normally handled by @nuxt/fonts,
3+
which is disabled in Storybook at this time) */
4+
@font-face {
5+
font-family: 'Geist';
6+
font-weight: 400;
7+
font-style: normal;
8+
font-display: swap;
9+
src: url('/fonts/Geist-Regular.ttf') format('truetype');
10+
}
11+
@font-face {
12+
font-family: 'Geist';
13+
font-weight: 500;
14+
font-style: normal;
15+
font-display: swap;
16+
src: url('/fonts/Geist-Medium.ttf') format('truetype');
17+
}
18+
@font-face {
19+
font-family: 'Geist';
20+
font-weight: 600;
21+
font-style: normal;
22+
font-display: swap;
23+
src: url('/fonts/Geist-SemiBold.ttf') format('truetype');
24+
}
25+
@font-face {
26+
font-family: 'Geist';
27+
font-weight: 700;
28+
font-style: normal;
29+
font-display: swap;
30+
src: url('/fonts/Geist-Bold.ttf') format('truetype');
31+
}
32+
@font-face {
33+
font-family: 'Geist Mono';
34+
font-weight: 400;
35+
font-style: normal;
36+
font-display: swap;
37+
src: url('/fonts/GeistMono-Regular.ttf') format('truetype');
38+
}
39+
@font-face {
40+
font-family: 'Geist Mono';
41+
font-weight: 500;
42+
font-style: normal;
43+
font-display: swap;
44+
src: url('/fonts/GeistMono-Medium.ttf') format('truetype');
45+
}
46+
@font-face {
47+
font-family: 'Geist Mono';
48+
font-weight: 700;
49+
font-style: normal;
50+
font-display: swap;
51+
src: url('/fonts/GeistMono-Bold.ttf') format('truetype');
52+
}
53+
html {
54+
-webkit-font-smoothing: antialiased;
55+
-moz-osx-font-smoothing: grayscale;
56+
text-rendering: optimizeLegibility;
57+
}
58+
259
/* Override docs story canvas background to match npmx theme */
360
.docs-story {
461
background-color: var(--bg, oklch(0.171 0 0)) !important;

CONTRIBUTING.md

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

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

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

461461
The following scripts help manage translation files. `en.json` is the reference locale.
462462

463-
| Command | Description |
464-
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
465-
| `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`). |
466-
| `pnpm i18n:check:fix [locale]` | Same as check, but adds missing keys to other locales with English placeholders. |
467-
| `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. |
468-
| `pnpm i18n:report:fix` | Removes unused keys from `en.json` and all other locale files. |
469-
| `pnpm i18n:schema` | Generates a JSON Schema from `en.json` at `i18n/schema.json`. Locale files reference this schema for IDE validation and autocompletion. |
463+
| Command | Description |
464+
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
465+
| `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`). |
466+
| `pnpm i18n:report:fix` | Removes unused keys from `en.json` and all other locale files. |
467+
| `pnpm vp run i18n:check [locale]` | Same as check:fix, but only show missing and extra keys. |
468+
| `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. |
469+
| `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. |
470470

471471
### Adding a new locale
472472

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

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

507507
#### Country variants (advanced)
508508

@@ -590,7 +590,7 @@ See how `es`, `es-ES`, and `es-419` are configured in [config/i18n.ts](./config/
590590
- Use `common.*` for shared strings (loading, retry, close, etc.)
591591
- Use component-specific prefixes: `package.card.*`, `settings.*`, `nav.*`
592592
- Do not use dashes (`-`) in translation keys; always use underscore (`_`): e.g., `privacy_policy` instead of `privacy-policy`
593-
- **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.
593+
- **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.
594594

595595
**Bad:**
596596

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ npmx.dev supports npm permalinks &ndash; just replace `npmjs.com` with `npmx.dev
114114
| `npmjs.com/org/nuxt` | [`npmx.dev/org/nuxt`](https://npmx.dev/org/nuxt) |
115115

116116
> [!TIP]
117-
> Want automatic redirects? Try the [npmx-replace browser extension](https://github.com/tylersayshi/npmx-replace-extension) (Chrome only for now) or the separate [npmx-redirect extension](https://github.com/iaverages/npmx-redirect) for [Chrome](https://chromewebstore.google.com/detail/lbhjgfgpnlihfmobnohoipeljollhlnb) / [Firefox](https://addons.mozilla.org/en-GB/firefox/addon/npmx-redirect/).
117+
> Want automatic redirects? Try the [npmx-redirect extension](https://github.com/iaverages/npmx-redirect) for [Chrome](https://chromewebstore.google.com/detail/lbhjgfgpnlihfmobnohoipeljollhlnb) / [Firefox](https://addons.mozilla.org/en-GB/firefox/addon/npmx-redirect/).
118118
119119
#### Not yet supported
120120

@@ -148,7 +148,7 @@ We welcome contributions &ndash; please do feel free to explore the project and
148148

149149
## Related projects
150150

151-
- [npmx-replace-extension](https://github.com/tylersayshi/npmx-replace-extension) &ndash; Browser extension to redirect npmjs.com to npmx.dev (Chrome only for now)
151+
- [npmx-redirect](https://github.com/iaverages/npmx-redirect) &ndash; Browser extension that automatically redirects npmjs.com URLs to npmx.dev.
152152
- [JSR](https://jsr.io/) &ndash; The open-source package registry for modern JavaScript and TypeScript
153153
- [npm-userscript](https://github.com/bluwy/npm-userscript) &ndash; Browser userscript with various improvements and fixes for npmjs.com
154154
- [npm-alt](https://npm.willow.sh/) &ndash; An alternative npm package browser
@@ -158,7 +158,6 @@ We welcome contributions &ndash; please do feel free to explore the project and
158158
- [nxjt](https://nxjt.netlify.app) &ndash; npmx Jump To: Quickly navigate to npmx common webpages.
159159
- [npmx-weekly](https://npmx-weekly.trueberryless.org/) &ndash; A weekly newsletter for the npmx ecosystem. Add your own content via suggestions in the weekly PR on [GitHub](https://github.com/trueberryless-org/npmx-weekly/pulls?q=is%3Aopen+is%3Apr+label%3A%22%F0%9F%95%94+weekly+post%22).
160160
- [npmx-digest](https://npmx-digest.trueberryless.org/) &ndash; An automated news aggregation website that summarizes npmx activity from GitHub and Bluesky every 8 hours.
161-
- [npmx-redirect](https://github.com/iaverages/npmx-redirect) &ndash; Browser extension that automatically redirects npmjs.com URLs to npmx.dev.
162161
- [npmx-badge](https://npmx-badge.vercel.app/) &ndash; A playground to help you create custom badges quickly.
163162

164163
If you're building something cool, let us know! 🙏

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 isAprilFirst = date === '04/01'
16+
17+
if (!isKawaii && !isAprilFirst) 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 (isAprilFirst) {
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/composables/useRepoMeta.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ProviderId, RepoRef } from '#shared/utils/git-providers'
2-
import { parseRepoUrl, GITLAB_HOSTS } from '#shared/utils/git-providers'
2+
import { GIT_PROVIDER_API_ORIGINS, parseRepoUrl, GITLAB_HOSTS } from '#shared/utils/git-providers'
33

44
// TTL for git repo metadata (10 minutes - repo stats don't change frequently)
55
const REPO_META_TTL = 60 * 10
@@ -134,7 +134,7 @@ const githubAdapter: ProviderAdapter = {
134134
let res: UnghRepoResponse | null = null
135135
try {
136136
const { data } = await cachedFetch<UnghRepoResponse>(
137-
`https://ungh.cc/repos/${ref.owner}/${ref.repo}`,
137+
`${GIT_PROVIDER_API_ORIGINS.github}/repos/${ref.owner}/${ref.repo}`,
138138
{ headers: { 'User-Agent': 'npmx', ...options.headers }, ...options },
139139
UNGH_REPO_META_TTL,
140140
)
@@ -256,7 +256,7 @@ const bitbucketAdapter: ProviderAdapter = {
256256
let res: BitbucketRepoResponse | null = null
257257
try {
258258
const { data } = await cachedFetch<BitbucketRepoResponse>(
259-
`https://api.bitbucket.org/2.0/repositories/${ref.owner}/${ref.repo}`,
259+
`${GIT_PROVIDER_API_ORIGINS.bitbucket}/2.0/repositories/${ref.owner}/${ref.repo}`,
260260
{ headers: { 'User-Agent': 'npmx', ...options.headers }, ...options },
261261
REPO_META_TTL,
262262
)
@@ -314,7 +314,7 @@ const codebergAdapter: ProviderAdapter = {
314314
let res: GiteaRepoResponse | null = null
315315
try {
316316
const { data } = await cachedFetch<GiteaRepoResponse>(
317-
`https://codeberg.org/api/v1/repos/${ref.owner}/${ref.repo}`,
317+
`${GIT_PROVIDER_API_ORIGINS.codeberg}/api/v1/repos/${ref.owner}/${ref.repo}`,
318318
{ headers: { 'User-Agent': 'npmx', ...options.headers }, ...options },
319319
REPO_META_TTL,
320320
)
@@ -372,7 +372,7 @@ const giteeAdapter: ProviderAdapter = {
372372
let res: GiteeRepoResponse | null = null
373373
try {
374374
const { data } = await cachedFetch<GiteeRepoResponse>(
375-
`https://gitee.com/api/v5/repos/${ref.owner}/${ref.repo}`,
375+
`${GIT_PROVIDER_API_ORIGINS.gitee}/api/v5/repos/${ref.owner}/${ref.repo}`,
376376
{ headers: { 'User-Agent': 'npmx', ...options.headers }, ...options },
377377
REPO_META_TTL,
378378
)
@@ -625,7 +625,7 @@ const radicleAdapter: ProviderAdapter = {
625625
let res: RadicleProjectResponse | null = null
626626
try {
627627
const { data } = await cachedFetch<RadicleProjectResponse>(
628-
`https://seed.radicle.at/api/v1/projects/${ref.repo}`,
628+
`${GIT_PROVIDER_API_ORIGINS.radicle}/api/v1/projects/${ref.repo}`,
629629
{ headers: { 'User-Agent': 'npmx', ...options.headers }, ...options },
630630
REPO_META_TTL,
631631
)

app/pages/accessibility.stories.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import Accessibility from './accessibility.vue'
2+
import type { Meta, StoryObj } from '@storybook-vue/nuxt'
3+
import AppHeader from '~/components/AppHeader.vue'
4+
import AppFooter from '~/components/AppFooter.vue'
5+
6+
const meta = {
7+
component: Accessibility,
8+
parameters: {
9+
layout: 'fullscreen',
10+
},
11+
decorators: [
12+
() => ({
13+
components: { AppHeader, AppFooter },
14+
template: `
15+
<div class="min-h-screen flex flex-col bg-bg text-fg">
16+
<AppHeader :show-logo="true" />
17+
<div id="main-content" class="flex-1 flex flex-col" tabindex="-1">
18+
<story />
19+
</div>
20+
<AppFooter />
21+
</div>
22+
`,
23+
}),
24+
],
25+
} satisfies Meta<typeof Accessibility>
26+
27+
export default meta
28+
type Story = StoryObj<typeof meta>
29+
30+
export const Default: Story = {}

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"

0 commit comments

Comments
 (0)