Repository navigation
fix(release): ship a .distignore so release:zip packs only the plugin - #33
Merged
Merged
Conversation
release:zip never reads .gitignore and its default list leaves out only a few paths, so the zip carried .env.local, .claude/, docs/, src/, graphify-out/ and the lint and test configs. Add the .distignore the docs already recommend, update the docs to say it ships, and gitignore dist/.
aryanjasala
approved these changes
Oct 1, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Ships a
.distignore, sonpm run release:zippacks only what the plugin needs at runtime. Found in a security review.Why
release:zippacks the working tree as it is on disk, never reads.gitignore, and without a.distignoreleaves out only.git/,dist/,tests/,node_modules/,bin/,.github/,*.config.jsandpackage-lock.json. A real run produced 5,551 files (94 MB), including.env.local,.claude/,docs/(withdocs/internal),src/,graphify-out/,scripts/and the lint and test configs. On a server those files sit inside the web-readable plugins directory.Changes
.distignore: the listdocs/local-development.mdalready recommends. It leaves out dotfiles (including.env.localand.wp-env.override.json),bin/,coverage/,docs/,graphify-out/,node_modules/,scripts/,src/,tests/, build and lint configs, the AI and contributor docs,composer.lockand the npm manifests.docs/local-development.md: says the.distignorenow ships, instead of "the skeleton ships none"..gitignore: adds/dist/, whererelease:zipwrites the zip, so a release build cannot be committed by accident.How I verified
Following the documented release steps (
composer install --no-dev --optimize-autoloader,npm run build:prod,npm run release:zip), with a test.env.localpresent:inc/,templates/,languages/,assets/build/, the no-devvendor/,composer.json,README.md,CHANGELOG.mdandLICENSE.md..env*,.claude/,docs/,src/,tests/,graphify-out/, lock files, PHPUnit or PHPCS in the zip.WP_DEBUGon and no PHP errors or warnings.composer install --no-devis still a manual step before zipping, as the docs describe;release:zipwarns when the zip is large because dev packages are present.