Skip to content

Commit

Permalink
feat: validate package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoppippi committed Aug 10, 2024
1 parent c94bc79 commit d7ab5ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export async function findUp(
*/
export async function readPkgJSON(pkgJSONPath: string): Promise<PackageJson> {
const pkgJSON = await fs.readFile(pkgJSONPath, 'utf-8');
return JSON.parse(pkgJSON) as PackageJson;
return typia.json.assertParse<PackageJson>(pkgJSON);
}

/**
Expand Down

0 comments on commit d7ab5ca

Please sign in to comment.