You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But by reading the documentation, the 'scripts' member is used for lifecycle management, not binaries. The 'bin' member is for listing executables that should go to the path.
But by reading the documentation, the 'scripts' member is used for lifecycle management, not binaries. The 'bin' member is for listing executables that should go to the path.
I edited the comment to make it clear I'm not talking about npm when I say "both package managers". It's about bpkg and basher.
Regardless, my expectation of using 'package.json' is that it at least keeps most of the known and documented logic in place, even though is not compatible with npm itself. If the intent is to diverge from the original, than the choice of the name 'package' and the format 'json' are both misleading and confusing for users.
The format used is similar to component and clibs. Considering a lot of its
users are also owners/contributors it made sense to maintain the same
format. It may be early enough to change the format but a PITA
On Jul 4, 2014 10:01 AM, "Juan Ibiapina" notifications@github.com wrote:
I edited the comment to make it clear I'm not talking about npm when I say
"both package managers". It's about bpkg and basher.
Regardless, my expectation of using 'package.json' is that it at least
keeps most of the known and documented logic in place, even though is not
compatible with npm itself. If the intent is to diverge from the original,
than the choice of the name 'package' and the format 'json' are both
misleading and confusing for users.
—
Reply to this email directly or view it on GitHub #17 (comment).
I edited the comment to make it clear I'm not talking about npm when I say "both package managers". It's about bpkg and basher.
Regardless, my expectation of using 'package.json' is that it at least keeps most of the known and documented logic in place, even though is not compatible with npm itself. If the intent is to diverge from the original, than the choice of the name 'package' and the format 'json' are both misleading and confusing for users.
—
Reply to this email directly or view it on GitHub.
@jwerle component uses component.json, which might differ from package.json. I couldn't find any examples of scripts or bin in clibs, although I looked only for a couple of minutes.
@stephenmathieson I like using bins instead of install scripts. That was one of the reasons I revived basher instead of simply using bpkg.
@jwerlehttps://github.com/jwerle component uses component.json, which
might differ from package.json. I couldn't find any examples of scripts or
bin in clibs, although I looked only for a couple of minutes.
fwiw, if there wasn't already a small community of people using clib, I'd move from package.json to clib.yml. I've personally run into issues using clib to manage C deps for native node modules. also, json is ugly and hard to read :/
@jwerlehttps://github.com/jwerle component uses component.json, which
might differ from package.json. I couldn't find any examples of scripts or
bin in clibs, although I looked only for a couple of minutes.
On the same thought, would you think bpkg could use a different format too? For basher I'm considering a package.bash file. I haven't completely decided, but I'll get to it as soon as I have some time.
I love the json parser, and it all looks beautiful, but a native bash format would be both simpler to implement and less confusing. Possible format (making this up on the spot):
On the same thought, would you think bpkg could use a different format
too? For basher I'm considering a package.bash file. I haven't completely
decided, but I'll get to it as soon as I have some time.
I love the json parser, and it all looks beautiful, but a native bash
format would be both simpler to implement and less confusing. Possible
format (making this up on the spot):
I'm only using the BIN variable, with a list of binaries separated by ":". Not using NAME or other things for now.
Let me know what you think. If you decide to keep package.json, in whatever format, I might be able to make basher support both package.json and package.sh.
If possible, I would retain as many semantics as possible from npm conventions, and still use a distinct file named bpkg.json, as it explicitly indicates support for bpkg implementations while avoiding the need for per-field conflict resolution. It just seems like unnecessary surface area for issues in the future to attempt to maintain partial compatibility with the evolving npm standards.
Reacted by Nate Fischer, Juan Ibiapina, Ben Peachey, Jason Karns and Joseph Werle
I have also reversed my opinion and now agree with what @juanibiapina and @ccarpita are saying above. New file (perhaps new format, whatever works for bpkg and basher), but hopefully using the same keywords and names with npm's semantics (simply to leverage well established naming conventions).
As (ab)using package.json is already causing problems.
The most vocal contributors in this thread all seem to agree (also) having a bpkg.json is a good idea.
So, moving forward, support for a bpkg.json needs to be added.
Both @fidian and @isaacs suggest an approach I wholeheartedly support:
I'd advocate simply using bpkg.json and falling back to package.json when bpkg.json does not exit. Later on this format can be changed to be an INI file or a shell script or whatnot.
And
I'd suggest a two-fold approach:
If bpkg.json is present, use that.
Else, if package.json is present, use that, but handle scripts/bin/etc. using npm's semantics.
So:
if a project has only a package.json, that is used
if a project has only a bpkg.json, that is used
if a project has both a package.jsonand a bpkg.json, the bpkg.json is used
Rather than recycling this issue, I'd suggest closing this issue with the common consensus as the conclusion and create a new issue specifically for adding bpkg.json support.
@Potherca I'm going to take a gander at adding support for bpkg.json
@jwerle Would you be to link me, or point me in the right direction, to where this was done for clibs. Although I think I know what the logic would look like, having a reference wouldn't hurt. :)
Activity
stephenmathieson commentedon Jul 4, 2014
npm and bpkg are already completely incompatible. npm is for JavaScript, not bash.
juanibiapina commentedon Jul 4, 2014
I edited the comment to make it clear I'm not talking about npm when I say "both package managers". It's about bpkg and basher.
Regardless, my expectation of using 'package.json' is that it at least keeps most of the known and documented logic in place, even though is not compatible with npm itself. If the intent is to diverge from the original, than the choice of the name 'package' and the format 'json' are both misleading and confusing for users.
jwerle commentedon Jul 4, 2014
The format used is similar to component and clibs. Considering a lot of its
users are also owners/contributors it made sense to maintain the same
format. It may be early enough to change the format but a PITA
On Jul 4, 2014 10:01 AM, "Juan Ibiapina" notifications@github.com wrote:
stephenmathieson commentedon Jul 4, 2014
Ah, I didn't know what basher is. That makes more sense ;)
I think there was talk of using "bin" for executables already in order to drop the need for an install script.
juanibiapina commentedon Jul 4, 2014
@jwerle component uses component.json, which might differ from package.json. I couldn't find any examples of scripts or bin in clibs, although I looked only for a couple of minutes.
@stephenmathieson I like using bins instead of install scripts. That was one of the reasons I revived basher instead of simply using bpkg.
jwerle commentedon Jul 4, 2014
I think bin would be so much easier too.
I'm sorry, I should have noted clibs uses src, not scripts.
I think it is early enough to make changes
On Fri, Jul 4, 2014 at 10:35 AM, Juan Ibiapina notifications@github.com
wrote:
stephenmathieson commentedon Jul 4, 2014
fwiw, if there wasn't already a small community of people using clib, I'd move from package.json to clib.yml. I've personally run into issues using clib to manage C deps for native node modules. also, json is ugly and hard to read :/
juanibiapina commentedon Jul 4, 2014
On the same thought, would you think bpkg could use a different format too? For basher I'm considering a package.bash file. I haven't completely decided, but I'll get to it as soon as I have some time.
I love the json parser, and it all looks beautiful, but a native bash format would be both simpler to implement and less confusing. Possible format (making this up on the spot):
NAME="name"
VERSION="1.2.3"
DESCRIPTION="Best package ever"
GLOBAL=true
BIN=bin/exec:otherexec
Let me know what you think.
stephenmathieson commentedon Jul 4, 2014
oh wow - that makes a ton of sense. then we'd just source the package
file, right?
On Fri, Jul 4, 2014 at 12:48 PM, Juan Ibiapina notifications@github.com
wrote:
juanibiapina commentedon Jul 4, 2014
Indeed, but I haven't tested it yet.
jwerle commentedon Jul 4, 2014
Yeah, that looks much better!
On Fri, Jul 4, 2014 at 12:53 PM, Juan Ibiapina notifications@github.com
wrote:
juanibiapina commentedon Jul 4, 2014
Might be a slight security problem though.
http://wiki.bash-hackers.org/howto/conffile
juanibiapina commentedon Jul 5, 2014
My initial version seems to work well: https://github.com/juanibiapina/basher/blob/master/libexec/basher-install#L25
I'm only using the BIN variable, with a list of binaries separated by ":". Not using NAME or other things for now.
Let me know what you think. If you decide to keep package.json, in whatever format, I might be able to make basher support both package.json and package.sh.
jwerle commentedon Jul 10, 2014
I like the idea of a bash script. How do you feel about an ini file? There is a ini parser written in bash as well here
juanibiapina commentedon Jul 10, 2014
I think it's simple enough and much safer. The syntax is also very similar to bash.
I don't know how to choose here.
23 remaining items
ccarpita commentedon Feb 17, 2016
If possible, I would retain as many semantics as possible from npm conventions, and still use a distinct file named
bpkg.json, as it explicitly indicates support for bpkg implementations while avoiding the need for per-field conflict resolution. It just seems like unnecessary surface area for issues in the future to attempt to maintain partial compatibility with the evolving npm standards.jasonkarns commentedon Nov 28, 2018
I have also reversed my opinion and now agree with what @juanibiapina and @ccarpita are saying above. New file (perhaps new format, whatever works for bpkg and basher), but hopefully using the same keywords and names with npm's semantics (simply to leverage well established naming conventions).
Potherca commentedon Jul 27, 2019
As (ab)using
package.jsonis already causing problems.The most vocal contributors in this thread all seem to agree (also) having a
bpkg.jsonis a good idea.So, moving forward, support for a
bpkg.jsonneeds to be added.Both @fidian and @isaacs suggest an approach I wholeheartedly support:
And
So:
package.json, that is usedbpkg.json, that is usedpackage.jsonand abpkg.json, thebpkg.jsonis usedRather than recycling this issue, I'd suggest closing this issue with the common consensus as the conclusion and create a new issue specifically for adding
bpkg.jsonsupport.jwerle commentedon Jul 27, 2019
@Potherca I would love to see a PR for this 😉
jwerle commentedon Aug 6, 2019
we've successfully done this for clibs by preferring
clib.jsonand falling back topackage.jsonif it exists! Would love to see it here as wellPotherca commentedon Aug 7, 2019
I'm hoping to give BPKG some love soon, but I can't give any guarantees yet. 🤞
SidIcarus commentedon Sep 9, 2019
@Potherca I'm going to take a gander at adding support for
bpkg.json@jwerle Would you be to link me, or point me in the right direction, to where this was done for
clibs. Although I think I know what the logic would look like, having a reference wouldn't hurt. :)jwerle commentedon Sep 9, 2019
@SidIcarus take a look over here https://github.com/clibs/clib/blob/next/src/clib-install.c and here https://github.com/clibs/clib-package/tree/next
jwerle commentedon Mar 25, 2022
we've finally done it - we moved to
bpkg.json