-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add npm
to nodejs-engine
build plan
#622
Conversation
A default version of `npm` comes bundled with every Node.js installation so this is now indicated in the build plan. [W-13916400](https://gus.lightning.force.com/a07EE00001XxIOnYAN)
A default version of `npm` comes bundled with every Node.js installation so this is now indicated in the build plan. [W-13916400](https://gus.lightning.force.com/a07EE00001XxIOnYAN)
I understand the high-level truthfulness that this buildpack provides npm, but I don't understand the specific use case of when this is intended to be used. I'm comparing this to the Ruby buildpack which only currently provides I see these provides/requires values more as tags to specific buildpacks than as actual generic features. I could use some help understanding either an app user or buildpack maintainer's perspective on how this is intended to be used versus what's available today. |
in regards to your questions @schneems:
the the way i intended it to be used was in conjunction with #623 and #625 so that the
that would support a standard npm-based application that either:
the strange this about this PR is that providing
which seems surprising. i would think that if a buildpack provides something that is not required by later buildpacks but all other require criteria are met then this should be fine but, from the above error, this doesn't appear to be the case. it seems like this would need to be combined with #623 and #625 to work fully. |
This is part of the spec:
The solution is to have an OR and say ~"(provides node and npm) OR (provides node)" |
thanks, @edmorley. i figured i was misinterpreting what the spec said about the build plan. i didn't realize the implication of the |
I think there is another solution. Have this buildpack also require I don't love the |
@joshwlewis I don't think it's misleading per-se, it's just how the build plan is meant to be used IMO. ie: Let's say I have some other buildpack that only needs Node and doesn't need NPM (eg it's running a JS script that has no dependencies). Without the That is, I think "provides" is meant to be more of a "here are the various scenarios I cater for, pick and match". |
Having this buildpack self-require
Yeah, I think folks who know the CNB spec well understand this. My comment about developer expectations was targeted at someone less familiar (like someone writing a JS script buildpack). |
Ah true :-) |
i also find this usage to be as confusing as the
i'm glad i'm not the only one who finds this contrary to developer expectations.
i'm not sure why an unmet |
@joshwlewis @colincasey What is the status of / next steps for this PR? Both the PR and the associated GUS work item have been in the "awaiting review" state for 2 weeks. |
* main: (48 commits) Remove cutlass job from CI (#675) Update Inventory for heroku/nodejs-npm-engine (#624) Remove cutlass integration tests (#674) Update Inventory for heroku/nodejs-engine (#671) Update Inventory for heroku/nodejs-yarn (#670) Prepare integration tests to run under a single builder (#663) Bump Swatinem/rust-cache from 2.6.2 to 2.7.0 (#665) Bump actions/checkout from 3 to 4 (#664) Bump regex from 1.9.5 to 1.9.6 (#666) Bump thiserror from 1.0.48 to 1.0.49 (#667) Bump ureq from 2.7.1 to 2.8.0 (#668) Bump serde_json from 1.0.105 to 1.0.107 (#669) Fix CNB builder repo URL (#672) Fix non-existent builder Docker image name (#673) Updates `libcnb` to 0.15.0 (#662) Switch tests from `heroku/buildpacks:20` to `heroku/builder:20` (#660) Prepare release v1.1.6 (#658) Bump regex from 1.9.4 to 1.9.5 (#656) Bump indoc from 2.0.3 to 2.0.4 (#657) Bump toml from 0.7.6 to 0.7.8 (#654) ... # Conflicts: # buildpacks/nodejs-engine/CHANGELOG.md
* main: (31 commits) Add `npm` to `nodejs-engine` build plan (#622) Remove cutlass job from CI (#675) Update Inventory for heroku/nodejs-npm-engine (#624) Remove cutlass integration tests (#674) Update Inventory for heroku/nodejs-engine (#671) Update Inventory for heroku/nodejs-yarn (#670) Prepare integration tests to run under a single builder (#663) Bump Swatinem/rust-cache from 2.6.2 to 2.7.0 (#665) Bump actions/checkout from 3 to 4 (#664) Bump regex from 1.9.5 to 1.9.6 (#666) Bump thiserror from 1.0.48 to 1.0.49 (#667) Bump ureq from 2.7.1 to 2.8.0 (#668) Bump serde_json from 1.0.105 to 1.0.107 (#669) Fix CNB builder repo URL (#672) Fix non-existent builder Docker image name (#673) Updates `libcnb` to 0.15.0 (#662) Switch tests from `heroku/buildpacks:20` to `heroku/builder:20` (#660) Prepare release v1.1.6 (#658) Bump regex from 1.9.4 to 1.9.5 (#656) Bump indoc from 2.0.3 to 2.0.4 (#657) ... # Conflicts: # Cargo.lock # Cargo.toml # buildpacks/nodejs-npm-engine/CHANGELOG.md # test_support/Cargo.toml # test_support/src/lib.rs
* main: (31 commits) Add `npm` to `nodejs-engine` build plan (#622) Remove cutlass job from CI (#675) Update Inventory for heroku/nodejs-npm-engine (#624) Remove cutlass integration tests (#674) Update Inventory for heroku/nodejs-engine (#671) Update Inventory for heroku/nodejs-yarn (#670) Prepare integration tests to run under a single builder (#663) Bump Swatinem/rust-cache from 2.6.2 to 2.7.0 (#665) Bump actions/checkout from 3 to 4 (#664) Bump regex from 1.9.5 to 1.9.6 (#666) Bump thiserror from 1.0.48 to 1.0.49 (#667) Bump ureq from 2.7.1 to 2.8.0 (#668) Bump serde_json from 1.0.105 to 1.0.107 (#669) Fix CNB builder repo URL (#672) Fix non-existent builder Docker image name (#673) Updates `libcnb` to 0.15.0 (#662) Switch tests from `heroku/buildpacks:20` to `heroku/builder:20` (#660) Prepare release v1.1.6 (#658) Bump regex from 1.9.4 to 1.9.5 (#656) Bump indoc from 2.0.3 to 2.0.4 (#657) ... # Conflicts: # Cargo.lock # Cargo.toml # meta-buildpacks/nodejs/buildpack.toml # test_support/Cargo.toml # test_support/src/lib.rs
## heroku/nodejs ### Changed - Updated `heroku/nodejs-corepack` to `1.1.7`. - Updated `heroku/nodejs-engine` to `1.1.7`. - Updated `heroku/nodejs-npm` to `1.1.7`. - Updated `heroku/nodejs-pnpm-install` to `1.1.7`. - Updated `heroku/nodejs-yarn` to `1.1.7`. ## heroku/nodejs-corepack - No changes. ## heroku/nodejs-engine - Added Node.js version 20.8.1. - Added Node.js version 18.18.2. - Added Node.js version 18.18.1. - Added Node.js version 20.8.0. - Provides `npm` added to the build plan since a default version of `npm` is bundled with Node.js. ([#622](#622)) ## heroku/nodejs-function ### Changed - Updated `heroku/nodejs-engine` to `1.1.7`. - Updated `heroku/nodejs-function-invoker` to `1.1.7`. - Updated `heroku/nodejs-npm` to `1.1.7`. ## heroku/nodejs-function-invoker - No changes. ## heroku/nodejs-npm - No changes. ## heroku/nodejs-pnpm-install - No changes. ## heroku/nodejs-yarn - Added Yarn version 4.0.0-rc.53. - Added Yarn version 4.0.0-rc.52. - Added Yarn version 3.6.4. Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com>
* main: Added `nodejs-npm-install` Buildpack (#625) Added `nodejs-npm-engine` Buildpack (#623) Prepare release v1.1.7 (#683) Update Inventory for heroku/nodejs-engine (#682) Update Inventory for heroku/nodejs-engine (#681) Update Inventory for heroku/nodejs-npm-engine (#678) Bump the rust-dependencies group with 2 updates (#680) Group minor/patch version Rust Dependabot updates into one PR (#679) Add `npm` to `nodejs-engine` build plan (#622) # Conflicts: # buildpacks/nodejs-engine/tests/fixtures/node-with-indexjs/package-lock.json # buildpacks/nodejs-engine/tests/fixtures/node-with-serverjs/package-lock.json # buildpacks/nodejs-engine/tests/integration_test.rs
A default version of
npm
comes bundled with every Node.js installation so this is now indicated in the build plan.W-13916400