Skip to content

Commit

Permalink
updated getPackageInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
sujjeee committed Dec 16, 2023
1 parent a4b4ec7 commit 8e91dd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svgls",
"version": "0.0.5",
"version": "0.0.6",
"description": "a beautiful library with svg logos.",
"publishConfig": {
"access": "public"
Expand Down
6 changes: 3 additions & 3 deletions src/utils/get-package-info.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import fs from "node:fs";
import path from "path";
import fs from "fs-extra";
import { type PackageJson } from "type-fest";
import type { PackageJson } from "type-fest";

export function getPackageInfo() {
const packageJsonPath = path.join("package.json");

return fs.readJSONSync(packageJsonPath) as PackageJson;
return JSON.parse(fs.readFileSync(packageJsonPath, "utf-8")) as PackageJson;
}

0 comments on commit 8e91dd4

Please sign in to comment.