GithubHelp home page GithubHelp logo

christianulbrich / lerna-release-prototype-in-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zalari/lerna-release-prototype

0.0 1.0 0.0 414 KB

This is a very basic Lerna.js release prototype!

CSS 0.03% TypeScript 78.07% HTML 13.43% JavaScript 8.47%

lerna-release-prototype-in-action's Introduction

Lerna-Release-Prototype

Intro

This is a prototype for testing out Lerna.js releases. It can be fully tested, by using a local NPM Registry (Docker-based Verdaccio).

Setup

You need to have Node and Docker installed.

  1. install deps npm install
  2. run local test registry npm run start:test-registry
  3. create a test user for publishing npm adduser --registry http://localhost:4873

Release Flow 101

This prototype is for modelling the usage of a monorepo with the Release Flow1 branching model. It basically boils down, to only using very short-lived topic branches that are directly merged into master. The master branch is used for doing releases - in terms of NPM it will mean for publishing packages.

For implementing a feature you'd have to do the following steps:

  1. create a topic branch
  2. actually implement a feature
  3. (optionally) release a canary version for "others"
  4. merge-request it into master
  5. upon approval it will get merged into master and your topic branch is deleted

Releases are always carried out from the master branch and involves in terms of a monorepo the following steps:

  1. all changed components, i.e. all components that have changed since the last release must be bumped and then published
  2. components that do depend on other components (in the repo) need to be bumped and published as well

Example: Modify a component that is not consumed by other internal components and release it

In this example we will modify a component, that is not depended on by other components. Its change should only impact itself.

  1. create a topic branch: npm run create-topic-branch topic/modify-b
  2. implement it (change it): npm run modify:component-b
  3. merge-request and approve it: npm run finish-topic-branch topic/modify-b && npm run delete-topic-branch topic/modify-b
  4. release it: npm run publish-all

Now you'd have to enter the version bump (major, minor, patch) and it will get released (i.e. published)

Example: Modify a component that is consumed by other internal components

In this example we will modify a component, that is depended on by other components. Its change should trigger new releases for other components as well.

  1. create a topic branch: npm run create-topic-branch topic/modify-a
  2. implement it (change it): npm run modify:component-a
  3. merge-request and approve it: npm run finish-topic-branch topic/modify-a && npm run delete-topic-branch topic/modify-a
  4. release it: npm run publish-all

Now you'd have to enter the version bump (major, minor, patch) for both components; first for the modified component and second for the component, that is depending on it. Both will get released (i.e. published).

lerna-release-prototype-in-action's People

Contributors

christianulbrich avatar semantic-release-bot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.