-
Notifications
You must be signed in to change notification settings - Fork 3
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 function to get version from package.json #10
Conversation
package_json_parser needs to parse version to be re-used in npm-install buildpack. Signed-off-by: Michael Dawson <[email protected]>
This is the change to make npm-install use the new functioality. Will submit a PR on paketo-buildpacks/npm-install once this PR lands and there is a new version of libnodejs - mhdawson/npm-install@6a25e53 |
@thitch97 any chance you could take a look? |
|
||
context("ParseVersion", func() { | ||
it.Before(func() { | ||
Expect(os.WriteFile(filePath, []byte(`{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhdawson Each time the file is written, can it be deleted to keep things clean? (it.After
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure will look at doing that in next few days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed commit do do cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine but I'm worried about lingering files.
Signed-off-by: Michael Dawson <[email protected]>
@TisVictress pushed commit to add cleanup of workingDir after every test. All files are written to that workingDir so that should makes sure that all files writen are deleted after the test completes. |
@TisVictress ping |
package_json_parser needs to parse version to be
re-used in npm-install buildpack.
Summary
Add parsing version in package.json helpers so that shared code
can be reused in npm-install
Use Cases
reduce duplicated code and centralize knowledge of constants
Checklist