@bare-ts/lib 0.6.0 → 0.6.1

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.
@@ -89,7 +89,7 @@ export function writeUintSafe32(bc, x) {
89
89
  // this is useful when assertions are skipped
90
90
  let zigZag = x >>> 0;
91
91
  while (zigZag >= 0x80) {
92
- writeU8(bc, 0x80 | (x & 0x7f));
92
+ writeU8(bc, 0x80 | (zigZag & 0x7f));
93
93
  zigZag >>>= 7;
94
94
  }
95
95
  writeU8(bc, zigZag);
package/dist/index.cjs CHANGED
@@ -553,7 +553,7 @@ function writeUintSafe32(bc, x) {
553
553
  }
554
554
  let zigZag = x >>> 0;
555
555
  while (zigZag >= 128) {
556
- writeU8(bc, 128 | x & 127);
556
+ writeU8(bc, 128 | zigZag & 127);
557
557
  zigZag >>>= 7;
558
558
  }
559
559
  writeU8(bc, zigZag);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bare-ts/lib",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "TypeScript library for BARE, a compact and simple binary-serialization format",
5
5
  "keywords": [
6
6
  "bare",
@@ -64,7 +64,9 @@
64
64
  "format": "biome check --linter-enabled=false --write .",
65
65
  "lint": "biome lint --error-on-warnings .",
66
66
  "prepublishOnly": "npm run clean && npm run build && npm test",
67
- "test": "NODE_ENV=development node --test && npm run check",
67
+ "test": "npm run test:dev && npm run test:prod",
68
+ "test:dev": "NODE_ENV=development node --test && npm run check",
69
+ "test:prod": "node --test && npm run check",
68
70
  "version": "sh ./scripts/version.sh"
69
71
  },
70
72
  "devDependencies": {