diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 8c62cd4eaa..d4df4beaa9 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -20,26 +20,21 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm - - - name: ๐ฆ Install dependencies - run: pnpm install + cache: true - name: ๐จ Check for non-RTL/non-a11y CSS classes - run: pnpm vp run lint:css + run: vp run lint:css - name: ๐ Compare translations - run: pnpm vp run i18n:check + run: vp run i18n:check - name: ๐ Update lunaria data - run: pnpm vp run build:lunaria + run: vp run build:lunaria - name: ๐ Fix lint errors - run: pnpm vp run lint:fix + run: vp run lint:fix - uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # 635ffb0c9798bd160680f18fd73371e355b85f27 diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 0a4860dc5f..df3a3ea8b0 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -26,15 +26,13 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} ref: ${{ github.event.pull_request.head.sha || github.sha }} - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* + cache: true - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm - - - name: ๐ฆ Install dependencies - run: pnpm install + - name: ๐ง Install pnpm globally + run: vp install -g pnpm - name: ๐งช Run Chromatic Visual and Accessibility Tests uses: chromaui/action@f191a0224b10e1a38b2091cefb7b7a2337009116 # v16.0.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b26e2a37b3..654a07fc0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,18 +28,16 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm + run-install: false - name: ๐ฆ Install dependencies (root only, no scripts) - run: pnpm install --filter . --ignore-scripts + run: vp install --filter . --ignore-scripts - name: ๐ Lint project - run: pnpm vp run lint + run: vp run lint types: name: ๐ช Type check @@ -48,18 +46,13 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm - - - name: ๐ฆ Install dependencies - run: pnpm install + cache: true - name: ๐ช Type check - run: pnpm vp run test:types + run: vp run test:types unit: name: ๐งช Unit tests @@ -68,18 +61,13 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm - - - name: ๐ฆ Install dependencies - run: pnpm install + cache: true - name: ๐งช Unit tests - run: pnpm vp test --project unit --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml + run: vp test --project unit --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml - name: โฌ๏ธ Upload test results to Codecov if: ${{ !cancelled() }} @@ -94,21 +82,16 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm - - - name: ๐ฆ Install dependencies - run: pnpm install + cache: true - name: ๐ Install browser - run: pnpm vp exec playwright install chromium-headless-shell + run: vp exec playwright install chromium-headless-shell - name: ๐งช Component tests - run: pnpm vp test --project nuxt --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml + run: vp test --project nuxt --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml - name: โฌ๏ธ Upload coverage reports to Codecov uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6 @@ -131,23 +114,18 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm - - - name: ๐ฆ Install dependencies - run: pnpm install + cache: true - name: ๐๏ธ Build project - run: pnpm vp run build:test + run: vp run build:test env: VALIDATE_HTML: true - name: ๐ฅ๏ธ Test project (browser) - run: pnpm vp run test:browser:prebuilt + run: vp run test:browser:prebuilt a11y: name: โฟ Accessibility audit @@ -159,21 +137,16 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm - - - name: ๐ฆ Install dependencies - run: pnpm install + cache: true - name: ๐๏ธ Build project - run: pnpm vp run build:test + run: vp run build:test - name: โฟ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode) - run: pnpm vp run test:a11y:prebuilt + run: vp run test:a11y:prebuilt env: LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }} @@ -185,18 +158,13 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm - - - name: ๐ฆ Install dependencies - run: pnpm install + cache: true - name: ๐งน Check for unused code - run: pnpm vp run knip + run: vp run knip i18n: name: ๐ i18n validation @@ -205,20 +173,18 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm + run-install: false - name: ๐ฆ Install dependencies (root only, no scripts) - run: pnpm install --filter . --ignore-scripts + run: vp install --filter . --ignore-scripts - name: ๐ Check for missing or dynamic i18n keys - run: pnpm vp run i18n:report + run: vp run i18n:report - name: ๐ Check i18n schema is up to date run: | - pnpm vp run i18n:schema + vp run i18n:schema git diff --exit-code i18n/schema.json diff --git a/.github/workflows/lunaria.yml b/.github/workflows/lunaria.yml index b2bc818360..51f83389d0 100644 --- a/.github/workflows/lunaria.yml +++ b/.github/workflows/lunaria.yml @@ -28,15 +28,10 @@ jobs: # Makes the action clone the entire git history fetch-depth: 0 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm - - - name: ๐ฆ Install dependencies - run: pnpm install + cache: true - name: Generate Lunaria Overview uses: lunariajs/action@4911ad0736d1e3b20af4cb70f5079aea2327ed8e # v1-prerelease diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index fc244db18e..6ab11c41d8 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -20,9 +20,10 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* + run-install: false - name: ๐ Check for unreleased commits id: check diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index 331540e6d9..659042c5ab 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -23,9 +23,10 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* + run-install: false - name: ๐ข Determine next version id: version @@ -58,13 +59,9 @@ jobs: git tag -a "$VERSION" -m "Release $VERSION" git push origin "$VERSION" - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - if: steps.check.outputs.skip == 'false' - name: ๐ง Install pnpm - - name: ๐ฆ Install dependencies if: steps.check.outputs.skip == 'false' - run: pnpm vp install --filter . --ignore-scripts + run: vp install --filter . --ignore-scripts - name: ๐ Generate release notes if: steps.check.outputs.skip == 'false' @@ -98,18 +95,14 @@ jobs: with: ref: release - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + - uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1 with: node-version: lts/* registry-url: https://registry.npmjs.org - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c - name: ๐ง Install pnpm - with: - cache: false + run-install: false - name: ๐ฆ Install dependencies - run: pnpm install --filter npmx-connector... + run: vp install --filter npmx-connector... - name: ๐ข Set connector version env: @@ -122,7 +115,7 @@ jobs: echo "Publishing npmx-connector@${PKG_VERSION}" - name: ๐๏ธ Build connector - run: pnpm --filter npmx-connector build + run: vp run --filter npmx-connector build - name: ๐ค Publish to npm with provenance # Uses OIDC trusted publishing โ no NPM_TOKEN needed. diff --git a/.storybook/decorators.ts b/.storybook/decorators.ts new file mode 100644 index 0000000000..270cdec3a5 --- /dev/null +++ b/.storybook/decorators.ts @@ -0,0 +1,20 @@ +import AppFooter from '~/components/AppFooter.vue' +import AppHeader from '~/components/AppHeader.vue' + +/** + * Wraps a page story with the standard site chrome: AppHeader, main content + * area, and AppFooter. Use this for any full-page story so the layout stays + * consistent and changes only need to be made in one place. + */ +export const pageDecorator = () => ({ + components: { AppHeader, AppFooter }, + template: ` +
+ {{ + $t('shortcuts.command_palette_description', { ctrlKey: $t('shortcuts.ctrl_key') }) + }} +
{{ $t('shortcuts.section.global') }}
+ {{ announcement }} +
+ + ++ {{ $t('command_palette.instructions') }} +
++ {{ statusMessage }} +
+ ++ {{ $t('command_palette.empty') }} +
++ {{ $t('command_palette.empty_search_hint', { query: trimmedQuery }) }} +
+