Skip to content

Commit

Permalink
chore: remove long dep (#22)
Browse files Browse the repository at this point in the history
Use Long exported from protobufjs instead
  • Loading branch information
achingbrain committed Mar 31, 2022
1 parent 023c29b commit 8795507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/protons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
},
"devDependencies": {
"aegir": "^36.1.3",
"long": "^4.0.0",
"pbjs": "^0.0.14",
"protons-runtime": "^1.0.0"
}
Expand Down
5 changes: 4 additions & 1 deletion packages/protons/test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import pbjs from 'pbjs'
import { Basic } from './fixtures/basic.js'
import { AllTheTypes, AnEnum } from './fixtures/test.js'
import fs from 'fs'
import Long from 'long'
import protobufjs from 'protobufjs'

const Long = protobufjs.util.Long

function longifyBigInts (obj: any) {
const output = {
Expand All @@ -15,6 +17,7 @@ function longifyBigInts (obj: any) {

for (const key of Object.keys(output)) {
if (typeof output[key] === 'bigint') {
// @ts-expect-error exported types are incomplete
output[key] = Long.fromString(`${output[key].toString()}`)
}
}
Expand Down

0 comments on commit 8795507

Please sign in to comment.