Skip to content

Commit 8231870

Browse files
authored
⬆️ Upgrade simple-icons to version 16.3.0 (#765)
1 parent a478270 commit 8231870

7 files changed

Lines changed: 81 additions & 12 deletions

File tree

.changeset/red-grapes-relate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"socialify": patch
3+
---
4+
5+
Upgrade simple-icons and add custom fallbacks for removed icons
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: upgrade-simple-icons
3+
description: Upgrade simple-icons to the latest version and preserve any removed icons by sourcing them from the previous version into common/icons/customIcons.ts and updating icon mappings. Use whenever bumping or upgrading simple-icons in this repo.
4+
---
5+
6+
# Upgrade simple-icons
7+
8+
## Workflow
9+
10+
1. Record the current simple-icons version from `package.json` and `pnpm-lock.yaml`.
11+
2. Install the latest package: `pnpm add simple-icons@latest`.
12+
3. Reconcile icon imports:
13+
- Review `common/icons/languageMapping.ts` for imports from `simple-icons`.
14+
- Run `pnpm lint` or `pnpm verify` to surface missing icon exports.
15+
4. If any previously used icon is missing after the upgrade:
16+
- Download the previous simple-icons version (recorded in step 1) to a temporary location or install it briefly.
17+
- Extract the icon data (`title`, `slug`, `hex`, `path`). In simple-icons, this is available from the `si*` export or `icons/<slug>.json` in the package.
18+
- Add a `custom<IconName>` entry to `common/icons/customIcons.ts` with the extracted data.
19+
- Update `common/icons/languageMapping.ts` to import and reference the custom icon.
20+
- Run `pnpm lint:fix` to fix import ordering issues if any.
21+
- Remove any temporary dependency or scratch folder after the data is captured.
22+
5. Update relevant documentation if icon mappings or customization behavior changes.
23+
6. Run `pnpm verify` before committing, and add a changeset for the upgrade.

AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ socialify/
4545
│ └── renderPNG.tsx # PNG conversion with resvg-wasm
4646
├── public/ # Static assets (wasm files copied here)
4747
├── .devcontainer/ # VS Code Dev Container configuration
48+
├── .github/skills/ # AI skills for repo-specific workflows
4849
├── .github/workflows/ # CI/CD workflows (build, test, release, docker)
4950
└── .changeset/ # Changeset files for versioning
5051
```
@@ -95,6 +96,10 @@ Copy `.env.example` to `.env` and configure:
9596
- **Import Aliases**: Use `@/` for imports (e.g., `@/components/...`)
9697
- **Styling**: Tailwind CSS with daisyUI components
9798

99+
## AI Skills
100+
101+
- `/.github/skills/upgrade-simple-icons/` - Upgrade the simple-icons dependency and preserve icons that are no longer available via custom mappings.
102+
98103
### Testing
99104
- **Unit Tests**: Jest with React Testing Library
100105
- **E2E Tests**: Playwright (Chromium)

common/icons/customIcons.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,39 @@ export const customVSCode: SimpleIcon = {
107107
return `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>${this.title}</title><path d="${this.path}"/></svg>`
108108
},
109109
}
110+
111+
export const customHeroku: SimpleIcon = {
112+
title: 'Heroku',
113+
slug: 'heroku',
114+
hex: '430098',
115+
source: 'https://devcenter.heroku.com/articles/heroku-brand-guidelines#logos',
116+
guidelines: 'https://devcenter.heroku.com/articles/heroku-brand-guidelines',
117+
path: 'M20.61 0H3.39C2.189 0 1.23.96 1.23 2.16v19.681c0 1.198.959 2.159 2.16 2.159h17.22c1.2 0 2.159-.961 2.159-2.159V2.16C22.77.96 21.811 0 20.61 0zm.96 21.841c0 .539-.421.96-.96.96H3.39c-.54 0-.96-.421-.96-.96V2.16c0-.54.42-.961.96-.961h17.22c.539 0 .96.421.96.961v19.681zM6.63 20.399L9.33 18l-2.7-2.4v4.799zm9.72-9.719c-.479-.48-1.379-1.08-2.879-1.08-1.621 0-3.301.421-4.5.84V3.6h-2.4v10.38l1.68-.78s2.76-1.26 5.16-1.26c1.2 0 1.5.66 1.5 1.26v7.2h2.4v-7.2c.059-.179.059-1.501-.961-2.52zM13.17 7.5h2.4c1.08-1.26 1.62-2.521 1.8-3.9h-2.399c-.241 1.379-.841 2.64-1.801 3.9z',
118+
get svg() {
119+
return `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>${this.title}</title><path d="${this.path}"/></svg>`
120+
},
121+
}
122+
123+
export const customOpenAI: SimpleIcon = {
124+
title: 'OpenAI',
125+
slug: 'openai',
126+
hex: '412991',
127+
source: 'https://openai.com/brand',
128+
guidelines: 'https://openai.com/brand',
129+
path: 'M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z',
130+
get svg() {
131+
return `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>${this.title}</title><path d="${this.path}"/></svg>`
132+
},
133+
}
134+
135+
export const customSlack: SimpleIcon = {
136+
title: 'Slack',
137+
slug: 'slack',
138+
hex: '4A154B',
139+
source: 'https://slack.com/brand-guidelines',
140+
guidelines: 'https://slack.com/brand-guidelines',
141+
path: 'M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z',
142+
get svg() {
143+
return `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>${this.title}</title><path d="${this.path}"/></svg>`
144+
},
145+
}

common/icons/languageMapping.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ import {
4848
siGraphql,
4949
siGreasyfork,
5050
siHaskell,
51-
siHeroku,
5251
siHtml5,
5352
siHuggingface,
5453
siJavascript,
@@ -73,7 +72,6 @@ import {
7372
siNuxt,
7473
siNvidia,
7574
siOcaml,
76-
siOpenai,
7775
siOpencv,
7876
siPerl,
7977
siPhp,
@@ -90,7 +88,6 @@ import {
9088
siSass,
9189
siScala,
9290
siScikitlearn,
93-
siSlack,
9491
siSpringboot,
9592
siSupabase,
9693
siSvelte,
@@ -113,10 +110,13 @@ import {
113110
customAmazon,
114111
customAWS,
115112
customCsharp,
113+
customHeroku,
116114
customJava,
117115
customMicrosoft,
118116
customMicrosoftAzure,
117+
customOpenAI,
119118
customPowershell,
119+
customSlack,
120120
customVisualStudio,
121121
customVSCode,
122122
} from './customIcons'
@@ -200,7 +200,7 @@ export const LANGUAGE_ICON_MAPPING: { [key: string]: SimpleIcon } = {
200200
'Google Cloud': siGooglecloud,
201201
GraphQL: siGraphql,
202202
GreasyFork: siGreasyfork,
203-
Heroku: siHeroku,
203+
Heroku: customHeroku,
204204
'Hugging Face': siHuggingface,
205205
Kafka: siApachekafka,
206206
Kubernetes: siKubernetes,
@@ -220,7 +220,7 @@ export const LANGUAGE_ICON_MAPPING: { [key: string]: SimpleIcon } = {
220220
NPM: siNpm,
221221
Nuxt: siNuxt,
222222
Nvidia: siNvidia,
223-
OpenAI: siOpenai,
223+
OpenAI: customOpenAI,
224224
OpenCV: siOpencv,
225225
PostgreSQL: siPostgresql,
226226
PyTorch: siPytorch,
@@ -229,7 +229,7 @@ export const LANGUAGE_ICON_MAPPING: { [key: string]: SimpleIcon } = {
229229
'Ruby on Rails': siRubyonrails,
230230
Sass: siSass,
231231
'scikit-learn': siScikitlearn,
232-
Slack: siSlack,
232+
Slack: customSlack,
233233
'Spring Boot': siSpringboot,
234234
Supabase: siSupabase,
235235
Tailwind: siTailwindcss,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"react-icons": "^5.5.0",
5252
"satori": "^0.15.2",
5353
"server-only": "^0.0.1",
54-
"simple-icons": "^15.22.0",
54+
"simple-icons": "^16.3.0",
5555
"use-debounce": "^10.0.6",
5656
"yoga-wasm-web": "^0.3.3"
5757
},

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)