Merged
Conversation
Member
raucao
commented
Apr 17, 2026
- Upgrade webfinger.js to v3
- Use the new promise-based API
- Refactor specs to eliminate dangling WebFinger fallback requests
* Upgrade webfinger.js to v3 * Use the new promise-based API * Refactor specs to eliminate dangling WebFinger fallback requests
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades webfinger.js to v3 and adapts the discovery/connect flow and unit tests to the new promise-based lookup API, aiming to remove flaky WebFinger fallback request behavior in specs.
Changes:
- Bump
webfinger.jsfrom^2.7.1to^3.0.3and update lockfile accordingly. - Refactor
Discoverto use the promise-basedwebFinger.lookup(...)API and expose it viaRemoteStorage.Discoverfor easier stubbing. - Update unit tests to stub discovery instead of relying on delayed fetch mocks; adjust discovery timeouts in specs.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/remotestorage.test.mjs | Refactors #connect tests to stub RemoteStorage.Discover instead of mocking WebFinger HTTP calls. |
| test/unit/discover.test.mjs | Adjusts discovery-related timeouts and fixes a config reset typo. |
| src/remotestorage.ts | Exposes Discover on RemoteStorage and switches connect flow to call RemoteStorage.Discover(...). |
| src/discover.ts | Migrates WebFinger lookup from callback-style to promise-style; adds timer cleanup. |
| package.json | Upgrades webfinger.js dependency to v3. |
| package-lock.json | Updates lockfile to reflect webfinger.js@3.0.3. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Prevents potential caching of resolved records after timeouts
Stub auth methods to prevent accidental navigation side effects from calling `connect()`
Member
|
@raucao I am in the process of working on a new release with a security fix and some other improvements. Should we hold off on this PR for a few hours and update it once I push out the new release? silverbucket/webfinger.js#159 |
Member
Author
|
Yes, definitely. |
silverbucket
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.