ssbc / ssb-ref

check if a string is a valid ssb-reference
MIT License
14 stars 10 forks source link

parseMultiServerAddress is deprecated... but ssb-ref uses it? #28

Closed stripedpajamas closed 6 years ago

stripedpajamas commented 6 years ago

I got the deprecated api used: ssb-ref.parseMultiServerAddress message recently and looked at the stack, only to find that the offending package was ssb-ref 😢

in ssb-ref: type() calls isInvite() calls isMultiServerInvite() calls parseMultiServerAddress()

should this function be marked as deprecated if the package itself is using it? if the goal is to warn others from calling parseMultiServerAddress, one idea is to keep the deprecation warning on parseMultiServerAddress, but have parseMultiServerAddress call _parseMultiServerAddress (move the logic there), and _parseMultiServerAddress can be called internally without warning.

christianbundy commented 6 years ago

one idea is to keep the deprecation warning on parseMultiServerAddress, but have parseMultiServerAddress call _parseMultiServerAddress (move the logic there), and _parseMultiServerAddress can be called internally without warning.

I think that's a great idea, I'd merge that PR. :tada:

stripedpajamas commented 6 years ago

Opened #29

christianbundy commented 6 years ago

Resolved by #29!