<?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: Wahdan</title>
    <description>The latest articles on DEV Community by Wahdan (@abdelrahmanahmed).</description>
    <link>https://dev.to/abdelrahmanahmed</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%2F235059%2Fc5d8a154-d7b3-4f28-bdb5-0c2db6bba51d.jpeg</url>
      <title>DEV Community: Wahdan</title>
      <link>https://dev.to/abdelrahmanahmed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abdelrahmanahmed"/>
    <language>en</language>
    <item>
      <title>Semantic Release Automation - Part 3 - deploy to github pages </title>
      <dc:creator>Wahdan</dc:creator>
      <pubDate>Mon, 25 May 2020 20:56:12 +0000</pubDate>
      <link>https://dev.to/abdelrahmanahmed/semantic-release-automation-part-3-deploy-to-github-pages-e9j</link>
      <guid>https://dev.to/abdelrahmanahmed/semantic-release-automation-part-3-deploy-to-github-pages-e9j</guid>
      <description>&lt;p&gt;In part 2 of &lt;strong&gt;Semantic Release Automation&lt;/strong&gt; series, we configured our Continues Integration part in our workflow using &lt;a href="https://github.com/semantic-release/semantic-release"&gt;semantic release package&lt;/a&gt; along with &lt;a href="https://github.com/features/actions"&gt;Github Actions&lt;/a&gt; and &lt;a href="https://github.com/features/packages"&gt;GitHub Packages&lt;/a&gt;. Now lets go live and configure the deployment workflow using &lt;a href="https://pages.github.com/"&gt;Github pages&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Table of contents
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;
Prerequisites &lt;/li&gt;
&lt;li&gt;Configure repository settings&lt;/li&gt;
&lt;li&gt;Update Github Action&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Prerequisites &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Basic knowledge of CI/CD workflow, you can refer to my 2 mins &lt;a href="https://dev.to/abdelrahmanahmed/continuous-integration-continuous-delivery-and-continuous-deployment-in-a-nutshell-1018"&gt;article&lt;/a&gt; about this topic.&lt;/li&gt;
&lt;li&gt;Create &lt;a href="https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line"&gt;Github token&lt;/a&gt;, this will be used by &lt;strong&gt;Github pages action&lt;/strong&gt; ( you can skip this part if you have already created it in the previous series).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Configure repository settings &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In your Github repository, Create a new branch from your main branch with name &lt;strong&gt;gh-pages&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Navigate to settings option.&lt;/li&gt;
&lt;li&gt;Go to GitHub Page section.&lt;/li&gt;
&lt;li&gt;Make sure that your are selecting the source branch to &lt;strong&gt;gh-pages&lt;/strong&gt; which you created before.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--09l9UdbV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/disswqnerlg2flpf3q8t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--09l9UdbV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/disswqnerlg2flpf3q8t.png" alt="gh pages"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now copy your site URL and open your &lt;code&gt;package.json&lt;/code&gt; file add &lt;strong&gt;homepage&lt;/strong&gt; key with your site URL as a value.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Update Github Action &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;To simply things for us we are going to use a &lt;a href="https://github.com/peaceiris/actions-gh-pages"&gt;ready action&lt;/a&gt; to deploy to github pages. You can find a full example in the following gist below:  &lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Now push a new commit and watch your pipeline in action, in a successful scenario you should find the build results in &lt;strong&gt;gh-pages&lt;/strong&gt; and your code is deployed to your site URL.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LS63d7Gq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t1z5a9y08gnx607zs7jp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LS63d7Gq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t1z5a9y08gnx607zs7jp.png" alt="DEMO"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading, waiting your feedback.&lt;/p&gt;

&lt;p&gt;Cover Design Credit: &lt;a href="https://www.freepik.com/free-photos-vectors/infographic"&gt;Infographic vector created by studiogstock - &lt;/a&gt;&lt;a href="http://www.freepik.com"&gt;www.freepik.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>github</category>
      <category>devops</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Critical Rendering Path </title>
      <dc:creator>Wahdan</dc:creator>
      <pubDate>Mon, 25 May 2020 19:47:11 +0000</pubDate>
      <link>https://dev.to/abdelrahmanahmed/critical-rendering-path-d0e</link>
      <guid>https://dev.to/abdelrahmanahmed/critical-rendering-path-d0e</guid>
      <description>&lt;p&gt;Measure then optimize, That being said, the following course/documentation from (Google and Udacity) will explain what is &lt;strong&gt;critical rendering path&lt;/strong&gt; (CRP) and how it is related to web performance. &lt;br&gt;
👉 &lt;a href="https://developers.google.com/web/fundamentals/performance/critical-rendering-path"&gt;Course / documentation link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Semantic Release Automation - Part 2 - Setup Semantic Release Package</title>
      <dc:creator>Wahdan</dc:creator>
      <pubDate>Wed, 20 May 2020 05:00:03 +0000</pubDate>
      <link>https://dev.to/abdelrahmanahmed/semantic-release-automation-part-2-setup-semantic-release-package-2b8j</link>
      <guid>https://dev.to/abdelrahmanahmed/semantic-release-automation-part-2-setup-semantic-release-package-2b8j</guid>
      <description>&lt;p&gt;Previously I talked about semantic version and why it is important to follow the guidelines for versioning, in this part of the series i will talk about how to maintain the package versioning automatically using &lt;a href="https://github.com/semantic-release/semantic-release" rel="noopener noreferrer"&gt;semantic release package&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here is a short description about semantic release from the authors: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;semantic-release automates the whole package release workflow including: determining the next version number, generating the release notes and publishing the package.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Semantic release is relying on the &lt;strong&gt;commit format&lt;/strong&gt; to determine the next release based on it. You can configure any format you want, the default format is &lt;a href="https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines" rel="noopener noreferrer"&gt;angular message format&lt;/a&gt;. for example if we have a package version &lt;code&gt;1.0.0&lt;/code&gt;, a commit message with this format:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;feat: added new feature&lt;/code&gt; will bump the version to 1.1.0 &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fix: added more config&lt;/code&gt; will bump the version to 1.0.1 &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more details about how semantic release works you can find it &lt;a href="https://github.com/semantic-release/semantic-release#how-does-it-work" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you didn't follow the naming conventions, semantic release package won't be able to determine the next release version. Also it would be a problem when you have a large team and you want all of them to follow the rules, luckily there are packages for this, we will talk about them shortly.&lt;/p&gt;

&lt;p&gt;I will use semantic release in a simple &lt;a href="https://reactjs.org/docs/create-a-new-react-app.html" rel="noopener noreferrer"&gt;react&lt;/a&gt; project and will use &lt;a href="https://github.com/features/actions" rel="noopener noreferrer"&gt;Github actions&lt;/a&gt; along with &lt;a href="https://github.com/features/packages" rel="noopener noreferrer"&gt;Github packages&lt;/a&gt; to automate our workflow.&lt;/p&gt;

&lt;p&gt;You can find a full example that we want to achieve at the end of this series &lt;a href="https://github.com/abdelrahmanahmed/semantic-release-example" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Get Ready 🔥&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Table Of Contents&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Prerequisites 📋&lt;/li&gt;
&lt;li&gt;Installing semantic release package 📦&lt;/li&gt;
&lt;li&gt;Configure Semantic Release package ⚙️&lt;/li&gt;
&lt;li&gt;Pipeline Setup ▶️&lt;/li&gt;
&lt;li&gt;See the workflow in action 🧪&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Prerequisites&lt;/strong&gt; 📋 &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Basic knowledge of CI/CD workflow, you can refer to my 2 mins &lt;a href="https://dev.to/abdelrahmanahmed/continuous-integration-continuous-delivery-and-continuous-deployment-in-a-nutshell-1018"&gt;article&lt;/a&gt; about this topic.&lt;/li&gt;
&lt;li&gt;Installed &lt;a href="https://www.npmjs.com" rel="noopener noreferrer"&gt;npm&lt;/a&gt; &amp;gt;=5.2.0&lt;/li&gt;
&lt;li&gt;Installed &lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;Git&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Fresh repository hosted on &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;Github&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Create &lt;a href="https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line" rel="noopener noreferrer"&gt;Github token&lt;/a&gt;, this will be used by semantic release package.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Installing semantic release package&lt;/strong&gt; 📦 &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;We will use &lt;a href="https://github.com/semantic-release/cli" rel="noopener noreferrer"&gt;sematnic release CLI&lt;/a&gt; package for quick installation. This will help us to configure multiple things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git repository.&lt;/li&gt;
&lt;li&gt;Package Manager repository &lt;strong&gt;(Github packages)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Continuous Integration platform &lt;strong&gt;(Github actions)&lt;/strong&gt;
Use this command to configure our workflow:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx semantic-release-cli setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You will be asked several questions about your credentials and configuration&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnsiya41ueo4dnrsy19k0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnsiya41ueo4dnrsy19k0.png" alt="CLI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NPM registry&lt;/strong&gt; the registry which you will store your package on it, in our case this we will use Github packages, so copy this url &lt;code&gt;https://npm.pkg.github.com/&lt;/code&gt; and press enter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication Method&lt;/strong&gt; Choose token based authentication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NPM username&lt;/strong&gt; here we will configure our Github packages credentials, so you need to enter your github username.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NPM password&lt;/strong&gt; this will be the github token which you have generated it earlier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Github username&lt;/strong&gt; this will be the same as username you enterd in NPM username, so enter it again 😅.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Github password&lt;/strong&gt; wrtie your Github password.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Which CI&lt;/strong&gt; we will be using Github actions, so choose the last option (other).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If everything goes Ok, the CLI will print out &lt;code&gt;GH_TOKEN&lt;/code&gt; and &lt;code&gt;NPM_TOKEN&lt;/code&gt;. These values will be used by our CI (Github actions), to be able to push automated commits and publish your package to Github packages.&lt;/p&gt;

&lt;p&gt;Now we are going to use &lt;code&gt;GH_TOKEN&lt;/code&gt; and &lt;code&gt;NPM_TOKEN&lt;/code&gt; and we will create new secrets in Github, which will be used by our pipelines.Go to your repository settings -&amp;gt; find &lt;strong&gt;secrets&lt;/strong&gt; tab in the left panel -&amp;gt; create two secrets, one for &lt;code&gt;GH_TOKEN&lt;/code&gt; and the other for&lt;code&gt;NPM_TOKEN&lt;/code&gt;. See below image:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0xihfqxs84ilx28chlr4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0xihfqxs84ilx28chlr4.png" alt="github secrets"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Edit your &lt;code&gt;package.json&lt;/code&gt; file and add our &lt;a href="https://docs.npmjs.com/files/package.json#publishconfig" rel="noopener noreferrer"&gt;publish config&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;publishConfig&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;registry&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://npm.pkg.github.com/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pkgRoot&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;build&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;code&gt;pkgRoot&lt;/code&gt; key is a path to your build directory, here we are using &lt;code&gt;create-react-app&lt;/code&gt; to build our package and produce the result to build directory. With these configations we will able to publish our package to Github packages.&lt;/p&gt;

&lt;p&gt;Also change the version value of your &lt;code&gt;package.json&lt;/code&gt; file and let it start with &lt;code&gt;1.0.0&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;version&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1.0.0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Configure Semantic Release package&lt;/strong&gt; ⚙️ &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Semantic Release has several configuration out of the box, we will use some of them to build our workflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a new file (&lt;code&gt;.releaserc.json&lt;/code&gt;) in your root directory (there are &lt;a href="https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration-file" rel="noopener noreferrer"&gt;other ways&lt;/a&gt; to create this file.&lt;/li&gt;
&lt;li&gt; copy the content of this gist to your &lt;code&gt;.releaserc.json&lt;/code&gt; file and change &lt;code&gt;repositoryUrl&lt;/code&gt; to your repository url.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;You may want to follow the &lt;a href="https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#options" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; for more clarification. &lt;/p&gt;

&lt;p&gt;The default &lt;a href="https://github.com/semantic-release/semantic-release/blob/master/docs/usage/plugins.md" rel="noopener noreferrer"&gt;plugins&lt;/a&gt; used be semantic release package are &lt;code&gt;['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/npm', '@semantic-release/github']&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I added two more external plugins &lt;a href="https://github.com/semantic-release/changelog" rel="noopener noreferrer"&gt;@semantic-release/changelog&lt;/a&gt; (to create an automated &lt;a href="https://github.com/abdelrahmanahmed/semantic-release-example/blob/master/CHANGELOG.md" rel="noopener noreferrer"&gt;changelog file&lt;/a&gt;) and &lt;a href="https://github.com/semantic-release/git" rel="noopener noreferrer"&gt;@semantic-release/git&lt;/a&gt; (to bump version in package.json and package-lock.json files and create a new commit with this change)&lt;/p&gt;

&lt;p&gt;Dont forget to install them in your dev dependencies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @semantic-release/git &lt;span class="nt"&gt;-D&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm &lt;span class="nb"&gt;install&lt;/span&gt; @semantic-release/changelog &lt;span class="nt"&gt;-D&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Pipeline Setup&lt;/strong&gt; ▶️ &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;To Define your Github actions, create &lt;code&gt;.github&lt;/code&gt; folder in your root project path and add &lt;code&gt;workflows&lt;/code&gt; folder inside it. After that create your action, for example : &lt;code&gt;ci.yml&lt;/code&gt;. A full path should be like this &lt;code&gt;.github/workflows/ci.yml&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Here is a full example of basic CI using semantic release command, copy this example to your action file and replace &lt;code&gt;SEMANTIC_RELEASE_GH_TOKEN&lt;/code&gt; and &lt;code&gt;SEMANTIC_RELEASE_NPM_TOKEN&lt;/code&gt; with your secrets name.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;You may noticed that we add this condition the build process &lt;code&gt;if: "!contains(github.event.head_commit.message, 'skip ci')"&lt;/code&gt;, this means that any commit message contains skip ci will not trigger complete the process of the pipelines, this is useful you wish to pervert unnecessary pipelines triggers for some commit messages. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;See the workflow in action&lt;/strong&gt; 🧪 &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Now push your commits to your repository and navigate to actions tab in your repository and watch your pipelines  progress. If everything goes well you should see a green indicators in all of action's steps. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjcpvphknnlz3l58hg86t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjcpvphknnlz3l58hg86t.png" alt="successful-piplines"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Semantic release package has created a new release, you can view it in releases tab. Also you can view your deployed package at packages tab&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwkqtkgdued0r1w13lo3h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwkqtkgdued0r1w13lo3h.png" alt="packages and releases tabs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Configurations🎉 now you have a built a basic automated workflow with github actions and semantic release package. Next we will continue our setup and implement the &lt;strong&gt;continues deployment&lt;/strong&gt; part to deploy our app to &lt;a href="https://pages.github.com/" rel="noopener noreferrer"&gt;Github pages&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks to freepik platform, i was able to build my article covered using their awesome designs. &lt;br&gt;
&lt;a href="https://www.freepik.com/free-photos-vectors/business" rel="noopener noreferrer"&gt;Business vector created by macrovector - &lt;/a&gt;&lt;a href="http://www.freepik.com" rel="noopener noreferrer"&gt;www.freepik.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>devops</category>
      <category>github</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Bored? 🙄 see what you can do now</title>
      <dc:creator>Wahdan</dc:creator>
      <pubDate>Thu, 16 Apr 2020 23:11:22 +0000</pubDate>
      <link>https://dev.to/abdelrahmanahmed/bored-see-what-you-can-do-now-11hf</link>
      <guid>https://dev.to/abdelrahmanahmed/bored-see-what-you-can-do-now-11hf</guid>
      <description>&lt;p&gt;Hello World,&lt;/p&gt;

&lt;p&gt;We have made a small funny game to see what you can do now. You can try it &lt;a href="https://abdelrahmanahmed.github.io/next-activity/"&gt;here&lt;/a&gt; .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: the content needs more of your contribution.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>contributorswanted</category>
      <category>react</category>
    </item>
    <item>
      <title>Slow network simulation using Chrome devtool</title>
      <dc:creator>Wahdan</dc:creator>
      <pubDate>Tue, 14 Apr 2020 09:59:18 +0000</pubDate>
      <link>https://dev.to/abdelrahmanahmed/slow-network-simulation-using-chrome-devtool-4h3k</link>
      <guid>https://dev.to/abdelrahmanahmed/slow-network-simulation-using-chrome-devtool-4h3k</guid>
      <description>&lt;p&gt;Chrome devtool team are developing more and more features to make our development activities easier. One of these interesting features is simulating network speed. you can do this with &lt;strong&gt;five&lt;/strong&gt; simple steps only, lets see this in a practical way:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Press &lt;code&gt;Command+Option+I&lt;/code&gt; (Mac) or &lt;code&gt;Control+Shift+I&lt;/code&gt; (windows/linux) to open chrome devtool.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to network tab.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---MeZns6r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vy7vv58ajiij9w4wjsbw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---MeZns6r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vy7vv58ajiij9w4wjsbw.png" alt="Network tab"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A small dropdown list will appear with default value &lt;strong&gt;online&lt;/strong&gt;. Here you can change the network to another option like &lt;strong&gt;slow 3G&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j9vxL3gy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vxh4mbghirxlh705rtxi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j9vxL3gy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vxh4mbghirxlh705rtxi.png" alt="Network tab options"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open &lt;a href="https://dev.to/"&gt;dev.to&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reload the page and see the magic&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Also you can create your own network settings, just click on custom option and type your download/ upload/ latency values.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Kq8Ik9g3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j0rztu2oaj8cpzpw4efn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Kq8Ik9g3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j0rztu2oaj8cpzpw4efn.png" alt="custom network profiles"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is an offline example for &lt;a href="https://dev.to/"&gt;dev.to&lt;/a&gt; using offline preset option 😄&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KnG7TCol--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6ib5803imqq8kixsettz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KnG7TCol--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6ib5803imqq8kixsettz.png" alt="offline"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading and happy hack week ✌️.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>testing</category>
      <category>developers</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Package alias name using NPM/yarn</title>
      <dc:creator>Wahdan</dc:creator>
      <pubDate>Fri, 14 Feb 2020 17:08:51 +0000</pubDate>
      <link>https://dev.to/abdelrahmanahmed/package-alias-name-using-npm-yarn-d9p</link>
      <guid>https://dev.to/abdelrahmanahmed/package-alias-name-using-npm-yarn-d9p</guid>
      <description>&lt;p&gt;Have you ever tried to install a package under an alias? you can do this using &lt;strong&gt;NPM&lt;/strong&gt; or yarn. Lets try to rename &lt;strong&gt;lodash&lt;/strong&gt; package to another name.&lt;/p&gt;

&lt;p&gt;with &lt;a href="https://www.npmjs.com/"&gt;NPM&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="kd"&gt;npm&lt;/span&gt; &lt;span class="kd"&gt;install&lt;/span&gt; &lt;span class="kd"&gt;yourPackageName&lt;/span&gt;@npm:lodash &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="na"&gt;-save
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;with &lt;a href="https://yarnpkg.com//"&gt;yarn&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="kd"&gt;yarn&lt;/span&gt; &lt;span class="kd"&gt;add&lt;/span&gt; &lt;span class="kd"&gt;yourPackageName&lt;/span&gt;@npm:lodash
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now you can import your aliased package with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;yourPackageName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;yourPackageName&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Happy hack week 😎&lt;/p&gt;

</description>
      <category>npm</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>A practical and fast way to learn Markdown syntax</title>
      <dc:creator>Wahdan</dc:creator>
      <pubDate>Sat, 19 Oct 2019 11:00:31 +0000</pubDate>
      <link>https://dev.to/abdelrahmanahmed/a-practical-and-fast-way-to-learn-markdown-syntax-1b10</link>
      <guid>https://dev.to/abdelrahmanahmed/a-practical-and-fast-way-to-learn-markdown-syntax-1b10</guid>
      <description>&lt;p&gt;Go ahead and write an article on dev.to, it's the best way to get started with markdown. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Continuous integration, continuous delivery and continuous deployment in a nutshell</title>
      <dc:creator>Wahdan</dc:creator>
      <pubDate>Thu, 17 Oct 2019 20:26:27 +0000</pubDate>
      <link>https://dev.to/abdelrahmanahmed/continuous-integration-continuous-delivery-and-continuous-deployment-in-a-nutshell-1018</link>
      <guid>https://dev.to/abdelrahmanahmed/continuous-integration-continuous-delivery-and-continuous-deployment-in-a-nutshell-1018</guid>
      <description>&lt;p&gt;Many people misunderstand between continuous integration, continuous delivery, and continuous deployment terms. In this article, I am going to simply these terms in simple words.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Continuous Integration
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y3tNPWoV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0w36ndtiw5uxu4oeqt6f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y3tNPWoV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0w36ndtiw5uxu4oeqt6f.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
When you finished developing on a feature branch and you want to merge your code back to your main branch. You need to run your tests before merging to the main branch to make sure that your feature is not breaking anything. This repetitive task is called &lt;strong&gt;continuous integration&lt;/strong&gt;, but doing this manually every time before merging to the main branch is boring and it will be an issue in large teams. Thanks to &lt;strong&gt;CI&lt;/strong&gt; tools such as Jenkins, Travis CI, and circle CI, you can run your tests automatically and apply CI in your workflow.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Continuous Deployment
&lt;/h1&gt;

&lt;p&gt;Continuous Deployment is all about releasing your app without any human interaction, so whenever a new code is merged to the main branch (after passing your tests), there will be a new release on your production environment.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Continuous Delivery
&lt;/h1&gt;

&lt;p&gt;Continuous Delivery is different from Continuous Deployment in only one thing, you need to click a button to deploy your app or decide when can release your application (human interaction is required).&lt;/p&gt;

&lt;p&gt;Now the question is: what is the best choice, Continuous Deployment or Continuous Delivery?&lt;/p&gt;

&lt;p&gt;Answer: This depends on your business needs. If you don't have users yet in your system, then continuous deployment should fit your needs, otherwise, you need to follow the continuous delivery approach. I believe you can mix between those two approaches in your workflow by applying continuous deployment on your &lt;strong&gt;development&lt;/strong&gt; branch so that whenever you merge your code to &lt;strong&gt;development&lt;/strong&gt; branch, your app will be deployed automatically on the &lt;strong&gt;development&lt;/strong&gt; environment. If you want to proceed to production, you need to click a button to release your app on &lt;strong&gt;production&lt;/strong&gt; environment.&lt;/p&gt;

&lt;p&gt;Here is a simple illustration:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gPK6acDm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rc6zhr4zdn4qhb1jkd0z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gPK6acDm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rc6zhr4zdn4qhb1jkd0z.png" alt="Alt Text"&gt;&lt;/a&gt;  &lt;/p&gt;

</description>
      <category>devops</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Block specific URL using match pattern with Chrome</title>
      <dc:creator>Wahdan</dc:creator>
      <pubDate>Fri, 11 Oct 2019 11:05:47 +0000</pubDate>
      <link>https://dev.to/abdelrahmanahmed/block-specific-url-using-match-pattern-with-chrome-2229</link>
      <guid>https://dev.to/abdelrahmanahmed/block-specific-url-using-match-pattern-with-chrome-2229</guid>
      <description>&lt;p&gt;Today we are going to learn about blocking some URL with Chrome. There are many use cases to block a specific URL, one of them is that you need to test your application behavior when your images are not accessible anymore for any reason. Chrome has provided a built-in feature to do this, let's discover it.&lt;/p&gt;

&lt;h1&gt;
  
  
  The steps
&lt;/h1&gt;

&lt;p&gt;1 - To access the DevTools, open a web page in Google Chrome and Right-click on any page and select &lt;strong&gt;Inspect&lt;/strong&gt;.&lt;br&gt;
2 - Click on &lt;strong&gt;three-dots icon&lt;/strong&gt; ( at the top right of the DevTools).&lt;br&gt;
3 - Navigate to &lt;strong&gt;more tools&lt;/strong&gt; option.&lt;br&gt;
4 - Click on the &lt;strong&gt;Request blocking&lt;/strong&gt; option.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fchbqaaq2nowahkky6efl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fchbqaaq2nowahkky6efl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
5- A new section is opened like the below image:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fuqozdaw896iubf0gieeu.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fuqozdaw896iubf0gieeu.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Click on &lt;strong&gt;Add pattern&lt;/strong&gt;. This will show up a text field.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmuugmi7gsrzy8q1oedpw.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmuugmi7gsrzy8q1oedpw.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
In the text field, you can write down any specific URL to block for example, &lt;code&gt;https://www.websiteToBlock.com&lt;/code&gt;. Or you can use a pattern such as &lt;code&gt;https://*.websiteToBlock.com/foo*&lt;/code&gt;, this will block any subdomain of &lt;code&gt;websiteToBlock&lt;/code&gt; as long as the path starts with &lt;code&gt;/foo&lt;/code&gt; and uses &lt;code&gt;https&lt;/code&gt; schema. For more details about Match patterns, you can follow these references from  &lt;a href="https://developer.chrome.com/apps/match_patterns" rel="noopener noreferrer"&gt;Google Chrome&lt;/a&gt; and &lt;a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns" rel="noopener noreferrer"&gt;Mozilla&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Have a nice testing day.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Semantic Release Automation - Part 1 - Understanding Semantic Version</title>
      <dc:creator>Wahdan</dc:creator>
      <pubDate>Thu, 26 Sep 2019 20:41:34 +0000</pubDate>
      <link>https://dev.to/abdelrahmanahmed/semantic-release-and-how-to-automate-it-part-1-4pa2</link>
      <guid>https://dev.to/abdelrahmanahmed/semantic-release-and-how-to-automate-it-part-1-4pa2</guid>
      <description>&lt;p&gt;Have you ever wondered why any software package must have a version number? what is the difference between this version &lt;code&gt;1.0.0&lt;/code&gt; number to this one &lt;code&gt;1.1.0&lt;/code&gt;?&lt;/p&gt;

&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Motivation&lt;/li&gt;
&lt;li&gt;What Is Semantic Versioning&lt;/li&gt;
&lt;li&gt;Updating Your Package Version&lt;/li&gt;
&lt;li&gt;About Semantic Release Package&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Motivation &lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DPKHlibh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/zgqmi0ug88q4j4qpf5ww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DPKHlibh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/zgqmi0ug88q4j4qpf5ww.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
In javascript world, we have multiple package managers such as &lt;a href="https://www.npmjs.com"&gt;npm&lt;/a&gt; and &lt;a href="https://yarnpkg.com/lang/en/"&gt;yarn&lt;/a&gt; that handle your dependencies in your application. They provide a bunch of features to make your life easier, you can view these features on their websites.&lt;/p&gt;

&lt;p&gt;With each package you installed in your application, there is a version number on each one of them. &lt;/p&gt;
&lt;h1&gt;
  
  
  What Is Semantic Versioning &lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://semver.org/"&gt;Semantic versioning&lt;/a&gt; is a set of rules that dictate how version numbers are assigned and incremented. The image below describes what each number means:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vTo7vOzT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mfyaefad6784i9z4ll2c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vTo7vOzT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mfyaefad6784i9z4ll2c.png" alt="Semantic Versioning"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So if: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;first number&lt;/strong&gt; from the right is incremented (patch). It means that there is a new &lt;strong&gt;hotfix/bugfix&lt;/strong&gt; on this package.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;middle number&lt;/strong&gt; is incremented (minor). It means that there is a new &lt;strong&gt;feature&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;last number&lt;/strong&gt; from the left is incremented (major). It means that there is a &lt;strong&gt;breaking change&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is important to highlight that it should be safe to update the package if there are any patch/minor changes (backward compatibility). If you find any major change, you have to double-check the package's release notes before upgrading its version. &lt;/p&gt;
&lt;h1&gt;
  
  
  Updating Your Package Version &lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;There are two ways to update your package version, either to do it manually or by using &lt;a href="https://docs.npmjs.com/cli/version"&gt;npm commands&lt;/a&gt; or &lt;a href="https://yarnpkg.com/lang/en/docs/cli/version/"&gt;yarn commands&lt;/a&gt;. If you don't have any package yet you can create a new one by running this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="kd"&gt;npm&lt;/span&gt; &lt;span class="kd"&gt;init&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="kd"&gt;yarn&lt;/span&gt; &lt;span class="kd"&gt;init&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Assuming that the current version of your package.json is &lt;code&gt;1.0.0&lt;/code&gt;. If you run this command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="kd"&gt;npm&lt;/span&gt; &lt;span class="kd"&gt;version&lt;/span&gt; &lt;span class="kd"&gt;patch&lt;/span&gt; //1.0.1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This will update your package.json version and it will be set to &lt;code&gt;1.0.1&lt;/code&gt;.What is happened under the hood is &lt;strong&gt;npm&lt;/strong&gt; will read your &lt;code&gt;package.json&lt;/code&gt; version and will update its value. You may also like to try out these commands and see the results&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="kd"&gt;npm&lt;/span&gt; &lt;span class="kd"&gt;version&lt;/span&gt; &lt;span class="kd"&gt;minor&lt;/span&gt; //1.1.0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="kd"&gt;npm&lt;/span&gt; &lt;span class="kd"&gt;version&lt;/span&gt; &lt;span class="kd"&gt;major&lt;/span&gt; //2.0.0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;so whenever you have done with your feature/bugfix or any other change you can use run these commands to update your package version. but there is a problem here, what if we are working within a team and each one of them will run these commands, what is the final version? how to avoid this conflict? even if you are working alone, trust me life is too short to run these commands every time after finishing your stuff.&lt;/p&gt;

&lt;h1&gt;
  
  
  About Semantic Release Package &lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://github.com/semantic-release/semantic-release"&gt;semantic release&lt;/a&gt; package is designed to automate your releases with many features like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create and update &lt;strong&gt;CHANGELOG&lt;/strong&gt; file&lt;/li&gt;
&lt;li&gt;Publish your packages to any registry.&lt;/li&gt;
&lt;li&gt;Update package.json version.&lt;/li&gt;
&lt;li&gt;Integration with any continues integration tool.&lt;/li&gt;
&lt;li&gt;Integration with GIT Hosted services.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my next article, I am going to explain how to set up this package in your project and automate your workflow.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>devops</category>
      <category>npm</category>
      <category>webdev</category>
    </item>
    <item>
      <title>JavaScript’s Primitive Wrapper Objects (the hidden feature)</title>
      <dc:creator>Wahdan</dc:creator>
      <pubDate>Mon, 23 Sep 2019 19:55:34 +0000</pubDate>
      <link>https://dev.to/abdelrahmanahmed/javascript-s-primitive-wrapper-objects-4agb</link>
      <guid>https://dev.to/abdelrahmanahmed/javascript-s-primitive-wrapper-objects-4agb</guid>
      <description>&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;p&gt;To understand this article we need to know more about primitive data types in javascript.&lt;/p&gt;

&lt;p&gt;There are &lt;strong&gt;seven&lt;/strong&gt; data types in javascript:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;String&lt;/li&gt;
&lt;li&gt;Number&lt;/li&gt;
&lt;li&gt;Boolean&lt;/li&gt;
&lt;li&gt;Object&lt;/li&gt;
&lt;li&gt;Null&lt;/li&gt;
&lt;li&gt;undefined&lt;/li&gt;
&lt;li&gt;Symbol&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Primitive data type means it is not an object and has &lt;strong&gt;no methods&lt;/strong&gt;. All primitives are &lt;strong&gt;immutable&lt;/strong&gt; (the value cant be altered). Let's see the following example:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;we declared a primitive variable called &lt;strong&gt;result&lt;/strong&gt; and a function that adds five to the result. The output is zero because &lt;strong&gt;addFive&lt;/strong&gt; function creates a local copy of &lt;strong&gt;result&lt;/strong&gt; and adds five to it and then the local copy variable is destroyed.&lt;/p&gt;

&lt;p&gt;Keep in mind that there is a difference between &lt;strong&gt;altering the value&lt;/strong&gt; and &lt;strong&gt;reassigning the value of a variable&lt;/strong&gt;.&lt;br&gt;
&lt;code&gt;&lt;br&gt;
let number5 = 5;&lt;br&gt;
number5 = 10; //(number5 variable is reassigned to a new value (10)&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Now we are ready, let's back to our main topic.&lt;/p&gt;
&lt;h1&gt;
  
  
  Motivation
&lt;/h1&gt;

&lt;p&gt;Have you ever wondered how this line of code even works?&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;You declared a primitive type (String) but still, you can use &lt;strong&gt;toUpperCase&lt;/strong&gt; method, one of String object methods, how is that possible? another good question, if we can use String methods on str then we can treat it as an object and set properties on it like this one :&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;But it outputs &lt;strong&gt;undefined!&lt;/strong&gt; sounds weird right?&lt;/p&gt;

&lt;h1&gt;
  
  
  Explanation
&lt;/h1&gt;

&lt;p&gt;If you try to access properties or set a new property on a string primitive type, javascript will create a temporary object wrapper implicitly on it using String constructor function. See the following example:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;As you can see, a temporary object wrapper was created when you tried to set the &lt;strong&gt;custom&lt;/strong&gt; property to &lt;strong&gt;str&lt;/strong&gt;, and the result is 1, after that the temporary object wrapper is removed and the custom property doesn’t exist anymore.&lt;/p&gt;

&lt;p&gt;Except for &lt;em&gt;null&lt;/em&gt; and &lt;em&gt;undefined&lt;/em&gt;, all primitive values have object equivalents that wrap around the primitive values.&lt;/p&gt;

&lt;p&gt;Keep in mind that javascript engine doesn’t keep this wrapper object around, as soon as the work of the method or other property is done, it is disposed of.&lt;/p&gt;

&lt;p&gt;Thank you for your time, please Don’t hesitate to comment below if you have any questions.&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
  </channel>
</rss>
