Skip to content

Commit a6549b9

Browse files
authored
fix(#109): WASM in grapheme_iterator causing integer underflow (#110)
1 parent e4ea343 commit a6549b9

17 files changed

+194
-102
lines changed

lib/cjs/index.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cjs/index.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cjs/saxWasm.d.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ export type Detail = AttributeDetail | TextDetail | TagDetail | ProcInstDetail;
6868
* @template T - The type of detail to be read.
6969
*/
7070
export declare abstract class Reader<T extends Detail = Detail> {
71+
#private;
7172
protected data: Uint8Array;
7273
protected memory: WebAssembly.Memory;
7374
protected cache: Record<string, unknown>;
74-
protected dataView: Uint8Array;
75+
get dataView(): Uint8Array;
7576
/**
7677
* Creates a new Reader instance.
7778
*
@@ -124,7 +125,7 @@ export declare enum AttributeType {
124125
* 4. 'value' bytes - byte position name_length-n (n bytes)
125126
*/
126127
export declare class Attribute extends Reader<AttributeDetail> implements AttributeDetail {
127-
static LENGTH: 76;
128+
static LENGTH: 120;
128129
type: AttributeType;
129130
name: Text;
130131
value: Text;
@@ -179,7 +180,7 @@ export declare class Attribute extends Reader<AttributeDetail> implements Attrib
179180
* * `ptr` - The initial pointer position.
180181
*/
181182
export declare class ProcInst extends Reader<ProcInstDetail> implements ProcInstDetail {
182-
static LENGTH: 88;
183+
static LENGTH: 144;
183184
target: Text;
184185
content: Text;
185186
constructor(data: Uint8Array, memory: WebAssembly.Memory);
@@ -226,7 +227,7 @@ export declare class ProcInst extends Reader<ProcInstDetail> implements ProcInst
226227
* into its respective fields: `start`, `end`, and `value`.
227228
*/
228229
export declare class Text extends Reader<TextDetail> implements TextDetail {
229-
static LENGTH: 36;
230+
static LENGTH: 56;
230231
/**
231232
* Gets the start position of the text node.
232233
*
@@ -270,7 +271,7 @@ export declare class Text extends Reader<TextDetail> implements TextDetail {
270271
* `closeEnd`, `selfClosing`, `name`, `attributes`, and `textNodes`.
271272
*/
272273
export declare class Tag extends Reader<TagDetail> implements TagDetail {
273-
static LENGTH: 82;
274+
static LENGTH: 104;
274275
/**
275276
* Gets the start position of the tag opening.
276277
*

lib/cjs/saxWasm.js

+45-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)