diff --git a/.husky/commit-msg b/.husky/pre-commit similarity index 100% rename from .husky/commit-msg rename to .husky/pre-commit diff --git a/README.md b/README.md index 204f0bb..ba4e77f 100644 --- a/README.md +++ b/README.md @@ -97,11 +97,11 @@ If no `bibliography` file is passed, the plugin will be skipped. #### options.bibliography -Type: `string`. +Type: `string|string[]`. By default, if no `bibliography` file is passed, the plugin will be skipped. -Name of bibtex or CSL-JSON file. +Name or path to Bibtex, CSL-JSON or CFF file. If multiple files are provided, they will be merged. #### options.path diff --git a/demo/app/App.jsx b/demo/app/App.jsx index b675c08..3c5b79a 100644 --- a/demo/app/App.jsx +++ b/demo/app/App.jsx @@ -7,6 +7,7 @@ import { CustomCSLExample, FootnotesExample, LinkCitationsExample, + CFFExample, } from './md-examples' const bibliography = @@ -18,12 +19,17 @@ const acmCSL = const chicagofullnoteCSL = 'https://raw.githubusercontent.com/citation-style-language/styles/master/chicago-fullnote-bibliography.csl' +const cff = 'https://raw.githubusercontent.com/timlrx/rehype-citation/main/test/CITATION.cff' +const cff2 = 'https://raw.githubusercontent.com/tensorflow/tensorflow/master/CITATION.cff' +const cff3 = 'https://raw.githubusercontent.com/langchain-ai/langchain/master/CITATION.cff' + const examples = [ 'Default', 'Suppress Bibliography', 'Custom CSL', 'Footnote Style', 'Link Citations', + 'Citation File Format', ] const pathList = examples.map((e) => e.toLocaleLowerCase().replace(' ', '-')) @@ -56,7 +62,10 @@ function App() { ))} {selected === examples[0] && ( - + )} {selected === examples[1] && ( )} + {selected === examples[5] && ( + + )} ) diff --git a/demo/app/main.jsx b/demo/app/main.jsx index 432dac6..3885300 100644 --- a/demo/app/main.jsx +++ b/demo/app/main.jsx @@ -1,10 +1,9 @@ import React from 'react' -import ReactDOM from 'react-dom' +import ReactDOM from 'react-dom/client' import App from './App' -ReactDOM.render( +ReactDOM.createRoot(document.getElementById('root')).render( - , - document.getElementById('root') + ) diff --git a/demo/app/md-examples.js b/demo/app/md-examples.js index 3bf21f0..f4b6a77 100644 --- a/demo/app/md-examples.js +++ b/demo/app/md-examples.js @@ -5,9 +5,12 @@ documents and insert bibliography in html format. - Supports standard citations [@Nash1950{pp. iv, vi-xi, (xv)-(xvii)}]; - in-text citations, @Nash1951 [p. 33] says blah; -- and multiple citations [see @Nash1950 pp 12-13; @Nash1951] +- multiple citations [see @Nash1950 pp 12-13; @Nash1951]; +- multiple sources [@10.5281/zenodo.1234] -Customizable CSL and locale. +Customizable CSL and locale. Bibtex, BibJSON, and CFF files are supported. + +\`options.biliography\` can either be a string or an array with multiple sources. ### Bibliography ` @@ -74,3 +77,20 @@ Implementation might differ from Pandoc, but if you run into any problems please ### Bibliography ` + +export const CFFExample = `## Welcome + +Supports CFF files as bibliography sources - +easily cite sources by their CITATION.cff file. + +- Citation from Github cff file e.g. @10.5281/zenodo.1234 with DOI as key; +- Tensorflow citation [@10.5281/zenodo.4724125]; +- Langchain citation with URL as key [@github.com/langchain-ai/langchain] + +If a DOI is included, it will be used as the citation key. +Otherwise the URL will be used. + +To cite, use the DOI reference directly or use the URL without the protocol (https://). + +### Bibliography +` diff --git a/package-lock.json b/package-lock.json index 7fe3ace..779842f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,9 +12,9 @@ "@citation-js/core": "^0.7.1", "@citation-js/date": "^0.5.1", "@citation-js/name": "^0.4.2", - "@citation-js/plugin-bibjson": "^0.7.1", - "@citation-js/plugin-bibtex": "^0.7.1", - "@citation-js/plugin-csl": "^0.7.1", + "@citation-js/plugin-bibjson": "^0.7.2", + "@citation-js/plugin-bibtex": "^0.7.2", + "@citation-js/plugin-csl": "^0.7.2", "citeproc": "^2.4.63", "cross-fetch": "^4.0.0", "hast-util-from-dom": "^5.0.0", @@ -105,18 +105,18 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.20.tgz", - "integrity": "sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", + "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.0.tgz", - "integrity": "sha512-97z/ju/Jy1rZmDxybphrBuI+jtJjFVoz7Mr9yUQVVVi+DNZE333uFQeMOqcCIy1x3WYBIbWftUSLmbNXNT7qFQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", + "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -124,10 +124,10 @@ "@babel/generator": "^7.23.0", "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-module-transforms": "^7.23.0", - "@babel/helpers": "^7.23.0", + "@babel/helpers": "^7.23.2", "@babel/parser": "^7.23.0", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.0", + "@babel/traverse": "^7.23.2", "@babel/types": "^7.23.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -239,9 +239,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.2.tgz", - "integrity": "sha512-k0qnnOqHn5dK9pZpfD5XXZ9SojAITdCKRn2Lp6rnDGzIbaP0rHyMPk/4wsSxVBVz4RfN0q6VpXWP2pDGIoQ7hw==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz", + "integrity": "sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==", "dev": true, "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", @@ -464,13 +464,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.1.tgz", - "integrity": "sha512-chNpneuK18yW5Oxsr+t553UZzzAs3aZnFm4bxhebsNTeshrC95yA7l5yl7GBAG+JG1rF0F7zzD2EixK9mWSDoA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", + "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", "dev": true, "dependencies": { "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.0", + "@babel/traverse": "^7.23.2", "@babel/types": "^7.23.0" }, "engines": { @@ -842,14 +842,14 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.15.tgz", - "integrity": "sha512-jBm1Es25Y+tVoTi5rfd5t1KLmL8ogLKpXszboWOTTtGFGz2RKnQe2yn7HbZ+kb/B8N0FVSGQo874NSlOU1T4+w==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.2.tgz", + "integrity": "sha512-BBYVGxbDVHfoeXbOwcagAkOQAm9NxoTdMGfTqghu1GrvadSaw6iW3Je6IcL5PNOw8VwjxqBECXy50/iCQSY/lQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.9", + "@babel/helper-remap-async-to-generator": "^7.22.20", "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { @@ -1710,12 +1710,12 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.22.20.tgz", - "integrity": "sha512-11MY04gGC4kSzlPHRfvVkNAZhUxOvm7DCJ37hPDnUENwe06npjIRAfInEMTGSb4LZK5ZgDFkv5hw0lGebHeTyg==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.2.tgz", + "integrity": "sha512-BW3gsuDD+rvHL2VO2SjAUNTBe5YrjsTiDyqamPDWY723na3/yPQ65X5oQkFVJZ0o50/2d+svm1rkPoJeR1KxVQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.22.20", + "@babel/compat-data": "^7.23.2", "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-plugin-utils": "^7.22.5", "@babel/helper-validator-option": "^7.22.15", @@ -1741,15 +1741,15 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.22.5", - "@babel/plugin-transform-async-generator-functions": "^7.22.15", + "@babel/plugin-transform-async-generator-functions": "^7.23.2", "@babel/plugin-transform-async-to-generator": "^7.22.5", "@babel/plugin-transform-block-scoped-functions": "^7.22.5", - "@babel/plugin-transform-block-scoping": "^7.22.15", + "@babel/plugin-transform-block-scoping": "^7.23.0", "@babel/plugin-transform-class-properties": "^7.22.5", "@babel/plugin-transform-class-static-block": "^7.22.11", "@babel/plugin-transform-classes": "^7.22.15", "@babel/plugin-transform-computed-properties": "^7.22.5", - "@babel/plugin-transform-destructuring": "^7.22.15", + "@babel/plugin-transform-destructuring": "^7.23.0", "@babel/plugin-transform-dotall-regex": "^7.22.5", "@babel/plugin-transform-duplicate-keys": "^7.22.5", "@babel/plugin-transform-dynamic-import": "^7.22.11", @@ -1761,9 +1761,9 @@ "@babel/plugin-transform-literals": "^7.22.5", "@babel/plugin-transform-logical-assignment-operators": "^7.22.11", "@babel/plugin-transform-member-expression-literals": "^7.22.5", - "@babel/plugin-transform-modules-amd": "^7.22.5", - "@babel/plugin-transform-modules-commonjs": "^7.22.15", - "@babel/plugin-transform-modules-systemjs": "^7.22.11", + "@babel/plugin-transform-modules-amd": "^7.23.0", + "@babel/plugin-transform-modules-commonjs": "^7.23.0", + "@babel/plugin-transform-modules-systemjs": "^7.23.0", "@babel/plugin-transform-modules-umd": "^7.22.5", "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", "@babel/plugin-transform-new-target": "^7.22.5", @@ -1772,7 +1772,7 @@ "@babel/plugin-transform-object-rest-spread": "^7.22.15", "@babel/plugin-transform-object-super": "^7.22.5", "@babel/plugin-transform-optional-catch-binding": "^7.22.11", - "@babel/plugin-transform-optional-chaining": "^7.22.15", + "@babel/plugin-transform-optional-chaining": "^7.23.0", "@babel/plugin-transform-parameters": "^7.22.15", "@babel/plugin-transform-private-methods": "^7.22.5", "@babel/plugin-transform-private-property-in-object": "^7.22.11", @@ -1789,10 +1789,10 @@ "@babel/plugin-transform-unicode-regex": "^7.22.5", "@babel/plugin-transform-unicode-sets-regex": "^7.22.5", "@babel/preset-modules": "0.1.6-no-external-plugins", - "@babel/types": "^7.22.19", - "babel-plugin-polyfill-corejs2": "^0.4.5", - "babel-plugin-polyfill-corejs3": "^0.8.3", - "babel-plugin-polyfill-regenerator": "^0.5.2", + "@babel/types": "^7.23.0", + "babel-plugin-polyfill-corejs2": "^0.4.6", + "babel-plugin-polyfill-corejs3": "^0.8.5", + "babel-plugin-polyfill-regenerator": "^0.5.3", "core-js-compat": "^3.31.0", "semver": "^6.3.1" }, @@ -1861,9 +1861,9 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.1.tgz", - "integrity": "sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", + "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -1887,9 +1887,9 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.0.tgz", - "integrity": "sha512-t/QaEvyIoIkwzpiZ7aoSKK8kObQYeF7T2v+dazAYCb8SXtp58zEVkWW7zAnju8FNKNdr4ScAOEDmMItbyOmEYw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.22.13", @@ -1952,9 +1952,9 @@ } }, "node_modules/@citation-js/plugin-bibjson": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@citation-js/plugin-bibjson/-/plugin-bibjson-0.7.1.tgz", - "integrity": "sha512-5JnISRx9/V+dBNpHt1qoSuvojqSip7+7FvdI1CFVEo9usLaOfEzfHc2E7BlwUum993t3yJJtRdh9ClnGtutyaw==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@citation-js/plugin-bibjson/-/plugin-bibjson-0.7.2.tgz", + "integrity": "sha512-RW2kVcdPX2XeslRcWT6sGTQZgo9JdN3BqvH8cjrIkmaH8ws21C83Oxl7J0B/7cqxT1CL836bg4TXq7gRbMGIzg==", "dependencies": { "@citation-js/date": "^0.5.0", "@citation-js/name": "^0.4.2" @@ -1967,9 +1967,9 @@ } }, "node_modules/@citation-js/plugin-bibtex": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@citation-js/plugin-bibtex/-/plugin-bibtex-0.7.1.tgz", - "integrity": "sha512-dj/GzpceS/QNbU8+rVzJfXeli7XSTYVTltGv5w2RHM+CCOdtG3tiFP1Ohu3yWi+8VPMjQJG9u2W789grIqc/ng==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@citation-js/plugin-bibtex/-/plugin-bibtex-0.7.2.tgz", + "integrity": "sha512-QkgPfYbs1dierenxKWzIlPV7450Jci8bvZbcpjO3HQTfTaj15SV2C2AaeKhUotXZmTjm49AJQWHZtrNh+7YWjg==", "dependencies": { "@citation-js/date": "^0.5.0", "@citation-js/name": "^0.4.2", @@ -1983,9 +1983,9 @@ } }, "node_modules/@citation-js/plugin-csl": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@citation-js/plugin-csl/-/plugin-csl-0.7.1.tgz", - "integrity": "sha512-B5Yv1o04Ds8/PF3FYlfL7bL3LFpVUhCEOAEqLFN5qgk785dnU0gMhDYbpJuCbQ8P6lIQpoU7O5x+EcJvWQhqCA==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@citation-js/plugin-csl/-/plugin-csl-0.7.2.tgz", + "integrity": "sha512-ogNb/gdcZ/EXZq+We+/aw6RkiYxjF+h7myJypyR0PApGJq9GzwcfGHW9ded2JdQIxyz4fO46pCTR4nv6FPUvMA==", "dependencies": { "@citation-js/date": "^0.5.0", "citeproc": "^2.4.6" @@ -2655,35 +2655,6 @@ } } }, - "node_modules/@rollup/plugin-babel/node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" - } - }, - "node_modules/@rollup/plugin-babel/node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "node_modules/@rollup/plugin-babel/node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, "node_modules/@rollup/plugin-commonjs": { "version": "17.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-17.1.0.tgz", @@ -2705,35 +2676,6 @@ "rollup": "^2.30.0" } }, - "node_modules/@rollup/plugin-commonjs/node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" - } - }, - "node_modules/@rollup/plugin-commonjs/node_modules/@rollup/pluginutils/node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, - "node_modules/@rollup/plugin-commonjs/node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, "node_modules/@rollup/plugin-inject": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-4.0.4.tgz", @@ -2748,35 +2690,6 @@ "rollup": "^1.20.0 || ^2.0.0" } }, - "node_modules/@rollup/plugin-inject/node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" - } - }, - "node_modules/@rollup/plugin-inject/node_modules/@rollup/pluginutils/node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, - "node_modules/@rollup/plugin-inject/node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, "node_modules/@rollup/plugin-json": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", @@ -2789,35 +2702,6 @@ "rollup": "^1.20.0 || ^2.0.0" } }, - "node_modules/@rollup/plugin-json/node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" - } - }, - "node_modules/@rollup/plugin-json/node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "node_modules/@rollup/plugin-json/node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, "node_modules/@rollup/plugin-node-resolve": { "version": "11.2.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", @@ -2838,7 +2722,7 @@ "rollup": "^1.20.0||^2.0.0" } }, - "node_modules/@rollup/plugin-node-resolve/node_modules/@rollup/pluginutils": { + "node_modules/@rollup/pluginutils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", @@ -2855,13 +2739,7 @@ "rollup": "^1.20.0||^2.0.0" } }, - "node_modules/@rollup/plugin-node-resolve/node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "node_modules/@rollup/plugin-node-resolve/node_modules/estree-walker": { + "node_modules/@rollup/pluginutils/node_modules/estree-walker": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", @@ -2954,9 +2832,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", - "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==", + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, "node_modules/@types/hast": { @@ -2983,9 +2861,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.8.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.4.tgz", - "integrity": "sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A==", + "version": "20.8.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.6.tgz", + "integrity": "sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==", "dev": true, "dependencies": { "undici-types": "~5.25.1" @@ -3250,13 +3128,13 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.5.tgz", - "integrity": "sha512-19hwUH5FKl49JEsvyTcoHakh6BE0wgXLLptIyKZ3PijHc/Ci521wygORCUCCred+E/twuqRyAkE02BAWPmsHOg==", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz", + "integrity": "sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==", "dev": true, "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.4.2", + "@babel/helper-define-polyfill-provider": "^0.4.3", "semver": "^6.3.1" }, "peerDependencies": { @@ -3264,12 +3142,12 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.4.tgz", - "integrity": "sha512-9l//BZZsPR+5XjyJMPtZSK4jv0BsTO1zDac2GC6ygx9WLGlcsnRd1Co0B2zT5fF5Ic6BZy+9m3HNZ3QcOeDKfg==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.5.tgz", + "integrity": "sha512-Q6CdATeAvbScWPNLB8lzSO7fgUVBkQt6zLgNlfyeCr/EQaEQR+bWiBYYPYAFyE528BMjRhL+1QBMOI4jc/c5TA==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.2", + "@babel/helper-define-polyfill-provider": "^0.4.3", "core-js-compat": "^3.32.2" }, "peerDependencies": { @@ -3277,12 +3155,12 @@ } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.2.tgz", - "integrity": "sha512-tAlOptU0Xj34V1Y2PNTL4Y0FOJMDB6bZmoW39FeCQIhigGLkqu3Fj6uiXpxIf6Ij274ENdYx64y6Au+ZKlb1IA==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz", + "integrity": "sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.2" + "@babel/helper-define-polyfill-provider": "^0.4.3" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -3518,9 +3396,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001547", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz", - "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==", + "version": "1.0.30001549", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz", + "integrity": "sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA==", "dev": true, "funding": [ { @@ -3627,6 +3505,18 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/citeproc": { "version": "2.4.63", "resolved": "https://registry.npmjs.org/citeproc/-/citeproc-2.4.63.tgz", @@ -3663,68 +3553,97 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-truncate/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/cli-truncate/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=12" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/cli-truncate/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "node_modules/cliui/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "ansi-regex": "^6.0.1" + "color-name": "~1.1.4" }, "engines": { - "node": ">=12" + "node": ">=7.0.0" + } + }, + "node_modules/cliui/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "engines": { + "node": ">=8" } }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=12" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/color-convert": { @@ -3828,6 +3747,15 @@ "node": ">=10" } }, + "node_modules/cosmiconfig/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/cross-fetch": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", @@ -3991,6 +3919,15 @@ "postcss": "^8.2.15" } }, + "node_modules/cssnano/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/csso": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", @@ -4055,9 +3992,9 @@ } }, "node_modules/define-data-property": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", - "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", "dev": true, "dependencies": { "get-intrinsic": "^1.2.1", @@ -4161,12 +4098,21 @@ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ + "node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ { "type": "github", "url": "https://github.com/sponsors/fb55" @@ -4230,22 +4176,24 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.548", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.548.tgz", - "integrity": "sha512-R77KD6mXv37DOyKLN/eW1rGS61N6yHOfapNSX9w+y9DdPG83l9Gkuv7qkCFZ4Ta4JPhrjgQfYbv4Y3TnM1Hi2Q==", + "version": "1.4.554", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.554.tgz", + "integrity": "sha512-Q0umzPJjfBrrj8unkONTgbKQXzXRrH7sVV7D9ea2yBV3Oaogz991yhbpfvo2LMNkJItmruXTEzVpP9cp7vaIiQ==", "dev": true }, "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } @@ -4608,18 +4556,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/eslint/node_modules/globals": { "version": "13.23.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", @@ -4734,9 +4670,9 @@ } }, "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", "dev": true }, "node_modules/execa": { @@ -4789,6 +4725,18 @@ "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -4939,70 +4887,6 @@ "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, - "node_modules/find-cache-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-cache-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -5049,9 +4933,9 @@ } }, "node_modules/fraction.js": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.6.tgz", - "integrity": "sha512-n2aZ9tNfYDwaHhvFTkhFErqOMIb8uyzSQ+vGJBjZyanAKZVbGUQ1sngfk9FdkBw7G26O7AgNjLcecLffD1c7eg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", "dev": true, "engines": { "node": "*" @@ -5096,10 +4980,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.6", @@ -5219,15 +5106,15 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/globals": { @@ -5862,12 +5749,15 @@ } }, "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-glob": { @@ -6365,15 +6255,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/lint-staged/node_modules/yaml": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", - "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, "node_modules/listr2": { "version": "6.6.1", "resolved": "https://registry.npmjs.org/listr2/-/listr2-6.6.1.tgz", @@ -6399,91 +6280,6 @@ } } }, - "node_modules/listr2/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/listr2/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/listr2/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/listr2/node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", - "dev": true - }, - "node_modules/listr2/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/listr2/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/listr2/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/loader-utils": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", @@ -6581,41 +6377,6 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/log-update/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-update/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/log-update/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/log-update/node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -6631,23 +6392,6 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/log-update/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/longest-streak": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", @@ -7899,9 +7643,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz", + "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8047,6 +7791,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-queue/node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + }, "node_modules/p-timeout": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", @@ -8101,23 +7851,12 @@ "node_modules/parse5": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dependencies": { - "entities": "^4.4.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "engines": { - "node": ">=0.12" + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dependencies": { + "entities": "^4.4.0" }, "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" + "url": "https://github.com/inikulin/parse5?sponsor=1" } }, "node_modules/path-exists": { @@ -8213,6 +7952,70 @@ "node": ">= 6" } }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/playwright": { "version": "1.39.0", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.39.0.tgz", @@ -8431,6 +8234,15 @@ } } }, + "node_modules/postcss-load-config/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/postcss-merge-longhand": { "version": "5.1.7", "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz", @@ -9248,9 +9060,9 @@ } }, "node_modules/resolve": { - "version": "1.22.6", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz", - "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { "is-core-module": "^2.13.0", @@ -9602,35 +9414,6 @@ "typescript": ">=2.4.0" } }, - "node_modules/rollup-plugin-typescript2/node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "node_modules/rollup-plugin-typescript2/node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, "node_modules/rollup-plugin-typescript2/node_modules/resolve": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", @@ -9911,18 +9694,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -9990,17 +9761,47 @@ "dev": true }, "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/string.prototype.matchall": { @@ -10294,18 +10095,6 @@ "node": ">=14.0.0" } }, - "node_modules/tailwindcss/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/tailwindcss/node_modules/postcss-load-config": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", @@ -10348,15 +10137,6 @@ "node": ">=4" } }, - "node_modules/tailwindcss/node_modules/yaml": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", - "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, "node_modules/terser": { "version": "5.21.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.21.0.tgz", @@ -11366,55 +11146,61 @@ } }, "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "dependencies": { - "color-convert": "^2.0.1" + "engines": { + "node": ">=12" }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=7.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -11437,12 +11223,12 @@ "dev": true }, "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", + "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", "dev": true, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/yargs": { @@ -11472,6 +11258,35 @@ "node": ">=12" } }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index da192df..bc0472c 100644 --- a/package.json +++ b/package.json @@ -74,9 +74,9 @@ "@citation-js/core": "^0.7.1", "@citation-js/date": "^0.5.1", "@citation-js/name": "^0.4.2", - "@citation-js/plugin-bibjson": "^0.7.1", - "@citation-js/plugin-bibtex": "^0.7.1", - "@citation-js/plugin-csl": "^0.7.1", + "@citation-js/plugin-bibjson": "^0.7.2", + "@citation-js/plugin-bibtex": "^0.7.2", + "@citation-js/plugin-csl": "^0.7.2", "citeproc": "^2.4.63", "cross-fetch": "^4.0.0", "hast-util-from-dom": "^5.0.0", diff --git a/src/citation-js/core/Cite/async.js b/src/citation-js/core/Cite/async.js index 47b46e8..7309a3b 100644 --- a/src/citation-js/core/Cite/async.js +++ b/src/citation-js/core/Cite/async.js @@ -1,6 +1,4 @@ -//@ts-nocheck -import Cite from './index.js' - +// @ts-nocheck /** * @callback module:@citation-js/core.Cite~asyncCallback * @param {Cite} data - Cite object @@ -22,7 +20,7 @@ function async(data, options, callback) { options = undefined } - const promise = Cite().setAsync(data, options) + const promise = new this().setAsync(data, options) if (typeof callback === 'function') { promise.then(callback) diff --git a/src/citation-js/core/Cite/get.js b/src/citation-js/core/Cite/get.js index 7090c45..531a759 100644 --- a/src/citation-js/core/Cite/get.js +++ b/src/citation-js/core/Cite/get.js @@ -1,5 +1,5 @@ // @ts-nocheck -import { validateOutputOptions as validate } from './static.js' +import { validateOutputOptions as validate } from './validate.js' import { format as formatData } from '../plugins/output.js' import { clean as parseCsl } from '../plugins/input/csl.js' diff --git a/src/citation-js/core/Cite/index.js b/src/citation-js/core/Cite/index.js index b069752..6188902 100644 --- a/src/citation-js/core/Cite/index.js +++ b/src/citation-js/core/Cite/index.js @@ -52,7 +52,12 @@ function Cite(data, options = {}) { */ this.data = [] - this.set(data, options) + // Modified citation-js to accept an array of objects + // Use add instead of set to retain previous data + data.forEach((d) => { + this.add(d, options) + }) + // this.set(data, options) this.options(options) return this diff --git a/src/citation-js/core/Cite/log.js b/src/citation-js/core/Cite/log.js index c31ba49..b8af3d2 100644 --- a/src/citation-js/core/Cite/log.js +++ b/src/citation-js/core/Cite/log.js @@ -1,7 +1,6 @@ -import Cite from './index.js' - +// @ts-nocheck /** - * @memberof module:@citation-js/core.Cite# + * @memberof module: @citation-js / core.Cite# * * @return {Number} The latest version of the object */ @@ -23,7 +22,7 @@ function retrieveVersion(versnum = 1) { return null } else { const [data, options] = this.log[versnum - 1] - const image = new Cite(JSON.parse(data), JSON.parse(options)) + const image = new this.constructor(JSON.parse(data), JSON.parse(options)) image.log = this.log.slice(0, versnum) return image } diff --git a/src/citation-js/core/plugin-common/input/index.js b/src/citation-js/core/plugin-common/input/index.js index 1ac9e36..4ef0cf4 100644 --- a/src/citation-js/core/plugin-common/input/index.js +++ b/src/citation-js/core/plugin-common/input/index.js @@ -1,16 +1,17 @@ // @ts-nocheck +/* global jQuery, HTMLElement */ + /** * @module input/other */ import * as empty from './empty.js' -import * as url from './url.js' import * as json from './json.js' import * as jquery from './jquery.js' import * as html from './html.js' export const ref = '@else' -export const parsers = { empty, url, json, jquery, html } +export const parsers = { empty, json, jquery, html } export const formats = { '@empty/text': { parse: empty.parse, @@ -41,8 +42,6 @@ export const formats = { }, }, '@else/url': { - parse: url.parse, - parseAsync: url.parseAsync, parseType: { dataType: 'String', predicate: /^https?:\/\/(([\w-]+\.)*[\w-]+)(:\d+)?(\/[^?/]*)*(\?[^#]*)?(#.*)?$/i, diff --git a/src/citation-js/core/plugin-common/input/url.js b/src/citation-js/core/plugin-common/input/url.js deleted file mode 100644 index a077a04..0000000 --- a/src/citation-js/core/plugin-common/input/url.js +++ /dev/null @@ -1 +0,0 @@ -export { fetchFile as parse, fetchFileAsync as parseAsync } from '../../util/index.js' diff --git a/src/citation-js/core/plugins/input/chain.js b/src/citation-js/core/plugins/input/chain.js index 81009bd..3c5b14b 100644 --- a/src/citation-js/core/plugins/input/chain.js +++ b/src/citation-js/core/plugins/input/chain.js @@ -10,6 +10,7 @@ import { applyGraph, removeGraph } from './graph.js' /** * @access private * @param {Array} graph + * @return {String} */ function prepareParseGraph(graph) { return ( diff --git a/src/citation-js/plugin-bibtex/mapping/biblatex.js b/src/citation-js/plugin-bibtex/mapping/biblatex.js index 42de01e..667ed20 100644 --- a/src/citation-js/plugin-bibtex/mapping/biblatex.js +++ b/src/citation-js/plugin-bibtex/mapping/biblatex.js @@ -8,9 +8,7 @@ const nonSpec = [ target: 'accessed', when: { source: false, - target: { - note: false, - }, + target: { note: false, addendum: false }, }, convert: { toSource(accessed) { @@ -22,9 +20,7 @@ const nonSpec = [ source: 'numpages', target: 'number-of-pages', when: { - source: { - pagetotal: false, - }, + source: { pagetotal: false }, target: false, }, }, @@ -36,7 +32,6 @@ const nonSpec = [ eprinttype(type) { return type !== 'pmid' }, - archiveprefix(type) { return type !== 'pmid' }, @@ -51,15 +46,26 @@ const nonSpec = [ target: false, }, }, + { + source: 's2id', + target: 'custom', + convert: { + toTarget(S2ID) { + return { S2ID } + }, + toSource({ S2ID }) { + return S2ID + }, + }, + }, ] + const aliases = [ { source: 'annote', target: 'annote', when: { - source: { - annotation: false, - }, + source: { annotation: false }, target: false, }, }, @@ -68,9 +74,7 @@ const aliases = [ target: 'publisher-place', convert: Converters.PICK, when: { - source: { - location: false, - }, + source: { location: false }, target: false, }, }, @@ -79,9 +83,7 @@ const aliases = [ target: 'PMID', convert: Converters.EPRINT, when: { - source: { - eprinttype: false, - }, + source: { eprinttype: false }, target: false, }, }, @@ -111,6 +113,7 @@ const aliases = [ }, }, ] + export default new util.Translator([ ...aliases, ...nonSpec, @@ -145,14 +148,19 @@ export default new util.Translator([ target: 'container-author', convert: Converters.NAMES, }, + + // Regarding maintitle, booktitle & journaltitle: + // When importing, maintitle is preferred, since it represents the + // larger container. When exporting, booktitle is preferred since + // it is more common, unless number-of-volumes is present indicating a + // multi-volume book. + // journaltitle is only used for articles. { source: ['maintitle', 'mainsubtitle', 'maintitleaddon'], target: 'container-title', when: { source: true, - target: { - 'number-of-volumes': true, - }, + target: { 'number-of-volumes': true }, }, convert: Converters.TITLE, }, @@ -160,14 +168,11 @@ export default new util.Translator([ source: ['booktitle', 'booksubtitle', 'booktitleaddon'], target: 'container-title', when: { - source: { - maintitle: false, - }, + source: { maintitle: false }, target: { 'number-of-volumes': false, - type(type) { - return !type.startsWith('article') + return !type || !type.startsWith('article') }, }, }, @@ -177,9 +182,7 @@ export default new util.Translator([ source: ['journaltitle', 'journalsubtitle', 'journaltitleaddon'], target: 'container-title', when: { - source: { - [TYPE]: 'article', - }, + source: { [TYPE]: 'article' }, target: { type: ['article', 'article-newspaper', 'article-journal', 'article-magazine'], }, @@ -190,9 +193,7 @@ export default new util.Translator([ source: 'shortjournal', target: 'container-title-short', when: { - source: { - [TYPE]: 'article', - }, + source: { [TYPE]: 'article' }, target: { type: ['article', 'article-newspaper', 'article-journal', 'article-magazine'], }, @@ -291,22 +292,19 @@ export default new util.Translator([ convert: { toTarget(type, subtype, typeKey) { if (!typeKey) { - if (type === 'masterthesis') { + if (type === 'mastersthesis') { typeKey = 'mathesis' } - if (type === 'phdthesis') { typeKey = 'phdthesis' } - if (type === 'techreport') { typeKey = 'techreport' } } - return [types.source[type] || 'book', typeKey || subtype] + return [types.source[type] || 'document', typeKey || subtype] }, - toSource(type, genre) { const sourceType = types.target[type] || 'misc' return genre in TYPE_KEYS ? [sourceType, undefined, genre] : [sourceType, genre] @@ -315,11 +313,7 @@ export default new util.Translator([ }, { source: TYPE, - when: { - target: { - type: false, - }, - }, + when: { target: { type: false } }, convert: { toSource() { return 'misc' @@ -336,12 +330,19 @@ export default new util.Translator([ target: 'event-place', }, { - source: 'eventtitle', + source: ['eventtitle', 'eventtitleaddon'], + target: 'event-title', + convert: Converters.EVENT_TITLE, + }, + { + source: ['eventtitle', 'eventtitleaddon'], target: 'event', + convert: Converters.EVENT_TITLE, + when: { source: false, target: { 'event-title': false } }, }, { source: LABEL, - target: ['id', 'citation-label', 'author', 'issued', 'year-suffix', 'title'], + target: ['id', 'citation-key', 'author', 'issued', 'year-suffix', 'title'], convert: Converters.LABEL, }, { @@ -364,8 +365,7 @@ export default new util.Translator([ issue(issue) { return typeof issue === 'string' && !issue.match(/\d+/) }, - - type: ['article', 'article-journal', 'article-newspaper', 'article-magazine'], + type: ['article', 'article-journal', 'article-newspaper', 'article-magazine', 'periodical'], }, }, }, @@ -380,13 +380,13 @@ export default new util.Translator([ issue(issue) { return issue && (typeof issue === 'number' || issue.match(/\d+/)) }, - type: [ 'article', 'article-journal', 'article-newspaper', 'article-magazine', 'paper-conference', + 'periodical', ], }, }, @@ -401,9 +401,7 @@ export default new util.Translator([ target: 'issued', convert: Converters.YEAR_MONTH, when: { - source: { - date: false, - }, + source: { date: false }, target: false, }, }, @@ -411,12 +409,8 @@ export default new util.Translator([ source: 'location', target: 'jurisdiction', when: { - source: { - type: 'patent', - }, - target: { - type: 'patent', - }, + source: { type: 'patent' }, + target: { type: 'patent' }, }, }, { @@ -429,10 +423,25 @@ export default new util.Translator([ target: 'language', convert: Converters.PICK, }, + { + source: 'langid', + target: 'language', + when: { source: { language: false }, target: false }, + }, { source: 'note', target: 'note', }, + { + source: 'addendum', + target: 'note', + when: { source: { note: false }, target: false }, + }, + { + source: 'eid', + target: 'number', + when: { target: { type: ['article-journal'] } }, + }, { source: ['isan', 'ismn', 'isrn', 'iswc'], target: 'number', @@ -454,12 +463,8 @@ export default new util.Translator([ source: 'number', target: 'number', when: { - source: { - [TYPE]: ['patent', 'report', 'techreport', 'legislation'], - }, - target: { - type: ['patent', 'report', 'legislation'], - }, + source: { [TYPE]: ['patent', 'report', 'techreport', 'legislation'] }, + target: { type: ['patent', 'report', 'legislation'] }, }, }, { @@ -482,22 +487,19 @@ export default new util.Translator([ target: 'original-title', }, { - source: ['pages', 'eid'], + source: 'pages', target: 'page', - convert: { - toTarget(pages, eid) { - return eid ? eid.replace(/^e?/i, 'e') : pages.replace(/[–—]/, '-') - }, - - toSource(page) { - return /^e/i.test(page) ? [page, page] : [page.replace('-', '--')] - }, - }, + when: { source: { bookpagination: [undefined, 'page'] } }, + convert: Converters.PAGES, }, { source: 'pagetotal', target: 'number-of-pages', }, + { + source: 'part', + target: 'part-number', + }, { source: ['eprint', 'eprinttype'], target: 'PMID', @@ -515,6 +517,9 @@ export default new util.Translator([ when: { source: true, target: { + // All except: + // - thesis, report: institution + // - webpage: organization type: [ 'article', 'article-journal', @@ -524,12 +529,17 @@ export default new util.Translator([ 'book', 'broadcast', 'chapter', + 'classic', + 'collection', 'dataset', + 'document', 'entry', 'entry-dictionary', 'entry-encyclopedia', + 'event', 'figure', 'graphic', + 'hearing', 'interview', 'legal_case', 'legislation', @@ -540,14 +550,18 @@ export default new util.Translator([ 'pamphlet', 'paper-conference', 'patent', + 'performance', + 'periodical', 'personal_communication', 'post', 'post-weblog', 'regulation', 'review', 'review-book', + 'software', 'song', 'speech', + 'standard', 'treaty', ], }, @@ -562,7 +576,7 @@ export default new util.Translator([ publisher: false, }, target: { - type: 'webpage', + type: 'webpage', // TODO paper-conference? }, }, }, @@ -586,6 +600,9 @@ export default new util.Translator([ convert: Converters.PICK, when: { source: { + howpublished(howPublished) { + return howPublished && !howPublished.startsWith('http') + }, publisher: false, organization: false, institution: false, @@ -599,18 +616,13 @@ export default new util.Translator([ source: ['pages', 'bookpagination'], target: 'section', when: { - source: { - bookpagination: 'section', - }, - target: { - page: false, - }, + source: { bookpagination: 'section' }, + target: { page: false }, }, convert: { toTarget(section) { return section }, - toSource(section) { return [section, 'section'] }, @@ -625,6 +637,11 @@ export default new util.Translator([ source: 'shorttitle', target: 'title-short', }, + { + source: 'shorttitle', + target: 'shortTitle', + when: { source: false, target: { 'title-short': false } }, + }, { source: ['title', 'subtitle', 'titleaddon'], target: 'title', @@ -662,4 +679,9 @@ export default new util.Translator([ source: 'volumes', target: 'number-of-volumes', }, + { + source: ['issuetitle', 'issuesubtitle', 'issuetitleaddon'], + target: 'volume-title', + convert: Converters.TITLE, + }, ]) diff --git a/src/citation-js/plugin-bibtex/mapping/bibtex.js b/src/citation-js/plugin-bibtex/mapping/bibtex.js index df98495..48ef98c 100644 --- a/src/citation-js/plugin-bibtex/mapping/bibtex.js +++ b/src/citation-js/plugin-bibtex/mapping/bibtex.js @@ -8,9 +8,7 @@ export default new util.Translator([ target: 'accessed', when: { source: false, - target: { - note: false, - }, + target: { note: false }, }, convert: { toSource(accessed) { @@ -126,7 +124,7 @@ export default new util.Translator([ }, { source: LABEL, - target: ['id', 'citation-label', 'author', 'issued', 'year-suffix', 'title'], + target: ['id', 'citation-key', 'author', 'issued', 'year-suffix', 'title'], convert: Converters.LABEL, }, { @@ -140,13 +138,13 @@ export default new util.Translator([ issue(issue) { return typeof issue === 'number' || (typeof issue === 'string' && issue.match(/\d+/)) }, - type: [ 'article', 'article-journal', 'article-newspaper', 'article-magazine', 'paper-conference', + 'periodical', ], }, }, @@ -164,26 +162,14 @@ export default new util.Translator([ source: 'number', target: 'number', when: { - source: { - [TYPE]: ['patent', 'report', 'techreport'], - }, - target: { - type: ['patent', 'report'], - }, + source: { [TYPE]: ['patent', 'report', 'techreport'] }, + target: { type: ['patent', 'report'] }, }, }, { source: 'pages', target: 'page', - convert: { - toTarget(text) { - return text.replace(/[–—]/, '-') - }, - - toSource(text) { - return text.replace('-', '--') - }, - }, + convert: Converters.PAGES, }, { source: 'publisher', @@ -191,6 +177,7 @@ export default new util.Translator([ convert: Converters.PICK, when: { target: { + // All except manuscript, paper-conference, techreport and thesis type: [ 'article', 'article-journal', @@ -200,12 +187,17 @@ export default new util.Translator([ 'book', 'broadcast', 'chapter', + 'classic', + 'collection', 'dataset', + 'document', 'entry', 'entry-dictionary', 'entry-encyclopedia', + 'event', 'figure', 'graphic', + 'hearing', 'interview', 'legal_case', 'legislation', @@ -214,13 +206,18 @@ export default new util.Translator([ 'musical_score', 'pamphlet', 'patent', + 'performance', + 'periodical', 'personal_communication', 'post', 'post-weblog', + 'regulation', 'review', 'review-book', + 'software', 'song', 'speech', + 'standard', 'treaty', 'webpage', ], @@ -232,12 +229,8 @@ export default new util.Translator([ target: 'publisher', convert: Converters.PICK, when: { - source: { - publisher: false, - }, - target: { - type: 'paper-conference', - }, + source: { publisher: false }, + target: { type: 'paper-conference' }, }, }, { @@ -249,9 +242,7 @@ export default new util.Translator([ publisher: false, organization: false, }, - target: { - type: 'report', - }, + target: { type: 'report' }, }, }, { @@ -264,9 +255,7 @@ export default new util.Translator([ organization: false, publisher: false, }, - target: { - type: 'thesis', - }, + target: { type: 'thesis' }, }, }, { @@ -275,6 +264,9 @@ export default new util.Translator([ convert: Converters.PICK, when: { source: { + howpublished(howPublished) { + return howPublished && !howPublished.startsWith('http') + }, publisher: false, organization: false, institution: false, @@ -294,7 +286,8 @@ export default new util.Translator([ target: ['type', 'genre'], convert: { toTarget(sourceType, subType) { - const type = types.source[sourceType] || 'book' + /* istanbul ignore next */ + const type = types.source[sourceType] || 'document' if (subType) { return [type, subType] @@ -306,7 +299,6 @@ export default new util.Translator([ return [type] } }, - toSource(targetType, genre) { const type = types.target[targetType] || 'misc' @@ -323,9 +315,7 @@ export default new util.Translator([ { source: TYPE, when: { - target: { - type: false, - }, + target: { type: false }, }, convert: { toSource() { diff --git a/src/citation-js/plugin-cff/index.js b/src/citation-js/plugin-cff/index.js index 9936fe5..18cdd2f 100644 --- a/src/citation-js/plugin-cff/index.js +++ b/src/citation-js/plugin-cff/index.js @@ -154,7 +154,11 @@ const PROP_CONVERTERS = { }, date: { toTarget(date) { - return parseDate(date.toISOString()) + if (date instanceof Date) { + return parseDate(date.toISOString()) + } else { + return parseDate(new Date(date).toISOString()) + } }, toSource(date) { if (date.raw) { @@ -642,19 +646,28 @@ const mainTranslator = new util.Translator(MAIN_PROPS) const refTranslator = new util.Translator(REF_PROPS) const CFF_VERSION = '1.2.0' +/** Add doi or url as unique id if available to make citation easy */ +function addId(entry) { + if ('DOI' in entry) { + entry.id = entry.DOI + } else if ('URL' in entry) { + entry.id = entry.URL.replace('http://', '').replace('https://', '') + } +} + function parse(input) { const main = mainTranslator.convertToTarget(input) if (input['cff-version'] <= '1.1.0') { main.type = TYPES_TO_TARGET.software } main._cff_mainReference = true - // Use identifier as unique id to make citation easy - if ('DOI' in main) { - main.id = main.DOI - } + addId(main) + const output = [main] if (input['preferred-citation']) { - output.push(refTranslator.convertToTarget(input['preferred-citation'])) + const preferredCitation = refTranslator.convertToTarget(input['preferred-citation']) + addId(preferredCitation) + output.push(preferredCitation) } if (Array.isArray(input.references)) { diff --git a/src/cite.js b/src/cite.js index f34c1d7..c06dc78 100644 --- a/src/cite.js +++ b/src/cite.js @@ -18,7 +18,6 @@ function Cite(data, opts) { } const self = new CiteCore(data, opts) - console.log(self) this._options = self._options this.log = self.log this.data = self.data diff --git a/src/generator.js b/src/generator.js index 0b6c49f..766f69f 100644 --- a/src/generator.js +++ b/src/generator.js @@ -43,13 +43,8 @@ const idRoot = 'CITATION' const rehypeCitationGenerator = (Cite) => { return (options = {}) => { return async (tree, file) => { - let bibliography = await getBibliography(options, file) - if (!bibliography) { - return - } - - /** @type {string} */ - let bibtexFile + /** @type {string[]} */ + let bibtexFile = [] /** @type {string} */ // @ts-ignore const inputCiteformat = options.csl || file?.data?.frontmatter?.csl || defaultCiteFormat const inputLang = options.lang || 'en-US' @@ -57,18 +52,23 @@ const rehypeCitationGenerator = (Cite) => { const citeFormat = await loadCSL(Cite, inputCiteformat, options.path) const lang = await loadLocale(Cite, inputLang, options.path) - if (isValidHttpUrl(bibliography)) { - isNode - const response = await fetch(bibliography) - bibtexFile = await response.text() - } else { - if (isNode) { - bibtexFile = await readFile(bibliography) + let bibliography = await getBibliography(options, file) + if (bibliography.length === 0) { + return + } + + for (let i = 0; i < bibliography.length; i++) { + if (isValidHttpUrl(bibliography[i])) { + const response = await fetch(bibliography[i]) + bibtexFile.push(await response.text()) } else { - throw new Error(`Cannot read non valid bibliography URL in node env.`) + if (isNode) { + bibtexFile.push(await readFile(bibliography[i])) + } else { + throw new Error(`Cannot read non valid bibliography URL in node env.`) + } } } - const citations = new Cite(bibtexFile) const citationIds = citations.data.map((x) => x.id) const citationPre = [] diff --git a/src/types.js b/src/types.js index 7a5430a..cfde000 100644 --- a/src/types.js +++ b/src/types.js @@ -1,8 +1,8 @@ /** * @typedef Options * Configuration. - * @property {string} [bibliography] - * Name of bibtex or CSL-JSON file + * @property {string | string[]} [bibliography] + * Name or path to Bibtex, CSL-JSON or CFF file. If multiple files are provided, they will be merged. * @property {string} [path] * Optional path to file (node). Will be joined with `options.bibliography` and used in place of cwd of file if provided. * @property {'apa'|'vancouver'|'harvard1'|'chicago'|'mla'|string} [csl] diff --git a/src/utils.js b/src/utils.js index b4e6812..c36a194 100644 --- a/src/utils.js +++ b/src/utils.js @@ -42,21 +42,28 @@ export const isValidHttpUrl = (str) => { * @param {import('vfile').VFile} file */ export const getBibliography = async (options, file) => { - let bibliography = '' + /** @type {string[]} */ + let bibliography = [] if (options.bibliography) { - bibliography = options.bibliography + bibliography = + typeof options.bibliography === 'string' ? [options.bibliography] : options.bibliography // @ts-ignore } else if (file?.data?.frontmatter?.bibliography) { // @ts-ignore - bibliography = file.data.frontmatter.bibliography + bibliography = + typeof file.data.frontmatter.bibliography === 'string' + ? [file.data.frontmatter.bibliography] + : file.data.frontmatter.bibliography // If local path, get absolute path - if (!isValidHttpUrl(bibliography)) { - if (isNode) { - bibliography = await import('path').then((path) => - path.join(options.path || file.cwd, bibliography) - ) - } else { - throw new Error(`Cannot read non valid bibliography URL in node env.`) + for (let i = 0; i < bibliography.length; i++) { + if (!isValidHttpUrl(bibliography[i])) { + if (isNode) { + bibliography[i] = await import('path').then((path) => + path.join(options.path || file.cwd, bibliography[i]) + ) + } else { + throw new Error(`Cannot read non valid bibliography URL in node env.`) + } } } } diff --git a/test/index.js b/test/index.js index 43523ce..40223ab 100644 --- a/test/index.js +++ b/test/index.js @@ -7,6 +7,7 @@ import rehypeCitation from '../index.js' const bibliography = './test/references-data.bib' const cslJSON = './test/csl-json-data.json' const cff = './test/CITATION.cff' +const urlCff = './test/pytorch-CITATION.cff' const processHtml = (html, options, input = bibliography) => { return rehype() @@ -277,13 +278,33 @@ rehypeCitationTest('generates multiple inline bibs', async () => { assert.is(result, expected) }) -rehypeCitationTest('works with cff file', async () => { +rehypeCitationTest('works with cff file and add doi as id', async () => { const result = await processHtml( - dedent`
[@10.5281/zenodo.1234]<
`, + dedent`
[@10.5281/zenodo.1234]
`, { suppressBibliography: true }, cff ) - const expected = dedent`
(Lisa & Bot, 2017)<
` + const expected = dedent`
(Lisa & Bot, 2017)
` + assert.is(result, expected) +}) + +rehypeCitationTest('adds url as id for preferred citation', async () => { + const result = await processHtml( + dedent`
[@papers.neurips.cc/paper/9015-pytorch-an-imperative-style-high-performance-deep-learning-library.pdf]
`, + { suppressBibliography: true }, + urlCff + ) + const expected = dedent`
(Paszke et al., 2019)
` + assert.is(result, expected) +}) + +rehypeCitationTest('parses multiple bibliography files', async () => { + const result = await processHtml( + dedent`
[@10.5281/zenodo.1234] and [@Nash1950]
`, + { suppressBibliography: true }, + [bibliography, cff] + ) + const expected = dedent`
(Lisa & Bot, 2017) and (Nash, 1950)
` assert.is(result, expected) }) diff --git a/test/pytorch-CITATION.cff b/test/pytorch-CITATION.cff new file mode 100644 index 0000000..3b60967 --- /dev/null +++ b/test/pytorch-CITATION.cff @@ -0,0 +1,73 @@ +cff-version: 1.2.0 +message: If you use this software, please cite it as below. +title: PyTorch +authors: + - family-names: PyTorch Team +url: https://pytorch.org +preferred-citation: + type: conference-paper + title: 'PyTorch: An Imperative Style, High-Performance Deep Learning Library' + authors: + - family-names: Paszke + given-names: Adam + - family-names: Gross + given-names: Sam + - family-names: Massa + given-names: Francisco + - family-names: Lerer + given-names: Adam + - family-names: Bradbury + given-names: James + - family-names: Chanan + given-names: Gregory + - family-names: Killeen + given-names: Trevor + - family-names: Lin + given-names: Zeming + - family-names: Gimelshein + given-names: Natalia + - family-names: Antiga + given-names: Luca + - family-names: Desmaison + given-names: Alban + - family-names: Kopf + given-names: Andreas + - family-names: Yang + given-names: Edward + - family-names: DeVito + given-names: Zachary + - family-names: Raison + given-names: Martin + - family-names: Tejani + given-names: Alykhan + - family-names: Chilamkurthy + given-names: Sasank + - family-names: Steiner + given-names: Benoit + - family-names: Fang + given-names: Lu + - family-names: Bai + given-names: Junjie + - family-names: Chintala + given-names: Soumith + collection-title: Advances in Neural Information Processing Systems 32 + collection-type: proceedings + editors: + - family-names: Wallach + given-names: H. + - family-names: Larochelle + given-names: H. + - family-names: Beygelzimer + given-names: A. + - family-names: "d'Alché-Buc" + given-names: F. + - family-names: Fox + given-names: E. + - family-names: Garnett + given-names: R. + start: 8024 + end: 8035 + year: 2019 + publisher: + name: Curran Associates, Inc. + url: http://papers.neurips.cc/paper/9015-pytorch-an-imperative-style-high-performance-deep-learning-library.pdf