NOTE: For the vast majority of users running supported versions of Node.js, this should not require any changes and you can update without issue. BREAKING CHANGE: This is a major rewrite that changes the module format from CommonJS to ESM-only. The package now requires Node.js >=20 and only exports ESM modules (not relevant in most cases). BREAKING CHANGE: The package.json exports have been updated to remove CommonJS support. Only ESM imports are now supported. BREAKING CHANGE: All source files have been converted from JavaScript to TypeScript, requiring TypeScript-aware tooling for development. - Replace Jest with Vitest for testing - Convert all source files from .js to .ts with proper TypeScript types - Use zshy for ESM-only builds (removes CJS support) - Adopt @epic-web/config for TypeScript, ESLint, and Prettier - Update to Node.js >=20 requirement - Remove kcd-scripts dependency - Add comprehensive e2e tests with GitHub Actions matrix testing - Update GitHub workflow with caching and cross-platform testing - Modernize documentation and remove outdated sections - Update all dependencies to latest versions - Add proper TypeScript declarations and exports The tool maintains its original functionality while being completely modernized with the latest tooling and best practices Co-authored-by: GitHub Action <[email protected]>
12 KiB
Contributing
Thanks for being willing to contribute!
Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub
Project setup
- Fork and clone the repo
npm installto install dependenciesnpm run validateto validate you've got it working- Create a branch for your PR
Tip: Keep your
mainbranch pointing at the original repository and make pull requests from branches on your fork. To do this, run:git remote add upstream https://github.com/kentcdodds/cross-env.git git fetch upstream git branch --set-upstream-to=upstream/main mainThis will add the original repository as a "remote" called "upstream," Then fetch the git information from that remote, then set your local
mainbranch to use the upstream main branch whenever you rungit pull. Then you can make all of your pull request branches based on thismainbranch. Whenever you want to update your version ofmain, do a regulargit pull.
Development
This project uses modern tooling:
- TypeScript for type safety
- Vitest for testing
- ESLint for linting
- Prettier for formatting
- zshy for building
Available Scripts
npm run build- Build the projectnpm run dev- Build in watch modenpm run test- Run tests in watch modenpm run test:run- Run tests oncenpm run test:coverage- Run tests with coveragenpm run lint- Run ESLintnpm run lint:fix- Fix ESLint issuesnpm run format- Format code with Prettiernpm run format:check- Check code formattingnpm run typecheck- Run TypeScript type checkingnpm run validate- Run all checks (build, typecheck, lint, format, test)
Help needed
Please checkout the the open issues
Also, please watch the repo and respond to questions/bug reports/feature requests! Thanks!
Contributors β¨
Thanks goes to these people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!