Skip to content

Commit

Permalink
fixed tests, updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
vaukalak committed Jun 30, 2024
1 parent 5c830e7 commit 8bbc55d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Please follow the recommendations outlined at [keepachangelog.com](http://keepac
### [Unreleased]
Changes since the last non-beta release.

#### Improved
- Improved dependency management by integrating package_json. [PR 1544](https://github.com/shakacode/react_on_rails/pull/1639) by [vaukalak](https://github.com/vaukalak).

### [14.0.3] - 2024-06-28

#### Fixed
Expand Down
32 changes: 16 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
react_on_rails (14.0.2)
react_on_rails (14.0.3)
addressable
connection_pool
execjs (~> 2.5)
Expand Down Expand Up @@ -93,7 +93,7 @@ GEM
bigdecimal (3.1.8)
bootsnap (1.18.3)
msgpack (~> 1.2)
builder (3.2.4)
builder (3.3.0)
byebug (11.1.3)
capybara (3.40.0)
addressable
Expand All @@ -109,7 +109,7 @@ GEM
launchy
childprocess (5.0.0)
coderay (1.1.3)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.3)
connection_pool (2.4.1)
coveralls (0.8.23)
json (>= 1.8, < 3)
Expand All @@ -127,7 +127,7 @@ GEM
drb (2.2.1)
equivalent-xml (0.6.0)
nokogiri (>= 1.4.3)
erubi (1.12.0)
erubi (1.13.0)
execjs (2.9.1)
ffi (1.16.3)
gem-release (2.2.2)
Expand All @@ -140,7 +140,7 @@ GEM
concurrent-ruby (~> 1.0)
interception (0.5)
io-console (0.7.2)
irb (1.13.1)
irb (1.13.2)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jbuilder (2.12.0)
Expand Down Expand Up @@ -170,8 +170,8 @@ GEM
matrix (0.4.2)
method_source (1.1.0)
mini_mime (1.1.5)
mini_portile2 (2.8.6)
minitest (5.23.0)
mini_portile2 (2.8.7)
minitest (5.24.1)
msgpack (1.7.2)
mutex_m (0.2.0)
net-imap (0.4.11)
Expand All @@ -184,7 +184,7 @@ GEM
net-smtp (0.5.0)
net-protocol
nio4r (2.7.3)
nokogiri (1.16.5)
nokogiri (1.16.6)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
package_json (0.1.0)
Expand All @@ -211,8 +211,8 @@ GEM
public_suffix (5.0.5)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.3)
rack (3.0.11)
racc (1.8.0)
rack (3.1.4)
rack-proxy (0.7.7)
rack
rack-session (2.0.0)
Expand Down Expand Up @@ -256,22 +256,22 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rdoc (6.6.3.1)
rdoc (6.7.0)
psych (>= 4.0.0)
regexp_parser (2.9.2)
reline (0.5.7)
reline (0.5.9)
io-console (~> 0.5)
rexml (3.2.7)
strscan (>= 3.0.9)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
rspec-expectations (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (6.1.2)
rspec-rails (6.1.3)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
Expand Down Expand Up @@ -358,7 +358,7 @@ GEM
sprockets (>= 3.0.0)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
stringio (3.1.0)
stringio (3.1.1)
strscan (3.1.0)
sync (0.5.0)
term-ansicolor (1.8.0)
Expand Down Expand Up @@ -389,7 +389,7 @@ GEM
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.36)
zeitwerk (2.6.14)
zeitwerk (2.6.16)

PLATFORMS
ruby
Expand Down
3 changes: 1 addition & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ You need a Rails application with Shakapacker installed and configured on it. Ch
rails new PROJECT_NAME --skip-javascript
cd PROJECT_NAME
bundle add shakapacker --strict
# currently react_on_rails uses yarn classic by default
PACKAGE_JSON_FALLBACK_MANAGER=yarn_classic rails shakapacker:install
rails shakapacker:install
```

You may need to check [the instructions for installing into an existing Rails app](https://www.shakacode.com/react-on-rails/docs/guides/installation-into-an-existing-rails-app/) if you have an already working Rails application.
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/react_on_rails/base_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def add_base_gems_to_gemfile
run "bundle"
end

def add_yarn_dependencies
def add_js_dependencies
major_minor_patch_only = /\A\d+\.\d+\.\d+\z/
if ReactOnRails::VERSION.match?(major_minor_patch_only)
package_json.manager.add(["react-on-rails@#{ReactOnRails::VERSION}"])
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/react_on_rails/generator_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

module GeneratorHelper
def package_json
@package_json ||= PackageJson.read(Rails.root.to_s)
@package_json ||= PackageJson.read
end

# Takes a relative path from the destination root, such as `.gitignore` or `app/assets/javascripts/application.js`
Expand Down

0 comments on commit 8bbc55d

Please sign in to comment.