Skip to content

Conversation

onsclom
Copy link
Contributor

@onsclom onsclom commented May 6, 2024

There were scenarios where the warning "Node.js Version defined in your Project Settings ("18.x") will not apply" would not be triggered. For example:

  1. Project Setting is 18.x
  2. package.json has "engines.node": ">=18.x"
  3. semver.intersects('18.x', '>=18.x') // => true (In this code path) -> No warning message that Node.js Version was changed
  4. After the error message we evaluate the latest node Version to use (20.x) in getSupportedNodeVersion()(this code path)
  5. User doesn't get notified that we changed the node version to something different than their project setting

This fixes that scenario by getting the supported node version first.

Copy link

changeset-bot bot commented May 6, 2024

🦋 Changeset detected

Latest commit: c9ce439

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@vercel/build-utils Patch
vercel Patch
@vercel/client Patch
@vercel/gatsby-plugin-vercel-builder Patch
@vercel/node Patch
@vercel/static-build Patch
@vercel-internals/types Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@onsclom onsclom force-pushed the austinmerrick/zero-1725-print-warning-message-about-changed-node-version-due-to branch from 2abbb69 to 58b832b Compare May 6, 2024 18:42
@onsclom onsclom marked this pull request as ready for review May 6, 2024 22:40
@onsclom onsclom force-pushed the austinmerrick/zero-1725-print-warning-message-about-changed-node-version-due-to branch from ad0130e to 119e2e5 Compare May 7, 2024 16:17
onsclom and others added 2 commits May 8, 2024 13:07
Co-authored-by: Nathan Rajlich <n@n8.io>
@onsclom onsclom added the pr: automerge Automatically merge the PR when checks pass label May 14, 2024
@kodiakhq kodiakhq bot merged commit d3c1267 into main May 14, 2024
@kodiakhq kodiakhq bot deleted the austinmerrick/zero-1725-print-warning-message-about-changed-node-version-due-to branch May 14, 2024 23:23
EndangeredMassa pushed a commit that referenced this pull request May 15, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @vercel/build-utils@8.2.0

### Minor Changes

- fix corepack detection for package manager version determination
([#11596](#11596))

### Patch Changes

- Fix triggering of ignored project settings node version warning
([#11550](#11550))

## vercel@34.2.0

### Minor Changes

- Stop sending system environment variables in dev
([#11526](#11526))

### Patch Changes

- Updated dependencies
\[[`d3c1267e2`](d3c1267),
[`ccd7eb1fb`](ccd7eb1)]:
    -   @vercel/build-utils@8.2.0
    -   @vercel/node@3.1.5
    -   @vercel/static-build@2.5.9

## @vercel/client@13.2.7

### Patch Changes

- Updated dependencies
\[[`d3c1267e2`](d3c1267),
[`ccd7eb1fb`](ccd7eb1)]:
    -   @vercel/build-utils@8.2.0

## @vercel/gatsby-plugin-vercel-builder@2.0.31

### Patch Changes

- Updated dependencies
\[[`d3c1267e2`](d3c1267),
[`ccd7eb1fb`](ccd7eb1)]:
    -   @vercel/build-utils@8.2.0

## @vercel/node@3.1.5

### Patch Changes

- Updated dependencies
\[[`d3c1267e2`](d3c1267),
[`ccd7eb1fb`](ccd7eb1)]:
    -   @vercel/build-utils@8.2.0

## @vercel/static-build@2.5.9

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/gatsby-plugin-vercel-builder@2.0.31

## @vercel-internals/types@1.0.36

### Patch Changes

- Updated dependencies
\[[`d3c1267e2`](d3c1267),
[`ccd7eb1fb`](ccd7eb1)]:
    -   @vercel/build-utils@8.2.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Automatically merge the PR when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants