feat(yargs): update yargs to 18.0.0 - #1671
Closed
oldium wants to merge 2 commits into
Closed
Conversation
oldium
force-pushed
the
feature/yargs-update
branch
2 times, most recently
from
October 28, 2025 18:35
4291322 to
9d91f95
Compare
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][1]. * 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][2]. While at it, also update `@yao-pkg/pkg` to support newer Node.js runtime. [1]: yao-pkg/pkg#16 (comment) [2]: evanw/esbuild#2441 (comment) Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
oldium
force-pushed
the
feature/yargs-update
branch
from
October 28, 2025 18:36
9d91f95 to
2e077a7
Compare
Author
|
Ha! The |
Author
|
Hm. I am able to get also locales working locally, but when packed with |
Author
|
I will leave it here in this state, feel free to close it if you do not want to continue on it. |
Author
|
Maybe try Node.js experimental Single Executable Applications? |
Owner
|
We've started using bun. So yargs 18 is coming soon |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New
yargsversion bundling is failing, because it is newly ESM-only module:esbuildandpkgdoes not patch ESM import paths.esbuild, the transpiledimport.meta.urlis empty and execution fails.Fix this by letting
esbuildtranspile alsoyargsto CJS, but provide a sensible value forimport.meta.urlas mentioned in theesbuildbug report.While at it, also update
@yao-pkg/pkgto support newer Node.js runtime.Supercedes: #1577