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

Support No package.json #15

Merged
merged 1 commit into from
Oct 16, 2020
Merged

Support No package.json #15

merged 1 commit into from
Oct 16, 2020

Conversation

nebhale
Copy link
Member

@nebhale nebhale commented Oct 16, 2020

Previously the NodeJSMainModule function would return an error if a NodeJS application did not have a package.json file. This was incorrect as it is possible to have a legal NodeJS application without one and the Paketo NodeJS buildpack supports this style of application.

This change updates the detection logic to return server.js in cases where there is no package.json or the package.json does not explicitly identify a main, in line with the behavior of the Paketo NodeJS buildpack.

Previously the NodeJSMainModule function would return an error if a NodeJS
application did not have a package.json file.  This was incorrect as it is
possible to have a legal NodeJS application without one and the Paketo NodeJS
buildpack supports this style of application.

This change updates the detection logic to return server.js in cases where
there is no package.json or the package.json does not explicitly identify a
main, in line with the behavior of the Paketo NodeJS buildpack.

Signed-off-by: Ben Hale <[email protected]>
@nebhale nebhale requested a review from a team October 16, 2020 14:46
@nebhale nebhale added semver:minor A change requiring a minor version bump type:enhancement A general enhancement labels Oct 16, 2020
@nebhale nebhale closed this Oct 16, 2020
@nebhale nebhale reopened this Oct 16, 2020
@ekcasey ekcasey merged commit 2bd382b into main Oct 16, 2020
@ekcasey ekcasey deleted the no-package-json branch October 16, 2020 16:03
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