ackama / rails-template

Application template for Rails 7 projects; preloaded with best practices for TDD, security, deployment, and developer productivity.
Other
294 stars 15 forks source link

fix: explicitly set our preferred package manager for js dependencies #528

Closed G-Rath closed 7 months ago

G-Rath commented 7 months ago

react-rails now supports other package managers using package_json, meaning it now defaults to npm if a package manager is not explicitly set in package.json, causing a stray package-lock.json to be created.

I've specified an exact version because currently corepack requires that (ranges are not yet supported) but we're not actually expecting anyone to be using corepack and we're definitely not using it in production (not explicitly at least...) so in theory this shouldn't cause problems and it means package.json conforms to the JSON schema - it'll also help to flush out any potential problems early before(/if) corepack becomes more mainstream.