diff --git a/.changeset/README.md b/.changeset/README.md deleted file mode 100644 index e5b6d8d6..00000000 --- a/.changeset/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Changesets - -Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works -with multi-package repos, or single-package repos to help you version and publish your code. You can -find the full documentation for it [in our repository](https://github.com/changesets/changesets) - -We have a quick list of common questions to get you started engaging with this project in -[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json deleted file mode 100644 index 0ad25f43..00000000 --- a/.changeset/config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://unpkg.com/@changesets/config@1.6.3/schema.json", - "changelog": [ - "@changesets/changelog-github", - { "repo": "twodft/astro-icon" } - ], - "commit": false, - "linked": [], - "access": "public", - "baseBranch": "main", - "updateInternalDependencies": "patch", - "ignore": ["www", "service", "demo"] -} diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json new file mode 100644 index 00000000..b8f99a37 --- /dev/null +++ b/.github/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + "packages/core": "1.3.3" +} diff --git a/.github/release-please-config.json b/.github/release-please-config.json new file mode 100644 index 00000000..52b73b04 --- /dev/null +++ b/.github/release-please-config.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "node", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "pull-request-title-pattern": "chore: release${component} ${version}", + "changelog-sections": [ + { "type": "feat", "section": "Features" }, + { "type": "fix", "section": "Bug Fixes" }, + { "type": "perf", "section": "Performance Improvements" }, + { "type": "deps", "section": "Dependencies" }, + { "type": "revert", "section": "Reverts" }, + { "type": "docs", "section": "Documentation", "hidden": false }, + { "type": "chore", "section": "Miscellaneous", "hidden": true }, + { "type": "refactor", "section": "Miscellaneous", "hidden": true }, + { "type": "test", "section": "Miscellaneous", "hidden": true }, + { "type": "build", "section": "Miscellaneous", "hidden": true }, + { "type": "ci", "section": "Miscellaneous", "hidden": true } + ], + "packages": { + "packages/core": { + "component": "@dallay/astro-icon", + "release-type": "node", + "package-name": "@dallay/astro-icon", + "changelog-path": "CHANGELOG.md", + "tag-name": "v${version}", + "release-as": "" + } + } +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e16da551..f93d5bed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,42 +21,64 @@ jobs: lint: name: Lint runs-on: ubuntu-latest + permissions: + contents: write steps: - - uses: actions/checkout@v6 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: 22 cache: 'pnpm' - run: pnpm install - # Lint autofix cannot run on forks, so just skip those! See https://github.com/wearerequired/lint-action/issues/13 - - name: Lint (External) - if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner }} + # Check only — forks and Dependabot (no write access to push fixes) + - name: Lint (check only — forks and Dependabot) + if: | + (github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner) || + contains(github.actor, 'dependabot') run: pnpm run lint - - # Otherwise, run lint autofixer - - name: Lint - if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }} - uses: wearerequired/lint-action@v2 + + # Auto-fix + commit — push to main or human PRs from same repo + - name: Lint (auto-fix) + if: | + !contains(github.actor, 'dependabot') && + (github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner) + run: pnpm run lint:fix || true + + - name: Commit lint fixes + if: | + !contains(github.actor, 'dependabot') && + (github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner) env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - prettier: true - auto_fix: true - git_name: github-actions[bot] - git_email: github-actions[bot]@users.noreply.github.com - commit_message: 'chore(lint): ${linter} fix' - github_token: ${{ secrets.GITHUB_TOKEN }} - neutral_check_on_warning: true + HEAD_REF: ${{ github.head_ref }} + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + if git diff --quiet; then + echo "No lint fixes needed." + exit 0 + fi + git add -A + git commit -m "chore(lint): biome auto-fix" + # actions/checkout leaves a detached HEAD on PR events. + # Push back to the source branch explicitly; --force-with-lease + # prevents overwriting concurrent pushes that aren't ours. + if [ -n "$HEAD_REF" ]; then + git push origin "HEAD:${HEAD_REF}" --force-with-lease + else + git push + fi smoke: name: Smoke Test runs-on: ubuntu-latest + permissions: + contents: read steps: - - uses: actions/checkout@v6 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: 22 cache: 'pnpm' diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..2e88cbfa --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,159 @@ +name: Release Please + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +defaults: + run: + shell: bash + +jobs: + release-please: + name: Release Please + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: write + pull-requests: write + outputs: + release_created: ${{ steps.release.outputs.releases_created }} + tag_name: ${{ steps.release.outputs['packages/core--tag_name'] }} + version: ${{ steps.release.outputs['packages/core--version'] }} + steps: + - name: Generate GitHub App Token + id: app-token + uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + + - name: Run Release Please + id: release + uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 + with: + token: ${{ steps.app-token.outputs.token }} + config-file: .github/release-please-config.json + manifest-file: .github/.release-please-manifest.json + + publish: + name: Publish to npm + runs-on: ubuntu-latest + timeout-minutes: 15 + needs: release-please + if: needs.release-please.outputs.release_created == 'true' + environment: npm + permissions: + contents: read + id-token: write + steps: + - name: Generate GitHub App Token + id: app-token + uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + token: ${{ steps.app-token.outputs.token }} + ref: ${{ needs.release-please.outputs.tag_name }} + + - name: Setup pnpm + uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.1.0 + + - name: Setup Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: 22 + registry-url: 'https://registry.npmjs.org' + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build package + run: pnpm --filter @dallay/astro-icon run build + + - name: Publish to npm + working-directory: packages/core + run: pnpm publish --access public --no-git-checks + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + deploy-www: + name: Deploy www to Vercel + runs-on: ubuntu-latest + timeout-minutes: 5 + needs: release-please + if: needs.release-please.outputs.release_created == 'true' + steps: + - name: Trigger Vercel deploy hook + run: curl -s -X POST "${{ secrets.VERCEL_DEPLOY_HOOK_WWW }}" + + deploy-service: + name: Deploy service to Vercel + runs-on: ubuntu-latest + timeout-minutes: 5 + needs: release-please + if: needs.release-please.outputs.release_created == 'true' + steps: + - name: Trigger Vercel deploy hook + run: curl -s -X POST "${{ secrets.VERCEL_DEPLOY_HOOK_SERVICE }}" + + deploy-demo: + name: Deploy demo to Cloudflare Pages + runs-on: ubuntu-latest + timeout-minutes: 15 + needs: release-please + if: needs.release-please.outputs.release_created == 'true' + permissions: + contents: read + steps: + - name: Generate GitHub App Token + id: app-token + uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + token: ${{ steps.app-token.outputs.token }} + ref: ${{ needs.release-please.outputs.tag_name }} + + - name: Setup pnpm + uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.1.0 + + - name: Setup Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: 22 + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build core and demo + run: | + pnpm --filter @dallay/astro-icon run build + pnpm --filter demo run build + + - name: Deploy to Cloudflare Pages + uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: a6500bbcdec00bf4c9fc57052081baa7 + command: pages deploy dist --project-name=astro-icon-demo --branch=main + workingDirectory: demo diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f70358a6..9b8b3053 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,17 +1,22 @@ -name: Release +name: Release (Manual) + +# Manual fallback publish — use only for emergency hotfixes. +# Normal releases are handled automatically by the release-please.yml workflow. on: - push: - tags: - - "v*.*.*" workflow_dispatch: + inputs: + confirm: + description: 'Type "publish" to confirm manual release' + required: true + type: string env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: false defaults: run: @@ -19,28 +24,37 @@ defaults: jobs: publish: - name: Publish npm package + name: Publish npm package (manual) runs-on: ubuntu-latest timeout-minutes: 15 + if: inputs.confirm == 'publish' environment: npm permissions: contents: read id-token: write steps: + - name: Generate GitHub App Token + id: app-token + uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: + token: ${{ steps.app-token.outputs.token }} fetch-depth: 0 - name: Setup pnpm - uses: pnpm/action-setup@v4 + uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.1.0 - name: Setup Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: 22.14.0 - registry-url: "https://registry.npmjs.org" - cache: "pnpm" + node-version: 22 + registry-url: 'https://registry.npmjs.org' + cache: 'pnpm' - name: Install dependencies run: pnpm install --frozen-lockfile @@ -50,21 +64,18 @@ jobs: npm install --global npm@^11.5.1 npm --version - - name: Verify tag matches package version - if: startsWith(github.ref, 'refs/tags/v') + - name: Verify branch is main run: | - TAG_VERSION="${GITHUB_REF_NAME#v}" - PACKAGE_VERSION="$(node -p "require('./packages/core/package.json').version")" - - if [[ "$TAG_VERSION" != "$PACKAGE_VERSION" ]]; then - echo "Tag version ($TAG_VERSION) does not match packages/core/package.json ($PACKAGE_VERSION)." + if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then + echo "Manual publish must run from main branch, got: ${{ github.ref }}" exit 1 fi - name: Build package - run: pnpm --filter @twodft/astro-icon run build + run: pnpm --filter @dallay/astro-icon run build - name: Publish package - if: startsWith(github.ref, 'refs/tags/v') working-directory: packages/core run: pnpm publish --access public --no-git-checks + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.nvmrc b/.nvmrc index dc0bb0f4..5bf4400f 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v22.12.0 +24.15.0 diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..034e8480 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +Use this section to tell people how to report a vulnerability. + +Tell them where to go, how often they can expect to get an update on a +reported vulnerability, what to expect if the vulnerability is accepted or +declined, etc. diff --git a/biome.json b/biome.json new file mode 100644 index 00000000..8812016a --- /dev/null +++ b/biome.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.4.15/schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "files": { + "ignoreUnknown": false, + "includes": ["**", "!**/dist", "!**/node_modules", "!pnpm-lock.yaml"] + }, + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 2, + "lineWidth": 100 + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "javascript": { + "formatter": { + "quoteStyle": "double", + "trailingCommas": "all", + "semicolons": "always" + } + }, + "json": { + "formatter": { + "enabled": true + } + } +} diff --git a/demo/astro.config.ts b/demo/astro.config.ts index a0c95e92..31d512bf 100644 --- a/demo/astro.config.ts +++ b/demo/astro.config.ts @@ -1,6 +1,6 @@ -import { defineConfig } from "astro/config"; import cloudflare from "@astrojs/cloudflare"; -import icon from "@twodft/astro-icon"; +import icon from "@dallay/astro-icon"; +import { defineConfig } from "astro/config"; // https://astro.build/config export default defineConfig({ diff --git a/demo/package.json b/demo/package.json index b270d795..ab0653e0 100644 --- a/demo/package.json +++ b/demo/package.json @@ -15,8 +15,9 @@ "@iconify-json/ri": "^1.2.10" }, "devDependencies": { - "@astrojs/cloudflare": "^13.1.8", - "@twodft/astro-icon": "workspace:*", - "astro": "^6.1.4" + "@astrojs/cloudflare": "^13.5.1", + "@dallay/astro-icon": "workspace:*", + "astro": "^6.3.3", + "wrangler": "^4.92.0" } } diff --git a/demo/src/layouts/base.astro b/demo/src/layouts/base.astro index 96d2b4c6..c51fe161 100644 --- a/demo/src/layouts/base.astro +++ b/demo/src/layouts/base.astro @@ -3,10 +3,40 @@ + Astro Icon - + + + +
+ +
+ + diff --git a/demo/src/pages/index.astro b/demo/src/pages/index.astro index 013661de..66f36116 100644 --- a/demo/src/pages/index.astro +++ b/demo/src/pages/index.astro @@ -1,5 +1,5 @@ --- -import { Icon } from "@twodft/astro-icon/components"; +import { Icon } from "@dallay/astro-icon/components"; import Base from "../layouts/base.astro"; const icon = "adjustment"; @@ -15,6 +15,7 @@ const icon = "adjustment";

Local Icons

+ @@ -33,16 +34,18 @@ const icon = "adjustment"; render it here!

+ - - - - - - - - - + + + + + + + + + + diff --git a/package.json b/package.json index 33afdb62..79c1bb76 100644 --- a/package.json +++ b/package.json @@ -4,30 +4,39 @@ "version": "0.0.0", "type": "module", "scripts": { - "build": "pnpm --filter @twodft/astro-icon --filter www run build", + "build": "pnpm --filter @dallay/astro-icon --filter www run build", "dev": "pnpm -r run dev", - "lint": "prettier \"**/*.{js,ts,md,json}\"", - "version": "changeset version && pnpm install --no-frozen-lockfile --lockfile-only" + "lint": "biome check .", + "lint:fix": "biome check --write .", + "format": "biome format --write ." }, "repository": { "type": "git", - "url": "git+https://github.com/twodft/astro-icon.git" + "url": "git+https://github.com/dallay/astro-icon.git" }, "keywords": [], "license": "MIT", "bugs": { - "url": "https://github.com/twodft/astro-icon/issues" + "url": "https://github.com/dallay/astro-icon/issues" }, - "homepage": "https://github.com/natemoo-re/astro-icon#readme", + "homepage": "https://github.com/dallay/astro-icon#readme", "packageManager": "pnpm@10.33.0", "engines": { - "node": ">=22.12.0" + "node": ">=24.15.0" }, - "dependencies": { - "@changesets/changelog-github": "^0.6.0", - "@changesets/cli": "^2.30.0" + "pnpm": { + "overrides": { + "devalue": ">=5.8.1", + "fast-uri": ">=3.1.2", + "minimatch@>=10.0.0": ">=10.2.3", + "path-to-regexp": ">=6.3.0", + "undici@<6": ">=5.29.0", + "ajv@>=7.0.0-alpha.0": ">=8.18.0", + "smol-toml": ">=1.6.1", + "yaml@>=2.0.0": ">=2.8.3" + } }, "devDependencies": { - "prettier": "^3.8.1" + "@biomejs/biome": "^2.4.15" } } diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index e57ceb14..cd879f0e 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,71 @@ # astro-icon +## [1.3.3](https://github.com/dallay/astro-icon/compare/@dallay/astro-icon-v1.3.2...@dallay/astro-icon-v1.3.3) (2026-05-16) + + +### Documentation + +* **README:** update installation instructions and add package manager options ([ca5c1ec](https://github.com/dallay/astro-icon/commit/ca5c1ec7a018cc230130fa965a470418511d2a7b)) + +## [1.3.2](https://github.com/dallay/astro-icon/compare/@dallay/astro-icon-v1.3.1...@dallay/astro-icon-v1.3.2) (2026-05-16) + + +### Bug Fixes + +* **a11y:** WCAG 2.1 accessibility improvements across Icon component and demo ([#6](https://github.com/dallay/astro-icon/issues/6)) ([af292bc](https://github.com/dallay/astro-icon/commit/af292bcfe229ca8c9f5b001e2ce2cf744de178fd)) + +## [1.3.1](https://github.com/dallay/astro-icon/compare/@dallay/astro-icon-v1.3.0...@dallay/astro-icon-v1.3.1) (2026-05-16) + + +### Bug Fixes + +* **lint:** suppress false positive noUnusedVariables on viewBox extraction ([d8e7a55](https://github.com/dallay/astro-icon/commit/d8e7a55ea0223e7fc481dfc95c5338a2f3778acc)) + +## [1.3.0](https://github.com/dallay/astro-icon/compare/@dallay/astro-icon-v1.2.4...@dallay/astro-icon-v1.3.0) (2026-05-15) + +### Features + +- add Sprite components that leverage <use> ([52bb8ff](https://github.com/dallay/astro-icon/commit/52bb8ff24e1dd1c26f6eadc2bb08d8e7f1ec3573)) +- automatically prefix IDs using SVGO ([0217a71](https://github.com/dallay/astro-icon/commit/0217a716c7278e30a04de45f72e7a3cce5c65180)) +- **desc:** support desc svg tag. ([#247](https://github.com/dallay/astro-icon/issues/247)) ([fce07f1](https://github.com/dallay/astro-icon/commit/fce07f17fe67116165d5d3dd279519bb7bbed55c)) +- fail builds when icons cannot be fetched ([330e465](https://github.com/dallay/astro-icon/commit/330e4654e160bcea8affd672e67afe69c2919cb2)) +- fork as @twodft/astro-icon v1.2.0 with Astro 6 support ([797dca5](https://github.com/dallay/astro-icon/commit/797dca5ee252ee1f592d0545c83189789c0356a8)) +- only include referenced icons in SpriteSheet ([62559e0](https://github.com/dallay/astro-icon/commit/62559e09db40482ab2fc6b4fdc001a6e38e9b7ad)) +- pass props to custom resolver ([#42](https://github.com/dallay/astro-icon/issues/42)) ([ae0a7f7](https://github.com/dallay/astro-icon/commit/ae0a7f72358dee39a133663423b499e4525c06cb)) + +### Bug Fixes + +- **#15:** fix parallelism issue with remote cache ([#16](https://github.com/dallay/astro-icon/issues/16)) ([9ff5e7d](https://github.com/dallay/astro-icon/commit/9ff5e7d50ec94e2e0b9552c14b2bcd243fb2c48a)) +- add `Sprite.Provider` component to fix race condition ([e61559b](https://github.com/dallay/astro-icon/commit/e61559be5b530d0cc1e3479490ff23fd06158ef5)) +- add node-fetch as dep ([98eb521](https://github.com/dallay/astro-icon/commit/98eb5218e3dd301967103730c269c764133679ff)) +- **createIconPack:** handle unresolved modules ([#148](https://github.com/dallay/astro-icon/issues/148)) ([d176a7d](https://github.com/dallay/astro-icon/commit/d176a7da3b7332d459ec97c0af1667b6be9057fa)) +- default size attribute ([d998134](https://github.com/dallay/astro-icon/commit/d99813407e9bb0c043a7ff8d499031b667dfd894)) +- do not throw error when no sprites are found ([3b29d89](https://github.com/dallay/astro-icon/commit/3b29d893bbb385c8e6e8fa51b421fefa17b050ac)) +- handle duplicate icon entries in include config ([#245](https://github.com/dallay/astro-icon/issues/245)) ([ff3a66a](https://github.com/dallay/astro-icon/commit/ff3a66a8a357375076022b6f9800561ed845c071)) +- **Icon:** switch to non-deprecated href attribute ([#243](https://github.com/dallay/astro-icon/issues/243)) ([a8c0a6c](https://github.com/dallay/astro-icon/commit/a8c0a6c5fe2a01841c258af5fb3abe04839df5eb)) +- include aliases in icon type definitions and hash calculation ([#250](https://github.com/dallay/astro-icon/issues/250)) ([41218fa](https://github.com/dallay/astro-icon/commit/41218facd06f51a63d75cccb80c3745c256ec99f)) +- inherit viewbox width / height of none provided ([#186](https://github.com/dallay/astro-icon/issues/186)) ([81985cc](https://github.com/dallay/astro-icon/commit/81985cc2b858795319885c2725b8cc4e24d61750)) +- move viewBox to symbol ([#246](https://github.com/dallay/astro-icon/issues/246)) ([4c5da33](https://github.com/dallay/astro-icon/commit/4c5da3378436c2bee6ccdf4ad9cf0e1f32fb6903)) +- replace remaining @twodft/astro-icon references with @dallay/astro-icon ([d2e01db](https://github.com/dallay/astro-icon/commit/d2e01dba00fdb0ca02d25b9957e29a0f3fb77e62)) +- show icon with gradients in Chrome ([#56](https://github.com/dallay/astro-icon/issues/56)) ([60c7304](https://github.com/dallay/astro-icon/commit/60c7304368a7ca88fa2190bc8bfac5e8229e0f50)) +- Sprite component compat with Astro v1.0.0 ([147001e](https://github.com/dallay/astro-icon/commit/147001eb2db7e6cbb8d0433be56fb86f79cf3a42)) +- **types:** resolve package root declarations ([ef09ec4](https://github.com/dallay/astro-icon/commit/ef09ec4e92b96c345fe02dbbc96d1446c4f19c00)) +- **types:** ship stable declaration entrypoints ([5351aaa](https://github.com/dallay/astro-icon/commit/5351aaadbc81e8c7f868b277c27d1b5f4b4a1130)) +- update release workflow and local icon reload ([b032a9c](https://github.com/dallay/astro-icon/commit/b032a9c08f7c3d5699ee3414d2f04f314577f03a)) +- use constant for id prefix ([4ac28c4](https://github.com/dallay/astro-icon/commit/4ac28c41c1c66de4bb9e5b21d4755621dc3b1115)) + +### Performance Improvements + +- **createIconPack:** improve local icon resolution ([#149](https://github.com/dallay/astro-icon/issues/149)) ([f564028](https://github.com/dallay/astro-icon/commit/f5640282120e4eaa947c695e02587604f3f8b1a6)) + +### Documentation + +- improve readme ([e201b6e](https://github.com/dallay/astro-icon/commit/e201b6e997c6b1cb25de2cc7d72524df0a816a55)) +- **README:** update props section ([63e93a3](https://github.com/dallay/astro-icon/commit/63e93a31f4d08953eb8e00b7f4b6388d54086af6)) +- update core README ([#106](https://github.com/dallay/astro-icon/issues/106)) ([23c032b](https://github.com/dallay/astro-icon/commit/23c032b41e462107b83c5ce1960f2c5098e2d174)) +- update README ([996a5ad](https://github.com/dallay/astro-icon/commit/996a5ad1b62350a0e8e093f16c34659fee34fdbf)) +- update README, add license ([0562b6e](https://github.com/dallay/astro-icon/commit/0562b6ec5811cf534164e2a59d5ae8542c3cbddf)) + ## 1.2.4 ### Patch Changes @@ -22,16 +88,16 @@ ### Patch Changes -- Fix compatibility with Astro v6 and `@astrojs/cloudflare` v13 in development and server-rendered builds by preventing `@twodft/astro-icon/components` from being prebundled before the integration's virtual module is registered. +- Fix compatibility with Astro v6 and `@astrojs/cloudflare` v13 in development and server-rendered builds by preventing `@dallay/astro-icon/components` from being prebundled before the integration's virtual module is registered. ## 1.2.0 -First release as `@twodft/astro-icon`, a maintained fork of [`astro-icon`](https://github.com/natemoo-re/astro-icon). +First release as `@dallay/astro-icon`, a maintained fork of [`astro-icon`](https://github.com/natemoo-re/astro-icon). ### Minor Changes - Upgraded to support **Astro v6.x** and updated all dependencies (TypeScript 6, Vite 7, Node 22+). -- Migrated package namespace from `astro-icon` to `@twodft/astro-icon`. +- Migrated package namespace from `astro-icon` to `@dallay/astro-icon`. ### Patch Changes diff --git a/packages/core/README.md b/packages/core/README.md index 3222a7d6..0c6b4275 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -2,14 +2,23 @@ > **A community-maintained fork of [`astro-icon`](https://github.com/natemoo-re/astro-icon) by [Nate Moore](https://github.com/natemoo-re), updated for Astro v6.x and Cloudflare Workers compatibility.** -[![npm version](https://img.shields.io/npm/v/@twodft/astro-icon?color=blue)](https://www.npmjs.com/package/@twodft/astro-icon) +[![npm version](https://img.shields.io/npm/v/@dallay/astro-icon?color=blue)](https://www.npmjs.com/package/@dallay/astro-icon) +[![npm downloads](https://img.shields.io/npm/dm/@dallay/astro-icon?color=blue)](https://www.npmjs.com/package/@dallay/astro-icon) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE) +[![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-3178c6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/) +[![Astro v6](https://img.shields.io/badge/Astro-v6+-ff4d03?logo=astro)](https://astro.build) +[![Cloudflare Ready](https://img.shields.io/badge/Cloudflare-Ready-orange?logo=cloudflare)](https://workers.cloudflare.com/) +[![GitHub issues](https://img.shields.io/github/issues/dallay/astro-icon)](https://github.com/dallay/astro-icon/issues) +[![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-3178c6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/) +[![Astro v6](https://img.shields.io/badge/Astro-v6+-ff4d03?logo=astro)](https://astro.build) +[![Cloudflare Ready](https://img.shields.io/badge/Cloudflare-Ready-orange?logo=cloudflare)](https://workers.cloudflare.com/) +[![GitHub issues](https://img.shields.io/github/issues/dallay/astro-icon)](https://github.com/dallay/astro-icon/issues) --- ## ⚠️ About This Fork -This package (`@twodft/astro-icon`) is a **ported and extended version** of the original [`astro-icon`](https://github.com/natemoo-re/astro-icon) created by **[Nate Moore (@natemoo-re)](https://github.com/natemoo-re)**. +This package (`@dallay/astro-icon`) is a **ported and extended version** of the original [`astro-icon`](https://github.com/natemoo-re/astro-icon) created by **[Nate Moore (@natemoo-re)](https://github.com/natemoo-re)**. The original `astro-icon` is an excellent integration that has served the Astro community well. This fork exists to address specific compatibility needs that arose with newer versions of Astro and serverless deployment targets: @@ -29,23 +38,55 @@ If the upstream project resumes active development with Astro v6 support, we rec ## Installation -### Using npm +Choose your preferred package manager: + +### npm + +```sh +npm install @dallay/astro-icon +``` + +### pnpm + +```sh +pnpm add @dallay/astro-icon +``` + +### yarn + +```sh +yarn add @dallay/astro-icon +``` + +### bun + +```sh +bun add @dallay/astro-icon +``` + +### pnpm + +```sh +pnpm add @dallay/astro-icon +``` + +### yarn ```sh -npm install @twodft/astro-icon +yarn add @dallay/astro-icon ``` -### Using pnpm +### bun ```sh -pnpm add @twodft/astro-icon +bun add @dallay/astro-icon ``` Then, add the integration to your `astro.config.mjs`: ```js import { defineConfig } from "astro/config"; -import icon from "@twodft/astro-icon"; +import icon from "@dallay/astro-icon"; export default defineConfig({ integrations: [icon()], @@ -66,7 +107,7 @@ By default, Astro Icon supports custom local `svg` icons. They are optimized wit ```astro --- -import { Icon } from '@twodft/astro-icon/components'; +import { Icon } from '@dallay/astro-icon/components'; --- @@ -83,7 +124,7 @@ Astro Icon also supports [Iconify](https://iconify.design) icon sets out-of-the- ```astro --- -import { Icon } from '@twodft/astro-icon/components' +import { Icon } from '@dallay/astro-icon/components' --- @@ -117,7 +158,7 @@ Styling your icons is straightforward. Any styles can be targeted to the `[data- ```astro --- -import { Icon } from '@twodft/astro-icon/components'; +import { Icon } from '@dallay/astro-icon/components'; ---