Browse Source

Rework benchmark deps and bump versions

pull/1175/head
Vitaly Puzrin 5 months ago
parent
commit
83450e2bc3
  1. 5
      .gitignore
  2. 109
      benchmark/extra/package-lock.json
  3. 8
      benchmark/extra/package.json
  4. 2
      benchmark/implementations/commonmark-reference/index.mjs
  5. 2
      benchmark/implementations/markdown-it-2.2.1-commonmark/index.mjs
  6. 4
      benchmark/implementations/marked/index.mjs
  7. 2
      package.json

5
.gitignore

@ -1,4 +1,7 @@
benchmark/extra/
benchmark/extra/node_modules/
benchmark/extra/bin/
benchmark/extra/lib/
benchmark/extra/share/
node_modules/
coverage/
demo/

109
benchmark/extra/package-lock.json

@ -0,0 +1,109 @@
{
"name": "extra",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"commonmark": "^0.31.2",
"markdown-it": "2.2.1",
"marked": "^18.0.4"
}
},
"node_modules/argparse": {
"version": "0.1.16",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz",
"integrity": "sha512-LjmC2dNpdn2L4UzyoaIr11ELYoLn37ZFy9zObrQFHsSuOepeUEMKnM8w5KL4Tnrp2gy88rRuQt6Ky8Bjml+Baw==",
"license": "MIT",
"dependencies": {
"underscore": "~1.7.0",
"underscore.string": "~2.4.0"
}
},
"node_modules/autolinker": {
"version": "0.15.3",
"resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.15.3.tgz",
"integrity": "sha512-mCyPIctUTUl324as6lCXFOkntxzZfVsKCCjivm0tlkig9GTUJ7Ap/TreIqeYyyJcrddro5g0a5cRnM/4pzfJgw==",
"license": "MIT Licensed. http://www.opensource.org/licenses/mit-license.php"
},
"node_modules/commonmark": {
"version": "0.31.2",
"resolved": "https://registry.npmjs.org/commonmark/-/commonmark-0.31.2.tgz",
"integrity": "sha512-2fRLTyb9r/2835k5cwcAwOj0DEc44FARnMp5veGsJ+mEAZdi52sNopLu07ZyElQUz058H43whzlERDIaaSw4rg==",
"license": "BSD-2-Clause",
"dependencies": {
"entities": "~3.0.1",
"mdurl": "~1.0.1",
"minimist": "~1.2.8"
},
"bin": {
"commonmark": "bin/commonmark"
},
"engines": {
"node": "*"
}
},
"node_modules/entities": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/markdown-it": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-2.2.1.tgz",
"integrity": "sha512-FMl50iLDiBc/tcG4QnhyrdAOPDNOyLR7Cxklav8yspWk8cf4V/E3CGRTrNB2xNIIR/8Mc8CXLoFd9DwgNchnvQ==",
"license": "MIT",
"dependencies": {
"argparse": "~ 0.1.15",
"autolinker": "~ 0.15.0"
}
},
"node_modules/marked": {
"version": "18.0.4",
"resolved": "https://registry.npmjs.org/marked/-/marked-18.0.4.tgz",
"integrity": "sha512-c/BTaKzg0G6ezQx97DAkYU7k0HM6ys0FqYeKBL6hlBByZwy+ycA1+f0vDdjMHKKeEjdgkx0GOv9Il6D+85cOqA==",
"license": "MIT",
"bin": {
"marked": "bin/marked.js"
},
"engines": {
"node": ">= 20"
}
},
"node_modules/mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==",
"license": "MIT"
},
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/underscore": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz",
"integrity": "sha512-cp0oQQyZhUM1kpJDLdGO1jPZHgS/MpzoWYfe9+CM2h/QGDZlqwT2T3YGukuBdaNJ/CAPoeyAZRRHz8JFo176vA=="
},
"node_modules/underscore.string": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz",
"integrity": "sha512-yxkabuCaIBnzfIvX3kBxQqCs0ar/bfJwDnFEHJUm/ZrRVhT3IItdRF5cZjARLzEnyQYtIUhsZ2LG2j3HidFOFQ==",
"engines": {
"node": "*"
}
}
}
}

8
benchmark/extra/package.json

@ -0,0 +1,8 @@
{
"private": true,
"dependencies": {
"commonmark": "^0.31.2",
"markdown-it": "2.2.1",
"marked": "^18.0.4"
}
}

2
benchmark/implementations/commonmark-reference/index.mjs

@ -1,6 +1,6 @@
import { createRequire } from 'node:module'
const commonmark = createRequire(import.meta.url)('../../extra/lib/node_modules/commonmark')
const commonmark = createRequire(import.meta.url)('../../extra/node_modules/commonmark')
const parser = new commonmark.Parser()
const renderer = new commonmark.HtmlRenderer()

2
benchmark/implementations/markdown-it-2.2.1-commonmark/index.mjs

@ -1,6 +1,6 @@
import { createRequire } from 'node:module'
const markdownit = createRequire(import.meta.url)('../../extra/lib/node_modules/markdown-it')
const markdownit = createRequire(import.meta.url)('../../extra/node_modules/markdown-it')
const md = markdownit('commonmark')

4
benchmark/implementations/marked/index.mjs

@ -1,6 +1,4 @@
import { createRequire } from 'node:module'
const marked = createRequire(import.meta.url)('../../extra/lib/node_modules/marked')
import { marked } from '../../extra/node_modules/marked/lib/marked.esm.js'
export function run (data) {
return marked(data)

2
package.json

@ -50,7 +50,7 @@
"demo": "npm run lint && node support/build_demo.mjs",
"gh-demo": "npm run demo && gh-pages -d demo -f -b master -r git@github.com:markdown-it/markdown-it.github.io.git",
"build": "node support/build-dist.mjs",
"benchmark-deps": "npm install --prefix benchmark/extra/ -g marked@0.3.6 commonmark@0.26.0 markdown-it/markdown-it.git#2.2.1",
"benchmark-deps": "npm install --prefix benchmark/extra/",
"specsplit": "support/specsplit.mjs good -o test/fixtures/commonmark/good.txt && support/specsplit.mjs bad -o test/fixtures/commonmark/bad.txt && support/specsplit.mjs",
"todo": "grep 'TODO' -n -r ./lib 2>/dev/null",
"prepack": "npm test && npm run build && npm run demo && npm run doc",

Loading…
Cancel
Save