Skip to content
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

Replace heroku/nodejs-engine with libcnb.rs implementation #184

Merged
merged 130 commits into from
Mar 9, 2022
Merged

Conversation

joshwlewis
Copy link
Member

@joshwlewis joshwlewis commented Jan 24, 2022

This changes heroku/nodejs-engine from a bash based buildpack to a rust and libcnb.rs version.

Most of the functionality stays the same, but there are some notable differences:

  • heroku/nodejs-engine no longer installs yarn. The heroku/nodejs-yarn buildpack can install yarn today, and that's the more correct place to install it.
  • The Go implementation of the node version resolver has been removed. Instead, I've included a modified version of https://github.com/heroku/resolve-version.rs in a shared rust library here. The shared rust library will be the new home for that functionality. The new resolver leverages the semver-node crate, which has support for Node's flavor of semver.
  • heroku/nodejs-engine no longer installs jq and yj. We're now using serde serialization and deserialization and rust types for working with toml and json files.
  • heroku/nodejs-yarn and heroku/nodejs-npm now install their ownjq instead of expecting it to be installed by heroku/nodejs-enginge.
  • The bash and profile.d implementation of WEB_MEMORY and WEB_CONCURRENCY has been replaced with a rust and exec.d implementation. The new implementation supports cgroups v2.
  • heroku/nodejs-engine is now independently usable. Simple node.js apps with an index.js or server.js and no dependencies can be built with heroku/nodejs-engine alone.

Releasing

Because the installation of jq has changed, we need to release the npm and yarn buildpack before releasing the engine buildpack. Suggested release order:

  1. heroku/nodejs-npm
  2. heroku/nodejs-yarn
  3. heroku/nodejs-engine
  4. heroku/nodejs
  5. heroku/nodejs-function

GUS-W-W-10729118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants