3 ms·
Very sad they went from 20 to 24. No 22. OTOH I've been moving from native NodeJS actions to packing them in a Docker container to separate code from compiled
by OptionOfT 1y ago
Very sad they went from 20 to 24. No 22.
OTOH I've been moving from native NodeJS actions to packing them in a Docker container to separate code from compiled code.
If you wanted to use Typescript for your action you always had a 2 step process because GitHub Actions required you to pack dependencies with ncc or vite or webpack.
This packaged version was subsequently committed to the main branch.
Technically I could do a composite action where I compile the typescript on the fly, but that was fragile last time I tried it.
- STRiDEX 1y agoWhat are you doing that requires checking in the compiled version. Esbuild takes like one second
- OptionOfT 1y agoThe code is written in typescript. So we go from * cloning the action * running the dist/index.js to * Cloning the action * npm install * npm compile * npm run
- franky47 1y agoYou can run TypeScript natively in Node.js 24, actions based on that runtime don’t need a build step. https://bsky.app/profile/danielroe.dev/post/3lxczp5apec2x https://bsky.app/profile/danielroe.dev/post/3lxczp5apec2x
- matt-p 1y agoI think it just ignores types, so may not suit all use cases.
- franky47 1y agoIt has a (albeit experimental) flag for transforming enums, namespaces and other runtime-impacting aspects of TypeScript, if that’s what you were referring to? https://nodejs.org/api/cli.html#--experimental-transform-types https://nodejs.org/api/cli.html#--experimental-transform-typ...
- romellem 1y agoIs there a specific part of Node 22 that isn’t there in Node 24?
- chrisweekly 1y agoYeah, strange to skip 22. If GHA is mandating 24, while other vendors like Netlify currently max out at 22, there isn't even overlap in an LTS version I can deploy to both places? Just, wat.
- vinnymac 1y agoSame for Vercel which doesn’t support 24 officially yet. https://vercel.com/docs/functions/runtimes/node-js/node-js-versions https://vercel.com/docs/functions/runtimes/node-js/node-js-v...
- mirekrusin 1y agoSadly docker actions can't be used in workflows that run on custom image (docker is not available in docker and making it available is an anti pattern) - they loose on their composability.