-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Plugin: Simplify and improve zip contents #65232
Conversation
143860c
to
ea877be
Compare
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If 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. |
Flaky tests detected in e52b23c. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10809351596
|
e52b23c
to
6ba9c59
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with Playground and everything continues to work.
My thinking exactly 👍 should be addressed at an earlier stage. |
I think the license file is because Terser extracts is as part of the vendors build. Other builds have terser configured not to extract comments: gutenberg/tools/webpack/vendors.js Lines 7 to 10 in a76c475
gutenberg/tools/webpack/shared.js Line 37 in a76c475
I'm not going to dig into that, the license file isn't hurting anything. |
What?
Include all of
/build
directory.I noticed that the
build-plugin-zip
script manually lists nearly all the files in the build directory. Effectively, directories are excluded from thebuild
directory but included for the rest of the plugin.The only difference here is the inclusion of
build/vendors/react-jsx-runtime.min.js.LICENSE.txt
which seems fine (or should be excluded from the build earlier).Exclude directory entries.
Directory structure is still preserved.
As far as I can tell, directories are included in zip files when it's important to preserve their properties (such as permissions). There doesn't seem to be a reason to use special permissions in directories included in the plugin zip, so all of the directory entries can likely be excluded from the zip file.
Use long zip options
This is simply for clarity, rather than
-r
and-D
, use the long form of the options.Changes to zip
You can see in the diff there's a single license text file addition and a number of directory entries are excluded.
The plugin zip file size changes from
11390087
bytes on trunk to11387680
on this branch. The zip file produced on this branch is ~2KB smaller.Diff of zip contents
Noticed while working on #65064.
Testing Instructions
A good way to test is with the playground. It relies on the plugin zip compiled for this PR. Gutenberg should continue to work as expected.