Skip to content

chore: replace metalsmith-prism with highlight.js#4493

Merged
Trott merged 2 commits intomainfrom
higlightjs
Mar 18, 2022
Merged

chore: replace metalsmith-prism with highlight.js#4493
Trott merged 2 commits intomainfrom
higlightjs

Conversation

@Trott
Copy link
Copy Markdown
Member

@Trott Trott commented Mar 15, 2022

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.

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.
Copy link
Copy Markdown
Member

@richardlau richardlau left a comment

Choose a reason for hiding this comment

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

  • 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: }

@Trott Trott merged commit 7a5c214 into main Mar 18, 2022
@Trott Trott deleted the higlightjs branch March 18, 2022 05:00
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