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

chore(deps): bump highlight.js from 9.18.1 to 10.0.0 #192

Merged
merged 2 commits into from Apr 25, 2020

Conversation

dependabot-preview[bot]
Copy link
Contributor

@dependabot-preview dependabot-preview bot commented Apr 22, 2020

Bumps highlight.js from 9.18.1 to 10.0.0.

Release notes

Sourced from highlight.js's releases.

10.0.0

Welcome to version 10.0. This a major release and therefore will contain breaking changes.

Breaking Changes

Our normal minor releases try to never break anything, holding all breaking changes for major releases. We tried to squeeze in as many as we could this time so that after 10.0 ships we'll be back to quiet sailing for a while before we need to push version 11. That said, we're very conservative about what we consider a breaking change.

i.e., if there it could possibly break things for anyone, it's typically a breaking change. The fact is a vast majority of users should upgrade and probably not notice any changes at all.

See VERSION_10_BREAKING_CHANGES.md for a comprehensive list of breaking changes, but here is a summary... if you use:

Core highlight.js lib on the client (with no extra CDN languages)

Just keep doing that.

  • If you're using darkula.css, you'll need to change that to darcula.css
  • The minified distributable has changed from .pack.js to .min.js, update your name when you update your URL.
  • If your users have very old browsers, they may no longer be supported (no more IE11, etc.). (We're using ES2015 code now.)
  • nohighlight or no-highlight are the only two CSS classes that will SKIP highlighting completely. *text* and *plain* no longer will do this.

Core highlight.js lib on the client (plus additional CDN languages)

Quite a few grammars have been renamed. Ex: nimrod.js is now nim.js.

  • Check the renamed grammars to see if you might need to update your links.
  • Be aware that you can't use version 9 CDN JS files anymore, they aren't compatible.
  • Plus read the above list of items.

highlight.js on the server (via NPM) and only use the public API

If you're just pulling in the FULL library (require('./highlight.js')) just keep doing that. You might not need to change anything.

  • If you're manually loading a smaller set of languages and using registerLanguage make sure you check out all the renamed grammars and dependency changes.
  • Read the client-side lists above also.

highlight.js on the server (via NPM) with a custom integration

Read the complete breaking changes list carefully.

  • Read the client-side lists above also.

highlight.js lib on the client, with source directly from our GitHub repo

That will no longer work. The source needs to be built to work properly and cannot be used "raw" unless you've also setup your own build pipeline (rollup, etc.). Fetch a static build from the CDN, the cdn-release repo or use the new highlightjs-dist NPM package.

highlight.js source code directly from our GitHub repo with a custom integration

All bets are off, since we only try to guarantee stability of our NPM and CDN builds and the public API. Read all the breaking changes and perhaps skim the commit history.

... (truncated)
Changelog

Sourced from highlight.js's changelog.

Version 10.0.0

New languages:

  • add(php-template) Explicit language to detect PHP templates (vs xml) [Josh Goebel][]
  • enh(python) Added python-repl for Python REPL sessions
  • add(never) Added 3rd party Never language support

New themes:

  • Srcery by [Chen Bin][]

Parser Engine Changes:

  • (bug) Fix beginKeywords to ignore . matches (#2434) [Josh Goebel][]
  • (enh) add before:highlight plugin API callback (#2395) [Josh Goebel][]
  • (enh) add after:highlight plugin API callback (#2395) [Josh Goebel][]
  • (enh) split out parse tree generation and HTML rendering concerns (#2404) [Josh Goebel][]
  • (enh) every language can have a name attribute now (#2400) [Josh Goebel][]
  • (enh) improve regular expression detect (less false-positives) (#2380) [Josh Goebel][]
  • (enh) make noHighlightRe and languagePrefixRe configurable (#2374) [Josh Goebel][]

Language Improvements:

  • enh(python) Exclude parens from functions params (#2490) [Álvaro Mondéjar][]
  • enh(swift) Add compactMap to keywords as built_in (#2478) [Omid Golparvar][]
  • enh(nim) adds func keyword (#2468) [Adnan Yaqoob][]
  • enh(xml) deprecate ActionScript inside script tags (#2444) [Josh Goebel][]
  • fix(javascript) prevent get/set variables conflicting with keywords (#2440) [Josh Goebel][]
  • bug(clojure) Now highlights defn- properly (#2438) [Josh Goebel][]
  • enh(bash) default value is another variable (#2439) [Josh Goebel][]
  • enh(bash) string nested within string (#2439) [Josh Goebel][]
  • enh(bash) Add arithmetic expression support (#2439) [Josh Goebel][]
  • enh(clojure) Add support for global definitions name (#2347) [Alexandre Grison][]
  • enh(fortran) Support Fortran 77 style comments (#2416) [Josh Goebel][]
  • (csharp) add support for @identifier style identifiers (#2414) [Josh Goebel][]
  • fix(elixir) Support function names with a slash (#2406) [Josh Goebel][]
  • fix(javascript) comma is allowed in a "value container" (#2403) [Josh Goebel][]
  • enh(apache) add deny and allow keywords [Josh Goebel][]
  • enh(apache) highlight numeric attributes values [Josh Goebel][]
  • enh(apache) highlight IP addresses, ports, and strings in sections [Josh Goebel][]
  • enh(php) added more keywords and include <?= syntax to meta [Taufik Nurrohman][]
  • fix(protobuf) Fix rpc when followed by a block (#) [Josh Goebel][]
  • enh(zephir) almost complete rework of the zephir grammar (#2387) [Josh Goebel][]
  • (markdown) much improved code block support (#2382) [Josh Goebel][]
  • (markdown) improve bold/italic nesting (#2382) [Josh Goebel][]
  • enh(csharp) Support where keyword as class constraint (#2378) [Josh Goebel][]
  • enh(csharp) Allow reference path in class inheritance lists (#2378) [Josh Goebel][]
  • enh(csharp) Add generic modifiers (in, out) (#2378) [Josh Goebel][]
  • (fortran) enh(fortran) support intrinsic data types (#2379) [Josh Goebel][]
... (truncated)
Commits
  • 51906fb (docs) there is a single AUTHORS file now
  • 2cb1759 (docs) tiny effort to update Russian docs with new names/urls
  • b49986e bump v10.0.0
  • e8ca7fb (chore) htmlbars.js now depends on handlebars.js
  • 0a89e7b (chore) extend the CDN npm build description a bit
  • c48b6c4 (dev) tools/checkAutodetect now detects exact relevance matches
  • c7c561d (yaml) add support for timestamps (#2496)
  • 18be9ee (docs) add CpcdosC+ to the list of supported languages (#2494)
  • 864b702 (docs) Add TSQL to the list of supported languages (#2492)
  • 4389bf2 (dev) Developer tool should use un-minified library
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Apr 22, 2020
@coveralls
Copy link

coveralls commented Apr 22, 2020

Coverage Status

Coverage remained the same at 97.027% when pulling 84538d6 on dependabot/npm_and_yarn/highlight.js-10.0.0 into 31f74a5 on master.

@curbengh
Copy link
Contributor

@dependabot rebase

to include Node 14 #193

@dependabot-preview dependabot-preview bot force-pushed the dependabot/npm_and_yarn/highlight.js-10.0.0 branch from 9b4c09b to f6fb467 Compare April 25, 2020 01:46
@curbengh
Copy link
Contributor

curbengh commented Apr 25, 2020

Highlight.js v10 introduces a breaking change to the sublanguage highlight feature (#37).

The feature doesn't work when language is specified, e.g. highlight(str, { lang: 'xml' }).

It only works if autoDetect option is enabled, i.e. highlight(str, { autoDetect: true }).

highlight(str, { lang: 'xml', autoDetect: true }) does not work either.

@stevenjoezhang
Copy link
Member

And test cases need to be updated

it('highlight sublanguages', done => {

See also #25

@curbengh
Copy link
Contributor

curbengh commented Apr 25, 2020

And test cases need to be updated

Done

@curbengh curbengh force-pushed the dependabot/npm_and_yarn/highlight.js-10.0.0 branch from f6fb467 to 84538d6 Compare April 25, 2020 02:51
result.should.eql([
'<figure class="highlight xml"><table><tr>',
'<figure class="highlight php-template"><table><tr>',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xml may be detected as php-template, see upstream changelog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lazy loading in highlight.js may break some languages highlighting
4 participants