。
I felt my heart nearly stop.
Literal
Life [subject-が] shrink thought [object-を] did.
命が縮む思いをする is an idiomatic expression meaning 'to feel one's life shortened' → 'to be terrified, to have a heart-stopping moment.' 思いをする ('to have the feeling of') is a common construction for naming a subjective experience. Captures a strong emotional scare.