Skip to content

Commit 23db321

Browse files
bloveclaude
andcommitted
fix(ci): unbreak main — drop verify assertions for the removed pricing matrix
#908 tightened the pricing page, deleting CompatibilityMatrix.tsx along with the WEBSITE_ANGULAR_SUPPORT_ROWS and WEBSITE_PRICING_SUPPORT_SUMMARY exports. scripts/verify-angular-support.mjs still imported both, so the module throws at import: SyntaxError: The requested module '.../angular-support.mjs' does not provide an export named 'WEBSITE_ANGULAR_SUPPORT_ROWS' That fails `Library — lint / test / build`, which fails `CI — required`, so main has been red since e8dc1ba and every PR inherits it. The Supported-row, Planned-row and pricing-summary assertions verified copy that no longer renders anywhere, so they go with the matrix rather than being propped up by restored constants. WEBSITE_SUPPORTED_ANGULAR_MAJORS still backs live page content and is still checked against the registry, so the drift this script exists to catch — the website advertising Angular majors the packages do not support — stays covered. Prunes the eight spec cases that drove only the removed assertions; the remaining 15 pass, and `node scripts/verify-angular-support.mjs` exits 0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 127ab51 commit 23db321

2 files changed

Lines changed: 11 additions & 159 deletions

File tree

scripts/verify-angular-support.mjs

Lines changed: 9 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ import {
88
ANGULAR_PEER_RANGE,
99
SUPPORTED_ANGULAR_MAJORS,
1010
} from '../examples/chat/smoke/angular-versions.mjs';
11-
import {
12-
WEBSITE_ANGULAR_SUPPORT_ROWS,
13-
WEBSITE_PRICING_SUPPORT_SUMMARY,
14-
WEBSITE_SUPPORTED_ANGULAR_MAJORS,
15-
} from '../apps/website/src/components/pricing/angular-support.mjs';
11+
import { WEBSITE_SUPPORTED_ANGULAR_MAJORS } from '../apps/website/src/components/pricing/angular-support.mjs';
1612

1713
export { ANGULAR_PEER_RANGE };
1814

@@ -248,19 +244,20 @@ export async function verifyDocumentation({ root = process.cwd() } = {}) {
248244
}
249245
}
250246

247+
/**
248+
* The pricing page's Angular compatibility matrix and support summary were
249+
* removed in #908, taking WEBSITE_ANGULAR_SUPPORT_ROWS and
250+
* WEBSITE_PRICING_SUPPORT_SUMMARY with them. The row/summary assertions that
251+
* used to live here verified copy that no longer renders anywhere, so they are
252+
* gone too. WEBSITE_SUPPORTED_ANGULAR_MAJORS still backs live page content and
253+
* is still checked against the registry.
254+
*/
251255
export async function verifyWebsiteMajors({
252-
websiteAngularSupportRows = WEBSITE_ANGULAR_SUPPORT_ROWS,
253-
websitePricingSupportSummary = WEBSITE_PRICING_SUPPORT_SUMMARY,
254256
websiteSupportedAngularMajors = WEBSITE_SUPPORTED_ANGULAR_MAJORS,
255257
} = {}) {
256258
const errors = [];
257259
const expectedMajors = SUPPORTED_ANGULAR_MAJORS.join(', ');
258260
const actualMajors = websiteSupportedAngularMajors.join(', ');
259-
const expectedSupportedVersions = `Angular ${expectedMajors}`;
260-
const expectedPricingSupportSummary = `Angular ${SUPPORTED_ANGULAR_MAJORS.slice(
261-
0,
262-
-1
263-
).join(', ')}, and ${SUPPORTED_ANGULAR_MAJORS.at(-1)} support`;
264261

265262
if (
266263
websiteSupportedAngularMajors.length !== SUPPORTED_ANGULAR_MAJORS.length ||
@@ -273,45 +270,6 @@ export async function verifyWebsiteMajors({
273270
);
274271
}
275272

276-
const supportedRows = websiteAngularSupportRows.filter(
277-
(row) => row.label === 'Supported'
278-
);
279-
const plannedRows = websiteAngularSupportRows.filter(
280-
(row) => row.label === 'Planned'
281-
);
282-
283-
if (supportedRows.length !== 1) {
284-
errors.push(
285-
`website must contain exactly one Supported row but found ${supportedRows.length}.`
286-
);
287-
} else if (supportedRows[0].versions !== expectedSupportedVersions) {
288-
errors.push(
289-
`website Supported row versions expected "${expectedSupportedVersions}" but found "${supportedRows[0].versions}".`
290-
);
291-
}
292-
293-
if (plannedRows.length !== 1) {
294-
errors.push(
295-
`website must contain exactly one Planned row but found ${plannedRows.length}.`
296-
);
297-
}
298-
299-
if (websitePricingSupportSummary !== expectedPricingSupportSummary) {
300-
errors.push(
301-
`website pricing support summary expected "${expectedPricingSupportSummary}" but found "${websitePricingSupportSummary}".`
302-
);
303-
}
304-
305-
for (const plannedRow of plannedRows) {
306-
for (const major of SUPPORTED_ANGULAR_MAJORS) {
307-
if (new RegExp(`\\b${major}\\b`).test(plannedRow.versions)) {
308-
errors.push(
309-
`website Planned row must not contain supported Angular major ${major}.`
310-
);
311-
}
312-
}
313-
}
314-
315273
if (errors.length > 0) {
316274
throw new Error(errors.join('\n'));
317275
}

scripts/verify-angular-support.spec.mjs

Lines changed: 2 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,8 @@ function runNode(args) {
5959
});
6060
}
6161

62-
function createWebsiteFixture({
63-
supportedMajors = [20, 21, 22],
64-
supportedVersions = 'Angular 20, 21, 22',
65-
plannedVersions = '—',
66-
pricingSupportSummary = 'Angular 20, 21, and 22 support',
67-
} = {}) {
68-
return {
69-
websiteAngularSupportRows: [
70-
{
71-
label: 'Supported',
72-
versions: supportedVersions,
73-
tone: 'success',
74-
},
75-
{ label: 'Experimental', versions: '—', tone: 'warn' },
76-
{ label: 'Planned', versions: plannedVersions, tone: 'info' },
77-
{ label: 'Unsupported', versions: 'Angular ≤19', tone: 'muted' },
78-
],
79-
websiteSupportedAngularMajors: supportedMajors,
80-
websitePricingSupportSummary: pricingSupportSummary,
81-
};
62+
function createWebsiteFixture({ supportedMajors = [20, 21, 22] } = {}) {
63+
return { websiteSupportedAngularMajors: supportedMajors };
8264
}
8365

8466
async function createDocumentationFixture(t, updateDocumentation) {
@@ -248,94 +230,6 @@ test('reports website support data that advertises Angular 23', async () => {
248230
);
249231
});
250232

251-
test('reports a supported Angular major under the website Planned row', async () => {
252-
await assert.rejects(
253-
verifyWebsiteMajors(
254-
createWebsiteFixture({ plannedVersions: 'Angular 22' })
255-
),
256-
/website Planned row must not contain supported Angular major 22/
257-
);
258-
});
259-
260-
test('reports Supported row text that omits Angular 22', async () => {
261-
await assert.rejects(
262-
verifyWebsiteMajors(
263-
createWebsiteFixture({ supportedVersions: 'Angular 20, 21' })
264-
),
265-
/website Supported row versions expected "Angular 20, 21, 22" but found "Angular 20, 21"/
266-
);
267-
});
268-
269-
test('reports Supported row text that advertises Angular 23', async () => {
270-
await assert.rejects(
271-
verifyWebsiteMajors(
272-
createWebsiteFixture({ supportedVersions: 'Angular 20, 21, 22, 23' })
273-
),
274-
/website Supported row versions expected "Angular 20, 21, 22" but found "Angular 20, 21, 22, 23"/
275-
);
276-
});
277-
278-
test('reports a missing website Supported row', async () => {
279-
const fixture = createWebsiteFixture();
280-
fixture.websiteAngularSupportRows = fixture.websiteAngularSupportRows.filter(
281-
(row) => row.label !== 'Supported'
282-
);
283-
284-
await assert.rejects(
285-
verifyWebsiteMajors(fixture),
286-
/website must contain exactly one Supported row but found 0/
287-
);
288-
});
289-
290-
test('reports duplicate website Supported rows', async () => {
291-
const fixture = createWebsiteFixture();
292-
fixture.websiteAngularSupportRows = [
293-
...fixture.websiteAngularSupportRows,
294-
{ label: 'Supported', versions: 'Angular 20, 21, 22', tone: 'success' },
295-
];
296-
297-
await assert.rejects(
298-
verifyWebsiteMajors(fixture),
299-
/website must contain exactly one Supported row but found 2/
300-
);
301-
});
302-
303-
test('reports a missing website Planned row', async () => {
304-
const fixture = createWebsiteFixture();
305-
fixture.websiteAngularSupportRows = fixture.websiteAngularSupportRows.filter(
306-
(row) => row.label !== 'Planned'
307-
);
308-
309-
await assert.rejects(
310-
verifyWebsiteMajors(fixture),
311-
/website must contain exactly one Planned row but found 0/
312-
);
313-
});
314-
315-
test('reports duplicate website Planned rows', async () => {
316-
const fixture = createWebsiteFixture();
317-
fixture.websiteAngularSupportRows = [
318-
...fixture.websiteAngularSupportRows,
319-
{ label: 'Planned', versions: '—', tone: 'info' },
320-
];
321-
322-
await assert.rejects(
323-
verifyWebsiteMajors(fixture),
324-
/website must contain exactly one Planned row but found 2/
325-
);
326-
});
327-
328-
test('reports a pricing support summary that drifts from website majors', async () => {
329-
await assert.rejects(
330-
verifyWebsiteMajors(
331-
createWebsiteFixture({
332-
pricingSupportSummary: 'Angular 20 and 21 support',
333-
})
334-
),
335-
/website pricing support summary expected "Angular 20, 21, and 22 support" but found "Angular 20 and 21 support"/
336-
);
337-
});
338-
339233
test('reports a peer range that omits Angular 22', async (t) => {
340234
const root = await createFixture(t, async (fixtureRoot) => {
341235
await writeJson(join(fixtureRoot, 'libs/chat/package.json'), {

0 commit comments

Comments
 (0)