Thank you for your interest in contributing to Easythread! This document outlines the development and release process.
-
Clone the repository
git clone https://github.com/leka74/easythread.git cd easythread -
Install dependencies
pnpm install
-
Build packages
pnpm build
-
Run tests
pnpm test
-
Create a new branch from
maingit checkout -b feature/your-feature-name
-
Make your changes and ensure all tests pass
pnpm test pnpm lint pnpm type-check -
Create a changeset for your changes
pnpm changeset
-
Commit your changes and push your branch
git add . git commit -m "feat: your feature description" git push origin feature/your-feature-name
-
Create a pull request to
main
We use Changesets to manage versions and releases.
When you make changes that should be released, create a changeset:
pnpm changesetThis will:
- Prompt you to select which packages have changed
- Ask for the type of change (patch, minor, major)
- Request a description of the changes
- Patch (0.0.X): Bug fixes, documentation updates
- Minor (0.X.0): New features, backwards-compatible changes
- Major (X.0.0): Breaking changes
Bug Fix (Patch)
pnpm changeset
# Select packages that changed
# Choose "patch"
# Description: "Fix worker thread performance issue"New Feature (Minor)
pnpm changeset
# Select packages that changed
# Choose "minor"
# Description: "Add support for SharedArrayBuffer in workers"Breaking Change (Major)
pnpm changeset
# Select packages that changed
# Choose "major"
# Description: "Change transformer API to support plugins"Releases are automated through GitHub Actions:
When changesets are merged to main, the release workflow will:
- CI Pipeline: Run all tests, linting, and type checking
- Version & Publish:
- If there are changesets: Create a "Release" PR with version bumps
- If Release PR is merged: Publish packages to npm automatically
- GitHub Release: Create a GitHub release with changelog
You can also trigger releases manually:
-
Go to GitHub Actions
- Navigate to the "Changeset Version" workflow
- Click "Run workflow"
- Select release type (patch/minor/major)
-
Review and Merge
- A PR will be created with version updates
- Review the changes and merge when ready
- Packages will be published automatically after merge
For urgent fixes:
- Create a hotfix branch from
main - Make the minimal necessary changes
- Create a changeset with type "patch"
- Create PR and get it reviewed quickly
- Merge to trigger automatic release
- Version Bump: All packages get new version numbers based on changesets
- Changelog Generation: CHANGELOG.md files are updated automatically
- Git Tags: Release tags are created (e.g.,
v1.2.3) - NPM Publishing: Packages are published to npm with public access
- GitHub Release: Release notes are generated with changelogs
@easythread/core- Core transformer@easythread/vite- Vite plugin@easythread/rollup- Rollup plugin@easythread/esbuild- ESBuild plugin
All packages are versioned together to maintain compatibility:
- When core changes, all plugins get the same version bump
- This ensures users can safely update all packages together
pnpm test # Run all tests
pnpm test --coverage # Run with coverage reportpnpm build # Build all packages
cd examples/vite-react && pnpm build # Test Vite integration
cd examples/node-express && pnpm build # Test Node.js integrationAll PRs automatically run:
- Linting: ESLint checks for code quality
- Type Checking: TypeScript validation
- Unit Tests: All 57 unit tests across Node.js 18, 20, 22
- Build Tests: Verify all packages build correctly
- Integration Tests: Test all example applications
- ESLint: Configured with TypeScript rules
- Prettier: Automatic code formatting
- EditorConfig: Consistent editor settings
Run formatting:
pnpm lint:fix # Fix linting issues- Issues: GitHub Issues
- Discussions: GitHub Discussions
Thank you for contributing! 🚀