1 00:00:01,570 --> 00:00:01,840 All right. 2 00:00:01,840 --> 00:00:05,020 We're not going to go around our common module find all of our different events. 3 00:00:05,020 --> 00:00:08,920 Four in total and inside of the data property of each of those events we're going to say that we're 4 00:00:08,920 --> 00:00:12,810 going to include the version number and it's going to be type number. 5 00:00:12,860 --> 00:00:14,820 So we'll start off first with order canceled. 6 00:00:15,250 --> 00:00:17,670 I'll find the data property right after the I.D.. 7 00:00:17,680 --> 00:00:23,620 We will include version as a number that's gonna be the version number of the order itself. 8 00:00:24,700 --> 00:00:26,180 That's it. 9 00:00:26,190 --> 00:00:29,640 Next up order created out of order created. 10 00:00:29,640 --> 00:00:32,130 We'll say this thing is going to include version as a number 11 00:00:35,120 --> 00:00:42,530 will go to ticket created ad in version number. 12 00:00:42,660 --> 00:00:48,270 And then finally ticket updated at in version number and that's it. 13 00:00:50,780 --> 00:00:52,130 Let's now go back over to our terminal. 14 00:00:52,130 --> 00:00:54,330 We're going to go into the common module directory. 15 00:00:54,380 --> 00:00:58,790 We're going to republish this thing and then we will update the version of the common module used inside 16 00:00:58,790 --> 00:01:06,510 of tickets and orders back at my terminal inside of ticketing which is our overall project directory. 17 00:01:06,590 --> 00:01:14,200 I'll change into the Common folder and do an NPM run a pub looks like I'm on version 20. 18 00:01:14,260 --> 00:01:19,030 You probably are a little bit less as I mentioned many times I've definitely published a couple extra 19 00:01:19,030 --> 00:01:23,390 versions here and there as I've rerecorded videos and whatnot. 20 00:01:23,470 --> 00:01:26,470 So version 20 you're probably gonna be on a much lesser version. 21 00:01:26,470 --> 00:01:32,170 Just remember that no we're now going to go over to our order service and the ticket service update 22 00:01:32,170 --> 00:01:35,740 the com module version in there and we're going to want to just double check make sure that all these 23 00:01:35,740 --> 00:01:41,080 virgin numbers line up with whatever version you just saw in your terminal I'll be in first inside of 24 00:01:41,080 --> 00:01:43,300 orders inside of orders. 25 00:01:43,300 --> 00:01:46,630 I'll do it in NPM updates my common module 26 00:01:51,410 --> 00:01:53,970 so I'm going to expect to see one zero twenty. 27 00:01:53,970 --> 00:01:59,010 In my case and yep looks good. 28 00:01:59,090 --> 00:02:03,650 Next up I'll go over to the ticket service and do an NPM update 29 00:02:12,730 --> 00:02:13,310 okay. 30 00:02:13,350 --> 00:02:15,880 Such a bit I'll also. 31 00:02:16,020 --> 00:02:21,450 Well now that we've got these new event definitions we're going to go round and unfortunately we're 32 00:02:21,450 --> 00:02:25,980 going to make sure that every single time we publish an event we include that version number. 33 00:02:26,010 --> 00:02:29,850 So there's going to be a little bit of hunting of code here to make sure that we always pass off the 34 00:02:29,850 --> 00:02:31,480 version number appropriately. 35 00:02:31,520 --> 00:02:34,170 This is going to include a little bit of hunting find. 36 00:02:34,320 --> 00:02:37,350 Luckily we do also have our tests. 37 00:02:37,470 --> 00:02:40,650 Now the tests are not going to necessarily make sure that we include the version number it's actually 38 00:02:40,680 --> 00:02:43,650 typescript that can make sure that we include the version number on there. 39 00:02:43,650 --> 00:02:47,880 So if we run the tests chances are we might see some typescript or something saying hey you were supposed 40 00:02:47,880 --> 00:02:50,660 to include a version property here but you didn't. 41 00:02:50,670 --> 00:02:54,570 So let's hunt through our ticket service and the order service in the next video and every single time 42 00:02:54,570 --> 00:02:58,440 we publish an event we'll just make sure that we always include a version as well.