publish handler will no longer deal with snapshot version
replace ._createURL method with .resolve()
remove unnecessary variable
fix a bug when unpublish a module if there is only one versions in the document