Skip to content

Upgrade webfinger.js to v3#1370

Merged
silverbucket merged 4 commits intomasterfrom
dev/upgrade_webfingerjs
Apr 17, 2026
Merged

Upgrade webfinger.js to v3#1370
silverbucket merged 4 commits intomasterfrom
dev/upgrade_webfingerjs

Conversation

@raucao
Copy link
Copy Markdown
Member

@raucao 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
@raucao raucao requested review from Copilot and silverbucket April 17, 2026 06:37
@raucao raucao added dev environment dependencies Pull requests that update a dependency file labels Apr 17, 2026
@raucao raucao changed the title Upgrade webfinger.js Upgrade webfinger.js to v3 Apr 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.js from ^2.7.1 to ^3.0.3 and update lockfile accordingly.
  • Refactor Discover to use the promise-based webFinger.lookup(...) API and expose it via RemoteStorage.Discover for 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.

Comment thread src/discover.ts Outdated
Comment thread test/unit/remotestorage.test.mjs
raucao added 2 commits April 17, 2026 11:55
Prevents potential caching of resolved records after timeouts
Stub auth methods to prevent accidental navigation side effects from
calling `connect()`
@silverbucket
Copy link
Copy Markdown
Member

silverbucket commented Apr 17, 2026

@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

@raucao
Copy link
Copy Markdown
Member Author

raucao commented Apr 17, 2026

Yes, definitely.

@silverbucket silverbucket merged commit 8dbd2ef into master Apr 17, 2026
2 checks passed
@silverbucket silverbucket deleted the dev/upgrade_webfingerjs branch April 17, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file dev environment

Development

Successfully merging this pull request may close these issues.

3 participants