All right.
We're not going to go around our common module find all of our different events.
Four in total and inside of the data property of each of those events we're going to say that we're
going to include the version number and it's going to be type number.
So we'll start off first with order canceled.
I'll find the data property right after the I.D..
We will include version as a number that's gonna be the version number of the order itself.
That's it.
Next up order created out of order created.
We'll say this thing is going to include version as a number
will go to ticket created ad in version number.
And then finally ticket updated at in version number and that's it.
Let's now go back over to our terminal.
We're going to go into the common module directory.
We're going to republish this thing and then we will update the version of the common module used inside
of tickets and orders back at my terminal inside of ticketing which is our overall project directory.
I'll change into the Common folder and do an NPM run a pub looks like I'm on version 20.
You probably are a little bit less as I mentioned many times I've definitely published a couple extra
versions here and there as I've rerecorded videos and whatnot.
So version 20 you're probably gonna be on a much lesser version.
Just remember that no we're now going to go over to our order service and the ticket service update
the com module version in there and we're going to want to just double check make sure that all these
virgin numbers line up with whatever version you just saw in your terminal I'll be in first inside of
orders inside of orders.
I'll do it in NPM updates my common module
so I'm going to expect to see one zero twenty.
In my case and yep looks good.
Next up I'll go over to the ticket service and do an NPM update
okay.
Such a bit I'll also.
Well now that we've got these new event definitions we're going to go round and unfortunately we're
going to make sure that every single time we publish an event we include that version number.
So there's going to be a little bit of hunting of code here to make sure that we always pass off the
version number appropriately.
This is going to include a little bit of hunting find.
Luckily we do also have our tests.
Now the tests are not going to necessarily make sure that we include the version number it's actually
typescript that can make sure that we include the version number on there.
So if we run the tests chances are we might see some typescript or something saying hey you were supposed
to include a version property here but you didn't.
So let's hunt through our ticket service and the order service in the next video and every single time
we publish an event we'll just make sure that we always include a version as well.