-
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
Replace CRLF with LF when generating unminified assets #33509
Replace CRLF with LF when generating unminified assets #33509
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @scinos! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
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.
This tests well! 👍🏻
build (fix/readable-js-assets-webpack-plugin-line-endings)$ find . -name 'index.js' -type f -exec file -- {} +
./edit-post/index.js: UTF-8 Unicode text, with very long lines
./date/index.js: UTF-8 Unicode text, with very long lines
./html-entities/index.js: UTF-8 Unicode text
./is-shallow-equal/index.js: ASCII text
./redux-routine/index.js: ASCII text
./rich-text/index.js: ASCII text
./url/index.js: UTF-8 Unicode text
./data/index.js: UTF-8 Unicode text, with very long lines
./admin-manifest/index.js: ASCII text
./data-controls/index.js: ASCII text
./deprecated/index.js: ASCII text
./reusable-blocks/index.js: ASCII text
./server-side-render/index.js: ASCII text
./escape-html/index.js: ASCII text
./customize-widgets/index.js: UTF-8 Unicode text, with very long lines
./dom-ready/index.js: ASCII text
./viewport/index.js: ASCII text
./block-serialization-default-parser/index.js: ASCII text
./shortcode/index.js: ASCII text
./annotations/index.js: ASCII text, with very long lines
./a11y/index.js: ASCII text
./block-library/index.js: UTF-8 Unicode text, with very long lines
./token-list/index.js: C++ source, UTF-8 Unicode text
./edit-navigation/index.js: UTF-8 Unicode text, with very long lines
./edit-widgets/index.js: UTF-8 Unicode text, with very long lines
./plugins/index.js: ASCII text
./priority-queue/index.js: ASCII text
./compose/index.js: UTF-8 Unicode text, with very long lines
./components/index.js: UTF-8 Unicode text, with very long lines
./hooks/index.js: ASCII text
./editor/index.js: UTF-8 Unicode text, with very long lines
./media-utils/index.js: ASCII text
./format-library/index.js: ASCII text, with very long lines
./keycodes/index.js: UTF-8 Unicode text
./react-i18n/index.js: ASCII text
./nux/index.js: ASCII text
./block-directory/index.js: UTF-8 Unicode text, with very long lines
./element/index.js: UTF-8 Unicode text, with very long lines
./block-editor/index.js: UTF-8 Unicode text, with very long lines
./api-fetch/index.js: ASCII text
./notices/index.js: ASCII text
./core-data/index.js: ASCII text, with very long lines
./primitives/index.js: ASCII text
./edit-site/index.js: UTF-8 Unicode text, with very long lines
./autop/index.js: UTF-8 Unicode text, with very long lines
./blob/index.js: ASCII text
./warning/index.js: ASCII text
./dom/index.js: ASCII text
./widgets/index.js: ASCII text, with very long lines
./blocks/index.js: UTF-8 Unicode text, with very long lines
./block-serialization-spec-parser/index.js: Pascal source, ASCII text
./i18n/index.js: UTF-8 Unicode text
./list-reusable-blocks/index.js: ASCII text
./keyboard-shortcuts/index.js: ASCII text
./wordcount/index.js: ASCII text, with very long lines
Notice there are no mentions of with CRLF, LF line terminators
for any of the unminimize js assets.
Congratulations on your first merged pull request, @scinos! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
Description
Add a feature in
@wordpress/readable-js-assets-webpack-plugin
so it replaces CRLF with LF line endings when generating unminified assets.How has this been tested?
I run
npm run build
before and after this patch, and compared both outputs withdiff -qr build-base/ build-patch/
. Then I verified that the only differences are that CRLF characters are gone.Screenshots
Types of changes
Bug fix
Checklist:
*.native.js
files for terms that need renaming or removal).