Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 2247

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 61k
Author
Asked: November 26, 20242024-11-26T03:39:09+00:00 2024-11-26T03:39:09+00:00

Publishing package to npm registry, tagging and doing a release, and beyond…

  • 61k

Release

You can find my release here.

Release tool and package registry used

npm

Installing the package

Installation instructions for node-tilify package can be found here.

Process of creating a release

I watched a couple of videos, read the documentation and a blog before I was able to successfully release the tool on npm. Videos watched include Creating Node.js modules & Publishing npm packages from npm's youtube channel and How To Create And Publish Your First NPM Package from Web Dev Simplified's youtube channel. Reading documentation included npm's very own documentation and blog includes Publishing a Node.js CLI tool to npm in less than 15 minutes. The steps I performed are below:

  1. Ran npm run adduser to create a user account on npm and link that user account locally to my machine. Ran npm version patch to upgrade the semver, followed by npm publish —access public to publish the package. Package was released with v1.0.0. Tested by running npm i node-tilify followed by node-tilify -h and it didn't work.

  2. I assumed the location of the index.js was incorrect so I moved it from /src dir to / root dir part of commit b832ef9e. Ran npm version patch to upgrade the semver, followed by npm publish —access public to publish the package. Package was released with patch release v1.0.1. Tested by running npm i node-tilify followed by node-tilify -h and it didn't work.

  3. I assumed the code within /index.js was exposed out in the open without being invoked by a function so I edited the code by putting all of the code into a function and then invoking that function at the bottom of /index.js part of commit 6597c56a. Ran npm version patch to upgrade the semver, followed by npm publish —access public to publish the package. Package was released with patch release v1.0.2. Tested by running npm i node-tilify followed by node-tilify -h and it didn't work.

  4. According to the blog that I read, it suggested adding a shebang line #!/usr/bin/env node at the top of index.js file so that systems like Unix can understand what executable to use to run the script, which in this case is node. Also added a property "bin": "./index.js" within /package.json file so that npm can install the package globally, refer to the bin entry and link the package name with the index.js file as specified in the ./package.json configuration parth of commit 1583e704. Ran npm version patch to upgrade the semver, followed by npm publish —access public to publish the package. Package was released with patch release v1.0.3. Tested by running npm i node-tilify followed by node-tilify -h and it didn't work.

  5. I missed one step from the blog, running npm link. npm link is a command-line tool for symlinking a local package as a dependency during development. It is commonly used for testing packages before publishing them. Ran npm link to link the package locally, followed by npm version patch to upgrade the semver, followed by npm publish —access public to publish the package. Package was released with patch release v1.0.4. Tested by running npm i node-tilify followed by node-tilify -h and it finally started working.

  6. It was then time to update the documentation with latest information on how to install the package from npm. I pushed the commit e8eb1820. Ran npm version patch to upgrade the semver, followed by npm publish —access public to publish the package. Package was released with patch release v1.0.5. Tested by running npm i node-tilify followed by node-tilify -h and it worked fine.

  7. Finally it was time to push all the tags to Github, ran git push --follow-tags command and then performed a release manually from GitHub to release v1.0.6 to the public.

User Testing

Manual user testing went quite well, which was unexpected. My tool only has 1 step to get it installed on another user's computer and they are ready to go to use the software. They did however point out a thing to fix on my documentation. The readme.md file mentioned the incorrect way to use the tool. It mentioned invoking the tool using node src/index.js -h which was now changed to node-tilify -h. Besides, they mentioned moving all the information regarding developer contributions like cloning a repo, installing the packages and running the repo code from the command line to contributing.md for better clarity. Also, they got stuck figuring out what passing a directory meant for input and output flags, so I explained it to them and they were able to get going after that point. Moreover, initially, they were reluctant to use toml configuration from the command line but then figured it out after reading the documentation a couple of times. Based on the feedback received the documentation was updated accordingly.

Learning Outcomes

This was a fantastic exercise for me considering I've never published packages to npm and releasing software to the public. I learnt how to test the software before publishing or releasing, publish a package on a registry, add git tags being part of the release, release the software on GitHub and perform user testing to gain valuable feedback from them to improve the documentation which in turn increases user adoption helping to capture wider audience who'd use the software.

javascriptopensourceprogrammingwebdev
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 2k
  • Popular
  • Answers
  • Author

    ES6 - A beginners guide - Template Literals

    • 0 Answers
  • Author

    Understanding Higher Order Functions in JavaScript.

    • 0 Answers
  • Author

    Build a custom video chat app with Daily and Vue.js

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.