Skip to content

Commit 8795507

Browse files
authored
chore: remove long dep (#22)
Use Long exported from protobufjs instead
1 parent 023c29b commit 8795507

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/protons/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@
154154
},
155155
"devDependencies": {
156156
"aegir": "^36.1.3",
157-
"long": "^4.0.0",
158157
"pbjs": "^0.0.14",
159158
"protons-runtime": "^1.0.0"
160159
}

packages/protons/test/index.spec.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import pbjs from 'pbjs'
66
import { Basic } from './fixtures/basic.js'
77
import { AllTheTypes, AnEnum } from './fixtures/test.js'
88
import fs from 'fs'
9-
import Long from 'long'
9+
import protobufjs from 'protobufjs'
10+
11+
const Long = protobufjs.util.Long
1012

1113
function longifyBigInts (obj: any) {
1214
const output = {
@@ -15,6 +17,7 @@ function longifyBigInts (obj: any) {
1517

1618
for (const key of Object.keys(output)) {
1719
if (typeof output[key] === 'bigint') {
20+
// @ts-expect-error exported types are incomplete
1821
output[key] = Long.fromString(`${output[key].toString()}`)
1922
}
2023
}

0 commit comments

Comments
 (0)