Skip to content

fix: ensure package IDs maintain canonical casing in validation and tests - #16

Merged
onlyexeption merged 1 commit into
mainfrom
mstoyanova/package-id-casing
Oct 22, 2026
Merged

onlyexeption merged 1 commit into
mainfrom
mstoyanova/package-id-casing

Conversation

@Marina-L-Stoyanova

Copy link
Copy Markdown
Contributor

The scaffold, list_wpf_components, get_wpf_api_reference and search_wpf_api showed package IDs in lowercase (infragistics.wpf.datagrids.trial), because build-api.ts took them from the nuget/packages folder names. Agents copied that casing into users' .csproj files.

  • scripts/build-api.ts: reads the ID from each package's .nuspec <id> (e.g. Infragistics.WPF.DataGrids.Trial). The build fails if the .nuspec is missing or its ID doesn't match the folder. This also covers dependency-only packages that aren't listed in WpfDocs.csproj (e.g. Barcodes, CalculationManager). EXCLUDE_PACKAGES is now compared without case.
  • scripts/validate-package.ts: fails if namespaces.json has lowercase IDs again.
  • scripts/smoke-test.ts: checks that the scaffold prints dotnet add package Infragistics.WPF.DataGrids.Trial. It runs for both servers.

Verified

After npm run build:all, the casing is the only change in the data: 191 components, 6,907 search entries and 6,907 API files, the same as before, and XamXGrid is still excluded. npm run test:dotnet, npm test and npm run typecheck pass.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused changes preserve existing data flow and exclusions, with no blocking issues identified.

No open issues 🎉

What changed in this PR

Preserves canonical NuGet package casing in generated data used by both servers.

Changes:

  • Reads and validates package IDs from .nuspec metadata.
  • Keeps package exclusions case-insensitive.
  • Adds validation and smoke-test checks against lowercase IDs.
File Description
scripts/​validate-package.ts Rejects lowercase package IDs in component data.
scripts/​smoke-test.ts Checks canonical casing in scaffold commands.
scripts/​build-api.ts Extracts canonical IDs and preserves package exclusions.

Review effort: Balanced

@onlyexeption
onlyexeption merged commit 2d2a3f6 into main Oct 22, 2026
8 checks passed
@onlyexeption
onlyexeption deleted the mstoyanova/package-id-casing branch October 22, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants