jasmine / jasmine-npm

A jasmine runner for node projects.
MIT License
376 stars 145 forks source link

Support `exports` entry in `package.json` #177

Closed aminya closed 2 years ago

aminya commented 3 years ago

Some of the modern libraries like solid-js now rely on the exports entry in package.json to import the correct code for different environments (node, browser, etc).

Most of the tools such as Parcel, Rollup, Vite, etc support these entries, but Jasmine doesn't. Could you the support for that?

Here is more information about exports: https://nodejs.org/api/packages.html#packages_subpath_exports https://medium.com/swlh/npm-new-package-json-exports-field-1a7d1f489ccf

sgravrock commented 3 years ago

That sounds like it could be useful. The catch is that the jasmine node module doesn't have a particularly well-documented public API at this point, so adding exports would likely be a breaking change. (Contrast jasmine-core, which does have a documented public API but isn't packaged in a way that makes exports useful.) We'll take another look at this when we get close to the next major release.