I broke my friends computer a year ago and he still doesn't know
What did you do to break his computer?
I accidently spilled a soda on it
What you did was an accident, and I'm sure he wouldn't have blamed you at the time.  But not telling your friend that this had happened is not acceptable. Tell your friend what you did and offer to pay for the repairs.
I'll fix it later, it's only a few dollars
I'm afraid that a broken computer will cost much more than a couple of dollars to fix.  However, the point remains, that even though this was just a forgivable accident, you should still tell your friend what happened, and that you are sorry for trying to cover it up.  Do what you can to help pay for the repairs, as that is the right thing to do.