Skip to content

Support content-type extensions with and without a leading dot - #13

Merged
mrlacey merged 1 commit into
mainfrom
fix/sbom-json-content-type-dot
Sep 25, 2026
Merged

mrlacey merged 1 commit into
mainfrom
fix/sbom-json-content-type-dot

Conversation

@mrlacey

@mrlacey mrlacey commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

TryRegisterJsonContentType only matched Extension="json". vsce writes content types with a leading dot (.json), so embedding the SBOM into a .vsix added a second json default to [Content_Types].xml. The VS Code Marketplace rejects packages with that duplicate entry.

The check now ignores a leading dot, so an existing .json (vsce) or json (NuGet) entry is recognised and nothing is added.

🤖 Generated with Claude Code

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.

Copilot review overview

🟢 Approval recommended

No unresolved issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Updates SBOM content-type detection to recognize both .json and json extensions, preventing duplicate VSIX entries.

Changes:

  • Normalize leading dots before matching JSON extensions.
  • Preserve existing NuGet behavior.
File Description
nuke/​SbomGenerator.cs Recognizes JSON content types with or without a leading dot.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mrlacey
mrlacey merged commit 7e7eb35 into main Sep 25, 2026
1 check passed
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.

2 participants