Improve our build and release workflow
See original GitHub issueI want to use this issue to discuss merging (some) stryker repositories together.
Right now we have separate repositories for stryker-api
, stryker
as well as all of the plugins (stryker-karma-runner
, stryker-mocha-runner
, etc). We did this because we want to release them as separate modules to npm.
This presents a number of challenges to us as maintainers:
- Coordinating changes across modules is a pain. You can build modules and install them locally, but the travis build will fail. This leaves you with releasing them under a tag in npm (
@next
for example) to prevent unsuspecting users to install it by accident. - Releasing a new major version often means you need to release them one by one. If in the meantime someone installs
npm i stryker stryker-api
for example, it might break for him becausestryker-api
could already be released with the next major release. - Steep learning curve for new people wanting to change cross module functionality.
This could all be solved with lernajs. With lerna its possible to easily host multiple npm modules in the same git repository. This solves all above challenges:
- Coordinating changes is simpler, because lerna bootstrap takes care of linking your npm modules locally.
- Releasing a new major version can be done using lerna publish, which will first publish to an npm tag “lerna-temp”. Only when everything is published, it will tag them with “latest” (the default tag for
npm install
). - The steel learning curve will be removed as we can easily tell people to run:
git clone git@github.com:stryker-mutator:stryker
cd stryker
npm i
./node_modules/.bin/lerna bootstrap
we could even remove the last step by introducing a post-install
step that does that for you.
However, lernajs is not a build tool, each module should still incorporate its own build. This also means that we should change our grunt setup, as grunt release
now does building, testing and releasing for us. Including updating our contributors and changelog, etc.
Side note: lerna doesn’t force us to maintain a single version number. However, it can. See https://github.com/lerna/lerna#how-it-works .
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
@simondel I’m really leaning towards putting all repo’s into one. LernaJS also takes into account the order in which to build. For example:
stryker-api
would be build beforestryker
, becausestryker
is dev-dependend onstryker-api
.An integration test module is pretty easy to. We should put it outside of the packages and add a relative file dependency on them so we actually test an npm install.
We could leave versioning for what it is right now.
Solves with #257