- [Instructor] Okay, so as you can see
we've published our package here,
but what if we wanted to work on it
and create a brand new version
or publish a brand new version?
This is what we'll explore right now.
So let's go back to VS code,
and what I'm going to do is add a package here,
and also, add a read me file.
So, like I said, a read me file is really important
when you create a new package.
So let's go ahead and do that.
So let me go and create a brand new file
by clicking on the plus,
and then I'm going to call this one readme.md.
And then I'm going to do something like,
this is an example of readme file for our package.
And, by the way, this is marked down syntax
if you wonder why I'm doing these little stars.
Npmtesty23, right?
So we've added a brand new file,
and then let's add a new package so we'll add socketio.
So let's do an npm I socketio
and you're going to see it show up on the package.json here.
Perfect, so we got that.
And there's a reason why I'm adding this package
'cause this kind of information will become very important
when we come to audit.
Alright, so now that we have all these different things
that we've added to our package,
we want to release or publish a new version.
So right now it's version 1.0.0.
So this would be considered adding maybe a package
and some notes on the read me file.
This is not a major release,
this is a minor release or a batch.
So we could do this one as a batch or minor release.
In this case I'm going to do a minor release.
So I'm going to do 1.1 and then save this.
And then what we need to do is go back to our terminal.
So I'm going to bring up view, terminal,
and then I'm going to publish again.
So what I'm going to do is do npm publish and then do a new tag
and I wanted to call this one readme_socketio,
and now I publish my brand new version.
As you can see it now has published the new version 1.1.0.
So if we go back to our project here,
I'm on the readme file, I can see the readme file.
If we look into the versions, we have the readme_socketio.
I also did in between takes a little version here
that says latest just to make sure to make sure
'cause we had a little issue with the internet
when I published it.
And because this is something that is not re writable,
then I had to test it.
But as you can see it has worked
and we also have a third version here.
Whenever you publish a new version you want to make sure
that your semantic version is changed.
So if you want to put at this tag you can put at this tag
so like this one or the beta or the latest,
or if you don't want to put a tag
you're not going to have anything in here.
So as you can see this how we can update the version.