gitlab-ci-local icon indicating copy to clipboard operation
gitlab-ci-local copied to clipboard

feat(yargs): update yargs to 18.0.0

Open oldium opened this issue 4 months ago • 4 comments

New yargs version bundling is failing, because it is newly ESM-only module:

  • It is not included in esbuild and pkg does not patch ESM import paths.
  • If added into esbuild, the transpiled import.meta.url is empty and execution fails.

Fix this by letting esbuild transpile also yargs to CJS, but provide a sensible value for import.meta.url as mentioned in the esbuild bug report.

While at it, also update @yao-pkg/pkg to support newer Node.js runtime.

Supercedes: #1577

oldium avatar Oct 28 '25 18:10 oldium

Ha! The yargs locales are probably missing due to this.

oldium avatar Oct 28 '25 18:10 oldium

Hm. I am able to get also locales working locally, but when packed with pkg, the --help option gets to segmentation fault... I have no solution for this.

oldium avatar Oct 28 '25 20:10 oldium

I will leave it here in this state, feel free to close it if you do not want to continue on it.

oldium avatar Oct 28 '25 21:10 oldium

Maybe try Node.js experimental Single Executable Applications?

oldium avatar Oct 28 '25 22:10 oldium