ackama / rails-template

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

feat: switch to using `package_json` for interacting with `package.json` #466

Closed G-Rath closed 1 month ago

G-Rath commented 1 year ago

This allows us to support all of the major javascript package managers by relying on the package_json gem to handle running and generating commands for a particular package manager.

Currently I'm making our template actually agnostic and have setup to test that is the case by running against the major package managers + Yarn PnP, though I expect after landing this we'll decide on a single package manager to use going forward and remove code that is needed for the other package managers.

G-Rath commented 9 months ago

Bun tests are currently broken because of https://github.com/oven-sh/bun/issues/8406 / https://github.com/oven-sh/bun/issues/9135

eoinkelly commented 2 months ago

I think we should be opinionated about which JS package manager we support. It's cool we can support many but for our own sanity, baking one into this repo makes sense to me.

G-Rath commented 1 month ago

Discussed this in our guild meeting today: we're going to land it as-is so that it's in the history, and immediately follow up with switching to using npm as our preferred package manager as that aligns with what we use everywhere else currently.

That's not to say we won't potentially explore and switch to another package manager in the future, but doing so would be in response to a wider choice rather than Rails specific, which is what this PR is meant to enable