node-html-to-text icon indicating copy to clipboard operation
node-html-to-text copied to clipboard

Version 9 roadmap (tracking issue)

Open KillyMXI opened this issue 3 years ago • 3 comments

Work is being done in v9 branch.

Checklist

  • [x] Node ~~12~~ 14 is the minimal supported version
    • [x] Bump dependencies
      • [x] parseley and selderee are pure TypeScript dual-mode packages, no legacy dependencies anymore
      • [ ] Revisit before release
  • [x] ES Modules
    • [x] Use ES module syntax in sources
    • [x] Produce both ESM and CJS exports
  • [x] Remove he module dependency
  • [x] Drop options deprecated in v6
  • [x] Drop fromString (deprecated in v6)
  • [x] Drop positional arguments in BlockTextBuilder methods (deprecated in v7)
  • [x] Drop supplied CLI
    • [x] Middleware that allows better support of modern options
    • [ ] Publish middleware (right before release)
    • [ ] External CLI package
  • [x] #238
  • [x] (Sponsored)
    • [x] Split into two packages - base layer and formatters layer (formatters layer will have exactly the same API as the current package - no user-facing differences from this refactoring)
    • [x] Introduce a companion package "html to markdown" - formatters layer optimized to produce Markdown text of different flavors
    • [x] Allow to specify character escape sequences (when output format has special meaning for certain characters)
    • [x] Allow to prevent wrapping (as a state, lasting between multiple builder calls)
    • [x] Ability to provide metadata along with HTML document for use in formatters (URL replace in particular)
  • [ ] HTML cleanup
    • [ ] Introduce HTML transformers package
    • [ ] Expose HTML transformers package options in -text/md packages options
    • [ ] Provide some default transformers for markdown package to address common issues (valid HTML that doesn't translate into valid Markdown directly)
  • [x] Move generic formatters to base package and make available from any implementation package
    • [x] Solves #231
  • [ ] Update docs
  • [ ] Update package links
  • [ ] Bump date in license file
  • [ ] Update issue templates

KillyMXI avatar Nov 10 '21 16:11 KillyMXI

While the work is being delayed, Node 12 is reaching it's end of life: https://nodejs.org/en/about/releases/

If I were confident about the release being close I would've stick to Node 12 anyway. But it will most likely make no sense when I will finally be able to dedicate my time to finish this.

So the release will likely be targeted for Node 14 and it is at best a couple months away.

KillyMXI avatar Apr 28 '22 19:04 KillyMXI

Hey @KillyMXI, thank you for your great work! Do you think you could publish the v9 alpha to npm as a prerelease so that I can test it?

dargmuesli avatar Aug 29 '22 15:08 dargmuesli

Yes, I thought I'd need to publish a preview to see how the recent changes would work with webpack in particular. Currently busy with a job, will get to this as soon as I can.

KillyMXI avatar Aug 29 '22 15:08 KillyMXI

@dargmuesli, v9 preview version is live:

npm i html-to-text@preview

KillyMXI avatar Nov 02 '22 16:11 KillyMXI

It does work for me! Thank you @KillyMXI :heart:

dargmuesli avatar Nov 03 '22 06:11 dargmuesli

I have a non-code issue I have to deal with during and after v9 release.

I opened a discussion for it:

  • #261

Looking forward for any feedback.

KillyMXI avatar Nov 22 '22 12:11 KillyMXI

Version 9 is live. And new CLI is live.

I hope I didn't miss something. I won't be surprised there are more issues with CLI I didn't notice. I wonder whether there is a solution for stdin not being passed through .ps1 wrapper in PowerShell.

I see a somewhat different approach how entities package could've been utilized, exposing more options. I'll keep that in mind in case some feedback on weird and legacy html will crop up to have some examples. Until then, it's hard to tell what difference it makes inside htmlparser2.

Now looking for feedback - whether everything works or not.

KillyMXI avatar Dec 02 '22 23:12 KillyMXI

I've upgraded and everything continues to work. Thank you!

dargmuesli avatar Dec 06 '22 06:12 dargmuesli