Skip to content

feat: ES Module#419

Merged
gr2m merged 39 commits intobetafrom
481/esm
May 29, 2023
Merged

feat: ES Module#419
gr2m merged 39 commits intobetafrom
481/esm

Conversation

@gr2m
Copy link
Copy Markdown
Member

@gr2m gr2m commented Oct 1, 2021

fixes #418

closes #330, closes #358, closes #390, closes #395, closes #396, closes #515, close #548, closes #580, closes #627, closes #628, closes #630, closes #631, closes #635

For reference, because it came up in other discussions, here is how I replaced proxyquire with quibble

- const addChannel = proxyquire('../lib/add-channel', {
-   './get-client': proxyquire('../lib/get-client', {'./definitions/rate-limit': rateLimit}),
- });
+ // mock rate limit imported via lib/get-client.js
+ await quibble.esm('../lib/definitions/rate-limit.js', RATE_LIMIT) // eslint-disable-line
+ const addChannel = (await import('../lib/add-channel.js')).default

BREAKING CHANGE: @semantic-release/github is now a native ES Module. It has named exports for each plugin hook (verifyConditions, publish, addChannel, success, fail)

BREAKING CHANGE: in case of error, the thrown error is not iterable directly. Use the error.errors property instead (via aggregate-error v4.0.0)

Todos

Reminder to self: run a single test:

npx ava test/get-client.test.js --match "Use the global throttler for all endpoints"

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ES Module

4 participants