Last 12 weeks · 0 commits
4 of 6 standards met
Hi, I've been using this library successfully for quite some time to open a local file (the "index.html" file containing a Jest coverage report). Unfortunately, since the update to v11, it no longer works. Is this a breaking change (I haven't been able to find the changelog)? Or is it a bug? I am on Windows 10. Thanks.
Repository: sindresorhus/open. Description: Open stuff like URLs, files, executables. Cross-platform. Stars: 3450, Forks: 248. Primary language: JavaScript. Languages: JavaScript (97.6%), TypeScript (2.4%). License: MIT. Latest release: v11.0.0 (3mo ago). Open PRs: 0, open issues: 2. Last activity: 3mo ago. Community health: 85%. Top contributors: sindresorhus, Richienb, watson, kuzalekon, Kudo, alan-agius4, pluma, arthurvr, reneleonhardt, tim-stasse and others.
A fix for #318. This is just a simple patch and can of course be changed if necessary. The instead of just is because might contain things other than strings. This doesn't add escaping to the app name itself. I'm not sure if you want to set up a unit test for this scenario, and I'm not sure if this change marks a breaking API change (if some people already put \` in their strings even though that wouldn't work on other platforms).
I'm using this module with Node's new Single Executable Application functionality. Currently this requires you to bundle your application into a single JavaScript file, which I'm doing with esbuild. However, when importing the module, it chokes over because after bundling with esbuild, is undefined. This PR fixes that by falling back to in case is . This also means that if someone wants to use the bundled xdg binary, they can distribute it alongside the sea binary and it should work.