Upgrade Shakapacker to 8.0.0, Upgrade ROR to 14.0.4#415
Conversation
WalkthroughThe changes involve updating dependencies and build scripts to use Changes
Poem
Note Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. 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 (
|
|
rameziophobia one thing to mention, that shakapacker uses package_json package, which allows to use different package managers (npm, yarn_berry etc.). |
ea4280e to
17883e2
Compare
justin808
left a comment
There was a problem hiding this comment.
Overall, looking good but with a HUGE omission of the breaking changes (changelog) that require an upgrade to latest shakapacker and react on rails.
| } | ||
|
|
||
| const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute('content'); | ||
| const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') || ''; |
There was a problem hiding this comment.
when using node v20 the typescript types for HTTP are more specific. They don't allow null | undefined in the headers and throw a compilation error. we can either do this or raise an error here if the token is not found @justin808
There was a problem hiding this comment.
isn't it safer to raise an error rather than blank?
There was a problem hiding this comment.
It can be safer but I didn't want to alter the flow of that component as I don't have context on it. I can just change it and see if any tests will fail
f4887f1 to
00d4974
Compare
Type 'string | null | undefined' is not assignable to type 'string'.
This is a follow-up PR for shakacode/react_on_rails_pro#415 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Updated the global declaration of `ReactOnRails` in `vm.ts` for compatibility with node 16+. - **Documentation** - Added a note in `basics.md` about `react-on-rails` installation for `global.ReactOnRails` types. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This is a follow-up PR for shakacode/react_on_rails_pro#415 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Updated the global declaration of `ReactOnRails` in `vm.ts` for compatibility with node 16+. - **Documentation** - Added a note in `basics.md` about `react-on-rails` installation for `global.ReactOnRails` types. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
react-on-railsv14.0.4 andshakapackerv8.0.0.shakapackerinstead ofwebpackerfor building.lazyApollo.tsfor missingcsrfToken.Documentation
spec/dummy/.nvmrc.spec/dummy/README.mdand added reference toCONTRIBUTING.md.Refactor
WebpackerwithShakapackerin various files such asassets_precompile_spec.rbandutils_spec.rb.webpack.config.jsfunction to handle invalidNODE_ENV.Bug Fixes
restartWorkersinrestartWorkers.ts.worker.tsrelated to worker ID access.Chores
shakapackerRuby scripts for setup and development server.shakapacker.ymland variousProcfile.devcommands.