Skip to content

Commit

Permalink
fix: use protons instead of protobuf for native .proto to .ts (#141)
Browse files Browse the repository at this point in the history
* fix: use protons instead of protobuf for native .proto to .ts

Swaps protobufjs for protons so we can generate `.ts` from `.proto` that is browser friendly (e.g. uses bigints instead of long.js, etc) and isn't broken by default

* ignore lockfile

* fix lint

Co-authored-by: Marin Petrunic <[email protected]>
  • Loading branch information
achingbrain and mpetrunic authored Apr 14, 2022
1 parent 114e437 commit 2ad93fa
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 9,944 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ yarn-error.log*
lerna-debug.log*
coverage/*
package-lock.json
yarn.lock
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"test:browser": "npm run test -- -t browser -t webworker",
"test:electron-main": "npm run test -- -t electron-main",
"docs": "aegir docs",
"prepublish": "npm run build",
"proto:gen": "pbjs -t static-module -w es6 -r libp2p-noise -o ./src/proto/payload.js ./src/proto/payload.proto && pbts -o ./src/proto/payload.d.ts ./src/proto/payload.js"
"proto:gen": "protons ./src/proto/payload.proto",
"prepublish": "npm run build"
},
"dependencies": {
"@libp2p/interfaces": "^1.3.14",
Expand All @@ -78,7 +78,7 @@
"it-pair": "^2.0.2",
"it-pb-stream": "^1.0.2",
"it-pipe": "^2.0.3",
"protobufjs": "^6.11.2",
"protons-runtime": "^1.0.3",
"uint8arraylist": "^1.4.0",
"uint8arrays": "^3.0.0"
},
Expand All @@ -89,6 +89,7 @@
"benchmark": "^2.1.4",
"events": "^3.3.0",
"microtime": "^3.0.0",
"protons": "^3.0.3",
"mkdirp": "^1.0.4",
"sinon": "^13.0.1",
"util": "^0.12.4"
Expand Down
106 changes: 0 additions & 106 deletions src/proto/payload.d.ts

This file was deleted.

Loading

0 comments on commit 2ad93fa

Please sign in to comment.