diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 515a36ea2..597ad4d3a 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01f33dfbf..98aa0b9c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: @@ -69,7 +69,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: @@ -97,7 +97,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: @@ -133,10 +133,10 @@ jobs: name: 🖥️ Browser tests runs-on: ubuntu-24.04-arm container: - image: mcr.microsoft.com/playwright:v1.58.0-noble + image: mcr.microsoft.com/playwright:v1.58.2-noble steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: @@ -166,7 +166,7 @@ jobs: mode: [dark, light] steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: @@ -194,7 +194,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: @@ -219,7 +219,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: diff --git a/.github/workflows/lunaria.yml b/.github/workflows/lunaria.yml index 9200079e1..0ecb5af4f 100644 --- a/.github/workflows/lunaria.yml +++ b/.github/workflows/lunaria.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: # Necessary for Lunaria to work properly # Makes the action clone the entire git history diff --git a/.github/workflows/mirror-tangled.yml b/.github/workflows/mirror-tangled.yml index 83458f90d..8759487d0 100644 --- a/.github/workflows/mirror-tangled.yml +++ b/.github/workflows/mirror-tangled.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-24.04-arm steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 diff --git a/.github/workflows/provenance.yml b/.github/workflows/provenance.yml index 14fd9b758..87e04ff97 100644 --- a/.github/workflows/provenance.yml +++ b/.github/workflows/provenance.yml @@ -23,7 +23,7 @@ jobs: name: 🔒 Check provenance downgrades runs-on: ubuntu-slim steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 diff --git a/.github/workflows/semantic-pull-requests.yml b/.github/workflows/semantic-pull-requests.yml index baeb4b45f..0099e10c3 100644 --- a/.github/workflows/semantic-pull-requests.yml +++ b/.github/workflows/semantic-pull-requests.yml @@ -34,5 +34,10 @@ jobs: The subject "{subject}" found in the pull request title "{title}" didn't match the configured pattern. Please ensure that the subject doesn't start with an uppercase character. + + Examples: + ✅ chore(ui): fix button spacing + ✅ docs: update README + ❌ chore(ui): Fix button spacing env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e0c605e40..26cd89c51 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,6 +31,7 @@ This focus helps guide our project decisions as a community and what we choose t - [Setup](#setup) - [Development workflow](#development-workflow) - [Available commands](#available-commands) + - [Clearing caches during development](#clearing-caches-during-development) - [Project structure](#project-structure) - [Local connector CLI](#local-connector-cli) - [Mock connector (for local development)](#mock-connector-for-local-development) @@ -124,6 +125,34 @@ pnpm test:a11y # Lighthouse accessibility audits pnpm test:perf # Lighthouse performance audits (CLS) ``` +### Clearing caches during development + +Nitro persists `defineCachedEventHandler` results to disk at `.nuxt/cache/nitro/`. This cache **survives dev server restarts**. If you're iterating on a cached API route and want fresh results, delete the relevant cache directory: + +```bash +# Clear all Nitro handler caches +rm -rf .nuxt/cache/nitro/handlers/ + +# Clear a specific handler cache (e.g. picks) +rm -rf .nuxt/cache/nitro/handlers/npmx-picks/ +``` + +Alternatively, you can bypass the cache entirely in development by adding `shouldBypassCache: () => import.meta.dev` to your `defineCachedEventHandler` options: + +```ts +export default defineCachedEventHandler( + async event => { + // ... + }, + { + maxAge: 60 * 5, + shouldBypassCache: () => import.meta.dev, + }, +) +``` + +The `.cache/` directory is a separate storage mount used for fetch-cache and atproto data. + ### Project structure ``` @@ -289,18 +318,6 @@ import { hasProtocol } from 'ufo' | Constants | SCREAMING_SNAKE_CASE | `NPM_REGISTRY`, `ALLOWED_TAGS` | | Types/Interfaces | PascalCase | `NpmSearchResponse` | -> [!TIP] -> Exports in `app/composables/`, `app/utils/`, and `server/utils/` are auto-imported by Nuxt. To prevent [knip](https://knip.dev/) from flagging them as unused, add a `@public` JSDoc annotation: -> -> ```typescript -> /** -> * @public -> */ -> export function myAutoImportedFunction() { -> // ... -> } -> ``` - ### Vue components - Use Composition API with ` + diff --git a/app/components/About/LogoList.vue b/app/components/About/LogoList.vue new file mode 100644 index 000000000..c6da68bc4 --- /dev/null +++ b/app/components/About/LogoList.vue @@ -0,0 +1,79 @@ + + + diff --git a/app/components/Button/Group.vue b/app/components/Button/Group.vue index f84d8653d..71f280f02 100644 --- a/app/components/Button/Group.vue +++ b/app/components/Button/Group.vue @@ -7,7 +7,7 @@ const props = defineProps<{ diff --git a/app/components/ScrollToTop.client.vue b/app/components/ScrollToTop.client.vue index e1e70ec5f..f09c13f2d 100644 --- a/app/components/ScrollToTop.client.vue +++ b/app/components/ScrollToTop.client.vue @@ -3,42 +3,32 @@ const route = useRoute() // Pages where scroll-to-top should NOT be shown const excludedRoutes = new Set(['index', 'code']) +const isPackagePage = computed(() => route.name === 'package' || route.name === 'package-version') -const isActive = computed(() => !excludedRoutes.has(route.name as string)) +const isActive = computed(() => !excludedRoutes.has(route.name as string) && !isPackagePage.value) const isMounted = useMounted() -const isVisible = shallowRef(false) -const scrollThreshold = 300 +const { scrollToTop, isTouchDeviceClient } = useScrollToTop() + +const { y: scrollTop } = useScroll(window) +const isVisible = computed(() => { + if (supportsScrollStateQueries.value) return false + return scrollTop.value > SCROLL_TO_TOP_THRESHOLD +}) const { isSupported: supportsScrollStateQueries } = useCssSupports( 'container-type', 'scroll-state', { ssrValue: false }, ) - -function onScroll() { - if (!supportsScrollStateQueries.value) { - return - } - isVisible.value = window.scrollY > scrollThreshold -} - -function scrollToTop() { - window.scrollTo({ top: 0, behavior: 'smooth' }) -} - -useEventListener('scroll', onScroll, { passive: true }) - -onMounted(() => { - onScroll() -}) +const shouldShowButton = computed(() => isActive.value && isTouchDeviceClient.value)