Remove yarn from bun detect tool
This PR as result of review and discussion here https://github.com/rails/cssbundling-rails/pull/165
Yup. Without this change a default rails app will break on Render.
Our SASS provider pre-installs bun by default while we are using yarn in development.
For years, we commited and pushed package.json and yarn.lock and some commands depends on yarn :
"scripts": {
"build:css:application": "postcss ./app/assets/stylesheets/application.postcss.css -o ./app/assets/builds/application.css",
"build:css:mailer": "postcss ./app/assets/stylesheets/mailer.postcss.css -o ./app/assets/builds/mailer.css",
"build:css": "yarn build:css:application && yarn build:css:mailer",
Yet In production, cssbundling-rails decided to use bun over yarn to call build:css and it wasn't a problem so far.
But yesterday they upgraded bun to 1.2.20. It includes this change : https://bun.sh/blog/bun-v1.2.20#automatic-yarn-lock-migration
Now calling bun build:css failed because it cannot found postcss command.
We worked around by overriding rake tasks from cssbundling-rails to force them to use yarn until the release of this patch.
I just switched to Bun ... goodbye esbuild and node.