Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt listMembers to exclusion and test it #95

Merged
merged 38 commits into from
May 11, 2023
Merged

Conversation

Powersource
Copy link
Collaborator

Fixes #77

index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@socket-security
Copy link

socket-security bot commented Apr 20, 2023

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Deprecated license ✅ 0 issues
Missing license ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

➕ Added Package Capability Access +/- Transitive Count Publisher
pull-flat-merge@2.0.3 None +0 nichoth

🚮 Removed packages: ssb-crut@4.6.3

package.json Outdated Show resolved Hide resolved
@Powersource Powersource marked this pull request as ready for review April 24, 2023 16:22
@Powersource Powersource requested a review from mixmix April 24, 2023 16:34
index.js Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
lib/epochs.js Outdated Show resolved Hide resolved
lib/epochs.js Outdated Show resolved Hide resolved
@Powersource
Copy link
Collaborator Author

"request review" meaning more like i have questions pls reply

index.js Outdated Show resolved Hide resolved
@mixmix
Copy link
Member

mixmix commented May 11, 2023

@Powersource I merged my refactor in (after putting README in, and the shape of the data coming out of listMembers)
I also pulled all the listening functions that were running in start() out into ./listeners.js (see comment below)

)
)
cb(null)
startListeners(ssb, getPreferredEpoch, console.error)
Copy link
Member

Choose a reason for hiding this comment

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

BOOM, look at this cute lil guy. Tidies up a whole mess.
Also takes an error-handler at the end, so we can easily decide what we wanna do with those errors later and change this in one place

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

woo nice

@mixmix
Copy link
Member

mixmix commented May 11, 2023

Finally... I found a limitation which is causing that test to fail.
Solution in this PR : #112

preferredEpoch (live) now emits on membership updates
Comment on lines +147 to +150
ssb.box2.addGroupInfo(
groupId,
{ key: epochInfo.secret },
(err) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this is unlikely to be needed here, we would need to have already added the epoch secret to figure out that the epoch is preferred i think

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

but doesn't technically hurt and we'll be poking around here more later

@Powersource
Copy link
Collaborator Author

who's even reviewing this anymore lol? i'll just merge now lmao

@Powersource Powersource merged commit 12e9979 into master May 11, 2023
3 checks passed
@Powersource Powersource deleted the listmembers-exclusion branch May 11, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt listMembers to exclusion
2 participants