Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create our own integrated fork of Angular's Domino fork #1

Closed
7 tasks done
pavelhoral opened this issue Apr 5, 2024 · 3 comments
Closed
7 tasks done

Create our own integrated fork of Angular's Domino fork #1

pavelhoral opened this issue Apr 5, 2024 · 3 comments

Comments

@pavelhoral
Copy link
Collaborator

pavelhoral commented Apr 5, 2024

I am creating this issue to track activities related to fully adopting this Domino fork into Mixmark / Turndown.

What needs to be done:

  • check licensing
  • create forked repository under
  • describe motivation behind this fork (why are we forking)
  • update README - add disclamer similar to what Angular's team made
  • update package.json - package will be deployed under @mixmark-io organization
  • release and publish to NPM
  • use in Turndown as a reference parser
@pavelhoral
Copy link
Collaborator Author

pavelhoral commented Apr 5, 2024

Motivation behind the fork:

  • Domino seems to be the best JS based HTML->DOM parser (Add happy-dom and benchmark turndown#457). However the last release was 4 years ago and there is no bugfixing being done in the repository.
  • There are issues we would love to see fixed (e.g. error while running with webpack bundle in nodejs turndown#439). As our usage in Turndown requires only a very narrow subset of features Domino offers, we can fork the repo and build our own package that will serve as the default reference parser (related to Separate Turndown Core turndown#290).
  • We are using Angular's fork as it provides a few fixes we want to have as well. Other than that our fork will be independent (we might pull changes from Angular when relevant in the future).

@pavelhoral
Copy link
Collaborator Author

pavelhoral commented Apr 6, 2024

There are some Angular-specific changes in the Angular's fork (duh :P), but they seem harmless to our use case, for example:

domino/lib/NodeUtils.js

Lines 15 to 20 in 9e7881d

// Export util functions so that we can run extra test for them.
// Note: we prefix function names with `ɵ`, similar to what we do
// with internal functions in Angular packages.
ɵescapeMatchingClosingTag: escapeMatchingClosingTag,
ɵescapeClosingCommentTag: escapeClosingCommentTag,
ɵescapeProcessingInstructionContent: escapeProcessingInstructionContent

I don't want to invest effort in removing those or to create our own fork from the original Domino repo. I think we are better off having commits from Angular including their changes that are not relevant for us.

@pavelhoral
Copy link
Collaborator Author

Turndown now uses this fork (mixmark-io/turndown#461). I consider this issue as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant