diff --git a/lib/mdTools.ts b/lib/mdTools.ts index 732054b..19174c2 100644 --- a/lib/mdTools.ts +++ b/lib/mdTools.ts @@ -1,4 +1,4 @@ -import * as yaml from "js-yaml"; +import yaml from "yaml"; type Meta = { type: string; @@ -50,7 +50,7 @@ function getMetaDataAndContent(lines: string[]): { metadataStart, ); const metadataString = lines.slice(metadataStart, metadataEnd).join("\n"); - const meta = yaml.load(metadataString); + const meta = yaml.parse(metadataString); const content = lines .slice(metadataEnd + 1) .join("\n") diff --git a/package-lock.json b/package-lock.json index 873b0cc..c192cdf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,6 @@ "eslint-config-next": "13.2.3", "firebase-tools": "^11.24.1", "framer-motion": "^10.16.4", - "js-yaml": "^4.1.0", "next": "^13.5.1", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -25,7 +24,8 @@ "react-markdown": "^8.0.7", "react-resize-detector": "^8.0.4", "serve": "^14.2.0", - "typescript": "4.9.5" + "typescript": "4.9.5", + "yaml": "^2.3.2" }, "devDependencies": { "@tailwindcss/typography": "^0.5.10", @@ -11334,6 +11334,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-nested": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.0.tgz", @@ -12704,12 +12713,11 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "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, + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", + "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/yocto-queue": { diff --git a/package.json b/package.json index 7ceffe7..32e9639 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ "eslint-config-next": "13.2.3", "firebase-tools": "^11.24.1", "framer-motion": "^10.16.4", - "js-yaml": "^4.1.0", "next": "^13.5.1", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -27,7 +26,8 @@ "react-markdown": "^8.0.7", "react-resize-detector": "^8.0.4", "serve": "^14.2.0", - "typescript": "4.9.5" + "typescript": "4.9.5", + "yaml": "^2.3.2" }, "devDependencies": { "@tailwindcss/typography": "^0.5.10",