Skip to content

[N/A] Mark vendored and generated files for diffs - #281

Merged
bd-viget merged 3 commits into
mainfrom
bd/gitattributes-generated
Sep 23, 2026
Merged

bd-viget merged 3 commits into
mainfrom
bd/gitattributes-generated

Conversation

@bd-viget

@bd-viget bd-viget commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This repo had no .gitattributes. ACF Pro is 705 files of third-party code and theme.json is a build artifact, so any diff that touches either one buries the actual change.

  • wp-content/plugins/advanced-custom-fields-pro/** → linguist-vendored=true
  • wp-content/themes/wp-starter/theme.json → linguist-generated=true
  • wp-content/mu-plugins/viget-wp/languages/*.pot → linguist-generated=true

ACF Pro gets vendored rather than generated since we ship it rather than build it. It stays committed so the starter runs with no license key - a project swaps it for the Composer package once it has one.

Same pass is going through the other four repos: PTTS #16, Blocks Toolkit #37, Mega Menu #26, and the docs site.

package-lock.json, composer.lock and *.min.js are already detected as generated by linguist, so they're not listed.

No effect on create-project. linguist-* attributes aren't read by git archive, so the dist zipball is byte-identical.

Rebased onto #262

CHANGELOG.md only exists on #262 - it's not on main or on #266 - so the v1.1.0 entry had nowhere to go from main. Base is now bd/repo-hygiene-and-setup-fixes, retargets to main when #262 merges.

This opens the ## v1.1.0 section with one line. #266 fills in the rest from what merged, and since it goes last it should land on top of this rather than conflict with it.

Also in here

Dropped a stale chunk from the README. It said the four synced skill directories are ignored wholesale, but #245 narrowed those ignores to the fetched skills - the viget-block-generator wrappers are tracked in all four. Collapsing that also removed a duplicated ddev agent-skills-sync block right below it.

Two things I noticed, not fixing here

  1. theme.json is both tracked and in .gitignore (line 244). It's committed, so the ignore does nothing. Might be intentional, might be worth a follow-up.
  2. I left .gitattributes in place for generated projects rather than removing it in create-project like packages.json and CHANGELOG.md. The ACF line stays useful to a project until they swap to Composer. Let me know if you'd rather it got cleaned up with the rest.

Issues

  • N/A

Testing Instructions

  1. git check-attr linguist-vendored linguist-generated -- wp-content/plugins/advanced-custom-fields-pro/acf.php wp-content/themes/wp-starter/theme.json - vendored: true and generated: true.
  2. git archive HEAD | tar -t matches the base branch - nothing about distribution changes.

@bd-viget bd-viget self-assigned this Sep 23, 2026
@bd-viget
bd-viget force-pushed the bd/gitattributes-generated branch from 6c124ee to 413c935 Compare September 23, 2026 14:41
@bd-viget
bd-viget changed the base branch from main to bd/repo-hygiene-and-setup-fixes September 23, 2026 14:41
@bd-viget
bd-viget force-pushed the bd/gitattributes-generated branch from 44a26d1 to bf2e09b Compare September 23, 2026 15:40
@bd-viget
bd-viget added this pull request to stack #283 September 23, 2026 16:01

@nathan-schmidt-viget nathan-schmidt-viget left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Base automatically changed from bd/repo-hygiene-and-setup-fixes to main September 23, 2026 16:40
bd-viget and others added 3 commits September 23, 2026 11:40
The repo had no .gitattributes. ACF Pro is 705 files of third-party code and
theme.json is a build artifact, so both dominate any diff that touches them.

linguist-vendored for ACF Pro, linguist-generated for theme.json and the
viget-wp POT file. Collapses them in pull request diffs and keeps them out of
the repo's language stats.

No effect on create-project: linguist attributes are not read by git archive.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3
#245 narrowed the ignores to the fetched skills, so the four
viget-block-generator wrappers are tracked. The README still said the whole
directories were ignored.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3
@bd-viget
bd-viget force-pushed the bd/gitattributes-generated branch from bf2e09b to 1d43826 Compare September 23, 2026 16:40
@bd-viget
bd-viget merged commit 3dd7d5a into main Sep 23, 2026
2 checks passed
@bd-viget
bd-viget deleted the bd/gitattributes-generated branch September 23, 2026 16:41
bd-viget added a commit that referenced this pull request Sep 23, 2026
packages.json 1.0.24 to 1.1.0, and the 1.1.0 entry.

The entry moved from README.md to CHANGELOG.md, which is where #262 relocated
the history - the README section is now a pointer, so adding to it conflicted.
Folded into the v1.1.0 section #281 opened rather than starting a second one.

Two corrections while moving it: the Blocks Toolkit line says 1.1.9, which is
what the theme lock picks up once that tag lands, and the >=8.2 PHP requirement
declared in #282 is user-facing so it gets a line.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3
bd-viget added a commit that referenced this pull request Sep 23, 2026
packages.json 1.0.24 to 1.1.0, and the 1.1.0 entry.

The entry moved from README.md to CHANGELOG.md, which is where #262 relocated
the history - the README section is now a pointer, so adding to it conflicted.
Folded into the v1.1.0 section #281 opened rather than starting a second one.

Two corrections while moving it: the Blocks Toolkit line says 1.1.9, which is
what the theme lock picks up once that tag lands, and the >=8.2 PHP requirement
declared in #282 is user-facing so it gets a line.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3
bd-viget added a commit that referenced this pull request Sep 23, 2026
* v1.1.0: Version bump and changelog

packages.json 1.0.24 to 1.1.0, and the 1.1.0 entry.

The entry moved from README.md to CHANGELOG.md, which is where #262 relocated
the history - the README section is now a pointer, so adding to it conflicted.
Folded into the v1.1.0 section #281 opened rather than starting a second one.

Two corrections while moving it: the Blocks Toolkit line says 1.1.9, which is
what the theme lock picks up once that tag lands, and the >=8.2 PHP requirement
declared in #282 is user-facing so it gets a line.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3

* Update Viget Blocks Toolkit to 1.1.9

v1.1.9 is tagged and on Packagist, so the theme lock picks it up. Item 2 of the
1.1.0 release checklist.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3

* Add the #262 fixes to the 1.1.0 changelog

#262 closed seven issues and none of them were listed. Adds the create-project
git protection, the Twig/vendor pruning fix, the DDEV escape codes, the skill
path correction, the licensing clarification, sync-version.mjs, and the
changelog move.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3

* Update ACF Pro to 6.8.10

The committed copy was 6.8.2. It is not Composer-managed - the starter ships it
so a fresh create-project runs with no license key - so nothing updates it
automatically and it has to be refreshed by hand at release time.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3

* Note the ACF Pro bump in the 1.1.0 changelog

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3

* Rename the starter in the files create-project was missing

Five files survive into a generated project still referencing wp-starter:

  .gitattributes                    theme.json path
  .github/dependabot.yml            two theme directory paths
  AGENTS.md                         theme paths in example links
  bin/check-event-handlers.php      theme composer.json path
  PostInstallScript.php             the PROJECT_SLUG fallback

Confirmed against the generated project rather than by reading the script - these
are the five that still matched after a real create-project run.

AGENTS.md needed three examples changed first. They used `wp_starter_`, which is
neither a token the script searches for nor what the theme actually uses
(`wpstarter_`), so a blanket replace left them half-rewritten: "e.g. acme-museum
-> wp_starter_". They use a generic example now, so they read correctly with or
without the rename.

Left `<theme-slug>` placeholders alone. The document defines them in a table and
tells the agent to resolve them from the directory, so they stay correct if the
theme is ever renamed again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3

* [N/A] Removed a file that didn't need to be updated.

* Use the real tokens in the AGENTS.md naming examples

The examples were changed to a generic acme-museum, which meant a generated
project read someone else's project name. Back to wp-starter and wpstarter_,
which are both tokens the rename searches for, so the examples come out as the
project's own names.

The blocker before was that the examples used wp_starter_, which is not what the
theme uses (wpstarter_) and not a token the script searches for, so a rename left
them half-rewritten. Using the prefix the theme actually uses fixes that, and the
function-prefix group runs before the slug group so wpstarter_ is consumed first.

Loosened the rule wording in the prefix table row, since the starter's own prefix
drops the dash and the old wording contradicted its own example.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3

* Update the 1.1.0 changelog for the rename fix

Drops PostInstallScript.php, which came back out of the replacement list, and
notes that the AGENTS.md naming examples resolve to the project's own prefix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DR1cWHgptENsJa7GTrmtQ3

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants