Thank you for your interest in contributing to JS Utils Kit π. This project is a pnpm monorepo powered by Turbo, and we welcome improvements across utilities, tooling, documentation, and performance.
This project uses:
- pnpm workspaces
- Turbo for task orchestration
- tsdown for building packages
- TypeDoc for documentation
- ESLint for linting
js-utils-kit/
βββ packages/ # All publishable/internal packages
βββ scripts/ # Build & development tooling
βββ eslint.config.ts # ESLint configuration
βββ tsconfig.json # TypeScript config
βββ turbo.json # Turbo pipeline config
βββ typedoc.json # Documentation config
βββ pnpm-workspace.yaml # Workspace definition
βββ package.json # Root package configEach utility/package inside packages/ is independently buildable and testable.
Before contributing, ensure you have:
- Node.js (LTS recommended)
- pnpm
- Git
- Basic understanding of TypeScript
- Familiarity with monorepos (preferred)
Install pnpm if needed:
npm install -g pnpmFork the repo on GitHub.
git clone https://github.com/your-username/js-utils-kit.git
cd js-utils-kitpnpm installSince this is a monorepo, this installs dependencies for all workspace packages.
Run all tests across packages:
pnpm testTurbo will automatically run tests in affected packages.
To run tests in a specific package:
pnpm --filter <package-name> testThis project uses tsdown for building and Turbo to orchestrate builds.
Build all packages:
pnpm buildBuild a specific package:
pnpm --filter <package-name> buildOutputs typically include:
- ESM build
- CJS build
- Type declaration files
Documentation is generated using TypeDoc.
pnpm docsTypedoc configuration is defined in:
typedoc.jsongit checkout -b feat/your-feature-nameWork inside the appropriate package under:
packages/pnpm test
pnpm buildEnsure:
- No TypeScript errors
- All tests pass
- Linting passes
- No breaking exports
Push your branch and open a PR against main.
This project uses Changesets to manage versioning and releases across the monorepo.
You must create a changeset when:
- You modify a public API
- You add a new feature
- You fix a bug that affects users
- You introduce breaking changes
Not required for:
- Internal refactors (no behavior change)
- Documentation-only changes (usually)
- CI or tooling changes (unless user-facing)
After making your changes:
pnpm changesetYou will be prompted to:
-
Select affected packages
-
Choose version bump type:
patchβ bug fixminorβ new featuremajorβ breaking change
-
Write a short summary
This creates a markdown file inside:
.changeset/Commit that file along with your changes.
We follow Conventional Commits:
feat:β New featurefix:β Bug fixdocs:β Documentation changerefactor:β Code refactoringtest:β Test changeschore:β Build/tooling/internal updates
Example:
git commit -m "feat(utils): add clamp utility"If you are contributing a new package:
- Create a new directory inside
packages/ - Add its
package.json - Ensure it is included in
pnpm-workspace.yaml - Add build script using
tsdown - Add tests
- Export properly
- Update documentation if necessary
This project enforces:
- ESLint (see
eslint.config.ts) - TypeScript strict mode
- Clean public exports
- Dual ESM + CJS compatibility
Run linting:
pnpm lintPlease review:
CODE_OF_CONDUCT.mdSECURITY.md
Report security issues responsibly.
Before submitting a PR, ensure:
- The change has a clear purpose
- Related tests are added or updated
- All tests pass (
pnpm test) - The project builds successfully (
pnpm build) - No unintended breaking changes
- The utility is compatible with both ESM and CJS
- Public exports are correct
- Documentation updated (if needed)
If youβre unsure about something:
- Open an Issue
- Start a Discussion
- Ask for architectural clarification before large changes