-
Notifications
You must be signed in to change notification settings - Fork 52
Conversation
I'll review this tomorrow. (Sorry for delay) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great work! 😊
But I'm a bit worried about the version of dependencies.
Thank you! And are you referring to Node 10 support or just some of the other package dependencies (I know commander is several major versions behind)? I should have time to address those if you need me to. |
@kherock I meant the versions of dependencies. |
fixes file copying and inline sourcemaps in directory mode
7386945
to
d8baed7
Compare
@kdy1 I upgraded the remaining dependencies and pinned the peer dependency for chokidar. I should be done here! |
Thanks! |
I tried publishing but it resulted in an error. |
Do you have any details I can help resolve? I'm not able to reproduce any publishing errors. I just attempted to publish a the package under my own npm scope and it seems to be working fine: https://www.npmjs.com/package/@kherock/swc-cli |
@kherock Sorry. I reinstalled node dependencies and it works. |
This consolidates most of the logic within the dir and file modes of the CLI, around 100 lines were able to be removed. Due to Node 10's EOL in April and there being places where
flatMap
andfs.rmdir(..., { recursive: true })
are helpful, I've bumped the minimum Node version to v12. Let me know if it's an issue to be dropping Node 10 support a bit prematurely.This closes both #11 and #17. This also provides a simple fix to swc-project/swc#1255 (I've documented the root cause as a comment referencing swc-project/swc#1388).
I noticed 3 options on the
CliOptions
interface that had no corresponding commander option that I removed:Aside from that, I thought it was strange behavior to have
--quiet
prevent errors from writing to stderr. It already had no influence over the unhandled promise rejection handler, so now errors will log in a few more places regardless of the presence of--quiet
. Additionally, I made it so that file deletions in directory watch mode will delete output files when they exist. Aside from these, no new behavior was added.