Gracefully handle error when trying to read package.json in detect#733
Merged
colincasey merged 2 commits intomainfrom Nov 29, 2023
Merged
Gracefully handle error when trying to read package.json in detect#733colincasey merged 2 commits intomainfrom
package.json in detect#733colincasey merged 2 commits intomainfrom
Conversation
This change prevents the detection routine from raising an error during detect if: - there is no `package.json` - there is a `package.json` but it cannot be read for some reason Both error cases will be handled and report a failed detect.
Malax
approved these changes
Nov 27, 2023
joshwlewis
approved these changes
Nov 27, 2023
This was referenced Dec 1, 2023
Merged
colincasey
pushed a commit
that referenced
this pull request
Dec 1, 2023
## heroku/nodejs ### Changed - Updated `heroku/nodejs-corepack` to `2.4.0`. - Updated `heroku/nodejs-engine` to `2.4.0`. - Updated `heroku/nodejs-npm-engine` to `2.4.0`. - Updated `heroku/nodejs-npm-install` to `2.4.0`. - Updated `heroku/nodejs-pnpm-install` to `2.4.0`. - Updated `heroku/nodejs-yarn` to `2.4.0`. ## heroku/nodejs-corepack - No changes. ## heroku/nodejs-engine - Added Node.js version 21.3.0. - Added Node.js version 18.19.0. ### Added - Added Node.js version 21.2.0. - Added Node.js version 20.10.0. ## heroku/nodejs-function ### Changed - Updated `heroku/nodejs-engine` to `2.4.0`. - Updated `heroku/nodejs-function-invoker` to `2.4.0`. - Updated `heroku/nodejs-npm` to `2.4.0`. ## heroku/nodejs-function-invoker - No changes. ## heroku/nodejs-npm ### Changed - This buildpack now implements Buildpack API 0.7 instead of 0.6. ([#721](#721)) ## heroku/nodejs-npm-engine ### Added - Added npm version 10.2.4. - Added npm version 9.9.2. ## heroku/nodejs-npm-install ### Fixed - Detection will report a failure instead of throwing an error when there is no `package.json` file in the application directory. ([#733](#733)) ## heroku/nodejs-pnpm-install ### Added - New symlink from {virtual_layer}/node_modules to {app_dir}/node_modules to support transitory dependency resolution and nuxt apps. ([#737](#737)) ### Changed - Virtual store artifact location has moved form {virtual_layer}/* to {virtual_layer}/store/* to support transitory dependency resolution and nuxt apps. ([#737](#737)) ## heroku/nodejs-yarn ### Added - Added Yarn version 4.0.2. - Added Yarn version 3.7.0. - Added Yarn version 1.22.21. - Added Yarn version 1.22.20. Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change prevents the detection routine from raising an error during detect if:
package.jsonpackage.jsonbut it cannot be read for some reasonBoth error cases will be handled and report a failed detect.
Fixes #722