<?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: Visaka Devi</title>
    <description>The latest articles on DEV Community by Visaka Devi (@visidevi).</description>
    <link>https://dev.to/visidevi</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%2F2362935%2F43c3d60b-bc60-46ad-8f66-2c137dc37bae.jpg</url>
      <title>DEV Community: Visaka Devi</title>
      <link>https://dev.to/visidevi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/visidevi"/>
    <language>en</language>
    <item>
      <title>publish a prerelease version of git your package</title>
      <dc:creator>Visaka Devi</dc:creator>
      <pubDate>Fri, 21 Feb 2025 13:25:10 +0000</pubDate>
      <link>https://dev.to/visidevi/publish-a-prerelease-version-of-git-your-package-41p</link>
      <guid>https://dev.to/visidevi/publish-a-prerelease-version-of-git-your-package-41p</guid>
      <description>&lt;p&gt;This guide outlines the steps to prepare, create, and publish a prerelease version of your package.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Preparing for Prerelease
&lt;/h2&gt;

&lt;p&gt;Ensure all changes are committed before creating a prerelease version.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"chore: prepare for new prerelease version"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Creating the Prerelease Version
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;npm version&lt;/code&gt; to create a prerelease version with a specified identifier:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm version prerelease &lt;span class="nt"&gt;--preid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-feature-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  This command will:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Increment the patch version.&lt;/li&gt;
&lt;li&gt;Add the prerelease identifier (&lt;code&gt;your-feature-name&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Create a new git commit with the updated version.&lt;/li&gt;
&lt;li&gt;Create a new git tag for the version.&lt;/li&gt;
&lt;li&gt;Update the &lt;code&gt;package.json&lt;/code&gt; file with the new version.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Building the Project
&lt;/h2&gt;

&lt;p&gt;Before publishing, ensure the project is built properly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Publishing the Prerelease Version
&lt;/h2&gt;

&lt;p&gt;Publish the prerelease version to npm with a specific tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm publish &lt;span class="nt"&gt;--tag&lt;/span&gt; your-feature-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  This ensures:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The package is published with the specified prerelease tag.&lt;/li&gt;
&lt;li&gt;Users can install the prerelease version without affecting the latest stable release.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Installing a Prerelease Version
&lt;/h2&gt;

&lt;p&gt;To install the prerelease version of the package, use:&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;your-package-name@your-feature-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows testing of the prerelease version before merging it into the stable release.&lt;/p&gt;

</description>
      <category>git</category>
      <category>npm</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
