Skip to content

Commit

Permalink
fix #93 - broken exports
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwilaby committed Jan 2, 2025
1 parent 57cf6a3 commit c57ac82
Show file tree
Hide file tree
Showing 18 changed files with 359 additions and 18 deletions.
2 changes: 2 additions & 0 deletions lib/cjs/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import * as SaxWasm from './saxWasm.js';
export * from './saxWasm.js';
export default SaxWasm;
6 changes: 5 additions & 1 deletion lib/cjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
// Import everything from saxWasm.js
const SaxWasm = require("./saxWasm.js");
// Export everything as named exports
__exportStar(require("./saxWasm.js"), exports);
//# sourceMappingURL=index.js.map
// Export everything as the default export
exports.default = SaxWasm;
1 change: 0 additions & 1 deletion lib/cjs/index.js.map

This file was deleted.

5 changes: 3 additions & 2 deletions lib/cjs/saxWasm.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ class SAXParser {
return this.end();
this.write(chunk.value);
if (eventAggregator.length) {
yield* eventAggregator;
for (const event of eventAggregator) {
yield event;
}
eventAggregator.length = 0;
}
}
Expand Down Expand Up @@ -316,4 +318,3 @@ const readPosition = (uint8Array, ptr = 0) => {
const character = readU32(uint8Array, ptr + 4);
return new Position(line, character);
};
//# sourceMappingURL=saxWasm.js.map
1 change: 0 additions & 1 deletion lib/cjs/saxWasm.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions lib/esm/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import * as SaxWasm from './saxWasm.js';
export * from './saxWasm.js';
export default SaxWasm;
6 changes: 5 additions & 1 deletion lib/esm/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
// Import everything from saxWasm.js
import * as SaxWasm from './saxWasm.js';
// Export everything as named exports
export * from './saxWasm.js';
//# sourceMappingURL=index.js.map
// Export everything as the default export
export default SaxWasm;
1 change: 0 additions & 1 deletion lib/esm/index.js.map

This file was deleted.

5 changes: 3 additions & 2 deletions lib/esm/saxWasm.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ export class SAXParser {
return this.end();
this.write(chunk.value);
if (eventAggregator.length) {
yield* eventAggregator;
for (const event of eventAggregator) {
yield event;
}
eventAggregator.length = 0;
}
}
Expand Down Expand Up @@ -305,4 +307,3 @@ const readPosition = (uint8Array, ptr = 0) => {
const character = readU32(uint8Array, ptr + 4);
return new Position(line, character);
};
//# sourceMappingURL=saxWasm.js.map
Loading

0 comments on commit c57ac82

Please sign in to comment.