If your web app exists for more than 4 years in it's current form, then that's amazing. That will mean it's dealt with new browser technologies and possibly loss of existing ones. It also means that the site will not need major modifications in that time.
Most web applications I have worked on have been nearly completely rewritten after 3 years. Usually this is because requirements change; usually there are so many additions in that time that it's a completely different piece of software.
Also, in 8 years, I'm sure the YUI will have changed so much that it won't even be the same. 8 years ago it didn't exist; 8 years from now it maybe something completely different. This doesn't mean you can't continue to use the existing libraries exactly as they are.
The only thing you might think of doing is keeping versions yourself. I don't mean loading them from your own server, but just keeping them somewhere. Even just incase YUI changes something and ends up breaking something you were using--not likely.
I think any library is subject to these same concerns: YUI or jQuery, etc.