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

Version 1 #74

Merged
merged 3 commits into from
Nov 19, 2017
Merged

Version 1 #74

merged 3 commits into from
Nov 19, 2017

Conversation

andrejewski
Copy link
Owner

@andrejewski andrejewski commented Nov 12, 2017

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. 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.

@coveralls
Copy link

coveralls commented Nov 12, 2017

Coverage Status

Coverage decreased (-1.007%) to 98.993% when pulling 4c2def6 on v1 into 0ffba19 on master.

@coveralls
Copy link

coveralls commented Nov 12, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 28a0f9d on v1 into 0ffba19 on master.

@coveralls
Copy link

coveralls commented Nov 12, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling f9badc9 on v1 into 0ffba19 on master.

@andrejewski andrejewski merged commit e7eea55 into master Nov 19, 2017
@andrejewski andrejewski deleted the v1 branch November 19, 2017 16:49
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

Successfully merging this pull request may close these issues.

2 participants