File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " prism-react-renderer " : patch
3+ ---
4+
5+ Fix inclusion of @types dependency for prismjs
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export const languagesToBundle = <const>[
2828 * that starts off assuming Prism lives in global scope. We also need to provide Prism as that
2929 * gets passed into an iffe preventing us from needing to use global scope.
3030 */
31- const header = `// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport Prism from "prismjs";\nexport { Prism };`
31+ const header = `// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport * as Prism from "prismjs";\nexport { Prism };`
3232const prismPath = dirname ( require . resolve ( "prismjs" ) )
3333
3434const readLanguageFile = async ( language : string ) : Promise < string > => {
Original file line number Diff line number Diff line change 3434 "@testing-library/react" : " ^14.0.0" ,
3535 "@types/jest" : " ^29.5.0" ,
3636 "@types/node" : " ^18.15.11" ,
37- "@types/prismjs" : " ^1.26.0" ,
3837 "@vitejs/plugin-react" : " ^3.1.0" ,
3938 "babel-plugin-codegen" : " ^4.1.5" ,
4039 "happy-dom" : " ^9.7.1" ,
5049 "vitest" : " ^0.30.1"
5150 },
5251 "dependencies" : {
52+ "@types/prismjs" : " ^1.26.0" ,
5353 "clsx" : " ^1.2.1"
5454 }
5555}
Original file line number Diff line number Diff line change 11import type { CSSProperties } from "react"
2- import { Token as PrismToken } from "prismjs"
2+ import type { Token as PrismToken } from "prismjs"
33
44export type Language = string
55export type PrismGrammar = Record < string , unknown >
You can’t perform that action at this time.
0 commit comments