Page MenuHomePhabricator

[token-server] Replace references to ChronikClientNode with ChronikClient
ClosedPublic

Authored by bytesofman on Aug 15 2024, 23:06.

Details

Summary

Update token-server to use current nomenclature and not legacy ChronikClientNode

Test Plan

npm test, grep -r ChronikClientNode . and no output

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Just so I'm understanding this correctly, there's no need to update package.json here to pick up the new chronik-client with the deprecated legacy ChronikClientNode constructor? Because it's on a relative path? But external apps using the chronik-client will right?

there's no need to update package.json here to pick up the new chronik-client with the deprecated legacy ChronikClientNode constructor? Because it's on a relative path?

Correct -- tho also this app would still work with that relative import without this change, since chronik-client aliases both to the in-node class now.

But external apps using the chronik-client will right?

Well, the latest monorepo updates to chronik-client have not been published yet. So, currently there is no required action for anyone using chronik-client as an npm module.

The way the codebase is right now -- if chronik-client is published -- both ChronikClientNode and ChronikClient are acceptable aliases for an in-node chronik server. However, all of the types that ended with InNode have been updated ... so if those are referenced anywhere, that will need to be corrected before updating to 1.0.0.

...debating just dropping support for the ChronikClientNode import but it's probably harmless enough to keep in.

emack requested changes to this revision.Aug 15 2024, 23:43

Just so I'm understanding this correctly, there's no need to update package.json here to pick up the new chronik-client with the deprecated legacy ChronikClientNode constructor? Because it's on a relative path? But external apps using the chronik-client will right?

image.png (299×1 px, 37 KB)

This revision now requires changes to proceed.Aug 15 2024, 23:43

Just so I'm understanding this correctly, there's no need to update package.json here to pick up the new chronik-client with the deprecated legacy ChronikClientNode constructor? Because it's on a relative path? But external apps using the chronik-client will right?

image.png (299×1 px, 37 KB)

if you are testing it locally, you will have to build chronik-client in the appropriate directory

cd modules/chronik-client
npm run build
cd ../../apps/token-server
npm test
npm run build
This revision is now accepted and ready to land.Aug 16 2024, 01:20