This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove fs as a dependency + update aegir
- Loading branch information
Showing
4 changed files
with
19 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
'use strict' | ||
|
||
const fs = require('fs') | ||
const path = require('path') | ||
const protobuf = require('protocol-buffers') | ||
|
||
const rpcSchema = fs.readFileSync( | ||
path.join(__dirname, 'rpc.proto')) | ||
|
||
const topicDescriptorSchema = fs.readFileSync( | ||
path.join(__dirname, 'topic-descriptor.proto')) | ||
const rpcProto = protobuf(require('./rpc.proto.js')) | ||
const topicDescriptorProto = protobuf(require('./topic-descriptor.proto.js')) | ||
|
||
exports = module.exports | ||
exports.rpc = protobuf(rpcSchema) | ||
exports.td = protobuf(topicDescriptorSchema) | ||
exports.rpc = rpcProto | ||
exports.td = topicDescriptorProto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e6ae36b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@haadcode - a huge "thank you" for landing this! Now my tests actually pass on the
libp2p-floodsub
implementation intojs-ipfs
core.e6ae36b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gavinmcdermott my pleasure. I'm also working on pubsub (js-ipfs-api side), so we should try and stay in sync as to what's happening. I'm currently refactoring the pubsub integration in js-ipfs-api and that work is here: https://github.com/haadcode/js-ipfs-api/blob/fix/pubsub/src/api/pubsub.js. I added some more tests too, so you might want to pull those in at some point for js-ipfs.