Skip to content
Merged
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
18 changes: 5 additions & 13 deletions src/platformIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,6 @@ export const PLATFORM_TO_ICON = {
nintendo: "nintendo",
"nintendo-switch": "nintendo-switch",
node: "nodejs",
"node-awslambda": "awslambda",
"node-azurefunctions": "azure-functions",
"node-cloudflare-pages": "cloudflare",
"node-cloudflare-workers": "cloudflare",
"node-connect": "connect",
"node-express": "express",
"node-fastify": "fastify",
"node-gcpfunctions": "gcp-functions",
"node-hapi": "hapi",
"node-koa": "koa",
"node-nestjs": "nestjs",
"node-serverlesscloud": "serverless",
nvidia: "nvidia",
Comment on lines 135 to 136
Copy link
Member

@ArthurKnaus ArthurKnaus Feb 4, 2025

Choose a reason for hiding this comment

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

I agree that we do this, just note that this is a breaking change and we need to bump to the next major version on release.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeap. I am aware of that :)

openai: "openai",
openfeature: "openfeature",
Expand Down Expand Up @@ -243,10 +231,14 @@ export const PLATFORM_TO_ICON = {
// Please add them where they belong alphabetically
} as const;


function normalizePlatform(platform: string): string {
// sentry uses format python-django, but docs uses python.django
// this function normalizes that
return platform.replace(".", "-");
const dashedPlatform = platform.replace(".", "-");

// Allow `node` as an alias for `javascript` to ensure backwards compatibility
return dashedPlatform.replace(/^node-/, 'javascript-')
}

function getIcon(platform: string): Platform {
Expand Down
Loading