fix: output esm into "*.mjs" module#47
Conversation
b80a710 to
2f28ff9
Compare
|
Tests I did locally
import { Headers } from 'headers-polyfill'
it('works', () => {
expect(Headers).toBeDefined()
})
that all seems to check out, at least using node 16.17.1 without const {Headers} = require('headers-polyfill')
it('works', () => {
expect(Headers).toBeDefined()
})seems to work fine as does a ts file, using tsjest import { Headers } from 'headers-polyfill'
it('works', () => {
expect(Headers).toBeDefined()
}) |
kettanaito
left a comment
There was a problem hiding this comment.
This looks great. Thank you @mattcosta7!
I'm glad to be rid of the /esm folder. Let's see the CI status before merging.
|
I love GitHub Actions sometimes |
Yeah, I think this is probably because it's a fork, which doesn't have access to repo secrets (iirc) |
|
https://github.com/mswjs/headers-polyfill/blob/main/.github/workflows/ci.yml#L19 This line in the workflow is the error. Secrets aren't exposed on most actions in forks to avoid users maliciously stealing them Using pull_request_target events should allow secrets from forks (I believe), but comes with the drawback that the version of the action from the base branch runs instead of the head (so changes need to land or be branch off to validate) |
Released: v3.1.1 🎉This has been released in v3.1.1! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
Removes legacyOutput option from tsup, in favor the
mjsoutput used without that configuration.removes unnecessary
esmfolder and package.jsonoutput of lib with this config (to compare against).
I haven't published/tested node resolution here - this might be helpful before versioning/merging