taoqf / node-html-parser

A very fast HTML parser, generating a simplified DOM, with basic element query support.
MIT License
1.12k stars 112 forks source link

Recent update causing builds to fail #82

Closed robwatkiss closed 4 years ago

robwatkiss commented 4 years ago

This package is a dependency on a project I work on and a recent update has caused builds to start failing. The build logs give the following error:

Step #1: ERROR in ./node_modules/node-html-parser/dist/esm/nodes/html.js 99:31
Step #1: Module parse failed: Unexpected token (99:31)
Step #1: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
Step #1: |     }
Step #1: |     get tagName() {
Step #1: >         return this.rawTagName?.toUpperCase();
Step #1: |     }
Step #1: |     /**
Step #1:  @ ./node_modules/node-html-parser/dist/esm/index.js 2:0-79 2:0-79 2:0-79 2:0-79

The ? after rawTagName was introduced recently in this commit. I am unfamiliar with TypeScript but I am fairly certain this is a typo.

Reverting to version 1.3.1 fixes my builds.

taoqf commented 4 years ago

Thank you for your report, please try 1.4.4, if it still bothers you please let me know.

robwatkiss commented 4 years ago

Sorry for the delay @taoqf - that commit has fixed the bug, thanks for your swift response!