Repository navigation
Packages: Stop publishing Markdown files other than README.md - #84307
Conversation
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.31 MB
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Navigates the items list via UP/DOWN arrow keys in
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| "./README.md": "./README.md", | ||
| "./CONTRIBUTING.md": "./CONTRIBUTING.md", |
There was a problem hiding this comment.
These exports seem to have been added in #72242, but they don't appear to serve any purpose, and that PR doesn't explain why they were added either.
There was a problem hiding this comment.
I was wrong. These two are used by Storybook, so removing them causes CI to fail. I reverted it in b5d8dcd.
Storybook imports these files via the package exports. Co-Authored-By: Claude <noreply@anthropic.com>
|
What's the common practice for similar files? Is CHANGELOG.md worth including? For example, the most active one is 300KB: packages/components/CHANGELOG.md. P.S. I also remember seeing a request to trim plugins' |
Co-Authored-By: Claude <noreply@anthropic.com>
|
Thanks, @t-hamano! Let's see what others think before merging this. |
manzoorwanijk
left a comment
There was a problem hiding this comment.
Yes, this should reduce the package sizes. Thanks
There was a problem hiding this comment.
The sync README links to ./CODE.md, and the ui README links to ./CONTRIBUTING.md in two places. Can we change those to GitHub URLs so the links still work when these files are excluded from the installed packages?
Co-Authored-By: Claude <noreply@anthropic.com>

What?
Follow-up to #73822
Stops publishing package-root Markdown files other thanREADME.mdandCHANGELOG.mdto npm.Update: Following the discussion, this PR now also stops publishing
CHANGELOG.md. OnlyREADME.mdremains among the package-root Markdown files.Why?
This was already happening before #73822, but I noticed that Markdown files that are probably meaningless in an npm package are being published, for example
AGENTS.md. These files sometimes reference resources outside the package, so there is no need to ship them in a standalone package.Update:
CHANGELOG.mdadds significant size (for example, about 300KB in@wordpress/components), while tools such as Renovate and Dependabot fetch changelogs from the source repository rather than from the published tarball.How?
Limits the published Markdown files toREADME.mdandCHANGELOG.md. npm always includesREADME.md, sofilesnow lists onlyCHANGELOG.mdin place of*.md.Update: Removes
*.mdfromfiles. npm always includesREADME.md, so it is still published.Note that Markdown files under
srcare still published through thesrcentry.As a result, the following Markdown files are removed from the npm packages:
CHANGELOG.mdfrom all affected packages@wordpress/components:AGENTS.md,CLAUDE.md,CONTRIBUTING.md,emotion-to-scss-modules.md@wordpress/style-engine:CONTRIBUTING.md@wordpress/sync:CODE.md@wordpress/theme:AGENTS.md,CLAUDE.md@wordpress/ui:AGENTS.md,CLAUDE.md,CONTRIBUTING.mdTesting Instructions
trunk, the output includesAGENTS.md,CLAUDE.md,CONTRIBUTING.md, andemotion-to-scss-modules.md. On this branch,onlyUpdate: onlyCHANGELOG.mdandREADME.mdare listedREADME.mdis listed.packages/style-engine,packages/sync,packages/theme, andpackages/ui.Use of AI Tools
Claude Code was used to find the affected files, update the
package.jsonfiles, and verify the published file lists withnpm pack --dry-run. I reviewed the changes.🤖 Generated with Claude Code