Skip to content

Commit

Permalink
npm: Upgrade path-to-regexp to fix high severity vulnerability
Browse files Browse the repository at this point in the history
API breaking, so requires code changes
  • Loading branch information
slusarz authored and cmouse committed Sep 18, 2024
1 parent b78714e commit 7823b5a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ export async function frontmatterIter(callback) {
/* Check for config override file. */
const lconf = await loadLocalConf()
const spt_conf = lconf?.source_path_translations ??
{ 'docs/:path(.*)': ':path' }
{ 'docs/:path': ':path' }

const spt = Object.entries(spt_conf).map(([from, to]) => ({
toPath: compile(`/${to}`, { validate: false }),
matchUrl: match(from.startsWith('^') ? new RegExp(from) : from)
matchUrl: match(from)
}))

for (let f of files) {
Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"markdown-it-deflist": "^3.0.0",
"markdown-it-mathjax3": "^4.3.2",
"pagefind": "^1.1.1",
"path-to-regexp": "^7.1.0",
"path-to-regexp": "^8.1.0",
"pdc": "^0.2.3",
"remark-definition-list": "^2.0.0",
"remark-man": "^9.0.0",
Expand Down

0 comments on commit 7823b5a

Please sign in to comment.