Skip to content

Update the legacy NPM buildpack to Buildpack API 0.7#721

Merged
edmorley merged 1 commit intomainfrom
edmorley/npm-buildpack-api-0.7
Nov 15, 2023
Merged

Update the legacy NPM buildpack to Buildpack API 0.7#721
edmorley merged 1 commit intomainfrom
edmorley/npm-buildpack-api-0.7

Conversation

@edmorley
Copy link
Copy Markdown
Member

@edmorley edmorley commented Nov 15, 2023

Since Buildpack API 0.6 has been deprecated for some time, and is no longer supported by newer versions of lifecycle, which is causing CI to fail since the integration tests in this repo use heroku/builder:22, which has just had its lifecycle version upgraded:
heroku/cnb-builder-images#431

These CI failures are not reflective of production (which is working fine), since Functions in production are actually run via the functions builder image (and not heroku/builder:22), which was intentionally left on the old lifecycle version. However, this functions builder image is not available on Docker Hub, so can't be used by the integration tests in this repo.

Improving parity of the integration tests here might be worth considering longer term, however, upgrading the Buildpack API version was a simpler (and arguably correct thing to do regardless) step for now.

There are no breaking changes that affect this buildpack in the new API version, so no buildpack changes were required:
https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.7

Fixes #720.
GUS-W-14493124.

Since Buildpack API 0.6 has been deprecated for some time, and is no
longer supported by newer versions  of `lifecycle`, which is causing
CI to fail since the integration tests in this repo use `heroku/builder:22`,
which has just had its lifecycle version upgraded:
heroku/cnb-builder-images#431

Functions in production are actually run via the functions builder image
(and not `heroku/builder:22`), which was intentionally left on the old
lifecycle version for this reason. However, this functions builder image
is not available on Docker Hub, so can't be used by the integration tests
in this repo.

Improving parity of the integration tests here might be worth considering
longer term, however, upgrading the Buildpack API version was a simpler
(and arguably correct thing to do regardless) step for now.

There are no breaking changes that affect this buildpack in the new API
version, so no buildpack changes were required:
https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.7

Fixes #720.
@edmorley edmorley self-assigned this Nov 15, 2023
@edmorley edmorley marked this pull request as ready for review November 15, 2023 08:50
@edmorley edmorley requested a review from a team as a code owner November 15, 2023 08:50
@edmorley edmorley enabled auto-merge (squash) November 15, 2023 08:54
@edmorley edmorley merged commit 8e947ee into main Nov 15, 2023
@edmorley edmorley deleted the edmorley/npm-buildpack-api-0.7 branch November 15, 2023 19:26
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>
edmorley added a commit to heroku/cnb-builder-images that referenced this pull request May 1, 2024
The Bash based NPM buildpack is no longer using one of
the unsupported Buildpack API versions as of:
heroku/buildpacks-nodejs#721

As such, the comment in the functions builder about why
an older `lifecycle` version is being used can be updated
to reference only the custom buildpacks reason instead.
edmorley added a commit to heroku/cnb-builder-images that referenced this pull request May 1, 2024
#501)

The Bash based NPM buildpack is no longer using one of
the unsupported Buildpack API versions as of:
heroku/buildpacks-nodejs#721

As such, the comment in the functions builder about why
an older `lifecycle` version is being used can be updated
to reference only the custom buildpacks reason instead.
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.

CI failing in nodejs-function-invoker job on main

2 participants