Skip to content

Commit

Permalink
fix: add pbjs namespace (#145)
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 authored Apr 20, 2021
1 parent 27d57df commit dd26b92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ipfs-unixfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"prepare": "run-s prepare:*",
"prepare:proto": "pbjs -t static-module -w commonjs --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/unixfs.js ./src/unixfs.proto",
"prepare:proto": "pbjs -t static-module -w commonjs -r ipfs-unixfs --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/unixfs.js ./src/unixfs.proto",
"prepare:proto-types": "pbts -o src/unixfs.d.ts src/unixfs.js",
"prepare:types": "aegir build --no-bundle",
"test": "aegir test",
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-unixfs/src/unixfs.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["ipfs-unixfs"] || ($protobuf.roots["ipfs-unixfs"] = {});

$root.Data = (function() {

Expand Down

0 comments on commit dd26b92

Please sign in to comment.