diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 182ca2f8b..4d6b0a60b 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,11 +1,17 @@ blank_issues_enabled: false contact_links: - - name: Bug Report - url: https://github.com/alpinejs/alpine/discussions/new - about: Submit a GitHub issue + - name: Get help or ask a Question + url: https://github.com/alpinejs/alpine/discussions/new?category=1-help + about: Ask questions or get help from other community members + - name: Feature Request - url: https://github.com/alpinejs/alpine/discussions/new - about: Request a feature to be added to the platform - - name: Ask a Question - url: https://github.com/alpinejs/alpine/discussions/new - about: Ask questions and discuss with other community members + url: https://github.com/alpinejs/alpine/discussions/new?category=3-feature-ideas + about: For ideas or feature requests + + - name: Bug Report + url: https://github.com/alpinejs/alpine/discussions/new?category=5-bugs + about: Submit a bug report + + - name: Documentation issue + url: https://github.com/alpinejs/alpine/pulls + about: For documentation issues, please open a pull request diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 000000000..ac9d5118e --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +**PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY.** + +## Reporting a Vulnerability + +If you discover a security vulnerability within Alpine.js, please send an email to Caleb Porzio at support@alpinejs.dev. All security vulnerabilities will be promptly addressed. diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b7c8b3fed..594ddb720 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -4,10 +4,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: '15' + node-version: '18' - run: npm install - run: npm run build - run: npm run test + - run: npm run vitest diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 000000000..281032bdb --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,76 @@ +# Alpine.js Development Guidelines + +## Pull Request Evaluation Criteria + +When evaluating pull requests for Alpine.js, assess the following: + +### 1. Tests +- Are tests provided for the change? +- Do existing tests still pass? +- For configuration changes (package.json, build scripts), tests may not be required + +### 2. Code Style +- Does the code match Alpine's existing patterns? +- Check indentation, naming conventions, and structure +- For package.json changes, ensure consistency with other packages in the monorepo + +### 3. Code Quality +- Is the code clean and maintainable? +- Is the change focused and minimal? +- Are there any unnecessary changes or complexity? +- Does this PR contain changes that should apply elsewhere? + +### 4. Simplicity +- Is this a simple, focused change? +- Does it follow Alpine's philosophy of simplicity? +- Could it be implemented more simply? +- Are the proposed additions intuitive for users? or do they require extra knowledge that they have to dig for. + +### 5. Precedent +- Does this PR (both public facing additions and internal implementation) follow established precedents in the project +- Does it use terms that are unfamiliar to the project as of yet? + +### 6. Description Quality +- Is there a clear explanation of what/why/how? +- Are breaking changes documented? +- Is backward compatibility addressed? + +### 7. Community Engagement +- Are there comments, reviews, or discussions? +- Has it been approved by maintainers? +- Are there any conflicting opinions or unresolved concerns? + +### Mergeability Rating +Based on the above, rate as: +- **HIGH**: Ready to merge (all criteria met, approved) +- **MEDIUM**: Needs attention (technically sound but missing reviews/tests) +- **LOW**: Requires work (has issues or conflicts to resolve) + +## Project Structure + +Alpine.js is a monorepo with packages in `/packages/`: +- Each package has its own package.json +- Build outputs go to `dist/` with `.cjs.js`, `.esm.js`, and `.min.js` versions +- Tests use Jest framework +- CI runs on GitHub Actions + +## Common Commands + +```bash +# Review PRs +gh pr list # List open PRs +gh pr view [number] # View PR details +gh pr diff [number] # View code changes +gh pr checks [number] # Check CI status +gh api repos/alpinejs/alpine/pulls/[number]/comments # View comments + +# Testing +npm test # Run all tests +npm run build # Build all packages +``` + +## Summary + +After assessing the pull request on the above qualities, provide a summary explaining the problem this PR addresses and the fix, and why it's a good or bad fix. Do it in plain language as if you are personally advising me on what the PR is and weather or not I should merge it. And if not, what might need to be addressed first. If things need to be addressed, offer to address them yourself. + +Please use code snippets to establish a starting point and and ending point if helpful. For example, when explaining the problem, it is often easier to provide a brief explanation alongside a code snippet of what is currently problematic, then when explaining the solution, showing what new code will allow a fix if applicable. \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md index c3cc2ddc7..5e2d12a11 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # MIT License -Copyright © 2019-2021 Caleb Porzio and contributors +Copyright © 2019-2025 Caleb Porzio and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 4eba19018..fe1dc10c8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Stay here for contribution-related information. > Looking for V2 docs? [here they are](https://github.com/alpinejs/alpine/tree/v2.8.2) -

Alpine Compoenent Patterns

+

Alpine Component Patterns

## Contribution Guide: @@ -47,12 +47,10 @@ Each package should at least have: a "cdn" build that is self-initializing and c The bundling for Alpine V3 is handled exclusively by ESBuild. All of the configuration for these builds is stored in the `scripts/build.js` file. ### Testing -There are 2 different testing tools used in this repo: Cypress (for integration tests), and Jest (for unit tests). +There are 2 different testing tools used in this repo: Cypress (for integration tests), and Vitest (for unit tests). -All tests are stored inside the `/tests` folder under `/tests/cypress` and `/tests/jest`. +All tests are stored inside the `/tests` folder under `/tests/cypress` and `/tests/vitest`. -You can run them both from the command line using: `npm run test` +If you wish to only run Cypress and open it's user interface (recommended during development), you can run: `npm run cypress` -If you wish to only run cypress and open it's user interface (recommended during development), you can run: `npm run cypress` - -If you wish to only run Jest tests, you can run `npm run jest` like normal and target specific tests. You can specify command line config options to forward to the jest command with `--` like so: `npm run jest -- --watch` +If you wish to only run Vitest tests, you can run `npm run vitest` like normal and target specific tests. diff --git a/benchmarks/giant.html b/benchmarks/giant.html index 6007f565e..115e95a08 100644 --- a/benchmarks/giant.html +++ b/benchmarks/giant.html @@ -1689,7 +1689,7 @@

Fork livewire

Comparing changes

-
Choose two branches to see what’s changed or to start a +
Choose two branches to see what's changed or to start a new pull request. If you need to, you can also . @@ -4749,11 +4749,11 @@

Open a pull request

Fix x layout (#2499) @@ -4826,7 +4826,7 @@

Open a pull request

-
* rollback & simplfy
+                                                    
* rollback & simplify
 
 * add tests
@@ -25559,7 +25559,7 @@

No commit comments for this range

- You can’t perform that action at this time. + You can't perform that action at this time.