Skip to content

Commit

Permalink
v4.1.0 & upgraded dependencies (#25)
Browse files Browse the repository at this point in the history
* v4.1.0 & upgraded dependencies

* drop beta version in travis
  • Loading branch information
JoshGlazebrook authored Jul 24, 2019
1 parent cbfd454 commit c72b29d
Show file tree
Hide file tree
Showing 5 changed files with 1,201 additions and 865 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: node_js
node_js:
- 6
- 7
- 8
- 10
- 12
Expand Down
5 changes: 5 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Change Log
## 4.1.0
> Released 07/24/2019
* Adds int64 support for node v12+
* Drops support for node v4

## 4.0
> Released 10/21/2017
* Major breaking changes arriving in v4.
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smart-buffer",
"version": "4.0.2",
"version": "4.1.0",
"description": "smart-buffer is a Buffer wrapper that adds automatic read & write offset tracking, string operations, data insertions, and more.",
"main": "build/smartbuffer.js",
"homepage": "https://github.com/JoshGlazebrook/smart-buffer/",
Expand Down Expand Up @@ -28,25 +28,25 @@
"license": "MIT",
"readmeFilename": "README.md",
"devDependencies": {
"@types/chai": "4.0.4",
"@types/mocha": "^2.2.44",
"@types/chai": "4.1.7",
"@types/mocha": "5.2.7",
"@types/node": "^12.0.0",
"chai": "4.1.2",
"coveralls": "3.0.0",
"chai": "4.2.0",
"coveralls": "3.0.5",
"istanbul": "^0.4.5",
"mocha": "4.0.1",
"mocha": "6.2.0",
"mocha-lcov-reporter": "^1.3.0",
"nyc": "^11.3.0",
"source-map-support": "0.5.0",
"ts-node": "3.3.0",
"tslint": "5.8.0",
"nyc": "14.1.1",
"source-map-support": "0.5.12",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"typescript": "^3.2.1"
},
"typings": "typings/smartbuffer.d.ts",
"dependencies": {},
"scripts": {
"prepublish": "npm install -g typescript && npm run build",
"test": "NODE_ENV=test mocha --recursive --compilers ts:ts-node/register test/**/*.ts",
"test": "NODE_ENV=test mocha --recursive --require ts-node/register test/**/*.ts",
"coverage": "NODE_ENV=test nyc npm test",
"coveralls": "NODE_ENV=test nyc npm test && nyc report --reporter=text-lcov | coveralls",
"lint": "tslint --type-check --project tsconfig.json 'src/**/*.ts'",
Expand Down
15 changes: 13 additions & 2 deletions typings/utils.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="node" />
import { SmartBuffer } from './smartbuffer';
import { Buffer } from 'buffer';
/**
* Error strings
*/
Expand Down Expand Up @@ -48,8 +49,18 @@ declare function checkOffsetValue(offset: any): void;
* @param { SmartBuffer } buff The SmartBuffer instance to check against.
*/
declare function checkTargetOffset(offset: number, buff: SmartBuffer): void;
interface Buffer {
readBigInt64BE(offset?: number): bigint;
readBigInt64LE(offset?: number): bigint;
readBigUInt64BE(offset?: number): bigint;
readBigUInt64LE(offset?: number): bigint;
writeBigInt64BE(value: bigint, offset?: number): number;
writeBigInt64LE(value: bigint, offset?: number): number;
writeBigUInt64BE(value: bigint, offset?: number): number;
writeBigUInt64LE(value: bigint, offset?: number): number;
}
/**
* Throws if Node.js version is too low to support bigint
*/
declare function bigIntVersionCheck(): void;
export { ERRORS, isFiniteInteger, checkEncoding, checkOffsetValue, checkLengthValue, checkTargetOffset, bigIntVersionCheck };
declare function bigIntAndBufferInt64Check(bufferMethod: keyof Buffer): void;
export { ERRORS, isFiniteInteger, checkEncoding, checkOffsetValue, checkLengthValue, checkTargetOffset, bigIntAndBufferInt64Check };
Loading

0 comments on commit c72b29d

Please sign in to comment.