extended-buffer 7.0.1 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![npm version](https://badge.fury.io/js/extended-buffer.svg)](https://badge.fury.io/js/extended-buffer)
1
+ [![npm version](https://badge.fury.io/js/extended-buffer.svg?flush_cache=v7_0_2)](https://badge.fury.io/js/extended-buffer)
2
2
 
3
3
  # ExtendedBuffer
4
4
 
@@ -63,7 +63,7 @@ type ExtendedBufferOptions = {
63
63
 
64
64
  Defaults (from source):
65
65
 
66
- - `capacity`: `512 * 1024` bytes (512 KiB)
66
+ - `capacity`: `16 * 1024` bytes (16 KiB)
67
67
  - `capacityStep`: same as `capacity`
68
68
 
69
69
  Example:
@@ -235,7 +235,7 @@ Common error codes you may see:
235
235
  - `SIZE_OUT_OF_RANGE` (reading more bytes than available)
236
236
  - `POINTER_OUT_OF_RANGE` (setting pointer outside `0…length`)
237
237
  - `INVALID_INTEGER_SIZE_VALUE_RANGE` (integer size not in `1…6`)
238
- - `EXCEEDING_MAXIMUM_BUFFER_SIZE` (allocation exceeds Node’s `kMaxLength`)
238
+ - `EXCEEDING_MAXIMUM_BUFFER_SIZE` (allocation exceeds Node’s `kMaxLength` or `os.totalmem()`)
239
239
  - `INVALID_INSTANCE_STATE` (internal invariant check failed)
240
240
 
241
241
  ---
@@ -4,7 +4,7 @@ exports.ExtendedBuffer = void 0;
4
4
  const buffer_1 = require("buffer");
5
5
  const utils = require("./utils");
6
6
  const errors_1 = require("./errors");
7
- const defaultCapacity = 512 * 1024;
7
+ const defaultCapacity = 16 * 1024;
8
8
  const defaultCapacityStep = defaultCapacity;
9
9
  class ExtendedBuffer {
10
10
  constructor(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extended-buffer",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "Node JS extended Buffer",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "scripts": {
16
16
  "build": "npm run clean && node ./node_modules/.bin/tsc",
17
- "test": "npm run build && node ./node_modules/.bin/mocha",
17
+ "test": "node ./node_modules/.bin/mocha",
18
18
  "coverage": "node ./node_modules/.bin/nyc --reporter=html --reporter=text ./node_modules/.bin/mocha",
19
19
  "clean": "node -e \"['./dist', './coverage', './.nyc_output'].forEach(item => require('fs').rmSync(item, {recursive:true,force:true}));\"",
20
20
  "prepack": "npm run build"
@@ -55,9 +55,9 @@
55
55
  ],
56
56
  "devDependencies": {
57
57
  "@types/node": "^6.14.13",
58
- "chai": "^4.1.2",
59
- "mocha": "^4.0.1",
60
- "nyc": "^11.3.0",
58
+ "chai": "^4.5.0",
59
+ "mocha": "^6.2.3",
60
+ "nyc": "^11.9.0",
61
61
  "typescript": "^4.7.2"
62
62
  }
63
63
  }