Managing the release of 2 npm lib - the same lib - in the same registry?

One of the dependencies of our applications (my-app) is the npm lib, which we publish in npm (my-lib).

name: my-app; version: <my-app-version> dependencies: { my-lib: <my-lib-version> } 

As a company, we strive to maintain the current version and an older version. my-app 1.0.0 depends on my-lib 1.0.0

  name: my-app; version: 1.0.0 dependencies: { my-lib: 1.0.0 } 

my-app 2.0.0 depends on the latest version of my-lib, which is 3.1.0

  name: my-app; version: 2.0.0 dependencies: { my-lib: 3.1.0 } 

We have a bug in my-lib that we must fix for both . The easy thing to do is commit to 3.1.0, but my-app 1.0.0 cannot accept 3.1.0, as it makes changes and should remain in version 1.XX What is the standard way to fix my lib in both of them?

+5
source share
1 answer

If you decide to upgrade versions 1.xx and 3.xx , you can continue to work on 2 split branches of GIT and publish 2 separate issues of patches on NPM.

+1
source

Source: https://habr.com/ru/post/1271874/


All Articles