Last 12 weeks · 0 commits
4 of 6 standards met
Hi, I know that ECMAScript Modules are the future, but for now I have a problem using ESM packages in my Electron.js project. I think that having a "hybrid" package is better! If my understanding is correct, we can extract the code from to a new file with a CJS style and in leave only a ESM style wrapper: and .
Repository: sindresorhus/default-shell. Description: Get the user's default shell Stars: 41, Forks: 7. Primary language: JavaScript. Languages: JavaScript (82.9%), TypeScript (17.1%). License: MIT. Latest release: v2.2.0 (4y ago). Open PRs: 0, open issues: 0. Last activity: 5mo ago. Community health: 85%. Top contributors: sindresorhus, mquevill, Richienb, msipinski.
Switches from a default export to named exports. Fixes #4.
We're using this module in hyper: https://github.com/zeit/hyper/blob/canary/app/session.js#L4 Since we require this module at startup, we won't see changes to the default shell, requiring a restart to use the new default shell after changing it. I have some ideas on how to fix this, but the best might be to export the detect function too, another way would be to purge the require cache in hyper, but that feels hacky. another way is to just copy this module code into hyper/lib. Thoughts?