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

Update dependency react-syntax-highlighter to v15 #461

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 10, 2022

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-syntax-highlighter 9.0.1 -> 15.4.5 age adoption passing confidence

Release Notes

react-syntax-highlighter/react-syntax-highlighter

v15.4.5

Compare Source

v15.4.4

Compare Source

v15.4.3

Compare Source

  • Fixed highlight version regression

v15.4.2

Compare Source

  • Updated lowlight to 1.17.0 to match highlight dependency version

v15.4.1

Compare Source

  • Bugfix: increased minwidth to avoid unequal line number widths
  • Bugfix: prevent last line of file from rendering an unwanted line number

v15.4.0

Compare Source

  • Security fix: updated highlight.js to 10.4.1

v15.3.1

Compare Source

  • Bugfix: styling correctly applied to interpolation punctuation

v15.3.0

Compare Source

  • Updated prismjs (1.22.0) and refractor (3.2.0)
  • Updated prism-themes (1.5.0)
  • Fixed a broken readme link

v15.2.1

Compare Source

  • Bugfix: use string templating in language-specific theming code

v15.2.0

Compare Source

  • Allow language-specific theme styles to override default theme styles

v15.1.0

Compare Source

  • Updated to prism-themes 1.4.1

v15.0.1

Compare Source

  • Regenerate Prism themes containing nested tokens

v15.0.0

Compare Source

  • Breaking change: Allow styling nested tokens with classes in styles (probably not practically breaking for most, since this is a change that fixes a previously non-working feature)

v14.0.2

Compare Source

  • updated test snapshots after 14.0.1 fix
  • added tests for line number rendering behavior

v14.0.0

Compare Source

  • New prop: wrapLongLines, which removes the need to manually add white-space: pre styling
  • New default prop value: showInlineLineNumbers = true: when showLineNumbers is true, we now default to inline line numbers instead of putting them in a separate <code> block
  • Explicit white-space styling on <code> tag (will be set to either white-space: pre or white-space: pre-wrap depending on value of wrapLongLines prop)

v13.5.3

Compare Source

  • don't forget to add current version to CHANGELOG at release time :)

v13.5.2

Compare Source

  • filled in CHANGELOG for v10.x through v13.5.1

v13.5.1

Compare Source

  • Brought back createElement that went missing as of version 13.5.
import createElement from "react-syntax-highlighter/create-element";

v13.5.0

Compare Source

  • Cleaned up old files in project root, add jest to eslint
  • Updated to refractor 3.1.0, which brings in prismjs 1.21.0. We'd pinned react-syntax-highlighter 13.3.1 to prismjs 1.21.0, but didn't realize that refractor's dependency would keep us at 1.20.0

v13.4.0

Compare Source

Bugfixes
  • JS error when using lineNumberStyle() for inline line numbers
  • incorrect 'hljs' className applied to <pre> when using Prism

v13.3.1

Compare Source

  • prism updated to 1.21.0, with lots of improvements: CHANGELOG for prism 1.21.0
  • added Github repo link to the upper right corner of demo pages
Bugfixes
  • Truncated Prism shell-session language command output
  • Incorrect syntax highlighting for mutli-line comments
  • Unexpected behavior with useInlineStyles={false}

v13.2.1

Compare Source

Bugfixes
  • Neglected to include rebuilt "Prism async light" demo files in 13.2.0 release

v13.2.0

Compare Source

  • Updated our prism-themes dependency to pull in new themes, including vsc-dark-plus
  • Prism async demo now dynamically loads autogenerated Prism themes list (EDIT: neglected to include built demo files, fixed in 13.2.1)
New Prism themes available
  • a11yDark
  • dracula
  • materialDark
  • materialLight
  • materialOceanic
  • nord
  • shadesOfPurple
  • synthwave84
  • vscDarkPlus

v13.1.0

Compare Source

Demo updates:

  • indicate that Highlight powers the default demo
  • restored Prism demo that went missing in 13.0.0
  • autogenerate demo-specific style lists (and add a comment to autogenerated files pointing out that they're autogenerated)
  • demos now autoload full lists of languages and styles from highlight/prism
  • minor UI adjustments

v13.0.0

Compare Source

  • latest highlight ^10.1.1 and lowlight ^1.14.0 dependencies
  • latest refractor ^3.0.0 and prism ^1.20.0 dependencies
  • updated codecov and lodash deps
  • corrected .gitignore
  • updated/fixed tests
  • new Demos UI
  • CircleCi v2 config added
  • exposed createElement() in public API
  • change FUNDING platform from liberapay to github
  • added projects to "built with" section of README
  • updated websocket-extensions to 0.1.4
New prop: showInlineLineNumbers
<SyntaxHighlighter
  showLineNumbers={true} // required to show line numbers, whether inline or not
  showInlineLineNumbers={true} // render them inside wrapped lines, instead of as a separate <code> block
  renderer={virtualizedRenderer({
    rowHeight: 20
  })}
>
  {code}
</SyntaxHighlighter>

When paired with showLineNumbers={true}, showInlineLineNumbers={true} injects line numbers into each wrapped line of code, instead of creating a separate <code></code> block for the numbers. This allows line numbering to work with virtualized renderers such as react-syntax-highlighter-virtualized-renderer.

Inline line numbers are styled so that they're not selected when drag-selecting multiple lines of highlighted text, preserving expected behavior.

Breaking changes

Highlight v10 introduced some breaking changes for us here which we've worked around (mainly that getLanguage was no longer exposed), but this shouldn't cause breakage for most people relying on react-syntax-highlighter and not consuming highlight.js directly.

Theme rename
  • If you rely on the darkula theme from highlight.js, highlight v10 has renamed that style to darcula.
Renamed/removed highlight.js languages
  • cs (renamed to csharp)
  • nimrod (renamed to nim)
  • tex (removed)
New languages

Note: react-syntax-highlighter provides an automated build wrapper around styles and languages provided by highlight.js (via lowlight) and prism (via refractor). Changes here are simply describing what's changed in those libraries. If you'd like to see another language or style added, please contribute to those libraries.

New highlight.js languages
  • cLike (c-like)
  • c
  • latex
  • phpTemplate (php-template)
  • pythonRepl (python-repl)
New prism.js languages
  • abnf
  • antlr4
  • aql
  • bbcode
  • bnf
  • brightscript
  • cil
  • cmake
  • concurnas
  • dax
  • dnsZoneFile (dns-zone-file)
  • ebnf
  • ejs
  • etlua
  • excelFormula (excel-formula)
  • factor
  • firestoreSecurityRules (firestore-security-rules)
  • ftl
  • gcode
  • gdscript
  • gml
  • hcl
  • javadoc
  • javadoclike
  • javastacktrace
  • jq
  • jsExtras (js-extras)
  • jsTemplates (js-templates)
  • jsdoc
  • json5
  • jsonp
  • latte
  • lilypond
  • llvm
  • moonscript
  • n1ql
  • nand2tetrisHdl (nand2tetris-hdl)
  • neon
  • pascaligo
  • pcaxis
  • phpdoc
  • powerquery
  • qml
  • regex
  • robotframework
  • shellSession (shell-session)
  • solidity
  • solutionFile (solution-file)
  • sparql
  • splunkSpl (splunk-spl)
  • sqf
  • t4Cs (t4-cs)
  • t4Templating (t4-templating)
  • t4Vb (t4-vb)
  • toml
  • turtle
  • vala
  • zig

v12.2.1

Compare Source

v12.1.0

Compare Source

v12.0.2

Compare Source

  • version bump, no other changes

v12.0.1

Compare Source

  • version bump, no other changes

v12.0.0

Compare Source

  • added projects to README
  • updated Docker config: removed /sbin/init command
  • introduced Github Actions config
  • removed CircleCI config
  • updated mixin-deep and handlebars dependencies
  • updated "removed" code in diff demo

v11.0.3

Compare Source

v11.0.2

Compare Source

  • updated style prop description in README
  • updated demo URL from conor.rodeo to conorhastings.github.io
  • updated lodash dep from 4.17.11 to 4.17.14

v11.0.1

Compare Source

  • version bump, no other changes

v11.0.0

Compare Source

  • version bump, no other changes

v10.3.5

Compare Source

v10.3.4

Compare Source

v10.3.3

Compare Source

  • build to update async-languages for highlight, picking up new languages added in 10.3.0

Historical note: vs-dark theme was automatically removed from AVAILABLE_STYLES_PRISM.MD in build process here

v10.3.2

Compare Source

  • version bump

v10.3.1

Compare Source

  • minor code change to diff demo
  • added FUNDING.yml
  • minor README updates

v10.3.0

Compare Source

  • added projects to "built with" section of README
  • corrected README typos
New highlight.js languages
  • angelscript
  • arcade
  • gml
  • isbl
  • pgsql
  • plaintext
  • properties
  • reasonml
  • sas
New prism.js styles
  • xonokai
  • vs-dark

v10.2.1

Compare Source

  • fixed classNames concatenation in createElement
  • updated test snapshots accordingly

v10.2.0

Compare Source

  • updated license copyright date
  • updated highlight from 9.12.0 to 9.13.0
  • updated lowlight from 1.9.1 to 1.11.0
New highlight.js styles available
  • a11yDark
  • a11yLight
  • anOldHope
  • atomOneDarkReasonable
  • gml
  • isblEditorDark
  • isblEditorLight
  • lightfair
  • nord
  • shadesOfPurple

v10.1.3

Compare Source

  • README corrections
  • updated deps: @babel/runtime, babel-jest, codecov, jest, request, webpack-dev-server
  • updated import paths in demos

v10.1.2

Compare Source

  • fine-tuned prettier config
  • prettier cleanup of src and demo code
  • use @babel/runtime instead of babel-runtime

v10.1.1

Compare Source

v10.1.0

Compare Source

v10.0.1

Compare Source

  • All highlighters except for the old "-light" varieties now have a supportedLanguages field which can be used to determine the supported languages

v10.0.0

Compare Source

  • registerLanguage is now a static method of the default export of highlighters that require registering of languages.
  • prism-async-light & light-async now ship with their own language loaders
  • Added esm & cjs outputs. Importing should now be done through import OR the import should point into the dist directory.
import SyntaxHighlighter from "react-syntax-highlighter/prism";

// Becomes:
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";

// OR (less ideally)
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter/dist/cjs/prism";
// OR
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter/dist/esm/prism";
  • styles have moved into the dist directory. Update your imports from:
import style from 'react-syntax-highlighter/styles/prism'

to:

import style from 'react-syntax-highlighter/dist/styles/prism'

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@vercel
Copy link

vercel bot commented Jan 10, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nteract/nteract-site/9KYLidBqyELcs8uBR2ni6huCHnZq
✅ Preview: Failed

@renovate
Copy link
Contributor Author

renovate bot commented Jan 11, 2022

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 15.x releases. But if you manually upgrade to 15.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/react-syntax-highlighter-15.x branch January 11, 2022 16:21
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