Brennan  Veum

Brennan Veum

1625216220

NPM Library Versioning Strategy for Hot Fixes

Ahh, your NPM package is finally live. You’ve published your library to the NPM registry for your tens of adoring fans (or maybe just you) to consume. You’ve been careful to exclude extraneous dependencies from the build and fiddled with webpack for hours to create a truly optimized build. But what about versioning?

Typically a minor version upgrade, from v1.1.0 to 1.2.0 introduces a non-breaking change like a small feature. A major upgrade, from v1.2.0 to v2.0.0, is usually reserved for breaking changes or non backwards-compatible changes. That leaves bugs, which can be resolved with patch upgrades.

This all sounds simple and straightforward enough, except when it isn’t. Developers often work asynchronously so there is a high chance that a library used as a dependency in another app will be a version or 2 behind the most recent version of the library currently being developed. This can lead to very confusing versioning obstacles when issues arise in production and need a hot-fix.

Let’s look at this scenario: Your company’s Burrito Finder App is using v1.2.0 of the Tinfoil library. Bob has recently wrapped up a ticket and published a new version of Tinfoil, which is now at 1.3.0. Bob’s changes aren’t breaking but they haven’t been fully tested by QA. Sarah is on-call and her phone just buzzed alerting here that a small bug in Tinfoil is not allowing users to click on the Burrito Icon! Rats!

#javascript

What is GEEK

Buddha Community

NPM Library Versioning Strategy for Hot Fixes
Modesto  Bailey

Modesto Bailey

1596739800

NPM Install and NPM CI: In What Aspect They Differ

Nodejs web development has achieved such a huge acclamation all over the world just because of its large ecosystem of libraries known as NPM modules. It is the largest software package library in the world, with over 500,000+ packages. Each time a Command Line Interface (CLI) for npm comes as an add-on with Nodejs installation which allows developers to connect with packages locally on their machine.

The idea of npm modules had come with some technical advancement in package management like reusable components, with easy installation via an online repository, with version and dependency management.

In general,NPM is a default package manager for every Nodejs development project. Npm eases the installing and updating dependencies processes. A dependency list on npmjs even provides you with the installation command, so that you can simply copy and paste in the terminal to initiate installation procedures.

All npm users have an advantage of a new install command called “npm ci(i.e. npm continuous integration)”. These commands provide enormous improvements to both the performance and reliability of default builds for continuous integration processes. In turn, it enables a consistent and fast experience for developers using continuous integration in their workflow.

In npm install, it reads the package.json to generate a list of dependencies and uses package-lock.json to know the exact version of these dependencies to install. If the dependency is found in package-lock.jso, it will be added by npm install.

Whereas here, the npm ci (continuous integration) installs dependencies from package-lock.json directly and use up package.json just to verify that there are no mismatched versions exists. If any dependencies mismatching versions, it will show an error.

#npm-install #npm-ci #npm #node-package-manager

Brennan  Veum

Brennan Veum

1625216220

NPM Library Versioning Strategy for Hot Fixes

Ahh, your NPM package is finally live. You’ve published your library to the NPM registry for your tens of adoring fans (or maybe just you) to consume. You’ve been careful to exclude extraneous dependencies from the build and fiddled with webpack for hours to create a truly optimized build. But what about versioning?

Typically a minor version upgrade, from v1.1.0 to 1.2.0 introduces a non-breaking change like a small feature. A major upgrade, from v1.2.0 to v2.0.0, is usually reserved for breaking changes or non backwards-compatible changes. That leaves bugs, which can be resolved with patch upgrades.

This all sounds simple and straightforward enough, except when it isn’t. Developers often work asynchronously so there is a high chance that a library used as a dependency in another app will be a version or 2 behind the most recent version of the library currently being developed. This can lead to very confusing versioning obstacles when issues arise in production and need a hot-fix.

Let’s look at this scenario: Your company’s Burrito Finder App is using v1.2.0 of the Tinfoil library. Bob has recently wrapped up a ticket and published a new version of Tinfoil, which is now at 1.3.0. Bob’s changes aren’t breaking but they haven’t been fully tested by QA. Sarah is on-call and her phone just buzzed alerting here that a small bug in Tinfoil is not allowing users to click on the Burrito Icon! Rats!

#javascript

Trystan  Doyle

Trystan Doyle

1593008507

Up your npm game with these 4 practices

If you don’t know what npm is then you should probably read about it before reading this article. This article is going to touch on recommendations and advanced concepts for those experienced with it. If you’re not, don’t worry, it’s not that complicated. I can recommend reading this article to get you started.

#npm #npm-package #node-package-manager #npm-weekly #up #programming

Annalise  Hyatt

Annalise Hyatt

1598140980

#15: Semantic Versioning - Mastering NPM

Don’t forget to subscribe and like the video if you enjoyed :)
Be a damner, join the coding community:
https://codedamn.com/

#mastering npm #npm #semantic

Garrett  Legros

Garrett Legros

1597841280

How to install exact (older) version of NPM package

Learn, how to install an exact previous version of an npm package.

reactgo.com recommended courseNodeJS - The Complete Guide (incl. MVC, REST APIs, GraphQL)

Sometimes, when we try to install a npm package using the npm install <package-name> command we will see the node version compatibility errors like this in our terminal.

express requires node version >= 7.0.

To solve it, we can install an older version of the npm package by specifying a version number after the package name.

Example:

npm install express@3.3.8

This above command will install an express version 3.3.8.

You can also install it globally by adding a -g flag to the command.

npm install -g express@3.3.8

#npm #exact #npm package