Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
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.
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
. Thehimalaya/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 methodstringify
is thetoHTML
of v1. The naming aligns nicely withJSON.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.