Onions should also keep for ages, in a dark, dry area, like a shed or garage.
Remember when our Mums used to buy a string of onions off the French Onion Man ? ( Sioni Wynwns in Wales ! )
We have a pantry and onions keep for months either hung up or in a bag I got from lakeland. I put a few in the fridge now and then for quickness and always keep spring onions in the fridge.
Of course most fridges are dark most of the time - I keep forgetting that
And they are sealed unit too
I always keep my bread in the microwave for that reason