julien-c / epub

node.js epub reader
https://www.npmjs.com/package/epub
Other
333 stars 307 forks source link

Throw better errors when there are parsing issues #49

Closed xavdid closed 4 years ago

xavdid commented 4 years ago

This is both a little more descriptive about where the error is raised, plus actually broadcasts the error contents. I added a test with a broken version of alice in wonderland (there's an invalid & in a chapter title)

While I was in there, I added the files property so we don't ship tests and the epub files in the npm package. Drops the package size pretty dramatically.

xavdid commented 4 years ago

ok, we should be good here! Added extra tests. My editor also removed trailing whitespace (which makes the div look extra big, but it's not). let me know if that's an issue. :)

julien-c commented 4 years ago

lgtm, feel free to merge, thanks for improving this:)

xavdid commented 4 years ago

sweet! can you release to npm when you have a chance?

julien-c commented 4 years ago

hmm, I think you released last time, no?

julien-c commented 4 years ago

(if not the case I can add you as a maintainer on npm, if that works for you)

xavdid commented 4 years ago

Oh, so I am. I had forgotten. 😁 I'll take care of that!