News for hackers. Stuff that matters.
Re:From Ruby to Node: Overhauling Shopify’s CLI for a Better... by pastor_bob on Thursday January 12, 2023 @03:18PM (#34359707)
I just find working with Node to be gross.

Look at this:

https://github.com/Shopify/cli/blob/main/package.json

but wait...this too:

https://github.com/Shopify/cli/blob/main/packages/app/packag...

https://github.com/Shopify/cli/blob/main/packages/cli-hydrog...

https://github.com/Shopify/cli/blob/main/packages/cli/packag...

https://github.com/Shopify/cli/blob/main/packages/create-app...

etc, etc, etc VS

https://github.com/Shopify/shopify-cli/blob/main/Gemfile

What am i missing? Why do you have to rely on all that junk to run a CLI? It feels like people choose Node because creating a Rube Goldberg machine creates job security.

Re:From Ruby to Node: Overhauling Shopify’s CLI for a Better... by lacasito25 on Thursday January 12, 2023 @03:34PM (#34359895)
The project looks extremely messy, so many packages inside packages. It feels like java, but less performant
Re:From Ruby to Node: Overhauling Shopify’s CLI for a Better... by jacobsenscott on Thursday January 12, 2023 @03:49PM (#34360048)
One reason is because ruby has a large standard library. Also people just pick what they know - there are more js devs than ruby devs. Also neither ruby nor node are a good choice for a cli, so it is kind of a moo point.
Re:From Ruby to Node: Overhauling Shopify’s CLI for a Better... by joshmn on Thursday January 12, 2023 @04:31PM (#34360526)
> there are more js devs than ruby devs.

Not at Shopify there ain't.

Re:From Ruby to Node: Overhauling Shopify’s CLI for a Better... by mccolin on Thursday January 12, 2023 @05:08PM (#34360940)
It's like a cow's opinion.
Re:From Ruby to Node: Overhauling Shopify’s CLI for a Better... by DwnVoteHoneyPot on Thursday January 12, 2023 @04:10PM (#34360294)
They think of it as a benefit: "Node’s module system allows having multiple versions of the same transitive package without conflicting with each other"
Re:From Ruby to Node: Overhauling Shopify’s CLI for a Better... by bretthopper on Thursday January 12, 2023 @04:27PM (#34360472)
You are missing a few things about the Ruby based CLI:

1. dependencies for Gems are specified in the gemspec file and not the Gemfile. See https://github.com/Shopify/shopify-cli/blob/main/shopify-cli... for example. There's a few non-development dependencies.

2. since it's difficult to package up a Ruby gem for distribution, maybe dependencies were vendored directly in the codebase: https://github.com/Shopify/shopify-cli/tree/main/vendor

This isn't meant to be a comparison of the number of dependencies or anything. Just pointing out a few nuances to how the Ruby dependencies were handled.

Re:From Ruby to Node: Overhauling Shopify’s CLI for a Better... by avx56 on Thursday January 12, 2023 @07:59PM (#34362593)
The dozens of ESLint dependencies are really what frustrate me... I wonder when someone will make a "batteries-included zero-config" JS linter with the most useful rules included, since that's what people seem to want in JS crazy land. See: Vite, Parcel, and the endless complaints about Webpack configs. Of course, people will inevitably want plugins and extensibility and you end right back up with Webpack again.
Re:From Ruby to Node: Overhauling Shopify’s CLI for a Better... by latchkey on Thursday January 12, 2023 @08:46PM (#34362945)
xo and eslint-config-xo

https://github.com/xojs/xo

Re:From Ruby to Node: Overhauling Shopify’s CLI for a Better... by avx56 on Thursday January 12, 2023 @10:24PM (#34363593)
All they need now is a sexy website!
Re:From Ruby to Node: Overhauling Shopify’s CLI for a Better... by myth_drannon on Thursday January 12, 2023 @09:49PM (#34363392)
That's not Node's issue but NX's monorepo. Having a mega monster root package.json just makes your ci/cd incredibly slow, one way to solve it, is to have per app package.json