File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ New entries must be placed in a section entitled `Unreleased`.
1515 Previously, ` writeUintSafe ` and ` writeIntSafe ` might output a non-canonical encoding for numbers that were too large.
1616 It now robustly handles invalid input numbers that are too large.
1717
18+ - BREAKING CHANGES: require Node.js 16.9.0 or above.
19+
20+ This allows us to remove code for ` BareError#cause ` which is now natively supported by ` Error ` .
21+
1822## 0.6.1 (2026-01-05)
1923
2024- Fix ` writeUintSafe32 ` that wrongly encoded numbers larger than 16383 (` 2e14 - 1 ` )
Original file line number Diff line number Diff line change 2121 "url" : " https://github.com/bare-ts/lib/issues"
2222 },
2323 "engines" : {
24- "node" : " ^14.18.0 || >=16.0 .0"
24+ "node" : " ^>=16.9 .0"
2525 },
2626 "type" : " module" ,
2727 "exports" : {
Original file line number Diff line number Diff line change 77export class BareError extends Error {
88 override name = "BareError"
99
10- readonly cause : unknown
11-
1210 readonly issue : string
1311
12+ /**
13+ * Byte offset in the read buffer where the error occurred.
14+ */
1415 readonly offset : number
1516
16- constructor ( offset : number , issue : string , opts ?: { cause : unknown } ) {
17- super ( `(byte:${ offset } ) ${ issue } ` )
17+ constructor ( offset : number , issue : string , options ?: ErrorOptions ) {
18+ super ( `(byte:${ offset } ) ${ issue } ` , options )
1819 this . issue = issue
1920 this . offset = offset
20- this . cause = opts ?. cause
2121 }
2222}
Original file line number Diff line number Diff line change 22 "$schema" : " https://json.schemastore.org/tsconfig" ,
33 "compilerOptions" : {
44 "lib" : [
5- " ES2020 "
5+ " ES2022 "
66 ],
77 "module" : " Node16" ,
8- "target" : " ES2020 " ,
8+ "target" : " ES2022 " ,
99 "types" : [],
1010
1111 "noEmit" : true ,
You can’t perform that action at this time.
0 commit comments