Skip to content

Commit

Permalink
Update devDeps
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jul 30, 2023
1 parent 20bae27 commit 507c728
Show file tree
Hide file tree
Showing 6 changed files with 1,074 additions and 689 deletions.
14 changes: 6 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# [2.0.0](https://github.com/GMOD/bam-js/compare/v1.1.18...v2.0.0) (2023-06-08)


### Features

* explicit buffer import ([#98](https://github.com/GMOD/bam-js/issues/98)) ([66de9f4](https://github.com/GMOD/bam-js/commit/66de9f4ce30e3ff647d5297f093695e92ec9227c))


- explicit buffer import ([#98](https://github.com/GMOD/bam-js/issues/98))
([66de9f4](https://github.com/GMOD/bam-js/commit/66de9f4ce30e3ff647d5297f093695e92ec9227c))

- Add explicit buffer import
- Remove cross-fetch and object.entries polyfills
- Improve typescripting
- Remove chunkSizeLimit and fetchSizeLimit
* Add explicit buffer import
* Remove cross-fetch and object.entries polyfills
* Improve typescripting
* Remove chunkSizeLimit and fetchSizeLimit

## [1.1.18](https://github.com/GMOD/bam-js/compare/v1.1.17...v1.1.18) (2022-12-17)

Expand Down
32 changes: 15 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,26 @@
"abortable-promise-cache": "^1.5.0",
"buffer-crc32": "^0.2.13",
"generic-filehandle": "^3.0.0",
"long": "^4.0.0",
"quick-lru": "^4.0.0"
},
"devDependencies": {
"@types/buffer-crc32": "^0.2.2",
"@types/jest": "^29.5.1",
"@types/long": "^4.0.0",
"@types/node": "^18.16.0",
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
"eslint": "^8.40.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-unicorn": "^47.0.0",
"jest": "^29.5.0",
"@types/jest": "^29.5.3",
"@types/node": "^20.4.5",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"eslint": "^8.46.0",
"eslint-config-prettier": "^8.9.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-unicorn": "^48.0.1",
"jest": "^29.6.2",
"jest-fetch-mock": "^3.0.3",
"prettier": "^2.8.8",
"rimraf": "^5.0.0",
"standard-changelog": "^2.0.27",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4"
"prettier": "^3.0.0",
"rimraf": "^5.0.1",
"standard-changelog": "^3.0.0",
"ts-jest": "^29.1.1",
"typescript": "^5.1.6"
},
"publishConfig": {
"access": "public"
Expand Down
1 change: 0 additions & 1 deletion src/record.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-empty-function */
import Constants from './constants'

const SEQRET_DECODER = '=ACMGRSVTWYHKDBN'.split('')
Expand Down
19 changes: 1 addition & 18 deletions src/util.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
import Long from 'long'
import Chunk from './chunk'
import VirtualOffset from './virtualOffset'

export function timeout(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms))
}

export function longToNumber(long: Long) {
if (
long.greaterThan(Number.MAX_SAFE_INTEGER) ||
long.lessThan(Number.MIN_SAFE_INTEGER)
) {
throw new Error('integer overflow')
}
return long.toNumber()
}

/**
* Properly check if the given AbortSignal is aborted.
* Per the standard, if the signal reads as aborted,
Expand Down Expand Up @@ -113,13 +102,7 @@ export function optimizeChunks(chunks: Chunk[], lowest?: VirtualOffset) {
}

export function parsePseudoBin(bytes: Buffer, offset: number) {
const lineCount = longToNumber(
Long.fromBytesLE(
Array.prototype.slice.call(bytes, offset, offset + 8),
true,
),
)
return { lineCount }
return { lineCount: Number(bytes.readBigInt64LE(offset)) }
}

export function findFirstData(
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"include": ["src"],
"compilerOptions": {
"outDir": "dist",
"target":"es2018",
"target": "es2018",
"types": ["node", "jest"],
"lib": ["dom", "esnext"],
"declaration": true,
Expand Down
Loading

0 comments on commit 507c728

Please sign in to comment.