Skip to content
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

feat!: use AbortSignal instead of EventEmitter for opener #131

Merged
merged 5 commits into from
May 2, 2024

Conversation

lukekarrys
Copy link
Contributor

BREAKING CHANGE: the opener function will now receive an object
with an abort signal which can be used to listen for the abort
event intead of an event emitter

@lukekarrys lukekarrys requested a review from a team as a code owner May 1, 2024 00:13
BREAKING CHANGE: the opener function will now receive an object
with an abort signal which can be used to listen for the abort
event intead of an event emitter
@lukekarrys
Copy link
Contributor Author

This also refactors the control flow to prefer async/await over promise chains.

lib/index.js Outdated Show resolved Hide resolved
lib/index.js Show resolved Hide resolved
lib/index.js Show resolved Hide resolved
lib/index.js Outdated Show resolved Hide resolved
lib/index.js Outdated Show resolved Hide resolved
lib/index.js Outdated Show resolved Hide resolved
lib/index.js Outdated Show resolved Hide resolved
lib/index.js Show resolved Hide resolved
BREAKING CHANGE: `hostname` is no longer sent as part of the web auth body

Co-authored-by: Gar <gar+gh@danger.computer>
BREAKING CHANGE: this uses AbortSignal.throwIfAborted() which is not available
in all versions of Node 16
@lukekarrys lukekarrys requested a review from wraithgar May 1, 2024 21:47
@lukekarrys
Copy link
Contributor Author

@wraithgar re-requesting review. note this also drops Node 16 now since AbortSignal.throwIfAborted() is not available in all versions of Node 16

@lukekarrys lukekarrys merged commit f67687d into main May 2, 2024
14 checks passed
@lukekarrys lukekarrys deleted the lk/abort-signal branch May 2, 2024 15:16
@github-actions github-actions bot mentioned this pull request May 2, 2024
lukekarrys pushed a commit that referenced this pull request May 2, 2024
🤖 I have created a release *beep* *boop*
---


## [10.0.0](v9.0.2...v10.0.0)
(2024-05-02)

### ⚠️ BREAKING CHANGES

* this uses AbortSignal.throwIfAborted() which is not available in all
versions of Node 16
* `hostname` is no longer sent as part of the web auth body
* the opener function will now receive an object with an abort signal
which can be used to listen for the abort event intead of an event
emitter

### Features

*
[`f67687d`](f67687d)
[#131](#131) drop node 16 support
(@lukekarrys)
*
[`d6f6ebe`](d6f6ebe)
[#131](#131) remove hostname from
body (@lukekarrys, @wraithgar)
*
[`c0bb22f`](c0bb22f)
[#131](#131) add webAuthOpener
method (@lukekarrys)
*
[`df44705`](df44705)
[#131](#131) use AbortSignal
instead of EventEmitter for opener (@lukekarrys)

### Bug Fixes

*
[`53db633`](53db633)
[#131](#131) pass signal to
webAuthCheckLogin timer (@lukekarrys)

### Dependencies

*
[`5c4221b`](5c4221b)
[#133](#133)
`npm-registry-fetch@17.0.1` (#133)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants