Closed Geod24 closed 3 years ago
node_modules
should not be committed. Please check the docs for more info:
TL;DR Add the package
script to package.json
from https://github.com/actions/typescript-action/blob/e849b574f4e0b705c43b503509c07a5c606d8931/package.json#L12, delete node_modules and then run this script to compile and link / bundle all dependencies in a single .js
file via ncc
.
So we've been doing it wrong all along ? :)
@PetarKirov we are not using proposed model, it is extremely impractical for maintaining multiple stable branches - and makes using non-released action version a major PITA. So in case of setup-dlang node_modules
must be committed, that is intentional.
Edit: switching to committing a bundled version instead is a good idea though, we definitely should do that.
@Geod24 seems to have some cert issue now: Error: unable to verify the first certificate
@Geod24 seems to have some cert issue now:
Error: unable to verify the first certificate
Yes it's an upstream issue with dlang.org and actually one of the reason I looked into dependencies.
install.sh
isn't working either ATM.
Can we hold this PR until the upstream issue is fixed? Would prefer to be confident it doesn't break anything ;)
Ah yes, obviously, I had no intent to merge it while the CI is red.
@mihails-strasuns
Edit: switching to committing a bundled version instead is a good idea though, we definitely should do that.
Yes, I meant that we should use ncc
, instead of commiting node_modules
, while keeping the same branching strategy we've been using already.
The best solution is to publish the "compiled" artifacts as an npm package either on npmjs.com, or on a GitHub NPM registry.
P.S. I registered @dlang
org on npmjs.com for purposes like this:
In order to avoid fiascos such as:
Of course, my intention is that @dlang
npm org should be controlled by the D community (or perhaps specifically DLF), but for now you can just ping me on dlang.slack.com and I will help whoever wants to setup some D-related package.
See also: https://github.com/dlang/dub/issues/2076
Edit: I checked the docs and it seems that GitHub is set on its NIH ways, instead of using standard and established solutions, so I guess commiting the ncc
-produced artifacts is still the way to go.
👍
Noticed the dependencies were quite out of date, especially for the cache-tools action.