-
Notifications
You must be signed in to change notification settings - Fork 361
Refactor | Move the code into different functions #291
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
Refactor | Move the code into different functions #291
Conversation
Avoid mutate the options parameter. https://eslint.org/docs/rules/no-param-reassign.html
Avoid use of chained assignment expressions https://eslint.org/docs/rules/no-multi-assign
It is only called in getName
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.
I read through these changes – they look good to me!
There's more that can be improved here, I think, though refactorings are sometimes easier to read if code is moved "as is" (as was done here) and then improved later.
Tests are failing; haven't dug through to see if it's related to this change.
@paulmelnikow Yes, there are other things that can be improved. |
yeah, tests are unrelated I think, just stupidity on uglify's part |
* Calc the extension and save it in a const to make the code simpler
Feel free to update the snapshots |
* Before pkgName was equal to undefined * Allow passing no-pkg and no-pkg-name tests
I can't update the snapshots, because the tests are working on my machine 😱 Probably its something related to the dependencies. Update: And now are broken, I don't know why. |
Maybe you have to clean npm cache and try to reinstall? If that won't help I'll look into it. |
remove |
I did what you said. For some reason, the tests are creating new folders with the TS declaration files ( |
that's very weird |
bors r+ |
291: Refactor | Move the code into different functions r=ForsakenHarmony a=MatiasOlivera Issue #289 Co-authored-by: Matías Olivera <[email protected]>
Build succeeded |
entries: options.entries, | ||
cwd, | ||
source: options.pkg.source, | ||
module: options.pkg.module, |
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.
I’m curious to learn, unless this is a mistake; how is module
used as an input here?
Issue #289