Comments (8)
thanks @RaisinTen for bringing this up!
@dsanders11 I agree 100% with your initial statement, the goal of the native parseArgs
module was never to replace full blown cli frameworks such as commander
.
That said, my proposal to use it here instead is based on different types of motivations:
- Given the intention to vendor
postject
within Node.js, it would be great to use its native solution and avoid adding an extra bundled dependency - This can be a great opportunity to set good examples/standards on how to use
parseArgs
on a real life cli application - By moving
postject
to the Node.js org, more contributors will be attracted to the project, which can help ease the extra work load, also these contributors might be more familiar with the standardparseArgs
module than a specific cli framework (myself included)
Outside of these practical reasons, there are also the relevance of helping creating more synergy between the collaborators of postject
and the larger pool of Node.js collaborators. I'd encourage the team here to report and even propose improvements to the parseArgs
module moving forward. Also relevant to this point, did you know parseArgs
is the result of a lot of collaboration between the maintainers of both commander
and yargs
that originally took place at https://github.com/pkgjs/parseargs as part of a Node.js Tooling Group initiative? 😊 A big motivation of my initial idea was helping promote this type of collaborative work!
With all that in mind I totally respect your call on this. Just let me know in case you want to move forward with parseArgs
since I might be able to contribute a little to the this specific initiative and also help rally more folks from the Working Groups that might be willing to help with the work necessary.
from postject.
I don't think parseArgs
is a replacement for commander
in Postject, it's too minimal. For example, we'd lose the whole help functionality and usage output we currently have. It would also make #43 more trickier, while commander
provides sub-command functionality.
from postject.
Yea that makes sense to me. @ruyadorno do you have any other suggestions on this?
from postject.
As a big fan of reducing dependency scope, I'm +1 on the idea of ditching commander if it's doable.
from postject.
@ruyadorno thanks for chiming in and also thank you for the great points!
Given the intention to vendor postject within Node.js, it would be great to use its native solution and avoid adding an extra bundled dependency
The way I initially imagined node would use postject is through the programmatic API here - https://github.com/postmanlabs/postject/blob/b9356bf75ba4c22aab6baeaab51a94111ef4a79b/src/api.js#L6, i.e., the inject() function. This file does not do require('commander')
, so commander would not be a part of the bundled JS file that was being used inside node.
However, I agree with the rest of the points you raised and I'm fully supportive of using parseArgs
if possible without adding a lot of complexity. :-)
from postject.
It would also make #43 more trickier, while
commander
provides sub-command functionality.
Incidentally if you do go for this, subcommands are doable in parseArgs
with a relatively small amount of boilerplate. More work than commander
, but not that bad.
from postject.
+1 for using native solution
from postject.
+1 for using parseArgs
from postject.
Related Issues (20)
- What to use for CI HOT 7
- Internally use `objcopy --add-section` on macOS and Linux HOT 10
- Unable to make build on macOS 13 due to deprecated functions HOT 3
- Calling `postject_find_resource()` segfaults on `rhel8-ppc64le` HOT 6
- Print a message when the build is successful HOT 1
- Weired output message `The signature seems corrupted!` on Windows HOT 7
- SEA created following Node.js documentation doesn't work HOT 9
- Can't read and write to target executable HOT 8
- single executable applications with warning HOT 4
- Investigate why running the wasm blob in Postject is slow
- upx compatibility(Cannot pack after postject-ed) HOT 2
- Question about the sentinel fuse. HOT 5
- Error: buffer[colonIndex].charCodeAt is not a function HOT 2
- stripping postjected executable causes segmentation fault
- Can't read and write to target executable HOT 2
- Error: Multiple occurences of sentinel found in the binary HOT 5
- SEA issue at step running postject to inject the blob HOT 1
- Error: Could not find the sentinel NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 in the binary
- injecting multiple resources to the same binary.
- Signing a `darwin-x64` node executable on `darwin-arm64` leads to a segmentation fault when started [SOLVED] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postject.