Skip to content

Latest Entities (6.0.0) breaks latest htmlparser2Β #2065

@Chinoman10

Description

@Chinoman10

[email protected] breaks htmlparser2.

version 6.0.0 is in the latest package.json of htmlparser2

htmlparser2 is expecting an export 'fromCodePoint' which isn't there anymore (after changing some imports in Tokenizer.js to fix yet another issue ⚠ ).
Changes done to Tokenizer.js:

  • Original
import { EntityDecoder, DecodingMode, htmlDecodeTree, xmlDecodeTree, } from "entities/lib/decode.js";
  • Change:
import { EntityDecoder, DecodingMode, decode, } from "entities";
const xmlDecodeTree = (str) => decode(str);
const htmlDecodeTree = (str) => decode(str);

Had to do a similar thing to Parser.js...

After changing entities's index to export fromCodePoint, everything works again.

I'm not sure if this is an entities issue or an htmlparser2's issue, but since htmlparser2 is using [email protected], I assume that at least should be changed, either point to an older version, or patch entities to 6.0.1 and point to that newer (fixed) version instead.

Thanks for looking into this @fb55 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions