chore: replace metalsmith-prism with highlight.js#4493
Merged
Conversation
Remove a metalsmith plugin that hasn't been updated recently. This has several advantages: * Removes some vulnerabilities the GitHub UI is complaining about. * Eliminates an error message when building involving prism. * Uses the same highlighting library as the docs, setting the stage for possible consolidation and/or alignment.
richardlau
approved these changes
Mar 18, 2022
Member
There was a problem hiding this comment.
- Eliminates an error message when building involving prism.
I'm assuming this fixes this error during the website build so 👍 :
stderr: Failed to load prism syntax: mjs
stderr: Error: Cannot find module 'prismjs/components/prism-mjs.js'
stderr: Require stack:
stderr: - /website/node_modules/metalsmith-prism/lib/index.js
stderr: - /website/build.js
stderr: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
stderr: at Function.Module._load (node:internal/modules/cjs/loader:778:27)
stderr: at Module.require (node:internal/modules/cjs/loader:1005:19)
stderr: at require (node:internal/modules/cjs/helpers:102:18)
stderr: at requireLanguage (/website/node_modules/metalsmith-prism/lib/index.js:42:11)
stderr: at Object.<anonymous> (/website/node_modules/metalsmith-prism/lib/index.js:86:11)
stderr: at initialize.exports.each (/website/node_modules/cheerio/lib/api/traversing.js:300:24)
stderr: at /website/node_modules/metalsmith-prism/lib/index.js:62:17
stderr: at /website/node_modules/lodash/lodash.js:4967:15
stderr: at baseForOwn (/website/node_modules/lodash/lodash.js:3032:24) {
stderr: code: 'MODULE_NOT_FOUND',
stderr: requireStack: [
stderr: '/website/node_modules/metalsmith-prism/lib/index.js',
stderr: '/website/build.js'
stderr: ]
stderr: }
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove a metalsmith plugin that hasn't been updated recently. This has
several advantages:
possible consolidation and/or alignment.