Skip to content

Commit 6eadaee

Browse files
committed
Run oxfmt
1 parent f51dced commit 6eadaee

File tree

178 files changed

+2336
-2191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+2336
-2191
lines changed

.doctor-rst.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ rules:
22
american_english: ~
33
argument_variable_must_match_type: ~
44
avoid_repetetive_words: ~
5-
# be_kind_to_newcomers: ~
5+
# be_kind_to_newcomers: ~
66
blank_line_after_anchor: ~
7-
# blank_line_after_colon: ~
7+
# blank_line_after_colon: ~
88
blank_line_after_directive: ~
9-
# blank_line_after_filepath_in_code_block: ~
10-
# blank_line_after_filepath_in_php_code_block: ~
11-
# blank_line_after_filepath_in_twig_code_block: ~
12-
# blank_line_after_filepath_in_xml_code_block: ~
13-
# blank_line_after_filepath_in_yaml_code_block: ~
9+
# blank_line_after_filepath_in_code_block: ~
10+
# blank_line_after_filepath_in_php_code_block: ~
11+
# blank_line_after_filepath_in_twig_code_block: ~
12+
# blank_line_after_filepath_in_xml_code_block: ~
13+
# blank_line_after_filepath_in_yaml_code_block: ~
1414
blank_line_before_directive: ~
15-
# composer_dev_option_at_the_end: ~
15+
# composer_dev_option_at_the_end: ~
1616
composer_dev_option_not_at_the_end: ~
1717
correct_code_block_directive_based_on_the_content: ~
1818
deprecated_directive_major_version:
@@ -27,26 +27,26 @@ rules:
2727
ensure_order_of_code_blocks_in_configuration_block: ~
2828
extend_abstract_admin: ~
2929
extend_abstract_controller: ~
30-
# extend_controller: ~
30+
# extend_controller: ~
3131
extension_xlf_instead_of_xliff: ~
32-
# filename_uses_dashes_only: ~
33-
# filename_uses_underscores_only: ~
32+
# filename_uses_dashes_only: ~
33+
# filename_uses_underscores_only: ~
3434
final_admin_classes: ~
3535
final_admin_extension_classes: ~
3636
forbidden_directives:
3737
directives:
3838
- '.. index::'
3939
indention: ~
4040
kernel_instead_of_app_kernel: ~
41-
# line_length: ~
41+
# line_length: ~
4242
lowercase_as_in_use_statements: ~
4343
max_blank_lines:
4444
max: 2
4545
max_colons: ~
4646
no_admin_yaml: ~
4747
no_app_bundle: ~
4848
no_app_console: ~
49-
# no_bash_prompt: ~
49+
# no_bash_prompt: ~
5050
no_blank_line_after_filepath_in_code_block: ~
5151
no_blank_line_after_filepath_in_php_code_block: ~
5252
no_blank_line_after_filepath_in_twig_code_block: ~
@@ -56,25 +56,25 @@ rules:
5656
no_composer_phar: ~
5757
no_composer_req: ~
5858
no_config_yaml: ~
59-
# no_contraction: ~
59+
# no_contraction: ~
6060
no_directive_after_shorthand: ~
6161
no_explicit_use_of_code_block_php: ~
6262
no_inheritdoc_in_code_examples: ~
6363
no_merge_conflict: ~
6464
no_namespace_after_use_statements: ~
6565
no_php_open_tag_in_code_block_php_directive: ~
66-
# no_php_prefix_before_bin_console: ~
67-
# no_php_prefix_before_composer: ~
68-
# no_space_before_self_xml_closing_tag: ~
66+
# no_php_prefix_before_bin_console: ~
67+
# no_php_prefix_before_composer: ~
68+
# no_space_before_self_xml_closing_tag: ~
6969
only_backslashes_in_namespace_in_php_code_block: ~
7070
only_backslashes_in_use_statements_in_php_code_block: ~
7171
ordered_use_statements: ~
72-
# php_open_tag_in_code_block_php_directive: ~
72+
# php_open_tag_in_code_block_php_directive: ~
7373
php_prefix_before_bin_console: ~
7474
replace_code_block_types: ~
7575
replacement: ~
7676
short_array_syntax: ~
77-
# space_before_self_xml_closing_tag: ~
77+
# space_before_self_xml_closing_tag: ~
7878
space_between_label_and_link_in_doc: ~
7979
space_between_label_and_link_in_ref: ~
8080
string_replacement: ~
@@ -83,7 +83,7 @@ rules:
8383
unused_links: ~
8484
use_deprecated_directive_instead_of_versionadded: ~
8585
use_https_xsd_urls: ~
86-
# use_named_constructor_without_new_keyword_rule: ~
86+
# use_named_constructor_without_new_keyword_rule: ~
8787
valid_inline_highlighted_namespaces: ~
8888
valid_use_statements: ~
8989
versionadded_directive_major_version:

.github/ISSUE_TEMPLATE/1-bug_report.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Report a bug in existing features
44
title: ''
55
labels: ['Bug']
66
assignees: ''
7-
87
---
98

109
<!-- ======================== Guidelines ============================
@@ -17,7 +16,7 @@ Describe Your Problem 🎯
1716
- Clearly explain the problem you're facing;
1817
- Describe what you expected to happen versus what actually occurred;
1918
- List the steps to reproduce the bug.
20-
19+
2120
Provide Detailed Information 📋
2221
- Share relevant details: Component version, errors, screenshots;
2322
- If possible, provide a minimal reproducer in a GitHub repository.
@@ -27,6 +26,3 @@ Be Kind and Respectful 🙂
2726
- Remember that this is a volunteer-driven project.
2827
2928
============================= Guidelines ======================== -->
30-
31-
32-

.github/ISSUE_TEMPLATE/2-feature_request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ about: Suggest ideas for new features or enhancements
44
title: ''
55
labels: ['RFC']
66
assignees: ''
7-
87
---

.github/ISSUE_TEMPLATE/3-documentation.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ about: Help us improve the documentation!
44
title: ''
55
labels: 'docs'
66
assignees: ''
7-
87
---
9-

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: true
22
contact_links:
3-
- name: 🛟 Support / help
4-
url: https://ux.symfony.com/support
5-
about: Ask your questions about Symfony UX
3+
- name: 🛟 Support / help
4+
url: https://ux.symfony.com/support
5+
about: Ask your questions about Symfony UX

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
| Q | A
2-
| -------------- | ---
3-
| Bug fix? | yes/no
4-
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
5-
| Deprecations? | yes/no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md -->
6-
| Documentation? | yes/no <!-- required for new features, or documentation updates -->
7-
| Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
8-
| License | MIT
1+
| Q | A |
2+
| -------------- | ------------------------------------------------------------------------------------------------------------------------ |
3+
| Bug fix? | yes/no |
4+
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files --> |
5+
| Deprecations? | yes/no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md --> |
6+
| Documentation? | yes/no <!-- required for new features, or documentation updates --> |
7+
| Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> |
8+
| License | MIT |
99

1010
<!--
1111
Replace this notice by a description of your feature/bugfix.

.github/generate-dist-files-size-diff.mjs

Lines changed: 56 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function computeDiffPercent(from, to) {
5555
return 0;
5656
}
5757

58-
return Math.round((from - to) / from * -100);
58+
return Math.round(((from - to) / from) * -100);
5959
}
6060

6161
/**
@@ -90,56 +90,63 @@ export function main() {
9090
* }>
9191
* }>}
9292
*/
93-
const packagesFiles = [...new Set([...Object.keys(pr), ...Object.keys(base)])]
94-
.sort()
95-
.reduce((acc, file) => {
96-
const beforeSize = base[file]?.size || 0;
97-
const afterSize = pr[file]?.size || 0;
98-
const beforeSizeGz = base[file]?.size_gz || 0;
99-
const afterSizeGz = pr[file]?.size_gz || 0;
100-
101-
if (beforeSize !== afterSize) {
102-
const isBridge = file.includes('src/Bridge'); // we assume that's enough for now
103-
const packageName = file.split('/')[1];
104-
const bridgeName = isBridge ? file.split('/')[4] : '';
105-
const key = isBridge ? `${packageName} (Bridge ${bridgeName})` : packageName;
106-
if (!acc.has(key)) {
107-
acc.set(key, {
108-
meta: {
109-
packageName,
110-
bridgeName,
111-
url: isBridge ? `${repoUrl}/tree/${process.env.HEAD_REF}/src/${packageName}/src/Bridge/${bridgeName}/assets/dist` : `${repoUrl}/tree/${process.env.HEAD_REF}/src/${packageName}/assets/dist`,
112-
}, files: new Set(),
113-
});
114-
}
115-
116-
const added = !base[file] && pr[file];
117-
const removed = base[file] && !pr[file];
118-
119-
acc.get(key).files.add({
120-
state: added ? 'added' : (removed ? 'removed' : 'changed'),
121-
before: { size: beforeSize, sizeGz: beforeSizeGz },
122-
after: { size: afterSize, sizeGz: afterSizeGz },
123-
diffPercent: {
124-
size: removed ? -100 : (added ? 100 : computeDiffPercent(beforeSize, afterSize)),
125-
sizeGz: removed ? -100 : (added ? 100 : computeDiffPercent(beforeSizeGz, afterSizeGz)),
126-
},
93+
const packagesFiles = [...new Set([...Object.keys(pr), ...Object.keys(base)])].sort().reduce((acc, file) => {
94+
const beforeSize = base[file]?.size || 0;
95+
const afterSize = pr[file]?.size || 0;
96+
const beforeSizeGz = base[file]?.size_gz || 0;
97+
const afterSizeGz = pr[file]?.size_gz || 0;
98+
99+
if (beforeSize !== afterSize) {
100+
const isBridge = file.includes('src/Bridge'); // we assume that's enough for now
101+
const packageName = file.split('/')[1];
102+
const bridgeName = isBridge ? file.split('/')[4] : '';
103+
const key = isBridge ? `${packageName} (Bridge ${bridgeName})` : packageName;
104+
if (!acc.has(key)) {
105+
acc.set(key, {
127106
meta: {
128-
fileNameShort: file.replace(isBridge ? `src/${file.split('/')[1]}/src/Bridge/${file.split('/')[4]}/assets/dist/` : `src/${file.split('/')[1]}/assets/dist/`, ''),
129-
fileNameUrl: `${repoUrl}/blob/${process.env.HEAD_REF}/${file}`,
107+
packageName,
108+
bridgeName,
109+
url: isBridge
110+
? `${repoUrl}/tree/${process.env.HEAD_REF}/src/${packageName}/src/Bridge/${bridgeName}/assets/dist`
111+
: `${repoUrl}/tree/${process.env.HEAD_REF}/src/${packageName}/assets/dist`,
130112
},
113+
files: new Set(),
131114
});
132115
}
133116

134-
return acc;
135-
}, new Map);
117+
const added = !base[file] && pr[file];
118+
const removed = base[file] && !pr[file];
119+
120+
acc.get(key).files.add({
121+
state: added ? 'added' : removed ? 'removed' : 'changed',
122+
before: { size: beforeSize, sizeGz: beforeSizeGz },
123+
after: { size: afterSize, sizeGz: afterSizeGz },
124+
diffPercent: {
125+
size: removed ? -100 : added ? 100 : computeDiffPercent(beforeSize, afterSize),
126+
sizeGz: removed ? -100 : added ? 100 : computeDiffPercent(beforeSizeGz, afterSizeGz),
127+
},
128+
meta: {
129+
fileNameShort: file.replace(
130+
isBridge
131+
? `src/${file.split('/')[1]}/src/Bridge/${file.split('/')[4]}/assets/dist/`
132+
: `src/${file.split('/')[1]}/assets/dist/`,
133+
''
134+
),
135+
fileNameUrl: `${repoUrl}/blob/${process.env.HEAD_REF}/${file}`,
136+
},
137+
});
138+
}
139+
140+
return acc;
141+
}, new Map());
136142

137143
if (packagesFiles.size === 0) {
138144
output += 'ℹ️ No difference in dist packagesFiles.\n';
139145
return output;
140146
}
141147

142-
output += 'Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.\n';
148+
output +=
149+
'Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.\n';
143150
output += 'Please review the changes and make sure they are expected.\n\n';
144151
output += `<table>
145152
<thead><tr><th>File</th><th>Before (Size / Gzip)</th><th>After (Size / Gzip)</th></tr></thead>
@@ -150,15 +157,17 @@ export function main() {
150157
output += `<tr>
151158
<td><a href="${file.meta.fileNameUrl}"><code>${file.meta.fileNameShort}</code></a></td>
152159
`;
153-
output += file.state === 'added'
154-
? `<td><em>Added</em></td>`
155-
: `<td>
160+
output +=
161+
file.state === 'added'
162+
? `<td><em>Added</em></td>`
163+
: `<td>
156164
<code>${formatBytes(file.before.size)}</code>
157165
/ <code>${formatBytes(file.before.sizeGz)}</code>
158-
</td>`;
159-
output += file.state === 'removed'
160-
? `<td><em>Removed</em></td>`
161-
: `<td>
166+
</td>`;
167+
output +=
168+
file.state === 'removed'
169+
? `<td><em>Removed</em></td>`
170+
: `<td>
162171
<code>${formatBytes(file.after.size)}</code>${file.state === 'changed' ? `<sup>${formatDiffPercent(file.diffPercent.size)}</sup>` : ''}
163172
/ <code>${formatBytes(file.after.sizeGz)}</code>${file.state === 'changed' ? `<sup>${formatDiffPercent(file.diffPercent.sizeGz)}</sup>` : ''}
164173
</td>`;

0 commit comments

Comments
 (0)