Skip to content

Commit b1aef82

Browse files
justin808claude
andcommitted
Use exact option in package_json gem for installing dependencies
The package_json gem (v0.2.0) now supports an 'exact' parameter in the add method to install packages with exact versions (no ^ or ~ prefix). This change updates the add_npm_dependencies helper method to use exact: true when adding both regular and dev dependencies. This ensures that React on Rails generators install npm packages with exact version specifications, consistent with the project's requirement for strict version matching between the gem and npm packages. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 57fb6bf commit b1aef82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/generators/react_on_rails/generator_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def add_npm_dependencies(packages, dev: false)
2626

2727
begin
2828
if dev
29-
pj.manager.add(packages, type: :dev)
29+
pj.manager.add(packages, type: :dev, exact: true)
3030
else
31-
pj.manager.add(packages)
31+
pj.manager.add(packages, exact: true)
3232
end
3333
true
3434
rescue StandardError => e

0 commit comments

Comments
 (0)