Skip to content

Commit

Permalink
Revert "Make changelog on website more clear"
Browse files Browse the repository at this point in the history
This reverts commit 748df70.
  • Loading branch information
igorkamyshev committed Aug 17, 2024
1 parent 748df70 commit d339c24
Showing 1 changed file with 3 additions and 35 deletions.
38 changes: 3 additions & 35 deletions apps/website/changelog/lib.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export function excludeTrashUpdates(items) {
.map((tags) => {
const [header, ...body] = tags;

const filteredBody = body
.filter((item) => !isUpdatedDependenciesMessage(item))
.filter((item) => !isPackageVersionBumpMessage(item));
const filteredBody = body.filter(
(item) => !item.at(1).toLowerCase().includes('updated dependencies')
);

if (filteredBody.length === 0) {
return null;
Expand All @@ -38,35 +38,3 @@ export function excludeTrashUpdates(items) {
})
.filter(Boolean);
}

function isUpdatedDependenciesMessage(item) {
return item.at(1).toLowerCase().includes('updated dependencies');
}

function isPackageVersionBumpMessage(item) {
if (!Array.isArray(item)) {
return false;
}

if (item.at(0) === 'bulletlist') {
return item.some(isPackageVersionBumpMessage);
}

if (item.at(0) !== 'listitem') {
return false;
}

if (item.length === 2) {
const message = item.at(1);
const [org, pkgAndVersion] = message.split('/');
const [pkg, version] = pkgAndVersion?.split('@') ?? [];

if (!org || !pkg || !version) {
return false;
}

return org === '@farfetched';
} else {
return item.some(isPackageVersionBumpMessage);
}
}

0 comments on commit d339c24

Please sign in to comment.