Diarrhea before labor? (TW: bodily fluids)

I’m 37w 1d and last night I had the most violent diarrhea and vomiting episode I have ever had in my life. Literally sitting on the toilet with my head in the garbage can at the same time. Once I fully finished I was perfectly fine the rest of the night minus the trauma from experiencing that, I could drink water and even ate a poptart two hours after with no sickness following, has anyone had this happen before labor and if so how long until you started contracting?