From 141fa7bd3d3061dea89ba176bb4b0e4fc70e4d00 Mon Sep 17 00:00:00 2001 From: Imani Manyara Date: Thu, 5 Nov 2026 00:56:16 -0500 Subject: [PATCH] Re-sync the flags on icon-sets-sync 00579ad so us and um keep their stars The SVG policy now allows , so the star marker and its marker-mid reference survive. Pin the sync to the merge and add a test that fails if us or um lose the marker, the star or the reference. --- .github/workflows/sync-upstream.yml | 4 ++-- CHANGELOG.md | 5 +++++ resources/assets/svg/files/1x1/bo.svg | 4 ++-- resources/assets/svg/files/1x1/je.svg | 4 ++-- resources/assets/svg/files/1x1/um.svg | 5 ++++- resources/assets/svg/files/1x1/us.svg | 5 ++++- resources/assets/svg/files/4x3/bo.svg | 4 ++-- resources/assets/svg/files/4x3/je.svg | 4 ++-- resources/assets/svg/files/4x3/um.svg | 5 ++++- resources/assets/svg/files/4x3/us.svg | 5 ++++- tests/Feature/StarredFlagsTest.php | 30 +++++++++++++++++++++++++++ 11 files changed, 61 insertions(+), 14 deletions(-) create mode 100644 tests/Feature/StarredFlagsTest.php diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml index 094e751..08ce8ea 100644 --- a/.github/workflows/sync-upstream.yml +++ b/.github/workflows/sync-upstream.yml @@ -42,10 +42,10 @@ jobs: permissions: contents: read issues: write - uses: ichava/icon-sets-sync/.github/workflows/sync-pack.yml@06b17d7e08b3ff6505e0224610770adf8689dafe # main 2026-11-04 + uses: ichava/icon-sets-sync/.github/workflows/sync-pack.yml@00579adf8f2b967a465fc804f58f6cd20be15754 # main 2026-11-05 with: pack: ${{ github.event.repository.name }} - toolkit-ref: 06b17d7e08b3ff6505e0224610770adf8689dafe + toolkit-ref: 00579adf8f2b967a465fc804f58f6cd20be15754 refresh-app-client-id: ${{ vars.REFRESH_APP_CLIENT_ID }} force: ${{ inputs.force == true }} secrets: diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a2cef5..3b85be6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,13 @@ All notable changes to `ichava/icon-sets-flag` follow [Keep a Changelog](https:/ - **The pack's kind is pinned against core's resolver.** `tests/Feature/SvgKindTest.php` gains cases for the D6 kind keys core now reads (ichava/core#162): `metadata.data.items` and `metadata.data.kinds.rules`, when present, hold valid kinds and globs and name files that exist; no category or the pack declares a `mixed` kind; and, with a core that has `Support\KindResolver`, a sample of items from every folder resolves `icon` from `package.kind`. `config.json` is unchanged: `package.kind` was already `icon`. `docs/configuration.md` describes the kind keys. +### Fixed + +- **The US and UM flags have their stars again**, in both ratios. Each draws the fifty stars as one `` repeated by `marker-mid`, and the sync's SVG policy stripped ``, so the canton shipped empty: 0 white pixels in the 4x3 US canton, against 11,050 now and upstream. Re-synced from flag-icons 7.6.0 with icon-sets-sync `00579ad` (icon-sets-sync#91). The same run keeps `color="#000"` on the drawn paths of `bo` and `je`, which the policy has allowed behind a value guard since icon-sets-sync#85; nothing else changed. `tests/Feature/StarredFlagsTest.php` fails if `us` or `um` loses the marker, its white star path or the `marker-mid` reference. + ### Changed +- **The upstream sync runs icon-sets-sync `00579ad`** (icon-sets-sync#91), up from `06b17d7`: the SVG policy allows ``, and a colliding emoji slug gets its own name. The `uses:` pin and `toolkit-ref` move together. - **The upstream sync runs icon-sets-sync `06b17d7`** (icon-sets-sync#88), up from `5d70f5d`, which also carries the `split-variants` and `exclude` transforms, the build-per-OS layout and the `licence_sha256` guard. The `uses:` pin and `toolkit-ref` move together; the reusable workflow's inputs did not change between the two commits, so the caller's `with:` block is untouched. - **`sync-upstream.yml` is a caller of icon-sets-sync's reusable `sync-pack.yml`**, pinned to a full commit SHA (icon-sets-sync#79). It builds the toolkit from source at that commit instead of `docker build` from `main`, grants `GITHUB_TOKEN` only `contents: read` and `issues: write` (the `contents`, `pull-requests` and `statuses: write` grants are gone: the Refresh Bot token does the writes), and opens an issue on an upstream licence change. The in-job Pest run and commit status are dropped; the sync pull request now starts the normal CI. `tests/Unit/SyncWorkflowCallerTest.php` pins the pin, the triggers and the permissions, and `symfony/yaml` joins `require-dev` for it. diff --git a/resources/assets/svg/files/1x1/bo.svg b/resources/assets/svg/files/1x1/bo.svg index d3a0f33..f2e48a0 100644 --- a/resources/assets/svg/files/1x1/bo.svg +++ b/resources/assets/svg/files/1x1/bo.svg @@ -330,7 +330,7 @@ - + @@ -351,7 +351,7 @@ - + diff --git a/resources/assets/svg/files/1x1/je.svg b/resources/assets/svg/files/1x1/je.svg index 62def02..942ac2d 100644 --- a/resources/assets/svg/files/1x1/je.svg +++ b/resources/assets/svg/files/1x1/je.svg @@ -1,7 +1,7 @@ - - + + diff --git a/resources/assets/svg/files/1x1/um.svg b/resources/assets/svg/files/1x1/um.svg index 1a18537..bb6b082 100644 --- a/resources/assets/svg/files/1x1/um.svg +++ b/resources/assets/svg/files/1x1/um.svg @@ -2,5 +2,8 @@ - + + + + \ No newline at end of file diff --git a/resources/assets/svg/files/1x1/us.svg b/resources/assets/svg/files/1x1/us.svg index f6c25cf..5db68ac 100644 --- a/resources/assets/svg/files/1x1/us.svg +++ b/resources/assets/svg/files/1x1/us.svg @@ -2,5 +2,8 @@ - + + + + \ No newline at end of file diff --git a/resources/assets/svg/files/4x3/bo.svg b/resources/assets/svg/files/4x3/bo.svg index 6c5bbf6..1a77511 100644 --- a/resources/assets/svg/files/4x3/bo.svg +++ b/resources/assets/svg/files/4x3/bo.svg @@ -331,7 +331,7 @@ - + @@ -352,7 +352,7 @@ - + diff --git a/resources/assets/svg/files/4x3/je.svg b/resources/assets/svg/files/4x3/je.svg index 08fe78e..4a62c72 100644 --- a/resources/assets/svg/files/4x3/je.svg +++ b/resources/assets/svg/files/4x3/je.svg @@ -1,7 +1,7 @@ - - + + diff --git a/resources/assets/svg/files/4x3/um.svg b/resources/assets/svg/files/4x3/um.svg index d4eef75..f161a84 100644 --- a/resources/assets/svg/files/4x3/um.svg +++ b/resources/assets/svg/files/4x3/um.svg @@ -2,5 +2,8 @@ - + + + + \ No newline at end of file diff --git a/resources/assets/svg/files/4x3/us.svg b/resources/assets/svg/files/4x3/us.svg index 0870c38..d63a3a3 100644 --- a/resources/assets/svg/files/4x3/us.svg +++ b/resources/assets/svg/files/4x3/us.svg @@ -2,5 +2,8 @@ - + + + + \ No newline at end of file diff --git a/tests/Feature/StarredFlagsTest.php b/tests/Feature/StarredFlagsTest.php new file mode 100644 index 0000000..c7abf33 --- /dev/null +++ b/tests/Feature/StarredFlagsTest.php @@ -0,0 +1,30 @@ + holding a white + * star path, repeated by marker-mid="url(#us-a)" (or #um-a). The SVG policy + * stripped until ichava/icon-sets-sync#91, so both flags shipped with + * an empty canton: 0 white pixels in it against 11,050 upstream. A sync that + * loses the marker, its star or the reference to it fails here. + */ +it(description: 'keeps the marker that draws the stars', closure: function (string $file, string $id) { + $path = dirname(__DIR__, 2) . '/resources/assets/svg/files/' . $file; + $dom = new DOMDocument; + + expect(is_file($path))->toBeTrue($file) + ->and($dom->load($path))->toBeTrue($file); + + $xpath = new DOMXPath($dom); + $xpath->registerNamespace('s', 'http://www.w3.org/2000/svg'); + + expect($xpath->query("//s:marker[@id='{$id}']")->length)->toBe(1, "{$file}: ") + ->and($xpath->query("//s:marker[@id='{$id}']/s:path[@fill='#fff' and @d!='']")->length)->toBe(1, "{$file}: white star path") + ->and($xpath->query("//s:path[@marker-mid='url(#{$id})']")->length)->toBe(1, "{$file}: marker-mid reference"); +})->with([ + 'us 4x3' => ['4x3/us.svg', 'us-a'], + 'us 1x1' => ['1x1/us.svg', 'us-a'], + 'um 4x3' => ['4x3/um.svg', 'um-a'], + 'um 1x1' => ['1x1/um.svg', 'um-a'], +]);