-
Notifications
You must be signed in to change notification settings - Fork 617
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
Webiny CLI - Improving System Requirements Checks #4448
Merged
Merged
Conversation
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
(cherry picked from commit 80b12cd)
adrians5j
changed the title
Adrian/check node v
Webiny CLI - Throw An Error If Invalid Node Version Used
Dec 13, 2024
adrians5j
changed the title
Webiny CLI - Throw An Error If Invalid Node Version Used
Webiny CLI - Throw An Error If An Invalid Node Version Is Used
Dec 13, 2024
adrians5j
changed the title
Webiny CLI - Throw An Error If An Invalid Node Version Is Used
Webiny CLI - Throw An Error If An Unsupported Node Version Is Used
Dec 13, 2024
adrians5j
changed the title
Webiny CLI - Throw An Error If An Unsupported Node Version Is Used
Centralized System Requirements Checks
Dec 31, 2024
adrians5j
changed the title
Centralized System Requirements Checks
Improving the System Requirements Checks
Dec 31, 2024
adrians5j
changed the title
Improving the System Requirements Checks
Improving System Requirements Checks
Dec 31, 2024
adrians5j
changed the title
Improving System Requirements Checks
Webiny CLI - Improving System Requirements Checks
Dec 31, 2024
…heck-node-v # Conflicts: # packages/api-prerendering-service/src/render/renderUrl.ts # packages/app-page-builder-elements/src/hooks/useLoader.ts # packages/app-page-builder/src/PageBuilder.tsx # packages/cli/cli.js # packages/create-webiny-project/bin.js # yarn.lock
/cypress |
Cypress E2E tests have been initiated (for more information, click here). ✨ |
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.
Changes
With this PR, we're centralizing the system requirements checks. By "system requirements checks", we mean checks that ensure proper versions of tools are installed on user's machine:
Prior to this PR, these checks were implemented in a couple of places (copy/pasted), making it hard when it comes to maintenance. For example, both
create-webiny-project
and@webiny/cli
packages had their own sys reqs checking-related code.We've centralized this via a separate
@webiny/system-requirements
package, which not only performs the checks, but also contains theconstraints.json
file, which is now a single source of truth when it comes to the required versions of tools Webiny relies on:With this in place, whenever we end up in a situation where we need to change these, we can just go into this file, and both
create-webiny-project
and@webiny/cli
will start respecting the new requirements.In the future, we might even rely on this file in other places (like in docs, or in our README.md file), in order to display the system requirements and keep them up to date (we've had cases where there was a mismatch between what was in our docs, and what was actually in the code).
Additional Changes
1. Improved Reporting
In case a system requirement is not satisfied, we now show a full report of which system requirements are in order, and which are not.
2. Removed Duplicate Code
As mentioned, we've removed multiple instances of code that was performing the system requirements checks. We've also utilized the
SystemRequirements
class and its static methods likegetNodeVersion
to retrieve currently installed versions upon running thewebiny about
command.How Has This Been Tested?
Manually.
Documentation
Maybe changelog.