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

feat(cli): unbundle 3rd-party CLIs #434

Merged
merged 12 commits into from
Aug 19, 2021
Merged

feat(cli): unbundle 3rd-party CLIs #434

merged 12 commits into from
Aug 19, 2021

Conversation

louis-bompart
Copy link
Collaborator

Proposed changes

Currently, a large part of the footprint of the CLI is caused by @vue/cli or @angular/cli, or create-react-app.
Unbundling them solves the issue and also ensures that the user will have a smooth ride moving forward when using either of them.

Removed some unused branching in the preconditions factories and add support for auto-fix in precondition

Breaking changes

This is arguable. This could be considered a breaking change on ui:create:angular because we now have a new user interaction branching. However, I do not consider CI/CD usage of this command to be a use case we want to support. Therefore, I'll consider the breaking aspect on iff the input of the command changed (no), or if the output of the command changed (no)

Testing

  • Unit Tests: 💯 unit-tested
  • Functional Tests: If the current tests pass (In the CI I trust 🎲), then it's covered, given that @angular/cli is the tricky bit with the global install, and is not installed in the setup phase (which mean it'll therefore be installed by the preconditions and the Terminal manipulation.
  • Manual Tests: Ran the three commands

CDX-478

@louis-bompart
Copy link
Collaborator Author

louis-bompart commented Aug 17, 2021

Copy link
Contributor

@y-lakhdar y-lakhdar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shia

Copy link
Member

@olamothe olamothe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Nice job

@louis-bompart
Copy link
Collaborator Author

louis-bompart commented Aug 17, 2021

#434 (comment)
#434 (comment)

This is a funny story. I'll start with the short version: Windows. The long one now:

Node.JS rely on libuv/libuv for IO operations (which is fine!). However, libuv/libuv also does that:
https://github.com/libuv/libuv/blob/v1.x/include/uv/errno.h#L245-L249

What this does, is 'if ENOENT is defined, then I set UV__ENOENT to its value, else, I set it to -4058'
POSIX system has an ENOENT defined at a known and easy value: 2 (KISS).
Windows, you guessed it, has not.

So, when a file is missing on Windows, we got a -4058 for errorCode, and 2 for POSIX.
But the fun does not stop there, remember, 'If ENOENT is defined, then I set UV__ENOENT to its value'

Well, Windows user can define ENOENT (or so I read) if they so desire :feelsgood: . Which that the errno is worth nothing and can't be relied upon.

I'll double-check something tho on that given that 'code' is consistent it seems:
image

  • Check if we could use code

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.

3 participants