Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions e2e/scan/eol.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,21 +245,15 @@ describe('scan:eol e2e', () => {
});
});

it('correctly identifies Angular 17 EOL status', async () => {
it('correctly identifies Angular 17 as having a EOL date', async () => {
const cmd = `scan:eol --purls=${angular17Purls}`;
const { stdout } = await run(cmd);

// Check for Angular package presence
match(stdout, /pkg:npm\/%40angular\/core@17\.3\.12/, 'Should detect Angular core package');

// Check for either SUPPORTED or EOL status
match(stdout, /⚡= Supported: End-of-Life \(EOL\) is scheduled/, 'Should show SUPPORTED status');

// Check for EOL date format with days remaining
match(stdout, /EOL Date: \d{4}-\d{2}-\d{2} \(\d+ days from now\)/, 'Should show EOL date with days remaining');

// Check for the status indicator in the package line
match(stdout, /⚡ pkg:npm\/%40angular\/core@17\.3\.12/, 'Should show supported status indicator');
// Check for EOL date format
match(stdout, /EOL Date: \d{4}-\d{2}-\d{2}/, 'Should show EOL date');

// Check for the arrow format
match(stdout, /⮑ {2}EOL Date: \d{4}-\d{2}-\d{2}/, 'Should show EOL date with arrow');
Expand Down
2 changes: 1 addition & 1 deletion src/config/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const EOL_REPORT_URL = '';
export const EOL_REPORT_URL = 'https://eol-report-card.apps.herodevs.com';
export const GRAPHQL_HOST = 'https://api.nes.herodevs.com';
export const GRAPHQL_PATH = '/graphql';

Expand Down
6 changes: 3 additions & 3 deletions src/ui/eol.ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ function getDaysEolString(daysEol: number | null): string {
if (daysEol === null) {
return '';
}
if (daysEol < 0) {
return `${Math.abs(daysEol)} days from now`;
if (daysEol <= 0) {
return `${Math.abs(daysEol) + 1} days from now`;
}
if (daysEol === 0) {
if (daysEol > 0) {
return 'today';
}
return `${daysEol} days ago`;
Expand Down