Skip to content

Commit

Permalink
fix(files): add support for legacy license format
Browse files Browse the repository at this point in the history
  • Loading branch information
msrcodes committed Oct 15, 2021
1 parent b17c278 commit 6695043
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const parsePackageFile = (path: string) => {
const fileContent = readFileSync(path).toString();
let {license} = JSON.parse(fileContent);

license = license ?? NO_LICENSE;
license = license?.type ?? license ?? NO_LICENSE;

return {name: `./${path}`, license};
};
Expand Down

0 comments on commit 6695043

Please sign in to comment.