build: stable sort db and compact extensions