-
Notifications
You must be signed in to change notification settings - Fork 976
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(CLI): add check node version middleware, rm
.nvmrc
, yarn engin…
…es (#9728) Continuation of #8907. Following up on our meeting today (@Tobbe, @thedavidprice; this PR doesn't implement the configurable engines functionality yet). This PR - removes the `.nvmrc` file from CRWA and test project fixtures Setup deploy commands should add node version files if they need them, preferably something nvm agnostic like Netlify's `.node-version` - removes yarn from engines in CRWA's root package.json since it doesn't do anything and just creates confusion - adds a node version check to build and dev This piece of middleware is lightweight; it doesn't involve a child process or the file system, it just checks against `process.version`. I also removed the babel check because it's been ages since we've made that change and original concerns against checking for the node version were about adding overhead tot he CLI. So let's remove unnecessary middleware if we're going to add more Right now, the node version check just emits a warning. Should it error out? (I should've taken better notes.) Build: ![image](https://github.com/redwoodjs/redwood/assets/32992335/e0d2ced6-7b52-448e-96a1-08a45aac64e0) Dev: ![image](https://github.com/redwoodjs/redwood/assets/32992335/d78069eb-bd6c-4ac9-b936-b90f704b5c5c) - [ ] research deploy providers and update `yarn rw setup deploy` commands - [x] settle on warning or error for build and dev - [x] settle on the contents of the message - [x] update CRWA - [x] baremetal Pretty sure it's completely up to you. - [x] coherence Via Nixpacks, `engines.node` in the root package.json: https://nixpacks.com/docs/providers/node#setup. - [x] flightcontrol Via Nixpacks, `engines.node` in the root package.json: https://www.flightcontrol.dev/docs/getting-started/javascript/setting-node-version#using-the-packagejson-file. - [x] netlify Via the `.node-version` file, or via in `netlify.toml`; see https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-and-javascript, https://docs.netlify.com/configure-builds/file-based-configuration/#sample-netlify-toml-file. - [ ] vercel Takes its cue from engines.node in the root package.json: https://vercel.com/docs/functions/serverless-functions/runtimes/node-js#version-overrides-in-package.json. - [x] render Same as netlify more or less, but also respects `engines.node` in the root package.json: https://docs.render.com/docs/node-version.
- Loading branch information
Showing
19 changed files
with
147 additions
and
129 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.