Thanks for your interest in Rockpack! Bug reports, documentation fixes, recipes and code changes are all welcome.
- Issues labelled
good first issueare small and well scoped, mostly documentation and recipes. - Issues labelled
help wantedneed more knowledge of the code base. - Issues labelled
blockedwait for an upstream release; comment before starting one. - Comment on an issue before you start working on it, so the work is not done twice.
- For a new feature or a change of behaviour, open an issue first and describe the use case.
| Path | Contents |
|---|---|
packages/babel |
@rockpack/babel: Babel presets and plugins |
packages/codestyle |
@rockpack/codestyle: ESLint, Stylelint and commitlint configs |
packages/compiler |
@rockpack/compiler: webpack-based compilers and the build reporter |
packages/starter |
@rockpack/starter: the rockpack CLI and the project templates |
packages/tester |
@rockpack/tester: the Jest wrapper |
packages/tsconfig, packages/utils |
Shared TypeScript config and helpers |
e2e/* |
End-to-end suites: compiler, starter, packaging (published tarballs), babel smoke test |
examples/* |
Example projects for the compiler and the tester |
book/ |
The documentation site |
plans/ |
Working plans of the maintainers |
The monorepo uses npm workspaces with Lerna on top of Nx.
Requirements: Node.js 24.15 or higher (see .nvmrc) and npm 11.
git clone https://github.com/AlexSergey/rockpack.git
cd rockpack
npm install
npm run buildPackages consume each other through their built lib folders, so run npm run build (or npm run build:<package>) after changing utils, babel, codestyle, compiler or tester and before running tests that depend on them.
| Command | What it does |
|---|---|
npm run lint |
tsc --noEmit and ESLint in every package |
npm run lint:deps |
syncpack and knip (versions, unused files and dependencies) |
npm run lint:ts |
Type check of the root scripts |
npm run test:unit |
Unit tests of every package |
npm test -w packages/compiler |
Unit tests of one package |
npm run e2e |
End-to-end suites (slow) |
npm test -w e2e/compiler-e2e -- frontend |
One e2e spec (positional arguments filter the specs) |
Run only what your change touches: one package's tests and lint are usually enough, CI runs the rest.
- Nx caches build, lint and test results. Run
npx nx resetwhen a result looks stale. - Runtime e2e specs (
npm run e2e:runtime) need Chrome:npm exec -w e2e/tools -- puppeteer browsers install chrome. - Some e2e specs compare output with golden files. When a change is intended, update them with
E2E_UPDATE_GOLDEN=1, for exampleE2E_UPDATE_GOLDEN=1 npm test -w e2e/packaging-e2e -- tarballs, and commit the updated files.
- TypeScript in strict mode; avoid
any, prefertypeoverinterface. - Keep the diff minimal and focused on the issue; do not reformat or refactor unrelated code.
- Formatting and lint rules come from
@rockpack/codestyle;npm run format -w <package>fixes most findings. - Add or update tests for every change in behaviour. Test files sit next to the source (
*.spec.ts). - Tests must be deterministic. Negative cases go first, positive cases after them, in separate
describeblocks:
describe('readPackageJson', () => {
describe('negative cases', () => {
it('returns undefined when the file does not exist', () => {});
});
describe('positive cases', () => {
it('returns the parsed package.json', () => {});
});
});- Update the package README when you change options or behaviour, and add a line to
CHANGELOG.mdunder an[Unreleased]section at the top (create it if it is missing).
- Commit messages follow Conventional Commits with the package as the scope:
fix(compiler): ...,feat(starter): ...,docs(tester): ...,test(babel): .... - Git hooks run on install:
pre-commitruns lint-staged,pre-pushrunsnpm run lintandnpm run test:unit. - Open pull requests against the
masterbranch. - One topic per pull request; link the issue it closes (
Closes #123). - CI must be green before a review.
Use the bug report template and include the Rockpack package versions, Node.js and npm versions, the operating system, the build or test script and the full output. A minimal repository that reproduces the problem helps the most.
By participating you agree to follow the Code of Conduct.