Skip to content

One Point Oh

Compare
Choose a tag to compare
@andrejewski andrejewski released this 19 Nov 16:58
· 23 commits to master since this release

This major release includes a lot of changes (re-iterated from the PR):

  • Dropping the Version 0 spec. In v0.2 Himalaya underwent huge internal changes in order to support multiple specification simultaneously with a shared parser powering these different formats. In v0.3 we introduced the v1 specification which co-existed alongside v0. While definitely good for v0.x users who won't upgrade, supporting both specs is quite tedious and from an ecosystem standpoint extremely difficult to build around as you have to support every spec in your independent packages. Going forward in v1, we will only support the single spec. The capability for coexisting specs is still there but Himalaya will not advertise or advocate multiple specifications. Refer to the v1 spec for details of the new spec.

  • Dropping the CLI tool. Back in 2015, every utility had a CLI tool packaged with it. Himalaya followed suit with a tool of its own that was just enough to say we had one. Even in 2017 the CLI never was treated as a first-class citizen and to its final day had zero tests. A Himalaya CLI tool is not a bad idea, but should be its own package as to not be neglected by the core and also not thrash core's history as the CLI is improved in its own various ways.

  • Removing translate. The himalaya/translate module had always been a bit odd. I always wanted it in its own package but it was so frequently needed and so closely tied to the spec I didn't want to break it out. The dream was that it would be the rosetta stone of HTML, bridging the gap between HTML, Jade/Pug, HAML, and what not using Himalaya has the shared AST. That dream is still possible but will have to live in other packages. A nice by-product of this change is that Himalaya now has zero external dependencies, making the package as a whole smaller.

  • Adding stringify. To replace the most common use case of the translate module I have increased the core API's method count from 1 to 2. The new method stringify is the toHTML of v1. The naming aligns nicely with JSON.parse/JSON.stringify.

Overall I think that Himalaya v1 is a huge leap forward, if only because its scope is much more limited. There will be bugs, but now that the specification is doing a lot less, I don't plan to be adding new features. Maybe expect a v2 when HTML6 comes out and removes < or whatever.