Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Aug 30, 2024
1 parent 8ae3cef commit a95bcf3
Show file tree
Hide file tree
Showing 6 changed files with 1,179 additions and 2,845 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"esm"
],
"scripts": {
"test": "vitest run",
"test": "vitest",
"lint": "eslint --report-unused-disable-directives --max-warnings 0",
"format": "prettier --write .",
"docs": "documentation readme --shallow src/indexedCramFile.ts --section=IndexedCramFile; documentation readme --shallow src/cramFile/file.ts --section=CramFile; documentation readme --shallow src/craiIndex.ts --section=CraiIndex; documentation readme --shallow errors.ts '--section=Exception Classes'; documentation readme --shallow src/cramFile/file.ts --section=CramFile; documentation readme --shallow src/cramFile/record.ts --section=CramRecord",
Expand All @@ -31,7 +31,7 @@
"build:es5": "tsc --target es2015 --module commonjs --outDir dist",
"build": "npm run build:esm && npm run build:es5",
"postbuild": "webpack",
"prepack": "npm test && npm run build && cp dist/errors.js errors.js",
"prepack": "npm test run && npm run build && cp dist/errors.js errors.js",
"postpublish": "rm errors.js",
"postversion": "git push --follow-tags"
},
Expand Down
4 changes: 1 addition & 3 deletions src/craiIndex.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import AbortablePromiseCache from '@gmod/abortable-promise-cache'
import QuickLRU from 'quick-lru'
import { unzip } from './unzip'
import { open } from './io'
import { CramMalformedError } from './errors'
Expand Down Expand Up @@ -124,7 +122,7 @@ export default class CraiIndex {

getIndex(opts?: { signal?: AbortSignal }) {
if (!this.parseIndexP) {
this.parseIndexP = this.parseIndex(opts).catch(e => {
this.parseIndexP = this.parseIndex(opts).catch((e: unknown) => {
this.parseIndexP = undefined
throw e
})
Expand Down
7 changes: 3 additions & 4 deletions src/cramFile/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,9 @@ export default class CramFile {
cacheSize: args.cacheSize ?? 20000,
}

// cache of features in a slice, keyed by the
// slice offset. caches all of the features in a slice, or none.
// the cache is actually used by the slice object, it's just
// kept here at the level of the file
// cache of features in a slice, keyed by the slice offset. caches all of
// the features in a slice, or none. the cache is actually used by the
// slice object, it's just kept here at the level of the file
this.featureCache = new QuickLRU({
maxSize: this.options.cacheSize,
})
Expand Down
2 changes: 1 addition & 1 deletion src/cramFile/slice/decodeRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function parseTagData(tagType: string, buffer: Uint8Array) {
return new Int8Array(buffer.buffer)[0]
}
if (tagType === 'C') {
return buffer[0] as number
return buffer[0]!
}
if (tagType === 'f') {
return new Float32Array(buffer.buffer)[0]
Expand Down
1 change: 0 additions & 1 deletion test/parse.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ describe('CRAM reader', () => {
refSeqStart: 0,
})
const {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
content,
parsedContent: compressionBlockData,
...compressionBlock
Expand Down
Loading

0 comments on commit a95bcf3

Please sign in to comment.