highlight.js
highlight.js copied to clipboard
Discuss: Any changes to common subset for 2022 / v12?
Related: #2848
Time for yearly/release cycle of discussing any changes to the default common set of languages we bundle. v11 was released in May of last year and we do have things on the breaking changes list so I'm starting to think about a summer release of v12.
The list stands at:
│ lang │ minified │
───────────────────────────
│ bash │ 6202 │
│ c │ 7923 │
│ cpp │ 11438 │
│ csharp │ 8322 │
│ css │ 3802 │
│ diff │ 1195 │
│ go │ 2359 │
│ ini │ 2335 │
│ java │ 5090 │
│ javascript │ 14719 │
│ json │ 1171 │
│ kotlin │ 6229 │
│ less │ 6243 │
│ lua │ 3054 │
│ makefile │ 2073 │
│ markdown │ 5022 │
│ objectivec │ 4896 │
│ perl │ 8825 │
│ php │ 13898 │
│ php-template │ 1147 │
│ plaintext │ 289 │
│ python │ 9064 │
│ python-repl │ 624 │
│ r │ 7935 │
│ ruby │ 9188 │
│ rust │ 5396 │
│ scss │ 4331 │
│ shell │ 770 │
│ sql │ 11736 │
│ swift │ 12238 │
│ typescript │ 2745 │
│ vbnet │ 5265 │
│ xml │ 5204 │
│ yaml │ 4562 │
And the stats:
highlight.min.js : 117742 bytes
highlight.min.js.gz : 39711 bytes
Rather than rehash what "almost" happened last time I'm just going to start this discussion fresh. We have since added two "hot" new web-related grammars that aren't currently in common that are worth consideration:
- WASM
- GraphQL
I'm not sure why we never added Node REPL last time but we probably should now for parity.
Opening this up for discussion.
CC @highlightjs/core
I wonder if in 2022 we still need all 4 CSS variants:
- css (the real deal)
- less
- stylus (my bad, this was never in common)
- scss
Also makefile stands out at me a bit as a "which one doesn't belong" if we were looking for something to cut, but it's only only 2kb.... so I'm tempted to leave it...
@allejo Any thoughts?
I feel like with the widespread support and usage of CSS "variables" (aka custom properties), the need for CSS preprocessors has lessened significantly compared to a few years ago. Unless you're building a CSS library, chances are, you probably won't be writing in a preprocessor anymore. I think if the common subset only had CSS, that would suffice for people.
Regarding Makefile... I don't think it's popular enough to deserve being in the common subset. It's mostly used in the C/C++ ecosystem and maybe Python. I vote to remove it.
I'm on the border but I'd push to remove vbnet from the common subset. I see it used in the Microsoft ecosystem, especially for plug-in development, but its use is dwindling since Microsoft has moved its Office SDKs to JavaScript.
Also on the border, but I'd vote out Objective-C. Swift has largely taken over the Apple SDK ecosystem where I don't see a need to bundle it as being common anymore.
You have my +1 for WASM and GraphQL
You have my +1 for WASM and GraphQL
These have been added and will hit with 11.6, only about ~750 bytes file size increase.
I think I'm with you - we'll try to be a bit more aggressive this year with our removals - and if anyone yells too loudly we can always slip things back in, otherwise I'm probably likely to leave in some of this stuff for years to come...
Removing:
modified: src/languages/less.js
modified: src/languages/makefile.js
modified: src/languages/objectivec.js
modified: src/languages/scss.js
modified: src/languages/vbnet.js