-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Fix assets clean lookups #474
Conversation
WalkthroughThe recent updates in the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Out of diff range and nitpick comments (2)
lib/shakapacker/commands.rb (1)
64-64
: Refine the regex to handle complex file extensions more accurately.Consider adding a comment explaining the regex for future maintainability.
spec/shakapacker/command_spec.rb (1)
Line range hint
49-76
: Enhance the test setup for handling compressed and map files.Consider adding more explicit assertions to verify the correct handling of compressed and map files.
Co-authored-by: Gareth Jones <[email protected]>
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.
Actionable comments posted: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- CHANGELOG.md (1 hunks)
- lib/shakapacker/commands.rb (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- lib/shakapacker/commands.rb
Additional Context Used
LanguageTool (51)
CHANGELOG.md (51)
Near line 1: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: * For the changelog of versions prior to v6, see the [5.x stable branch of rails...
Near line 4: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...grading to new spelling in version 7. * Please see the [v6 Upgrade Guide](./docs/v6_up...
Near line 4: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...docs/v6_upgrade.md) to go from versions prior to v6. * [ShakaCode](https://www.shakacode...
Near line 45: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...G-Rath. - Removehttps
option forwebpack-dev-server
...
Near line 47: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...G-Rath. - Removeverify_file_existance
method [PR 446]...
Near line 64: Use a comma before ‘but’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...ad of errors when compilation is success but stderr is not empty. [PR 416](https://g...
Near line 67: You’ve repeated a verb. Did you mean to only write one of them?
Context: ...G-Rath](https://github.com/g-rath) ### Removed - Removes dependency onglob
library. [PR 435](...
Near line 73: Possible missing article found.
Context: ...viously this could have been ignored in few code branches, especially when checking...
Near line 110: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...acker/pull/363). ## [v7.0.3] - July 7, 2023 ### Fixed - Fixed commands execution fo...
Near line 111: Possible typo: you repeated a word
Context: ...l/363). ## [v7.0.3] - July 7, 2023 ### Fixed - Fixed commands execution for projects with sp...
Near line 114: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...b.com/kukicola). ## [v7.0.2] - July 3, 2023 ### Fixed - Fixed creation of assets:pr...
Near line 115: Possible typo: you repeated a word
Context: ...icola). ## [v7.0.2] - July 3, 2023 ### Fixed - Fixed creation of assets:precompile if it is ...
Near line 118: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...com/ahangarha). ## [v7.0.1] - June 27, 2023 ### Fixed - Fixed the condition for sho...
Near line 119: Possible typo: you repeated a word
Context: ...arha). ## [v7.0.1] - June 27, 2023 ### Fixed - Fixed the condition for showing warning for s...
Near line 122: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...com/ahangarha). ## [v7.0.0] - June 23, 2023 ### Breaking changes - Removes defaults...
Near line 126: Possible missing comma found.
Context: ...ery file in the codebase was treated as TSX leading to potential issues. This has b...
Near line 126: Possible missing article found.
Context: ...s. This has been removed and returns to sensible default of the preset which is to figur...
Near line 126: Possible missing comma found.
Context: ... and returns to sensible default of the preset which is to figure out the file type fr...
Near line 126: Possible missing comma found.
Context: ...is change might affect generated output however so it is marked as breaking. - Export ...
Near line 150: ‘Prior to’ might be wordy. Consider a shorter alternative.
Context: ...dracz](https://github.com/tomdracz). Prior to this change, top level directory of sta...
Near line 150: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...com/tomdracz). Prior to this change, top level directory of static assets like images ...
Near line 150: Possible missing article found.
Context: ...and fonts was stripped. This meant that file inapp/javascript/images/image.png
wo...
Near line 152: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...tic/image.jpg")`. Going forward, the top level directory of static files will be retai...
Near line 152: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...rectory of static files will be retained so this will necessitate the update of fil...
Near line 159: Possible missing comma found.
Context: ...ery file in the codebase was treated as TSX leading to potential issues. This has b...
Near line 159: Possible missing article found.
Context: ...s. This has been removed and returns to sensible default of the preset which is to figur...
Near line 159: Possible missing comma found.
Context: ... and returns to sensible default of the preset which is to figure out the file type fr...
Near line 159: Possible missing comma found.
Context: ...is change might affect generated output however so it is marked as breaking. - Fixed R...
Near line 163: You’ve repeated a verb. Did you mean to only write one of them?
Context: ...arha](https://github.com/ahangarha) ### Removed - Remove redundant enhancement for precompile ta...
Near line 167: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...com/ahangarha). ## [v6.6.0] - March 7, 2023 ### Improved - Allow configuration of w...
Near line 171: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...alecslupu). ## [v6.5.6] - February 11, 2023 ### Fixed - Fixed failing to update `bi...
Near line 172: Possible typo: you repeated a word
Context: ...). ## [v6.5.6] - February 11, 2023 ### Fixed - Fixed failing to updatebin/setup
file due ...
Near line 190: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...m/tagliala). ## [v6.5.4] - November 4, 2022 ### Fixed - Fixed regression caused by ...
Near line 191: Possible typo: you repeated a word
Context: ...a). ## [v6.5.4] - November 4, 2022 ### Fixed - Fixed regression caused by 6.5.3. PR #192 int...
Near line 224: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ....com/pulkitkkr). ## [v6.5.0] - July 4, 2022 ### Added - `append_stylesheet_pack_tag...
Near line 231: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...ub.com/artemave) ## [v6.4.1] - June 5, 2022 ### Fixed - Restores automatic installa...
Near line 239: Unpaired symbol: ‘[’ seems to be missing
Context: ...ttps://github.com/tomdracz). ## [v6.4.0] - June 2, 2022 ### Fixed - Fixed [Issue...
Near line 239: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...b.com/tomdracz). ## [v6.4.0] - June 2, 2022 ### Fixed - Fixed [Issue 123: Rails 7.0...
Near line 240: Possible typo: you repeated a word
Context: ...dracz). ## [v6.4.0] - June 2, 2022 ### Fixed - Fixed [Issue 123: Rails 7.0.3 - Webpacker con...
Near line 244: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...se nested entries. This was the default prior to v6.0. Because entries maybe generated, ...
Near line 249: If this is a question, use a question mark.
Context: ...tasks/yarn.rake) in your own application. ## [v6.3.0] - May 19, 2022 ### Improv...
Near line 266: The phrase “a variety of” may be wordy. To make your writing clearer, consider replacing it.
Context: ...e mode can affect how your code runs in a variety of ways, but in newer versions of Babel it...
Near line 270: You’ve repeated a verb. Did you mean to only write one of them?
Context: ... change probably won't affect you. ### Added - Addswebpacker_precompile
setting to `webp...
Near line 277: The modal verb ‘will’ requires the verb’s base form.
Context: ...timestamp will be checked together will timestamps of all files and directories inside of ...
Near line 279: Possible missing comma found.
Context: ... in improved compiler checks performance but might be breaking for certain setups an...
Near line 284: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...com/tomdracz). ## [v6.2.1] - April 15, 2022 ### Fixed - Put back config.public_mani...
Near line 298: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...ple invocations of stylesheet_pack_tag (eg for a regular stylesheet & a print styl...
Near line 306: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...m/tomdracz). ## [v6.1.0] - February 4, 2022 ### Added - Support for SWC loader. [PR...
Near line 313: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: .../pull/2802). ## [v6.0.2] - January 25, 2022 ### Improved - Fix incorrect command na...
Near line 317: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...tricknotes). ## [v6.0.1] - January 24, 2022 ### Improved - PR #21 removed pnp-webpa...
Near line 350: Use a comma before ‘or’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...renvironment.js
, this must be removed or you will receive an error (`Item nodeMo...
@@ -10,6 +10,10 @@ _next_ branch is for v8 changes | |||
## [Unreleased] | |||
Changes since the last non-beta release. | |||
|
|||
### Fixed | |||
|
|||
- Fixes incorrect removal of files in the assets:clean task [PR 474](https://github.com/shakacode/shakapacker/pull/474) by [tomdracz](https://github.com/tomdracz). |
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.
Ensure consistency in list item markers.
- - Fixes incorrect removal of files in the assets:clean task [PR 474](https://github.com/shakacode/shakapacker/pull/474) by [tomdracz](https://github.com/tomdracz).
+ * Fixes incorrect removal of files in the assets:clean task [PR 474](https://github.com/shakacode/shakapacker/pull/474) by [tomdracz](https://github.com/tomdracz).
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
- Fixes incorrect removal of files in the assets:clean task [PR 474](https://github.com/shakacode/shakapacker/pull/474) by [tomdracz](https://github.com/tomdracz). | |
* Fixes incorrect removal of files in the assets:clean task [PR 474](https://github.com/shakacode/shakapacker/pull/474) by [tomdracz](https://github.com/tomdracz). |
Summary
Fixes lookup for assets:clean tasks
The task was trying to group files but ended up lumping map and compressed files together that ended up with incorrect deletion.
Changes the regex grouping to group file by full
.js.map.br
for example rather than just.js
to prevent incorrect deletion.Think this will also address rails/webpacker#2913 issues like reported here
Pull Request checklist
Update documentationSummary by CodeRabbit
assets:clean
task.