mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-11 13:28:19 +00:00
* Updates needed to support Solid 2 * Switch to the next tag * feat(packages): add `@lucide/solid` package for Solid 2 Solid 2's API is a breaking change from Solid 1 and is still an RC, so `lucide-solid` stays on Solid 1 (`solid-js: ^1.4.7`) untouched and Solid 2 support ships as a new `packages/solid` package named `@lucide/solid` — the same scheme already used by `@lucide/svelte` and `@lucide/angular`. The package is a copy of `lucide-solid` on the `@lucide/shared` build architecture, ported to Solid 2: - `splitProps` -> `omit`, `solid-js/web` -> `@solidjs/web`, `JSXElement` -> `Element`, `Context.Provider` -> `<Context value>` - `jsxImportSource` is `@solidjs/web` in tsconfig, the esbuild step and `ts.createProgram`; rollup externals drop the removed `solid-js/store` - `vite-plugin-solid` -> `@solidjs/vite-plugin` - tests keep upstream's coverage with two Solid 2 adaptations: boolean attribute literals must be strings (`aria-hidden="false"`), and writes are batched so the reactivity tests need a `flush()` before asserting Rendered output is unchanged — the snapshots are byte-identical to `lucide-solid`'s. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(solid): fix React leftovers in the Solid guide The Solid guide was derived from the React guide and three things were not carried across: - `advanced/typescript.md` still told readers the types are for "a TypeScript React project" - its `LucideIcon` example kept React's destructured-props signature. The `: ButtonProps` annotation had also been dropped in the copy, so `ButtonProps` was declared but unused and the parameters were implicitly `any`. Destructuring props breaks reactivity in Solid — verified: with `({ icon: Icon, label })` a changing `label` never reaches the DOM, while `props.label` updates correctly. - `advanced/aliased-names.md` had an orphaned `###` heading; its parent `## Choosing import name style` was dropped during the conversion because it documents React-only subpath exports. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: type the shared Sandpack wrapper with `SandpackProps` The base Sandpack wrapper declared its props as `FunctionalComponent<LucideProps>` with `LucideProps` imported from `@lucide/vue`, which has nothing to do with a Sandpack embed. None of the props the markdown plugin actually passes (`template`, `files`, `options`, `customSetup`, `theme`) were declared, so they only reached the inner `<Sandpack />` via Vue's fallthrough attributes. Declare `SandpackProps` from `sandpack-vue3` instead and forward them explicitly. This also removes the `@lucide/vue` import that made every framework guide — including the Solid one, which uses this wrapper directly — appear to reference the Vue package. Verified with a full `vitepress build`: each framework guide's chunk still carries its own template (react/vue/vite-svelte/vanilla/ vite-solid) and all five props reach the component. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(solid): document the Solid 2 flavour in the getting started guide The Solid guide teaches `lucide-solid` throughout (64 references), so the one-line note about `@lucide/solid` left Solid 2 readers on a page whose every install command and live example is Solid 1 — and the packages list points `@lucide/solid` at this same page. Replace that note with a "Using Solid 2?" callout holding its own tabbed install group, the import-specifier swap, and a table of the Solid 2 changes that affect code written around Lucide (`@solidjs/web`, `jsxImportSource`, `splitProps` -> `omit`, `<Ctx value>`), linking out to Solid's own migration guide for the rest. The claim that both packages expose the same components and props is checked, not assumed: `dist/types/lucide-solid.d.ts` is identical between the two packages, and the only differences anywhere in the public type surface are Solid's own renames (the `JSX` namespace source and `JSXElement` -> `Element`). Keeps one guide section for both packages, matching how upstream handles the two Svelte packages. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(solid): port lucide-solid to Solid 2 - Icon/context/types use Solid 2 APIs: omit() instead of splitProps(), Dynamic and JSX types from @solidjs/web. - solid-js / @solidjs/web 2.0 (rc) as peer and dev dependencies, babel-preset-solid 2; rollup and tsconfig updated to match. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Add integration test * Update rollup file * Fix tests * Revert lucide-solid changes * update lockfile * Fix docs * Format code --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Eric <eric.fennis@gmail.com>
180 lines
5.6 KiB
YAML
180 lines
5.6 KiB
YAML
name: Release Packages
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
workflow_call:
|
|
inputs:
|
|
version:
|
|
required: true
|
|
description: Version
|
|
type: string
|
|
tag:
|
|
description: NPM tag
|
|
default: 'latest'
|
|
type: string
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
prepare:
|
|
if: github.repository == 'lucide-icons/lucide' && contains('["ericfennis", "karsa-mistmere", "jguddas"]', github.actor)
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
VERSION: ${{ steps.get_version.outputs.VERSION }}
|
|
steps:
|
|
- name: Get the version
|
|
id: get_version
|
|
run: |
|
|
echo $VERSION_REF
|
|
echo "VERSION=${VERSION_REF/refs\/tags\/\v}" >> $GITHUB_OUTPUT
|
|
env:
|
|
VERSION_REF: ${{ inputs.version || github.event.inputs.version || github.ref }}
|
|
|
|
release:
|
|
if: github.repository == 'lucide-icons/lucide'
|
|
runs-on: ubuntu-latest
|
|
needs: prepare
|
|
permissions:
|
|
id-token: write # Required for OIDC
|
|
contents: read
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
package:
|
|
[
|
|
'lucide',
|
|
'lucide-react',
|
|
'lucide-react-native',
|
|
'lucide-preact',
|
|
'lucide-solid',
|
|
'@lucide/angular',
|
|
'@lucide/astro',
|
|
'@lucide/icons',
|
|
'@lucide/solid',
|
|
'@lucide/svelte',
|
|
'@lucide/vue',
|
|
]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
cache: 'pnpm'
|
|
node-version-file: 'package.json'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Set new version
|
|
run: pnpm version ${{ needs.prepare.outputs.VERSION }} --filter ${{ matrix.package }} --fail-if-no-match --no-git-tag-version
|
|
|
|
- name: Build
|
|
run: pnpm --filter ${{ matrix.package }} build
|
|
|
|
- name: Test
|
|
run: pnpm --filter ${{ matrix.package }} test
|
|
|
|
- name: Publish
|
|
run: pnpm --filter ${{ matrix.package }} publish --access public --no-git-checks --ignore-scripts --tag ${{ inputs.tag }}
|
|
env:
|
|
NPM_CONFIG_PROVENANCE: true
|
|
|
|
lucide-static:
|
|
if: github.repository == 'lucide-icons/lucide'
|
|
runs-on: ubuntu-latest
|
|
needs: [prepare, lucide-font]
|
|
permissions:
|
|
id-token: write # Required for OIDC
|
|
contents: read
|
|
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: lucide-font
|
|
path: lucide-font
|
|
|
|
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
cache: 'pnpm'
|
|
node-version-file: 'package.json'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Set new version
|
|
run: pnpm version ${{ needs.prepare.outputs.VERSION }} --filter lucide-static --no-git-tag-version
|
|
|
|
- name: Move Font
|
|
run: cp -r lucide-font packages/lucide-static/font
|
|
|
|
- name: Build
|
|
run: pnpm --filter lucide-static build
|
|
|
|
- name: Publish
|
|
run: pnpm --filter lucide-static publish --no-git-checks --ignore-scripts --tag ${{ inputs.tag }} --access public
|
|
env:
|
|
NPM_CONFIG_PROVENANCE: true
|
|
|
|
lucide-font:
|
|
if: github.repository == 'lucide-icons/lucide'
|
|
runs-on: ubuntu-latest
|
|
needs: prepare
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
cache: 'pnpm'
|
|
node-version-file: 'package.json'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Execute unit tests for build-font
|
|
run: pnpm test:font
|
|
|
|
- name: Create font in ./lucide-font
|
|
run: pnpm build:font --saveCodePoints
|
|
env:
|
|
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
|
|
|
|
- name: 'Upload to Artifacts'
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: lucide-font
|
|
path: lucide-font
|
|
|
|
post-release:
|
|
if: github.repository == 'lucide-icons/lucide' && github.event_name != 'workflow_call'
|
|
runs-on: ubuntu-latest
|
|
needs: [prepare, lucide-font]
|
|
permissions:
|
|
contents: write # Required to upload the release assets
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: lucide-font
|
|
path: lucide-font
|
|
|
|
- name: Zip font and icons
|
|
run: |
|
|
zip -r lucide-font-${{ needs.prepare.outputs.VERSION }}.zip lucide-font
|
|
zip -r lucide-icons-${{ needs.prepare.outputs.VERSION }}.zip icons
|
|
|
|
- name: Release zip and fonts
|
|
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
|
|
with:
|
|
tag_name: ${{ needs.prepare.outputs.VERSION }}
|
|
|
|
files: |
|
|
lucide-font-${{ needs.prepare.outputs.VERSION }}.zip
|
|
lucide-icons-${{ needs.prepare.outputs.VERSION }}.zip
|