Skip to content

Commit

Permalink
fix: prism themes import (#215)
Browse files Browse the repository at this point in the history
* chore(deps): pin prism-react-renderer version

Signed-off-by: Dipak Parmar <hi@dipak.tech>

* fix: update prism them import

Signed-off-by: Dipak Parmar <hi@dipak.tech>

* docs(changeset): Fix Prism themes import after upgrade

---------

Signed-off-by: Dipak Parmar <hi@dipak.tech>
  • Loading branch information
dipakparmar authored May 3, 2023
1 parent 6af6f8a commit c243589
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-drinks-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'docs-diary': minor
---

Fix Prism themes import after upgrade
6 changes: 4 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ const isDeployPreview =
process.env.VERCEL_ENV === 'development' ||
process.env.VERCEL_ENV === 'preview';

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const themes = require('prism-react-renderer').themes;

const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;

// With JSDoc @type annotations, IDEs can provide config autocompletion
/** @type {import('@docusaurus/types').DocusaurusConfig} */
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"autoprefixer": "10.4.14",
"clsx": "1.2.1",
"postcss": "8.4.23",
"prism-react-renderer": "^2.0.3",
"prism-react-renderer": "2.0.3",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-gist": "1.2.4",
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7700,19 +7700,19 @@ pretty-time@^1.1.0:
resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e"
integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==

prism-react-renderer@^1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.3.5.tgz#786bb69aa6f73c32ba1ee813fbe17a0115435085"
integrity sha512-IJ+MSwBWKG+SM3b2SUfdrhC+gu01QkV2KmRQgREThBfSQRoufqRfxfHUxpG1WcaFjP+kojcFyO9Qqtpgt3qLCg==

prism-react-renderer@^2.0.3:
prism-react-renderer@2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-2.0.3.tgz#251c93af94718991f6d4805bae70ac08c37997ce"
integrity sha512-KhTfMTznJeSqJkoqh9TUDuvRdyaNWXHCii1Z46sqthQXnMiFzCaWapfsmW5kHcFjRwEUJ92iysrgznv0y9XHlQ==
dependencies:
"@types/prismjs" "^1.26.0"
clsx "^1.2.1"

prism-react-renderer@^1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.3.5.tgz#786bb69aa6f73c32ba1ee813fbe17a0115435085"
integrity sha512-IJ+MSwBWKG+SM3b2SUfdrhC+gu01QkV2KmRQgREThBfSQRoufqRfxfHUxpG1WcaFjP+kojcFyO9Qqtpgt3qLCg==

prismjs@^1.28.0:
version "1.29.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.29.0.tgz#f113555a8fa9b57c35e637bba27509dcf802dd12"
Expand Down

0 comments on commit c243589

Please sign in to comment.