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

Gracefully handle error when trying to read package.json in detect #733

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

colincasey
Copy link
Contributor

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.

Fixes #722

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.
@colincasey colincasey self-assigned this Nov 24, 2023
@colincasey colincasey requested a review from a team as a code owner November 24, 2023 18:52
@colincasey colincasey merged commit f1a7028 into main Nov 29, 2023
21 checks passed
@colincasey colincasey deleted the issue_722_detection_error branch November 29, 2023 16:42
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

heroku/nodejs-npm-install is erroring instead of gracefully failing detection, causing log spam
3 participants