Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace heroku/nodejs-engine with libcnb.rs implementation (#184)
* Add a rudimentary nodejs buildpack * Add rudimentary shared lib for libcnb buildpacks * s/ruby/node * Move package_json into it's own mod * Bring in resolve-version.rs * Use node-semver over semver * Add resolve-version.rs bins * Rename version bins * Move version parsing to lib * Refactor and deserialize package.json versions as node semver requirements * Move version to versions * Move libnodejs to libcncb-nodejs * Parse requested node version from package.json * Get version detection and resolution working * Cache and reuse if node version hasn't changed * Use compile target to determine default release * Drop debug lines * s/Software/Inventory * s/RuntimeLayer/DistLayer/ * Detect server.js or index.js as default process * Add integration tests for nodejs-runtime * Drop inventory dir * Set provides and requires for nodejs-runtime * Use layer metadata to evaluate dist layer reuse * Use cargo workspaces * Create set_web_concurrency.rs * Set WEB_CONCURRENCY via exec.d * Attempt to read memory from cgroups v2 and cgroups v1 as a fallback * Replace nodejs-engine with nodejs-runtime * Drop extra Cargo.lock * Update libcnb-test dependency to use git over local * Update buildpack.toml with homepage * Drop reqwest,tokio,openssl * Use released libcnb versions * WebLayer -> WebEnvLayer * Drop util in favor of libherokubuildpack * Improve error typing * Improve error messaging * Run rust fmt * Add error messaging * Use libherokubuildpack logging * Update integration tests to match new logging * Adjust detection conditions * Add cargo test and rust fmt to circle build * Install pack-cli in circle builds * Don't run shpec on nodejs-engine * Add a nodejs-engine build script * Use the machine executor for cargo test * Bump nodejs-engine in test/meta-buildpacks * Add missing build.sh script * Don't setup remote docker for cargo test * Install rust when packaging buildpacks * Install rust when running cutlass tests * Use release target for build.sh * Update nodejs-engine version for meta-buildpacks test * yarn buildpack should install it's own yj * Add missing logging functionality to yarn buildpack * Include [types] table for the toolbox * npm buildpack should install it's own yj * Fix shellcheck issue * Restore lost messaging * Adjust messaging expectations * Fix more shell linting issues * Update all buildpacks to 0.6 * Add [types] table to a few layers to support newer buildpack api * Adjust nodejs-engine logging * Apply cargo fmt * Update changelogs * Move nodejs to dist layer bin so that PATH changes aren't required * Run clippy in CI * Apply clippy * Fix linting issues * Drop superfluous postfix on error variants * Additional lint fixes * Update the nodejs-engine README * Update root README.md * Adjust casing for keywords * s/libcnb-nodejs/libhkcnb-nodejs/ * Prune dependencies * Get a little more critical with lints * Add #[must_use] where appropriate * Allow module_name_repetitions * Drop unused tempfile crate form libhkcnb-nodejs * Update lockfile * Add missing Cargo.toml fields * Address clippy::missing_errors_doc * Add a small README.md for libhkcnb-nodejs * Address clippy::cargo_common_metadata * Specify rust version * Resolve clippy::single_char_pattern * Apply additional clippy fixes * More cargo fmt * Split inventory functionality out into inv package * Move inventory read functionality into lib * Cargo fmt * Rename Ver and Req to Version and Requirement * Rename versions::Ver,Req to vrs::Version,Requirement * Update libhkcnb-nodejs/src/package_json.rs Co-authored-by: Manuel Fuchs <manuel.fuchs@salesforce.com> * Improve launchjs detection * Drop a few lets in version_range fetching * Simplify detection * Simplify layer initialization * Use StackId from libcnb::data * Use derived Eq to detect layer strategy * Create helper function for initializing metadata * Update .circleci/config.yml Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> * Update .circleci/config.yml Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> * Fix clippy command in CI Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> * Drop superfluous .buildpacks call in test Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> * Drop superfluous .buildpacks call in test Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> * Update base image for CI tests Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> * Output files checked with cargo fmt Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> * Refactor web_env * Add clippy pedantic in more places * Remove unused dependency in integration test * Break apart integration and unit tests, fix CI * Import test dependencies to silence unused dep clippy * Use 1.58 as minimum rust version Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> * Update README.md dependencies * Don't install libcnb-cargo for integration tests * Set publish = false and drop cargo metadata Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> * Update cargo manifests * Drop 'Buildpack' suffix from buildpack name * Upgrade to libcnb-test 0.3.0 * Use assert_contains from libcnb-test * Use assert_contains from libcnb_test * Move shared rust lib to common/nodejs-utils * Group and organize use statements * Bump minor versions for yarn and npm buildpacks * Update test meta-buildpacks to point at new npm/yarn buildpack versions Co-authored-by: Manuel Fuchs <manuel.fuchs@salesforce.com> Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
- Loading branch information