<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Omkar Bhavare</title>
    <description>The latest articles on DEV Community by Omkar Bhavare (@omkarbhavare).</description>
    <link>https://dev.to/omkarbhavare</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1111772%2F01b55ef7-44c3-4859-8057-b60d29bdd7ba.png</url>
      <title>DEV Community: Omkar Bhavare</title>
      <link>https://dev.to/omkarbhavare</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/omkarbhavare"/>
    <language>en</language>
    <item>
      <title>Demystifying Semantic Versioning</title>
      <dc:creator>Omkar Bhavare</dc:creator>
      <pubDate>Thu, 09 Nov 2023 17:33:39 +0000</pubDate>
      <link>https://dev.to/omkarbhavare/demystifying-semantic-versioning-3ic8</link>
      <guid>https://dev.to/omkarbhavare/demystifying-semantic-versioning-3ic8</guid>
      <description>&lt;p&gt;In this section, we’ll cover the basics of Semantic Versioning — what it is, the various types of versions, and an in-depth exploration of version upgrades. We’ll also discuss how these versioning practices can impact our code. Let’s dive right in! 💻✨&lt;/p&gt;

&lt;p&gt;🤔 What is Semantic Versioning ?&lt;br&gt;
Sematic Versioning is a way to specify and convey the changes made in the software / packages based on it’s version number.&lt;/p&gt;

&lt;p&gt;🖋️ Version Number Structure&lt;/p&gt;

&lt;p&gt;example: if version number of any dependency is 2.6.3&lt;br&gt;
Here ,&lt;/p&gt;

&lt;p&gt;Major version number is 2 &lt;br&gt;
Minor version number is 6&lt;br&gt;
Patch version number is 3&lt;br&gt;
MAJOR Version:&lt;br&gt;
Indicates significant updates that may break existing functionality or APIs.&lt;br&gt;
Increments for backward incompatible changes.&lt;br&gt;
&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Backward Incompatibility : It refers that the new updated version is not fully compatible with the older version as there might be some structural changes in code or removal of the some feature&lt;/p&gt;

&lt;p&gt;&lt;code&gt;// Version 1.0.0&lt;br&gt;
function calculateSum(a, b) {&lt;br&gt;
 return a + b;&lt;br&gt;
}&lt;br&gt;
function calculateProduct(a, b) {&lt;br&gt;
 return a * b;&lt;br&gt;
}&lt;br&gt;
// Version 2.0.0&lt;br&gt;
function calculateSum(a, b) {&lt;br&gt;
 return a + b;&lt;br&gt;
}&lt;br&gt;
// calculateProduct function is removed in this version&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;MINOR Version:
Indicates the introduction of new functionality without breaking existing features.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Increments for backward-compatible additions of features.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;example: &lt;br&gt;
ejs : 3.2.9&lt;br&gt;
ejs: 3.4.9&lt;/code&gt;&lt;br&gt;
Backward-Compatibility : It refers to ability of a newer version of software to work seamlessly with system or code that was designed for older version.&lt;/p&gt;

&lt;p&gt;`// Version 1.0.0&lt;br&gt;
function calculateSum(a, b) {&lt;br&gt;
 return a + b;&lt;br&gt;
}&lt;br&gt;
In Version 1.1.0, a backward-compatible change is made by adding a new function, calculateAverage , without modifying or removing any existing functionality.&lt;/p&gt;

&lt;p&gt;// Version 1.1.0&lt;br&gt;
function calculateSum(a, b) {&lt;br&gt;
 return a + b;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;// New backward-compatible feature added&lt;br&gt;
function calculateAverage(a, b) {&lt;br&gt;
 return (a + b) / 2;&lt;br&gt;
}`&lt;br&gt;
3.PATCH Version:&lt;br&gt;
Indicates the correction of issues without introducing new features mostly done for Security and Bugs fixes&lt;/p&gt;

&lt;p&gt;&lt;code&gt;example: &lt;br&gt;
ejs : 3.3.1&lt;br&gt;
ejs: 3.3.2&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Beta Version:
A pre-release version for testing, signaling that it’s not yet a final, stable release.
[beta is often used to indicate a version that is still in testing or development.]&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
 "dependencies": {&lt;br&gt;
 "library": "2.0.0-beta.1"&lt;br&gt;
 }&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
Beta versions invite users to test upcoming features and report issues before the stable release, allowing developers to gather feedback and ensure software readiness for widespread use.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Metadata:
Metadata provides additional information about the build or release but does not affect the previous version feature or compatibility.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
 "dependencies": {&lt;br&gt;
 "library": "1.2.3+build456"&lt;br&gt;
 }&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
😀 Let’s see what is Version Upgrade:&lt;/p&gt;

&lt;p&gt;Caret ( ^ ) : Allows only MINOR &amp;amp; PATCH version upgradation automatically.&lt;br&gt;
example: &lt;br&gt;
&lt;code&gt;{&lt;br&gt;
 "dependencies": {&lt;br&gt;
 "ejs": "^3.3.1"&lt;br&gt;
 }&lt;br&gt;
}&lt;br&gt;
ejs: 3.3.2 // allowed Patch Version fix&lt;br&gt;
ejs: 3.4.2 // allowed Minor Version fix&lt;br&gt;
ejs: 4.1.0 // not allowed Major Version fix&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tilde ( ~ ) : Allows only PATCH version upgradation automatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;example: &lt;br&gt;
&lt;code&gt;{&lt;br&gt;
 "dependencies": {&lt;br&gt;
 "ejs": "~3.3.1"&lt;br&gt;
 }&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;ejs: 3.3.2 // allowed Patch Version fix&lt;br&gt;
ejs: 3.4.2 // not allowed Minor Version fix&lt;br&gt;
ejs: 4.1.0 // not allowed Major Version fix&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Equal ( = ) :The = (Equal ) sign in version dependency declarations is used to specify that you want to install the exact version of a package.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
 "dependencies": {&lt;br&gt;
 "ejs": "=3.3.1"&lt;br&gt;
 }&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
📚 Earlier Post:&lt;/p&gt;

&lt;p&gt;What is NPM ? click below to know more 👇&lt;br&gt;
&lt;a href="https://medium.com/@omkarbhavare2406/what-is-npm-40dc291537d4"&gt;https://medium.com/@omkarbhavare2406/what-is-npm-40dc291537d4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔍 Coming up next:&lt;br&gt;
Dependency vs DevDependency&lt;br&gt;
Local &amp;amp; Global Package Installation:&lt;/p&gt;

&lt;p&gt;Stay tuned for more insights into the world of JavaScript development! 🚀📦&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>programming</category>
    </item>
    <item>
      <title>What is npm?</title>
      <dc:creator>Omkar Bhavare</dc:creator>
      <pubDate>Sat, 21 Oct 2023 13:10:50 +0000</pubDate>
      <link>https://dev.to/omkarbhavare/npm-120c</link>
      <guid>https://dev.to/omkarbhavare/npm-120c</guid>
      <description>&lt;p&gt;🔍 What is npm? 📦 &lt;/p&gt;

&lt;p&gt;npm is an open-source repository of tools &amp;amp; libraries created by the developers. It serves as a central-hub for JavaScript Community, offering a vast collection of resusable code packages to enhance and accelerate their projects.&lt;/p&gt;

&lt;p&gt;🤝 Benefits of npm&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy Package Management: npm simplifies the process of managing external libraries and tools, making it easy to add, update, and remove dependencies in your project.&lt;/li&gt;
&lt;li&gt;Code Reusability: Access to a vast repository of packages enables developers to reuse existing, well-tested code, saving time and effort in building common functionalities.&lt;/li&gt;
&lt;li&gt;Version Control: npm helps ensure version consistency by allowing developers to specify the exact versions or version ranges of dependencies, reducing compatibility issues.&lt;/li&gt;
&lt;li&gt;Community Collaboration: npm fosters community collaboration by allowing developers to share their code, contributing to a collaborative ecosystem of shared knowledge and resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🛠️ How NPM Works: A Step-by-Step Guide 🚀&lt;/p&gt;

&lt;p&gt;1.Project Initialization: Developers kickstart a new project by running npm init in the project directory. This command generates a package.json file that acts as a manifest for the project, containing metadata and dependency information.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.Developers specify these dependencies in the package.json file and install them using the npm install command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install lodash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.NPM automatically creates a node_modules directory where it stores the installed packages. These dependencies are recorded in the package.json file under the dependencies section.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"dependencies": {
  "lodash": "^4.17.21"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.NPM uses semantic versioning to define package versions. Developers can specify version ranges in the package.json file to allow for flexibility in updating packages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"dependencies": {
  "lodash": "^4.17.21"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5.The package-lock.json file provides specific version information for each package that is currently being used in a project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "my-blog",
  "version": "1.0.0",
  "lockfileVersion": 2,
  "dependencies": {
    "lodash": {
      "version": "4.17.21",
      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
      "integrity": "sha512-...
      "dev": true
    }
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Coming up next: 🔍&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Semantic Versioning:&lt;/li&gt;
&lt;li&gt;Dependency vs DevDependency:&lt;/li&gt;
&lt;li&gt;Local &amp;amp; Global Package Installation:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Stay tuned for more insights into the world of JavaScript development! 🚀📦&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>npm</category>
      <category>developer</category>
    </item>
  </channel>
</rss>
