add `package.json`, convert to CommonJS