-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support an "engines"
field in package.json
#5846
Comments
as most teams will end up with a mix of node and bun for their projects, this would make sense to support the |
Are there any plans to implement this feature? |
yes but probably not right now. i think it would be cool if bun in the engines field could be used to force the |
@lgarron Any updates? |
Seems like this is the only reasonable way to know which runtime a project is meant to be used with. For reproducibility's sake, this is kind of needed. Once this is done and bun is supported by corepack we can all sleep easy. |
…omises`. This requires `bun` v1.0.30. `bun` doesn't support the `"engines"` field in `package.json`, but I'm going to try setting it to see what happens: oven-sh/bun#5846
I came across this while trying to find a way to force all users of our monorepo to update to the newly released It looks like the Is there any way to try and force all users to use a particular version of bun or should I add a test which checks |
Is this being considered as a possible feature, and if so, will it be implemented in the near future? |
@vitch Nice callout! Found this in the Might be a good intermediate solution while bun itself doesn't add support to it.
|
Related: It looks like corepack is likely going to be removed from the node distribution. |
I saw this issue because of the link in the comment above. In case folks hadn't seen this, a group of folks have been working on a more robust proposal to cover openjs-foundation/package-metadata-interoperability-collab-space#15 |
Now that Bun is gaining a new lockfile format, I think it would be more valuable than ever to be able to specify "this project requires a minimum |
What is the problem this feature would solve?
In #5845 I was testing with an outdated version of
bun
. Although I was creating a project from scratch, it is possible to catch similar compatibility issues among developers of a given repo by using the"engines"
field ofpackage.json
— in particular,bun
could show a compatibility warning (optionally overridable) instead of erroring deep in implementation code.For those of us testing various versions of
bun
, this could be particularly useful to avoid head-scratching situations. It's also just generally useful for any project that is using features ofbun
as they become available, if any of those projects are checked out by multiple developers or on multiple devices.What is the feature you are proposing to solve the problem?
Support
"bun"
version ranges in the"engines"
field ofpackage.json
for both the project and dependencies.What alternatives have you considered?
Leave things as-is, especially if it's a performance concern?
The text was updated successfully, but these errors were encountered: