Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
fix: add pbjs namespace
Browse files Browse the repository at this point in the history
To prevent namespace conflicts with protobuf message names.

Refs ipfs/js-ipfs-bitswap#323
  • Loading branch information
achingbrain committed Apr 20, 2021
1 parent 26a178f commit 434ff54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lint": "aegir lint",
"prepare": "npm run build",
"build": "npm run build:proto && npm run build:proto-types && aegir build",
"build:proto": "pbjs -t static-module -w commonjs --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/message/dht.js ./src/message/dht.proto",
"build:proto": "pbjs -t static-module -w commonjs -r libp2p-kad-dht --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/message/dht.js ./src/message/dht.proto",
"build:proto-types": "pbts -o src/message/dht.d.ts src/message/dht.js",
"test": "aegir test -t node",
"test:node": "aegir test -t node",
Expand Down
2 changes: 1 addition & 1 deletion src/message/dht.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var $protobuf = require("protobufjs/minimal");
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
var $root = $protobuf.roots["libp2p-kad-dht"] || ($protobuf.roots["libp2p-kad-dht"] = {});

$root.Record = (function() {

Expand Down

0 comments on commit 434ff54

Please sign in to comment.