Skip to content

Commit

Permalink
Misc devdeps
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Dec 17, 2024
1 parent a0370c2 commit b04e95b
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 172 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"@vitest/coverage-v8": "^2.0.5",
"buffer": "^6.0.3",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^56.0.0",
"prettier": "^3.3.3",
"rimraf": "^6.0.1",
Expand Down
9 changes: 5 additions & 4 deletions src/bamFile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import crc32 from 'crc/crc32'
import crc32 from 'crc/calculators/crc32'
import { unzip, unzipChunkSlice } from '@gmod/bgzf-filehandle'
import { LocalFile, RemoteFile, GenericFilehandle } from 'generic-filehandle2'
import AbortablePromiseCache from '@gmod/abortable-promise-cache'
Expand Down Expand Up @@ -451,9 +451,10 @@ export default class BamFile {
(blockStart - dpositions[pos]) +
chunk.minv.dataPosition +
1
: // must be slice, not subarray for buffer polyfill on web
// @ts-expect-error
crc32.signed(ba.subarray(blockStart, blockEnd)),
: // this shift >>> 0 is equivalent to crc32(b).unsigned but uses the
// internal calculator of crc32 to avoid accidentally importing buffer
// https://github.com/alexgorbatchev/crc/blob/31fc3853e417b5fb5ec83335428805842575f699/src/define_crc.ts#L5
crc32(ba.subarray(blockStart, blockEnd)) >>> 0,
})

sink.push(feature)
Expand Down
Loading

0 comments on commit b04e95b

Please sign in to comment.