-
Notifications
You must be signed in to change notification settings - Fork 380
Migrate to Shakapacker 9.0.0-beta.7 with Babel transpiler #662
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
67d625b
Migrate to Shakapacker 9.0.0-beta.4 with Babel transpiler
justin808 ce2ad19
Fix SSR by adding react-intl safeguards
justin808 a863bb9
Update to Shakapacker 9.0.0.beta.7 with CSS modules fix
justin808 3f9f720
Remove unnecessary react-intl SSR safeguards and fix Turbo test
justin808 5905fa9
Remove unnecessary test change
justin808 a4f7dc5
Fix Chrome headless test configuration
justin808 57bb979
Centralize Chrome headless driver configuration
justin808 c3ed3ac
Improve test driver registration and sass configuration
justin808 d6fa4d4
Revert unnecessary react-intl pattern changes in CommentForm
justin808 da0c7f5
Simplify CSS loader configuration using optional chaining
justin808 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,41 +2,48 @@ | |
|
|
||
| module DriverRegistration | ||
| def self.register_selenium_chrome | ||
| return if @selenium_chrome_registered | ||
| # Force re-register to ensure our configuration is used | ||
| Capybara.drivers.delete(:selenium_chrome) | ||
|
Comment on lines
+5
to
+6
|
||
|
|
||
| Capybara.register_driver :selenium_chrome do |app| | ||
| Capybara::Selenium::Driver.new(app, browser: :chrome) | ||
| end | ||
|
|
||
| Capybara::Screenshot.register_driver(:selenium_chrome) do |js_driver, path| | ||
| js_driver.browser.save_screenshot(path) | ||
| end | ||
| @selenium_chrome_registered = true | ||
| end | ||
|
|
||
| def self.register_selenium_firefox | ||
| return if @selenium_firefox_registered | ||
| # Force re-register to ensure our configuration is used | ||
| Capybara.drivers.delete(:selenium_firefox) | ||
|
|
||
| Capybara.register_driver :selenium_firefox do |app| | ||
| Capybara::Selenium::Driver.new(app, browser: :firefox) | ||
| end | ||
|
|
||
| Capybara::Screenshot.register_driver(:selenium_firefox) do |js_driver, path| | ||
| js_driver.browser.save_screenshot(path) | ||
| end | ||
| @selenium_firefox_registered = true | ||
| end | ||
|
|
||
| def self.register_selenium_chrome_headless | ||
| return if @selenium_headless_registered | ||
| # Force re-register to ensure our configuration is used | ||
| Capybara.drivers.delete(:selenium_chrome_headless) | ||
|
|
||
| Capybara.register_driver :selenium_chrome_headless do |app| | ||
| capabilities = Selenium::WebDriver::Chrome::Options.new( | ||
| "goog:chromeOptions" => { args: %w[headless disable-gpu no-sandbox disable-dev-shm-usage] } | ||
| ) | ||
| Capybara::Selenium::Driver.new app, browser: :chrome, options: capabilities | ||
| browser_options = ::Selenium::WebDriver::Chrome::Options.new | ||
| browser_options.args << "--headless" | ||
| browser_options.args << "--disable-gpu" | ||
| browser_options.args << "--no-sandbox" | ||
| browser_options.args << "--disable-dev-shm-usage" | ||
| browser_options.args << "--window-size=1920,1080" | ||
|
|
||
| Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options) | ||
| end | ||
| Capybara::Screenshot.register_driver(:selenium_chrome_headless) do |js_driver, path| | ||
| js_driver.browser.save_screenshot(path) | ||
|
|
||
| Capybara::Screenshot.register_driver(:selenium_chrome_headless) do |driver, path| | ||
| driver.browser.save_screenshot(path) | ||
| end | ||
| @selenium_headless_registered = true | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8263,13 +8263,14 @@ [email protected]: | |
| resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" | ||
| integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== | ||
|
|
||
| shakapacker@8.2.0: | ||
| version "8.2.0" | ||
| resolved "https://registry.npmjs.org/shakapacker/-/shakapacker-8.2.0.tgz#c7bed87b8be2ae565cfe616f68552be545c77e14" | ||
| integrity sha512-Ct7BFqJVnKbxdqCzG+ja7Q6LPt/PlB7sSVBfG5jsAvmVCADM05cuoNwEgYNjFGKbDzHAxUqy5XgoI9Y030+JKQ== | ||
| shakapacker@9.0.0-beta.7: | ||
| version "9.0.0-beta.7" | ||
| resolved "https://registry.npmjs.org/shakapacker/-/shakapacker-9.0.0-beta.7.tgz#c00b9590b84f365bf0fd4e7b7efdd59104901a00" | ||
| integrity sha512-m4xGyTg9yy4ys+wz44jBdygsxwKDbARBlgYqsyirwowQKWZHqnyb+ucS9yz5cKQHUtHeDlJOhPHKhRsCwhJcDQ== | ||
| dependencies: | ||
| js-yaml "^4.1.0" | ||
| path-complete-extname "^1.0.0" | ||
| webpack-merge "^5.8.0" | ||
|
|
||
| shallow-clone@^3.0.0: | ||
| version "3.0.1" | ||
|
|
@@ -9204,7 +9205,7 @@ webpack-dev-server@^4.11.1: | |
| webpack-dev-middleware "^5.3.4" | ||
| ws "^8.13.0" | ||
|
|
||
| webpack-merge@5, webpack-merge@^5.7.3: | ||
| webpack-merge@5, webpack-merge@^5.7.3, webpack-merge@^5.8.0: | ||
| version "5.10.0" | ||
| resolved "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" | ||
| integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The removal of
sassOptions: { includePaths: [] }may break Sass imports that rely on custom include paths. Consider verifying that all existing Sass imports continue to work without this configuration.Copilot uses AI. Check for mistakes.