Skip to content

Commit

Permalink
fix: replace YAML parser library
Browse files Browse the repository at this point in the history
  • Loading branch information
iamjoshua committed Sep 22, 2023
1 parent 9559200 commit 1132229
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/mdTools.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as yaml from "js-yaml";
import yaml from "yaml";

type Meta = {
type: string;
Expand Down Expand Up @@ -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")
Expand Down
22 changes: 15 additions & 7 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
"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",
"react-icons": "^4.8.0",
"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",
Expand Down

1 comment on commit 1132229

@vercel
Copy link

@vercel vercel bot commented on 1132229 Sep 22, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.