-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to esm #107
base: main
Are you sure you want to change the base?
Convert to esm #107
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #107 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 19 13 -6
Lines 91 349 +258
Branches 0 41 +41
==========================================
+ Hits 91 349 +258
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
0d33cd8
to
8dd7553
Compare
* Prepare build for both CommonJS and ESM support * Export CommonJS bundled as default
This avoids creating another index file
e77d36f
to
e75ac16
Compare
nyc doesn't support ESM, but c8 does and is a drop in replacement See https://github.com/bcoe/c8
3640ab9
to
775439f
Compare
I published an alpha version using npm info @sinonjs/commons
@sinonjs/commons@4.0.0-alpha.0 | BSD-3-Clause | deps: 1 | versions: 25
Simple functions shared among the sinon end user libraries
https://github.com/sinonjs/commons#readme
dist
.tarball: https://registry.npmjs.org/@sinonjs/commons/-/commons-4.0.0-alpha.0.tgz
.shasum: 41fa7570fdc19265981f48ad8520d79703be4ecd
.integrity: sha512-D6UsFb7vj6k/iDBr3TVks/9BHc9vvClRK7JbM3NtxmmV/r2/i/6uh8Z78y4NGMaj2JTRjN2Hy3TTMB5+gPaK5g==
.unpackedSize: 64.0 kB
dependencies:
type-detect: 4.0.8
maintainers:
- mrgnrdrck <morgan@roderick.dk>
- fatso83 <carlerik@gmail.com>
- mantoni <mail@maxantoni.de>
- cjohansen <christian@cjohansen.no>
- benjamin.gruenbaum <benjamingr@gmail.com>
- simenb <sbekkhus91@gmail.com>
dist-tags:
latest: 4.0.0-alpha.0
published just now by mrgnrdrck <morgan@roderick.dk> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine!
This PR is the first in a series to convert all the Sinon repositories from CommonJS to ESM.
Process:
.cjs
extenssion.cjs
and.mjs
versionsexports
in package.json`nyc
withc8
, asnyc
doesn't (yet) support ESMdist-tag
ofnext
, so we can show that it works in the Sinon dependents before cutting a new release