-
Notifications
You must be signed in to change notification settings - Fork 26
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
fix(cli): Redirect messages to stderr #53
Conversation
🦋 Changeset detectedLatest commit: d4865bf The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Can you rebase? |
Head branch was pushed to by a user without write access
72b5bfd
to
d88905d
Compare
@magic-akari is attempting to deploy a commit to the SWC Project Team on Vercel. A member of the Team first needs to authorize it. |
Is there any context about why this change was made? |
Error messages should go to the stderr. It’s correct default, so we fixed it. |
That makes sense, although this PR also changed a non-error message, aka: - console.log(message, duration.toFixed(2));
+ stderr.write(message); which in turned broke nx https://github.com/nrwl/nx/blob/master/packages/js/src/utils/swc/compile-swc.ts#L95 - Pretty nasty the way they check for success (instead of exit code) but it broke nonetheless |
This was the reason I ended up here actually. Attempted updating swc in an NX project and learned pretty quick it did not work as expected despite a successful build. |
This is a log, so it should go to |
Improves our error handling for swc when using `@nx/js:swc` executor <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> The executor fails to build if the workspace has a newer versions of `@swc/cli` e.g.(`0.6.0`) is installed since it now uses stderr instead of message to log errors. RE: swc-project/pkgs#53 ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> The executor should pass in this scenario. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #29599
Improves our error handling for swc when using `@nx/js:swc` executor <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> The executor fails to build if the workspace has a newer versions of `@swc/cli` e.g.(`0.6.0`) is installed since it now uses stderr instead of message to log errors. RE: swc-project/pkgs#53 ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> The executor should pass in this scenario. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #29599 (cherry picked from commit 6181592)
Improves our error handling for swc when using `@nx/js:swc` executor <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> The executor fails to build if the workspace has a newer versions of `@swc/cli` e.g.(`0.6.0`) is installed since it now uses stderr instead of message to log errors. RE: swc-project/pkgs#53 ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> The executor should pass in this scenario. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #29599
No description provided.