Skip to content

WIP of converting examples to Webpack v2#742

Merged
justin808 merged 10 commits intomasterfrom
update-to-webpack-v2
Mar 6, 2017
Merged

WIP of converting examples to Webpack v2#742
justin808 merged 10 commits intomasterfrom
update-to-webpack-v2

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Mar 1, 2017

This change is Reviewable

@justin808 justin808 requested a review from alex35mil March 1, 2017 09:45
@justin808
Copy link
Copy Markdown
Member Author

@alexfedoseev Can you take a look at my conversions of the webpack configs in /spec/dummy/client.

Copy link
Copy Markdown
Member

@alex35mil alex35mil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments.

Comment thread spec/dummy/client/.babelrc Outdated
{
"presets": ["es2015", "stage-0", "react"],
"presets": ["es2015", "stage-2", "react"],
"plugins": ["syntax-decorators"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it should be here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean syntax-decorators?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, AFAIR we don't use them anywhere.

),
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
loader: [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use:

loader: [
{
loader: 'css-loader',
query: {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options:

),
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
loader: [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use:

loader: [
{
loader: 'css-loader',
query: {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options:

@justin808
Copy link
Copy Markdown
Member Author

justin808 commented Mar 2, 2017

Still some issues:

  1. Tests fail with no JS being run due to a syntax error. See below. cd spec/dummy && rspec.
  2. Hot reloading is broken with this error below. foreman start -f Procfile.hot

Phantomjs issue

Details
➜  ~/shakacode/react-on-rails/react_on_rails/spec/dummy (update-to-webpack-v2 u=) ✗ rspec './spec/features/integration_spec.rb[1:1:1:1]'                                                                                       ✹ [21:00:16]
Capybara using driver: poltergeist
Run options: include {:ids=>{"./spec/features/integration_spec.rb"=>["1:1:1:1"]}}

Pages/Index
All in one page
Server Rendered/Cached React/Redux Component

====> React On Rails: Checking app/assets/webpack for outdated/missing bundles

[SERVER] RENDERED RenderedHtml to dom node with id: HelloWorld-react-component-4 with railsContext: {"inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","href":"http://127.0.0.1:59126/","location":"/","scheme":"http","host":"127.0.0.1","port":59126,"pathname":"/","search":null,"httpAcceptLanguage":"en-US,*","somethingUseful":"REALLY USEFUL","serverSide":true}
TURBO: USING TURBOLINKS 2: document added event listeners page:before-unload and page:change.
TURBO: reactOnRailsPageLoaded
RENDERED ReduxApp to dom node with id: ReduxApp-react-component-0 with props, railsContext: [object Object] [object Object]
example at ./spec/features/integration_spec.rb:15 (FAILED - 1)
HTML screenshot: file:///Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/tmp/capybara/screenshot_2017-03-01-21-00-44.888.html
Image screenshot: file:///Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/tmp/capybara/screenshot_2017-03-01-21-00-44.888.png

Failures:

  1. Pages/Index All in one page Server Rendered/Cached React/Redux Component
    Failure/Error: visit root_path

    Capybara::Poltergeist::JavascriptError:
    One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details).

    TypeError: ReactOnRails encountered an error while rendering component: ReduxApp.
    Original message: undefined is not a constructor (evaluating 'Object.assign({}, props, { railsContext: railsContext })')
    TypeError: ReactOnRails encountered an error while rendering component: ReduxApp.
    Original message: undefined is not a constructor (evaluating 'Object.assign({}, props, { railsContext: railsContext })')
    at undefined:10 in default
    at :41 in default
    at :45 in createReactElement
    at :133 in render
    at :66 in forEach
    at :71 in forEachComponent
    at :167 in reactOnRailsPageLoaded
    at :0 in dispatchEvent
    at http://127.0.0.1:59126/assets/application_static-b5e9b7937a49f12d63506a83dcc03e6b8a0f635b24e2cc91ed1234c6688e6fb7.js:4572 in triggerEvent
    at http://127.0.0.1:59126/assets/application_static-b5e9b7937a49f12d63506a83dcc03e6b8a0f635b24e2cc91ed1234c6688e6fb7.js:4941
    Shared Example Group: "React Component" called from ./spec/features/integration_spec.rb:31

    /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:376:in `command'

    /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:35:in `visit'

    /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/driver.rb:97:in `visit'

    /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/session.rb:233:in `visit'

    /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/dsl.rb:52:in `block (2 levels) in module:DSL'

    ./spec/features/integration_spec.rb:27:in `block (3 levels) in <top (required)>'

    /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:112:in `block in run'

    /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `loop'

    /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `run'

    /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'

    /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:30:in `block (2 levels) in setup'

Finished in 8.31 seconds (files took 10.52 seconds to load)
1 example, 1 failure

Failed examples:

rspec './spec/features/integration_spec.rb[1:1:1:1]' # Pages/Index All in one page Server Rendered/Cached React/Redux Component

Hot Reload Issue

Details
➜  ~/shakacode/react-on-rails/react_on_rails/spec/dummy (update-to-webpack-v2 u=) foreman start -f Procfile.hot                                                                                                                  [21:06:20]
21:06:30 rails.1               | started with pid 7264
21:06:30 hot-assets.1          | started with pid 7265
21:06:30 rails-server-assets.1 | started with pid 7266
21:06:30 hot-assets.1          | yarn run v0.20.3
21:06:30 rails-server-assets.1 | yarn run v0.20.3
21:06:31 rails-server-assets.1 | $ (cd client && yarn run build:dev:server --silent)
21:06:31 hot-assets.1          | $ (cd client && yarn run hot-assets)
21:06:32 hot-assets.1          | yarn run v0.20.3
21:06:32 rails-server-assets.1 | yarn run v0.20.3
21:06:32 hot-assets.1          | $ babel-node server-rails-hot.js
21:06:32 rails-server-assets.1 | $ webpack -w --config webpack.server.rails.build.config.js
21:06:33 rails-server-assets.1 |
21:06:33 rails-server-assets.1 | Webpack is watching the files…
21:06:33 rails-server-assets.1 |
21:06:35 rails.1               | => Booting Puma
21:06:35 rails.1               | => Rails 4.2.8 application starting in development on http://0.0.0.0:3000
21:06:35 rails.1               | => Run `rails server -h` for more startup options
21:06:35 rails.1               | => Ctrl-C to shutdown server
21:06:35 rails.1               | ================================================================================
21:06:35 rails.1               | Using caching = false
21:06:35 rails.1               | ================================================================================
21:06:36 hot-assets.1          | /Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/client/webpack.client.rails.hot.config.js:24
21:06:36 hot-assets.1          | config.module.loaders.push({
21:06:36 hot-assets.1          |                      ^
21:06:36 hot-assets.1          |
21:06:36 hot-assets.1          | TypeError: Cannot read property 'push' of undefined
21:06:36 hot-assets.1          |     at Object. (/Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/client/webpack.client.rails.hot.config.js:25:1)
21:06:36 hot-assets.1          |     at Module._compile (module.js:571:32)
21:06:36 hot-assets.1          |     at loader (/Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/client/node_modules/babel-register/lib/node.js:144:5)
21:06:36 hot-assets.1          |     at Object.require.extensions.(anonymous function) [as .js] (/Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/client/node_modules/babel-register/lib/node.js:154:7)
21:06:36 hot-assets.1          |     at Module.load (module.js:488:32)
21:06:36 hot-assets.1          |     at tryModuleLoad (module.js:447:12)
21:06:36 hot-assets.1          |     at Function.Module._load (module.js:439:3)
21:06:36 hot-assets.1          |     at Module.require (module.js:498:17)
21:06:36 hot-assets.1          |     at require (internal/module.js:20:19)
21:06:36 hot-assets.1          |     at Object. (/Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy/client/server-rails-hot.js:20:1)
21:06:36 hot-assets.1          | error Command failed with exit code 1.
21:06:36 hot-assets.1          | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:06:37 hot-assets.1          | error Command failed with exit code 1.
21:06:37 hot-assets.1          | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:06:37 hot-assets.1          | exited with code 1
21:06:37 system                | sending SIGTERM to all processes
21:06:37 rails.1               | Exiting
21:06:37 rails-server-assets.1 | terminated by SIGTERM
21:06:37 rails.1               | terminated by SIGTERM

@justin808
Copy link
Copy Markdown
Member Author

Might be related: shakacode/react-webpack-rails-tutorial#361

@alex35mil
Copy link
Copy Markdown
Member

screen shot 2017-03-02 at 18 49 47

config.module.rules.push

@justin808
Copy link
Copy Markdown
Member Author

justin808 commented Mar 4, 2017

Took out lots of errors!

Still got 6 left.

Please help!

Failures:

  1) Pages/Index All in one page Server Rendered/Cached React Component Without Redux changes name in message according to input
     Failure/Error: visit root_path

     Capybara::Poltergeist::DeadClient:
       PhantomJS client died while processing {"id":"a32319b9-08a8-46b9-8132-88848047fb57","name":"visit","args":["http://127.0.0.1:61221/",30]}
     Shared Example Group: "React Component" called from ./spec/features/integration_spec.rb:35
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/server.rb:38:in `send'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:369:in `command'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:35:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/driver.rb:97:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/session.rb:233:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/dsl.rb:52:in `block (2 levels) in <module:DSL>'
     # ./spec/features/integration_spec.rb:27:in `block (3 levels) in <top (required)>'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:112:in `block in run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `loop'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:30:in `block (2 levels) in setup'

  2) Pages/Index All in one page Simple Client Rendered Component same component with different props changes name in message according to input
     Failure/Error: visit root_path

     Capybara::Poltergeist::DeadClient:
       PhantomJS client died while processing {"id":"3e03875f-515c-449e-a617-0ba5090b2da5","name":"visit","args":["http://127.0.0.1:61221/",30]}
     Shared Example Group: "React Component" called from ./spec/features/integration_spec.rb:42
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/server.rb:38:in `send'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:369:in `command'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:35:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/driver.rb:97:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/session.rb:233:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/dsl.rb:52:in `block (2 levels) in <module:DSL>'
     # ./spec/features/integration_spec.rb:27:in `block (3 levels) in <top (required)>'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:112:in `block in run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `loop'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:30:in `block (2 levels) in setup'

  3) Pages/Index All in one page Simple Component Without Redux changes name in message according to input
     Failure/Error: visit root_path

     Capybara::Poltergeist::DeadClient:
       PhantomJS client died while processing {"id":"4651210f-e394-4916-b262-a044b8c436d1","name":"visit","args":["http://127.0.0.1:61221/",30]}
     Shared Example Group: "React Component" called from ./spec/features/integration_spec.rb:48
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/server.rb:38:in `send'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:369:in `command'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:35:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/driver.rb:97:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/session.rb:233:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/dsl.rb:52:in `block (2 levels) in <module:DSL>'
     # ./spec/features/integration_spec.rb:27:in `block (3 levels) in <top (required)>'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:112:in `block in run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `loop'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:30:in `block (2 levels) in setup'

  4) Code Splitting w/ Server Rendering loading an asyncronous route should not cause a client/server checksum mismatch
     Failure/Error: background { visit "/deferred_render_with_server_rendering/async_page" }

     Capybara::Poltergeist::DeadClient:
       PhantomJS client died while processing {"id":"d6b357b7-74ab-4b20-b144-390a97c1ccf7","name":"visit","args":["http://127.0.0.1:61221/deferred_render_with_server_rendering/async_page",30]}
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/server.rb:38:in `send'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:369:in `command'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:35:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/driver.rb:97:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/session.rb:233:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/dsl.rb:52:in `block (2 levels) in <module:DSL>'
     # ./spec/features/integration_spec.rb:172:in `block (2 levels) in <top (required)>'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:112:in `block in run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `loop'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:30:in `block (2 levels) in setup'

  5) 2 react components, 1 store, server side, controller setup /server_side_hello_world_shared_store_controller Type in one component changes the other component
     Failure/Error: find("input").set new_text2

     Capybara::Poltergeist::DeadClient:
       PhantomJS client died while processing {"id":"2075109b-1a9f-404d-8e39-ad9f49694d32","name":"set","args":[1,5,"Jane Smith"]}
     Shared Example Group: "React Component Shared Store" called from ./spec/features/integration_spec.rb:230
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/server.rb:38:in `send'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:369:in `command'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:100:in `set'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/node.rb:17:in `command'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/node.rb:91:in `set'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/node/element.rb:108:in `block in set'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/node/base.rb:85:in `synchronize'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/node/element.rb:104:in `set'
     # ./spec/features/integration_spec.rb:206:in `block (4 levels) in <top (required)>'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/session.rb:291:in `within'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/dsl.rb:52:in `block (2 levels) in <module:DSL>'
     # ./spec/features/integration_spec.rb:202:in `block (3 levels) in <top (required)>'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:112:in `block in run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `loop'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:30:in `block (2 levels) in setup'

  6) 2 react components, 1 store, server side, defer /server_side_hello_world_shared_store_defer Type in one component changes the other component
     Failure/Error: background { visit url }

     Capybara::Poltergeist::DeadClient:
       PhantomJS client died while processing {"id":"8bf1fd99-3813-4654-9913-e86630a9fab9","name":"visit","args":["http://127.0.0.1:61221/server_side_hello_world_shared_store_defer",30]}
     Shared Example Group: "React Component Shared Store" called from ./spec/features/integration_spec.rb:238
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/server.rb:38:in `send'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:369:in `command'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/browser.rb:35:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/poltergeist-1.12.0/lib/capybara/poltergeist/driver.rb:97:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/session.rb:233:in `visit'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/capybara-2.7.1/lib/capybara/dsl.rb:52:in `block (2 levels) in <module:DSL>'
     # ./spec/features/integration_spec.rb:190:in `block (2 levels) in <top (required)>'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:112:in `block in run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `loop'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:101:in `run'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /Users/justin/.rvm/gems/ruby-2.3.1@react_on_rails/gems/rspec-retry-0.5.2/lib/rspec/retry.rb:30:in `block (2 levels) in setup'

Finished in 35.01 seconds (files took 5.03 seconds to load)
75 examples, 6 failures

Failed examples:

rspec './spec/features/integration_spec.rb[1:1:2:2]' # Pages/Index All in one page Server Rendered/Cached React Component Without Redux changes name in message according to input
rspec './spec/features/integration_spec.rb[1:1:3:3:2]' # Pages/Index All in one page Simple Client Rendered Component same component with different props changes name in message according to input
rspec './spec/features/integration_spec.rb[1:1:4:4]' # Pages/Index All in one page Simple Component Without Redux changes name in message according to input
rspec ./spec/features/integration_spec.rb:173 # Code Splitting w/ Server Rendering loading an asyncronous route should not cause a client/server checksum mismatch
rspec './spec/features/integration_spec.rb[16:1:1]' # 2 react components, 1 store, server side, controller setup /server_side_hello_world_shared_store_controller Type in one component changes the other component
rspec './spec/features/integration_spec.rb[18:1:1]' # 2 react components, 1 store, server side, defer /server_side_hello_world_shared_store_defer Type in one component changes the other component

* Including the babel-polyfill in the registrations files.
* Same for the es5shim
Require path instead of assuming it's already imported.
@justin808 justin808 force-pushed the update-to-webpack-v2 branch from 740e35f to 96bed98 Compare March 5, 2017 22:53
@justin808
Copy link
Copy Markdown
Member Author

@robwise can you scan these changes. I'd like to merge soon!

@justin808 justin808 requested a review from robwise March 6, 2017 00:32
Copy link
Copy Markdown
Member

@alex35mil alex35mil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

"jsdom": "^9.9.1",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.0",
"fbjs": "^0.8.9",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a direct dep?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at some point, this was a peer dep...

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 99.334% when pulling c8848f3 on update-to-webpack-v2 into 8b13c3b on master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 99.334% when pulling c8848f3 on update-to-webpack-v2 into 8b13c3b on master.

1 similar comment
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 99.334% when pulling c8848f3 on update-to-webpack-v2 into 8b13c3b on master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 99.334% when pulling 1ee7df9 on update-to-webpack-v2 into 8b13c3b on master.

1 similar comment
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 6, 2017

Coverage Status

Coverage remained the same at 99.334% when pulling 1ee7df9 on update-to-webpack-v2 into 8b13c3b on master.

@justin808 justin808 merged commit c4db23f into master Mar 6, 2017
@justin808 justin808 deleted the update-to-webpack-v2 branch March 6, 2017 06:49
justin808 added a commit that referenced this pull request Oct 19, 2025
Following the Shakapacker PR #742 guidelines, this adds comprehensive
changelog documentation requirements to CLAUDE.md:

- Changelog entries required for user-visible changes only (features,
  bug fixes, breaking changes, deprecations, performance improvements)
- No entries needed for linting, formatting, internal refactoring, tests,
  or documentation fixes
- Format requirements: PR links, author links, consistent formatting
- Breaking changes: bold formatting with migration guide links
- Version release: update version diff links

This ensures consistent, high-quality changelog maintenance across
the project.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
justin808 added a commit that referenced this pull request Nov 3, 2025
* Add changelog guidelines to CLAUDE.md

Following the Shakapacker PR #742 guidelines, this adds comprehensive
changelog documentation requirements to CLAUDE.md:

- Changelog entries required for user-visible changes only (features,
  bug fixes, breaking changes, deprecations, performance improvements)
- No entries needed for linting, formatting, internal refactoring, tests,
  or documentation fixes
- Format requirements: PR links, author links, consistent formatting
- Breaking changes: bold formatting with migration guide links
- Version release: update version diff links

This ensures consistent, high-quality changelog maintenance across
the project.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* Fix changelog guidelines: PR format and automation reference

Fixes identified in code review:

1. PR link format: Changed from `[PR #123]` to `[PR 1818]` (no hash)
   - Analysis shows 165 entries without hash vs only 7 with hash
   - Aligns with actual project standard

2. Added reference to `bundle exec rake update_changelog`
   - This is the existing automation for updating version headers
   - Mentioned in CHANGELOG.md line 18 but was missing from guidelines

3. Verified file ends with newline (required per CLAUDE.md)

These changes ensure guidelines match actual usage and reference
existing automation tools.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* Enhance changelog guidelines with comprehensive documentation

Following code review recommendations, this adds:

1. **Section header guidance**: Documents both standard keepachangelog.com
   headers (Added, Changed, Deprecated, Removed, Fixed, Security) and
   project-specific headers (Breaking Changes, New Features, Bug Fixes,
   Security Enhancements, API Improvements, etc.)

2. **Complete format examples**: Three real-world examples showing:
   - Simple entry format
   - Breaking change with migration guide
   - Entry with sub-bullets
   All examples verified against actual CHANGELOG.md patterns

3. **Cross-reference**: Added reference to CHANGELOG.md lines 15-18
   for contributor guidelines and keepachangelog.com format

4. **Better organization**: Restructured into subsections (Section Headers,
   Format Requirements, Entry Format Examples) for easier reference

These enhancements make the guidelines actionable and ensure consistent,
high-quality changelog entries.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* Simplify changelog section to conserve space

Reduces the changelog section from ~50 lines to 5 concise bullets:
- Consolidates what to include/exclude into one line each
- Provides format example inline instead of separate section
- References CHANGELOG.md lines 15-18 for full guidelines
- Points to existing `bundle exec rake update_changelog` task
- Includes grep command to view real formatting examples

This saves space while making the guidelines more actionable by
pointing developers to existing tools and real examples rather
than duplicating information.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* Add /update-changelog command for guided changelog updates

Adds comprehensive slash command based on Shakapacker's implementation
with React on Rails-specific improvements:

**New slash command**: `/update-changelog`
- Provides guided workflow for adding changelog entries
- Ensures correct formatting (no hash in PR numbers)
- Validates user-visible vs non-user-visible changes
- Handles version boundaries and beta releases
- Includes real examples from the codebase
- Documents both standard and custom section headers

**Improvements over Shakapacker version**:
- Updated PR link format (no hash symbol)
- Documents all React on Rails custom section headers
- References `bundle exec rake update_changelog` for version management
- Includes actual examples from CHANGELOG.md
- Added grep command for viewing real formatting examples

**Updated CLAUDE.md**:
- References `/update-changelog` command for guided updates
- Separates version management (rake task) from entry creation (command)
- Maintains concise 6-bullet format

This makes changelog updates consistent and reduces errors by providing
an interactive guided process with comprehensive documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

* Fix update-changelog command: remove redundancy and fix formatting

Addresses code review feedback:

1. **Removed redundant section headers**:
   - "New Features" (redundant with standard "Added")
   - "Bug Fixes" (redundant with standard "Fixed")
   - "Security Enhancements" (redundant with standard "Security")
   - "Code Improvements" (internal, not user-visible)

2. **Added "Improved" to standard headers** (used 9 times in CHANGELOG.md)

3. **Emphasized standard headers**: Updated guidance to prefer standard
   keepachangelog.com headers and use custom ones sparingly

4. **Fixed broken markdown formatting**:
   - Corrected triple/quadruple backtick issues in Breaking Change example
   - Removed nested code blocks that broke rendering
   - Simplified code examples within the markdown example

5. **Final header list**:
   - Standard: Added, Changed, Deprecated, Removed, Fixed, Security, Improved
   - Custom: Breaking Changes, API Improvements, Developer Experience,
     Generator Improvements, Performance, Pro License Features

This reduces confusion and ensures the command guides developers to use
consistent, standard headers while keeping legitimate project-specific
headers for special cases.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants