Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ permissions:

jobs:
code:
name: 🤖 Autofix code
runs-on: ubuntu-24.04-arm
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
Expand All @@ -25,13 +24,16 @@ jobs:
node-version: lts/*

- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
name: 🟧 Install pnpm
name: Install pnpm
with:
cache: true

- name: 📦 Install dependencies
run: pnpm install

- name: 📦 Install browsers
run: pnpm playwright install

- name: 🌐 Compare translations
run: pnpm i18n:check

Expand All @@ -41,4 +43,14 @@ jobs:
- name: 🔠 Fix lint errors
run: pnpm lint:fix

- name: 🧪 Update unit test snapshots
run: pnpm test:unit -u

- name: 🏃 Update component test snapshots
run: pnpm test:nuxt -u

# TODO: re-enable when we have snapshots in browser tests
# - name: 🖥️ Update browser test snapshots
# run: pnpm test:browser --update-snapshots

- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
99 changes: 24 additions & 75 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ permissions:

jobs:
lint:
name: 🔠 Lint project
runs-on: ubuntu-24.04-arm
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
Expand All @@ -32,59 +31,18 @@ jobs:
node-version: lts/*

- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
name: 🟧 Install pnpm
# pnpm cache skipped deliberately as the project is not actually installed here

- name: 🔠 Lint project
run: node scripts/lint.ts

types:
name: 💪 Type check
runs-on: ubuntu-24.04-arm

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: lts/*

- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
name: 🟧 Install pnpm
name: Install pnpm
with:
cache: true

- name: 📦 Install dependencies
run: pnpm install

- name: 💪 Type check
run: pnpm test:types

unit:
name: 🧪 Unit tests
runs-on: ubuntu-24.04-arm

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: lts/*

- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
name: 🟧 Install pnpm
with:
cache: true

- name: 📦 Install dependencies
run: pnpm install

- name: 🧪 Unit tests
run: pnpm test:unit --project unit run --coverage
- name: 🔠 Lint project
run: pnpm lint

test:
name: 🧪 Component tests
runs-on: ubuntu-24.04-arm
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
Expand All @@ -94,27 +52,27 @@ jobs:
node-version: lts/*

- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
name: 🟧 Install pnpm
name: Install pnpm
with:
cache: true

- name: 📦 Install dependencies
run: pnpm install

- name: 🌐 Install browser
run: pnpm playwright install chromium-headless-shell
run: pnpm playwright install

- name: 🧪 Component tests
run: pnpm vite test --project nuxt run --coverage
- name: 💪 Type check
run: pnpm test:types

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
env:
CODECOV_TOKEN: 17b4bed9-d407-4ce2-9c10-2ccd4328a1d9
- name: 🧪 Unit test
run: pnpm test:unit

- name: 🏃 Component tests
run: pnpm test:nuxt

browser:
name: 🖥️ Browser tests
runs-on: ubuntu-24.04-arm
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.58.0-noble

Expand All @@ -126,25 +84,18 @@ jobs:
node-version: lts/*

- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
name: 🟧 Install pnpm
name: Install pnpm
with:
cache: true

- name: 📦 Install dependencies
run: pnpm install

- name: 🏗️ Build project
run: pnpm build:playwright

- name: 🖥️ Test project (browser)
run: pnpm test:browser:prebuilt
run: pnpm test:browser

a11y:
name: ♿ Accessibility audit
runs-on: ubuntu-latest # See https://github.com/GoogleChrome/lighthouse/discussions/16834
strategy:
matrix:
mode: [dark, light]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
Expand All @@ -154,25 +105,23 @@ jobs:
node-version: lts/*

- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
name: 🟧 Install pnpm
name: Install pnpm
with:
cache: true

- name: 📦 Install dependencies
run: pnpm install

- name: 🏗️ Build project
run: NODE_ENV=test pnpm build
run: pnpm build

- name: ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
- name: ♿ Accessibility audit (Lighthouse - dark & light mode)
run: ./scripts/lighthouse-a11y.sh
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }}

knip:
name: 🧹 Unused code check
runs-on: ubuntu-24.04-arm
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
Expand All @@ -182,14 +131,14 @@ jobs:
node-version: lts/*

- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
name: 🟧 Install pnpm
name: Install pnpm
with:
cache: true

- name: 📦 Install dependencies
run: pnpm install

- name: 🧹 Check for unused code
- name: 🔍 Check for unused code
run: pnpm knip

- name: 🧹 Check for unused production code
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lunaria.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ permissions:

jobs:
lunaria-overview:
name: 🌝 Generate Lunaria Overview
runs-on: ubuntu-24.04-arm
name: Generate Lunaria Overview
runs-on: ubuntu-latest

steps:
- name: Checkout
Expand All @@ -33,7 +33,7 @@ jobs:
node-version: lts/*

- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
name: 🟧 Install pnpm
name: Install pnpm
with:
cache: true

Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/provenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,21 @@ on:
push:
branches:
- main
paths:
- pnpm-lock.yaml
pull_request:
branches:
- main
paths:
- pnpm-lock.yaml
merge_group:
branches:
- main

permissions:
contents: read

jobs:
check-provenance:
name: 🔒 Check provenance downgrades
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0

- name: Check provenance downgrades
uses: danielroe/provenance-action@41bcc969e579d9e29af08ba44fcbfdf95cee6e6c # v0.1.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
if: github.repository == 'npmx-dev/npmx.dev'
runs-on: ubuntu-slim
name: 🏷️ Validate PR title
name: semantic-pr
steps:
- name: Validate PR title
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
Expand Down
90 changes: 26 additions & 64 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,45 @@
# Contributor Covenant 3.0 Code of Conduct
# Contributor Covenant Code of Conduct

## Our Pledge
## Our pledge

We pledge to make our community welcoming, safe, and equitable for all.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
## Our standards

## Encouraged Behaviors
Examples of behavior that contributes to creating a positive environment include:

While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
Examples of unacceptable behavior by participants include:

1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
2. Engaging **kindly and honestly** with others.
3. Respecting **different viewpoints** and experiences.
4. **Taking responsibility** for our actions and contributions.
5. Gracefully giving and accepting **constructive feedback**.
6. Committing to **repairing harm** when it occurs.
7. Behaving in other ways that promote and sustain the **well-being of our community**.
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Restricted Behaviors
## Our responsibilities

We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
7. Behaving in other ways that **threaten the well-being** of our community.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

### Other Restrictions

1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.

## Reporting an Issue

Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.

When an incident does occur, it is important to report it promptly. To report a possible violation, contact the project stewards (@danielroe and @patak.dev) by DM in our community chat. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project stewards are obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.

## Addressing and Repairing Harm

If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.

1. Warning
1. Event: A violation involving a single incident or series of incidents.
2. Consequence: A private, written warning from the Community Moderators.
3. Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
2. Temporarily Limited Activities
1. Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
2. Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
3. Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
3. Temporary Suspension
1. Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
2. Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
3. Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
4. Permanent Ban
1. Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
2. Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
3. Repair: There is no possible repair in cases of this severity.
## Scope

This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Scope
## Enforcement

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project stewards (`@danielroe` and `@patak.dev`) by DM in our [community chat](https://chat.npmx.dev). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The stewards are obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

## Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
[homepage]: https://www.contributor-covenant.org

For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
Loading
Loading