chore: remove deprecated APIs: setExitNodeEnabled, ping(disco), fetch, ssh #150

Merged
codinget merged 1 commits from chore/remove-deprecated-apis into main 2026-07-30 00:16:43 +02:00
Owner

Remove the deprecated APIs on the JS/webnet side. Doesn't touch the go/tailscale side, that will need to be done in another PR there, and the submodule updated in this repo later.

Removes:

  • #141 - fetch: can be replaced by @webnet/http directly
  • #141 - ssh: not immediately replacable by @webnet/ssh, but currently unused in this restrictive form, will be replaced by #103
  • #144 - setExitNodeEnabled: can be replaced by setExitNode already, also adds setExitNode(null) as a more explicit synonym for setExitNode('')
  • #145 - ping('disco'): never actually worked on WASM builds of tailscale and not really useful in the first place as the other ping methods are always more relevant (testing the connection, netstack and the peerapi)
Remove the deprecated APIs on the JS/webnet side. Doesn't touch the go/tailscale side, that will need to be done in another PR there, and the submodule updated in this repo later. Removes: - #141 - `fetch`: can be replaced by `@webnet/http` directly - #141 - `ssh`: not immediately replacable by `@webnet/ssh`, but currently unused in this restrictive form, will be replaced by #103 - #144 - `setExitNodeEnabled`: can be replaced by `setExitNode` already, also adds `setExitNode(null)` as a more explicit synonym for `setExitNode('')` - #145 - `ping('disco')`: never actually worked on WASM builds of tailscale and not really useful in the first place as the other ping methods are always more relevant (testing the connection, netstack and the peerapi)
codinget added the Human label 2026-07-29 23:30:46 +02:00
Author
Owner

Resolved in afbc809.

Original finding: the exported IpnMainThreadHandle still declared setExitNode(stableNodeID: string), preventing connectMainThread() consumers from using the new setExitNode(null) API. The force-pushed revision widens the parameter to string | null, matching IpnClient, IpnWorkerClient, and the delegated IPN implementation.

✅ Resolved in `afbc809`. Original finding: the exported `IpnMainThreadHandle` still declared `setExitNode(stableNodeID: string)`, preventing `connectMainThread()` consumers from using the new `setExitNode(null)` API. The force-pushed revision widens the parameter to `string | null`, matching `IpnClient`, `IpnWorkerClient`, and the delegated `IPN` implementation.
codinget added 1 commit 2026-07-29 23:39:02 +02:00
chore: remove deprecated APIs: setExitNodeEnabled, ping(disco), fetch, ssh
CI / format (pull_request) Successful in 2m41s
CI / lint (pull_request) Successful in 2m46s
CI / install (pull_request) Successful in 10m45s
CI / typetest (pull_request) Successful in 2m49s
CI / typecheck (pull_request) Successful in 3m2s
CI / node-tests (pull_request) Successful in 3m10s
CI / browser-tests (pull_request) Successful in 6m13s
afbc809240
codinget force-pushed chore/remove-deprecated-apis from 4ca69f63d8 to afbc809240 2026-07-29 23:39:02 +02:00 Compare
Author
Owner

The PR advertises setExitNode(null) as the explicit way to clear an exit node and updates IpnClient plus IpnWorkerClient accordingly, but the exported IpnMainThreadHandle still declares setExitNode(stableNodeID: string).

Nice catch!

and ideally cover the concrete handle declaration in a type-level test

Not needed, as this actually failed typescript (though I force-pushed the fix before CI could reach that) as it (transitively) implements IpnClient that has a string | null signature.

I also noticed that the FetchDebug component in example-app also caused type errors, so I removed it. Since the whole point of that component was to exercise the IPN method directly, there is no point in removing it.

> The PR advertises setExitNode(null) as the explicit way to clear an exit node and updates IpnClient plus IpnWorkerClient accordingly, but the exported IpnMainThreadHandle still declares setExitNode(stableNodeID: string). Nice catch! > and ideally cover the concrete handle declaration in a type-level test Not needed, as this actually failed typescript (though I force-pushed the fix before CI could reach that) as it (transitively) implements `IpnClient` that has a `string | null` signature. I also noticed that the `FetchDebug` component in `example-app` also caused type errors, so I removed it. Since the whole point of that component was to exercise the IPN method directly, there is no point in removing it.
codinget merged commit afbc809240 into main 2026-07-30 00:16:43 +02:00
codinget deleted branch chore/remove-deprecated-apis 2026-07-30 00:16:43 +02:00
Sign in to join this conversation.