diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml index e3b1ff2..2248905 100644 --- a/.github/workflows/sync-upstream.yml +++ b/.github/workflows/sync-upstream.yml @@ -7,7 +7,7 @@ # # A human reviews the PR diff and merges. release-please then opens the # release PR, and its tag starts release.yml, which publishes the GitHub -# release. Nothing is published to Packagist; installs come from the tags. +# release. Packagist reads the tag and lists the new version. # # Required: # GITHUB_TOKEN (automatic) for PR creation. diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a915e8c..466df71 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.1" + ".": "0.1.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d345906..a145f8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to `ichava/icon-sets-flag` follow [Keep a Changelog](https:/ ## [Unreleased] +## [0.1.0] - TBD + +First release of `ichava/icon-sets-flag`. The repository is published as a single commit; the 0.1.x tags cut between 2026-10-23 and 2026-10-26 (v0.1.0 to v0.1.1) are folded into this release, and their notes are kept below under *Archived history*. + ### Added - **The pack declares its SVG kind.** `config.json` sets `package.kind` to `icon`, the kind ichava/core resolves for every category that names none of its own (core reads it from ichava/core#148; an older core ignores the key). `tests/Feature/SvgKindTest.php` fails on a kind core would not recognise, on a category that resolves none, and, against a core that has `IconRegistry::kindFor()`, on any category core resolves differently. `RetiredCopiesTest` also pins a non-empty description for every label core loads. @@ -17,30 +21,39 @@ All notable changes to `ichava/icon-sets-flag` follow [Keep a Changelog](https:/ - **The package author is Simtabi LLC, not a person.** `composer.json` named a personal maintainer and mailbox as author; it now names `Simtabi LLC` with the role address `ichava@simtabi.com` (no personal contact is published, decided 2026-10-28). `NoPersonalContactTest` reads `composer.json`, `README.md`, `LICENSE`, `docs/` and `src/`, fails on a personal name or address, and fails when it reads fewer files than it did when written. - **`sync-upstream.yml`'s header describes what the workflow runs.** It said the image bundles Python and that a release ships to Packagist. The image is icon-sets-sync's Go binary with git, gh and Node, built from the toolkit's `main`, and a release is the GitHub release that release-please and `release.yml` make; nothing is published to Packagist. Comments only: the workflow runs the same steps. - **CI tests against `ichava/core`'s `main`.** Every job that installs dependencies first aliases core's `main` into the 0.1 line (`composer require "ichava/core:dev-main as 0.1.99" --no-update`), prints the commit it resolved, and restores `composer.json` after the install, so the committed constraint is unchanged and the tests read it. Against that core, `SvgKindTest`'s comparison with `IconRegistry::kindFor()` runs instead of skipping. +- **The author address is the community role address `opensource@simtabi.com`.** `composer.json` named `ichava@simtabi.com`. Simtabi LLC stays the only author, and `NoPersonalContactTest` pins the new address. +- **The README follows the documentation standard for 0.1.0.** It shows the Packagist, Tests, Static analysis and MIT badges (the pack is listed on Packagist now), its Install section gives the `repositories` block for the `laranail/*` packages core needs, which are not on Packagist yet, and a new `## Quick start guide and usage` section has the seed step and two usage examples. `docs/installation.md` no longer says nothing in the ecosystem is on Packagist. +- **release-please starts from `v0.1.0`.** `.release-please-manifest.json` and `config.json` `package.version` are `0.1.0`, the version the repository is tagged at when it is published as a single commit, and `bootstrap-sha` is removed from `release-please-config.json`, because it named a commit that publishing removes. After the tag, release-please reads `v0.1.0` as the last release. +- **`composer.json` counts SVGs, not flags.** It said 271 country flag SVGs; the pack ships 542, each of the 271 flags in two ratios. +- **`sync-upstream.yml`'s header no longer says nothing is published to Packagist.** Comment only. ### Removed - **The `commands` and `info` translation groups.** They were written for an update command and an about block this pack does not ship (core's about section reads the registry), and nothing loaded them. `tests/Feature/RetiredCopiesTest.php` keeps them out. - **`set.name` and `set.prefix` from the config file.** Both copied what core already reads from `config.json` through `IconsConstants`, and nothing read them. The file keeps its one real setting, `default_variant`. -## [0.1.1] - 2026-10-26 +## [Archived history] -### Added +> Two archives, newest first. The 0.1.x sections cut between 2026-10-23 and 2026-10-26 were folded into 0.1.0 when the repository was published as a single commit; their tags and GitHub releases were removed. Below them are the sections from before versioning was re-based to 0.1.0 on 2026-10-23, whose tags and releases were removed then. Sections reproduced verbatim, one heading level down. + +### [0.1.1] - 2026-10-26 + +#### Added - **Releases are prepared by release-please.** A *Release Please* workflow reads the Conventional Commit log, keeps one release pull request open that bumps `.release-please-manifest.json`, and tags the release when that pull request merges; the tag starts `release.yml` as before. On 0.x a breaking change bumps the minor and everything else bumps the patch. The minor moves in lockstep with the other coupled ichava packages: a breaking change anywhere in the family reaches every coupled repository as a `Release-As: 0.N.0` footer, so `^0.N` means the same line everywhere. Release notes stay hand-written: release-please is set to `skip-changelog`, and the workflow closes this `[Unreleased]` section under the new version on the release branch, failing if it is empty. It runs on `workflow_dispatch`, a weekly schedule, and the merge of a release pull request, so the only `push` trigger is still the tag. The pull request and the tag are made with a per-run Refresh Bot token, because ones made with `GITHUB_TOKEN` start no workflows. `release.yml` gains a `workflow_dispatch` recovery path for a tag push that started nothing; its first step refuses any ref that is not a `vX.Y.Z` tag. -### Fixed +#### Fixed - **`config.json` no longer says the vendored snapshot is flag-icons v7.5.0.** The assets were refreshed to v7.6.0 on 2026-10-19 (`upstream_version` and `current_version` both say so), but the `update_command` note still named v7.5.0. It now points at `current_version` instead of repeating a version that goes stale on the next bump. - **The package says whose flags these are, and `LICENSE` reads as MIT again.** The SVGs are flag-icons, © 2013 Panayiotis Lipiridis, MIT; the code around them is © Simtabi LLC, MIT. The asset notice was appended to `LICENSE`, which made GitHub's licence detection answer `NOASSERTION` instead of MIT, and it named the upstream licence without carrying its copyright and permission notice, which is the condition MIT sets on redistribution. The notice moves, with its wording kept, to a new root `ATTRIBUTION.md`, which adds the upstream licence verbatim (from `LICENSE` at `v7.6.0`, identical at `v7.5.0`) and says Simtabi LLC claims no authorship of the artwork. `LICENSE` is the plain MIT text for the code. The README's License section and `docs/attribution.md` point at it, since `docs/` is export-ignored and never reaches a consumer. `AttributionTest` fails if `ATTRIBUTION.md` is missing, export-ignored, or loses the upstream notice, if `LICENSE` carries a notice or a second holder, or if the README stops pointing at it. It failed against the old `LICENSE` first. - **`config.json` keeps up with releases.** Release-please now moves `resources/assets/svg/config.json`'s `package.version` with each release (`extra-files`), so the version the icon registry reports stays equal to the released one. Before this it stayed at the value it had when release-please was added. `ReleaseVersionTest` fails if `package.version` differs from `.release-please-manifest.json`, if the `extra-files` entry goes missing, or if the branch alias and the `ichava/core` constraint stop naming the same minor, or drift more than one minor ahead of the released one. - **The release pull request is found in the same run that opens it.** The step that hands the release branch to the changelog close asked `gh pr list --label 'autorelease: pending'`, which goes through GitHub's search index; on the first live run (js-motion#30) the index had not caught up with the pull request opened seconds earlier, so the close was skipped and a second dispatch was needed. It now takes the branch from release-please's own `pr` output, and only when the action reports nothing (the pull request was already current) falls back to the open pull requests, matched by the `release-please--branches--main` prefix rather than the label. -## [0.1.0] - 2026-10-23 +### [0.1.0] - 2026-10-23 Versioning re-based to 0.1.0. This release contains everything previously tagged v0.1.0 through v0.3.4 (2026-08-31 to 2026-09-26) plus the changes below, and requires `ichava/core` `^0.1`, the re-based core. Those tags and their GitHub releases were removed; every commit they pointed at is on `main`, and their sections are kept under *Archived pre-reset history*. -### Changed +#### Changed - **References follow the repository renames.** `ichava/maintainer-toolkit` is now `ichava/icon-sets-sync`, `ichava/motion` is `ichava/js-motion` and `ichava/react-browser` is `ichava/react-icon-browser`. GitHub redirects the old names, but redirects are not permanent. - **The sync workflow's verification step can run the suite.** It called `composer update` on @@ -52,8 +65,6 @@ Versioning re-based to 0.1.0. This release contains everything previously tagged consumer that does not declare it cannot resolve core at all. The entry is harmless until then. Nothing here is on Packagist. -## [Archived pre-reset history] - > Versioning was re-based to 0.1.0 on 2026-10-23. The tags and GitHub releases below were removed; > every commit they pointed at is on `main`. Sections reproduced verbatim, one heading level down. diff --git a/README.md b/README.md index aaeb184..2d63d46 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,64 @@ # ichava/icon-sets-flag +[![Packagist](https://img.shields.io/packagist/v/ichava/icon-sets-flag)](https://packagist.org/packages/ichava/icon-sets-flag) [![Tests](https://github.com/ichava/icon-sets-flag/actions/workflows/tests.yml/badge.svg)](https://github.com/ichava/icon-sets-flag/actions/workflows/tests.yml) -[![Code Quality](https://github.com/ichava/icon-sets-flag/actions/workflows/code-quality.yml/badge.svg)](https://github.com/ichava/icon-sets-flag/actions/workflows/code-quality.yml) -[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) +[![Static analysis](https://github.com/ichava/icon-sets-flag/actions/workflows/code-quality.yml/badge.svg)](https://github.com/ichava/icon-sets-flag/actions/workflows/code-quality.yml) +[![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) -> Country flag icons for the Ichava Laravel icon ecosystem — 542 SVGs in `4x3` and `1x1` ratios, vendored from `lipis/flag-icons`. +> Country flag icons for the Ichava Laravel icon ecosystem: 542 SVGs, 271 flags in `4x3` and `1x1` ratios, vendored from `lipis/flag-icons`. -This package is not published to Packagist, so there is no registry-version badge to show. Requires [`ichava/core`](https://opensource.simtabi.com/documentation/ichava/core/); targets PHP `^8.4.1 || ^8.5` on Laravel `^13`. +Requires [`ichava/core`](https://opensource.simtabi.com/documentation/ichava/core/) `^0.1` on PHP `^8.4.1 || ^8.5` and Laravel `^13`. ## Install +`ichava/core` and this pack come from Packagist. The `laranail/*` packages core depends on are not on Packagist yet, so the **application's** `composer.json` names them: + +```json +{ + "repositories": [ + { "type": "vcs", "url": "https://github.com/laranail/package-tools" }, + { "type": "vcs", "url": "https://github.com/laranail/console" }, + { "type": "vcs", "url": "https://github.com/laranail/enumerator" }, + { "type": "vcs", "url": "https://github.com/laranail/db-tools" } + ] +} +``` + +Then require the pack: + ```bash composer require ichava/icon-sets-flag +``` + +The service provider is discovered automatically. Core's [installation guide](https://opensource.simtabi.com/documentation/ichava/core/installation) covers core's own setup. + +## Quick start guide and usage + +### Getting started + +Seed the pack once after installing it, and again after upgrading it: + +```bash php artisan ichava::ichava-core.database seed --package=ichava/icon-sets-flag ``` -The seed is not optional — until it runs the registry holds no rows for this pack and every lookup returns nothing. See core's [installation guide](https://opensource.simtabi.com/documentation/ichava/core/installation). +The seed is not optional: until it runs the registry holds no rows for this pack and every lookup returns nothing. No configuration is needed; the defaults are merged without publishing anything. + +### Usage + +Icons are addressed as `ichava/icon-sets-flag::/`. In Blade, through core's component: + +```blade + +``` + +Or from PHP, through core's helper: + +```blade +{{ ichava('ichava/icon-sets-flag::1x1/de')->class('w-5 h-5') }} +``` + +See [Getting started](docs/getting-started.md) for the full walkthrough, and the [Documentation](#documentation) index below for everything else. ## Documentation diff --git a/composer.json b/composer.json index 2205ccd..763be28 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "ichava/icon-sets-flag", - "description": "271 country flag SVGs (4x3 + 1x1 aspect ratios) sourced from lipis/flag-icons. Laravel 13+, built on the Ichava ecosystem.", + "description": "542 country flag SVGs (271 flags, each in 4x3 and 1x1) from lipis/flag-icons, for Laravel 13 on the Ichava icon ecosystem.", "type": "library", "keywords": [ "laravel", @@ -15,7 +15,7 @@ "authors": [ { "name": "Simtabi LLC", - "email": "ichava@simtabi.com", + "email": "opensource@simtabi.com", "homepage": "https://simtabi.com", "role": "Developer" } diff --git a/docs/installation.md b/docs/installation.md index 822324e..e2e946a 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -9,7 +9,7 @@ Core is the engine; this pack is only icons and the provider that registers them ## The repositories block -Nothing in this ecosystem is published to Packagist, so Composer has to be told where to look. +The `ichava/*` packages are on Packagist, but the `laranail/*` packages core depends on are not yet, so Composer has to be told where to find them. Composer reads `repositories` only from the root package, which is why the block belongs in the **application's** `composer.json` and has to name the whole transitive closure rather than just this pack. Core's [installation guide](https://opensource.simtabi.com/documentation/ichava/core/installation) gives the full block. diff --git a/release-please-config.json b/release-please-config.json index c02ce2f..19b4694 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,7 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/googleapis/release-please/v17.11.2/schemas/config.json", "release-type": "php", - "bootstrap-sha": "b7ea0e3475237c0d8ec2561d855461174ca439e0", "include-v-in-tag": true, "include-component-in-tag": false, "bump-minor-pre-major": true, diff --git a/resources/assets/svg/config.json b/resources/assets/svg/config.json index 37c26c7..02b2fd5 100644 --- a/resources/assets/svg/config.json +++ b/resources/assets/svg/config.json @@ -11,7 +11,7 @@ "lipis", "iso-3166" ], - "version": "0.1.1", + "version": "0.1.0", "upstream_version": "7.6.0", "type": "single", "kind": "icon", diff --git a/tests/Unit/NoPersonalContactTest.php b/tests/Unit/NoPersonalContactTest.php index 5b14251..7aff908 100644 --- a/tests/Unit/NoPersonalContactTest.php +++ b/tests/Unit/NoPersonalContactTest.php @@ -6,7 +6,7 @@ * Nothing this package ships names a person (decided 2026-10-28, finding W-20). * * The author is Simtabi LLC and the contact is the role address - * ichava@simtabi.com. The guard reads composer.json, README.md, LICENSE and every + * opensource@simtabi.com. The guard reads composer.json, README.md, LICENSE and every * file under docs/, src/, .github/ and .dev/ (the workflows set the sync bot's commit * identity, and .dev/ holds generated tooling output), and fails on a personal name or mailbox. It also * fails when it read fewer files than it did when written, so a path that stops @@ -46,7 +46,7 @@ function personal_contact_files(): array $composer = json_decode((string) file_get_contents(personal_contact_root() . '/composer.json'), true, flags: JSON_THROW_ON_ERROR); expect($composer['authors'])->toHaveCount(1); expect($composer['authors'][0]['name'])->toBe('Simtabi LLC'); - expect($composer['authors'][0]['email'])->toBe('ichava@simtabi.com'); + expect($composer['authors'][0]['email'])->toBe('opensource@simtabi.com'); }); it(description: 'ships no personal name or email address', closure: function () { @@ -54,6 +54,6 @@ function personal_contact_files(): array // 15 files measured 2026-10-30; a walk matching nothing must not pass. expect(count($files))->toBeGreaterThanOrEqual(15); foreach ($files as $file) { - $this->assertDoesNotMatchRegularExpression('/imani@|manyara/i', (string) file_get_contents($file), "{$file} names a person; use Simtabi LLC "); + $this->assertDoesNotMatchRegularExpression('/imani@|manyara/i', (string) file_get_contents($file), "{$file} names a person; use Simtabi LLC "); } });