Skip to content

Commit cfcd5c7

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/org-packages-fancy
2 parents 02794dc + 34e9077 commit cfcd5c7

22 files changed

Lines changed: 1068 additions & 27 deletions

.github/workflows/lunaria.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: lunaria
2+
3+
on:
4+
# Trigger the workflow every time a pull request is opened or synchronized at the target `main` branch
5+
pull_request_target:
6+
types: [opened, synchronize]
7+
8+
# Automatically cancel in-progress actions on the same branch
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
11+
cancel-in-progress: true
12+
13+
# Allow this job to clone the repository and comment on the pull request
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
18+
jobs:
19+
lunaria-overview:
20+
if: false # temporarily disabled
21+
name: Generate Lunaria Overview
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
with:
28+
# Necessary for Lunaria to work properly
29+
# Makes the action clone the entire git history
30+
fetch-depth: 0
31+
32+
- uses: actions/checkout@v6
33+
- run: corepack enable
34+
- uses: actions/setup-node@v6
35+
with:
36+
node-version: lts/*
37+
cache: pnpm
38+
39+
- name: 📦 Install dependencies
40+
run: pnpm install
41+
42+
- name: Generate Lunaria Overview
43+
uses: lunariajs/action@v1-prerelease
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: chore
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
permissions: {}
11+
12+
jobs:
13+
semantic-pr:
14+
permissions:
15+
contents: read
16+
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
17+
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
18+
if: github.repository == 'npmx-dev/npmx.dev'
19+
runs-on: ubuntu-latest
20+
name: semantic-pr
21+
steps:
22+
- name: Validate PR title
23+
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
24+
with:
25+
scopes: |
26+
docs
27+
i18n
28+
deps
29+
subjectPattern: ^(?![A-Z]).+$
30+
subjectPatternError: |
31+
The subject "{subject}" found in the pull request title "{title}"
32+
didn't match the configured pattern. Please ensure that the subject
33+
doesn't start with an uppercase character.
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CONTRIBUTING.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,27 @@ Make sure to read about [Playwright best practices](https://playwright.dev/docs/
365365
4. ensure CI checks pass (lint, type check, tests)
366366
5. request review from maintainers
367367

368-
### Commit messages
368+
### Commit messages and PR titles
369369

370-
Write clear, concise commit messages that explain the "why" behind changes:
370+
Write clear, concise PR titles that explain the "why" behind changes.
371+
372+
We use [Conventional Commits](https://www.conventionalcommits.org/). Since we squash on merge, the PR title becomes the commit message in `main`, so it's important to get it right.
373+
374+
Format: `type(scope): description`
375+
376+
**Types:** `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
377+
378+
**Scopes (optional):** `docs`, `i18n`, `deps`
379+
380+
**Examples:**
371381

372382
- `fix: resolve search pagination issue`
373383
- `feat: add package version comparison`
374-
- `docs: update installation instructions`
384+
- `fix(i18n): update French translations`
385+
- `chore(deps): update vite to v6`
386+
387+
> [!NOTE]
388+
> The subject must start with a lowercase letter. Individual commit messages within your PR don't need to follow this format since they'll be squashed.
375389
376390
## Pre-commit hooks
377391

app/components/ConnectorModal.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ watch(open, isOpen => {
162162
type="password"
163163
name="connector-token"
164164
:placeholder="$t('connector.modal.token_placeholder')"
165-
autocomplete="off"
166-
spellcheck="false"
165+
v-bind="noCorrect"
167166
class="w-full px-3 py-2 font-mono text-sm bg-bg-subtle border border-border rounded-md text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
168167
/>
169168
</div>

app/components/OrgMembersPanel.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ watch(lastExecutionTime, () => {
327327
type="search"
328328
name="members-search"
329329
:placeholder="$t('org.members.filter_placeholder')"
330-
autocomplete="off"
330+
v-bind="noCorrect"
331331
class="w-full pl-7 pr-2 py-1.5 font-mono text-sm bg-bg-subtle border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
332332
/>
333333
</div>
@@ -512,8 +512,7 @@ watch(lastExecutionTime, () => {
512512
type="text"
513513
name="new-member-username"
514514
:placeholder="$t('org.members.username_placeholder')"
515-
autocomplete="off"
516-
spellcheck="false"
515+
v-bind="noCorrect"
517516
class="w-full px-2 py-1.5 font-mono text-sm bg-bg border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
518517
/>
519518
<div class="flex items-center gap-2">

app/components/OrgTeamsPanel.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ watch(lastExecutionTime, () => {
296296
type="search"
297297
name="teams-search"
298298
:placeholder="$t('org.teams.filter_placeholder')"
299-
autocomplete="off"
299+
v-bind="noCorrect"
300300
class="w-full pl-7 pr-2 py-1.5 font-mono text-sm bg-bg-subtle border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
301301
/>
302302
</div>
@@ -453,8 +453,7 @@ watch(lastExecutionTime, () => {
453453
type="text"
454454
:name="`add-user-${teamName}`"
455455
:placeholder="$t('org.teams.username_placeholder')"
456-
autocomplete="off"
457-
spellcheck="false"
456+
v-bind="noCorrect"
458457
class="flex-1 px-2 py-1 font-mono text-sm bg-bg-subtle border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
459458
/>
460459
<button
@@ -510,8 +509,7 @@ watch(lastExecutionTime, () => {
510509
type="text"
511510
name="new-team-name"
512511
:placeholder="$t('org.teams.team_name_placeholder')"
513-
autocomplete="off"
514-
spellcheck="false"
512+
v-bind="noCorrect"
515513
class="flex-1 px-2 py-1.5 font-mono text-sm bg-bg border border-border rounded-r text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
516514
/>
517515
</div>

app/components/PackageDownloadAnalytics.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,9 @@ const config = computed(() => ({
487487
stroke: isDarkMode.value ? '#4A4A4A' : '#a3a3a3',
488488
labels: {
489489
axis: {
490-
yLabel: $t('package.downloads.y_axis_label', { granularity: selectedGranularity.value }),
490+
yLabel: $t('package.downloads.y_axis_label', {
491+
granularity: $t(`package.downloads.granularity_${selectedGranularity.value}`),
492+
}),
491493
xLabel: packageName,
492494
yLabelOffsetX: 12,
493495
fontSize: 24,

app/components/PackageListControls.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const showFilteredCount = computed(() => {
6666
v-model="filterValue"
6767
type="search"
6868
:placeholder="placeholder ?? $t('package.list.filter_placeholder')"
69-
autocomplete="off"
69+
v-bind="noCorrect"
7070
class="w-full bg-bg-subtle border border-border rounded-lg pl-10 pr-4 py-2 font-mono text-sm text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:(border-border-hover outline-none)"
7171
/>
7272
</div>

app/components/PackageMaintainers.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ watch(
227227
type="text"
228228
name="add-owner-username"
229229
:placeholder="$t('package.maintainers.username_placeholder')"
230-
autocomplete="off"
231-
spellcheck="false"
230+
v-bind="noCorrect"
232231
class="flex-1 px-2 py-1 font-mono text-sm bg-bg-subtle border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
233232
/>
234233
<button

app/components/UserCombobox.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ const prefersReducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)')
145145
type="text"
146146
:placeholder="placeholder ?? $t('user.combobox.default_placeholder')"
147147
:disabled="disabled"
148-
autocomplete="off"
149-
spellcheck="false"
148+
v-bind="noCorrect"
150149
role="combobox"
151150
aria-autocomplete="list"
152151
:aria-expanded="isOpen && (filteredSuggestions.length > 0 || showNewUserHint)"

0 commit comments

Comments
 (0)