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

Enable support for Node & Yarn installation #215

Closed
wants to merge 1 commit into from

Conversation

pivotal-david-osullivan
Copy link
Contributor

Summary

This PR adds support for detection of a package.json or yarn.lock, which will cause the following buildpacks/dependencies to be required as part of the build:

  • yarn.lock - requires install of yarn and node dependencies (can be provided by the yarn & node-engine buildpacks)
  • package.json - requires install of node dependency (can be provided by the node-engine buildpack)

The Javascript package manager file should be specified with the environment variable BP_JS_PACKAGE_MANAGER_FILE, which expects a path relative to your application root and points to a package.json or yarn.lock file. This variable defaults to "", therefore requiring explicit opt-in to this feature.

This will require both the Yarn and NodeEngine buildpacks to be added to the Java composite order group as optional.

Use Cases

Enables projects which build frontend/javascript code to run commands such as 'yarn' to build alongside Java code. See paketo-buildpacks/java#651.

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@pivotal-david-osullivan pivotal-david-osullivan added semver:minor A change requiring a minor version bump type:enhancement A general enhancement labels Feb 14, 2023
@pivotal-david-osullivan pivotal-david-osullivan requested a review from a team as a code owner February 14, 2023 14:04
@dmikusa
Copy link
Contributor

dmikusa commented Feb 18, 2023

Going with #216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants