-
Notifications
You must be signed in to change notification settings - Fork 333
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
Doctor should treat install errors like test errors #1170
Comments
Thanks for the thorough explanation. I totally agree. I have attempted a fix and published it to |
Hm... I'm afraid it didn't work as expected. The following happens :
So when running Hm, I'm not sure how this can be fixed. I assumed ncu doctor would apply a single update to the package.json and then runs I know this is a special case for mostly TypeScript/CoffeScript projects. But even the NPM documentation says that the prepare script (or the deprecated prepublish) can be used for "Compiling CoffeeScript source code into JavaScript." so I think it is safe to say that this is the common standard and it would be nice if ncu could support this. |
Ah, I see. I didn't know that Do you have a repo where I can reproduce the issue? I think I will add |
Here is an example for reproduction: https://github.com/kayahr/ncu-1170 The prepare script is in my project, not in the dependency. |
Thanks so much! That's super helpful. I was able to turn it into an automated test. I added the logic to manually run the prepare script when it is present. Published to |
Works great now. Thank you for the fast response and fix and thanks for this wonderful tool! |
npm-check-updates
node >= 14
The doctor iteration doesn't work for any project which does some kind of compilation/transpilation (Typescript, native stuff, ...) in the prepare stage because in this case after upgrading a dependency the
npm install
step will most likely fail because this triggers the compilation and TypeScript for example throws a compilation error when the compiled code is not compatible with the new dependency. But whennpm install
fails then the doctor immediately aborts.It would be nice if the doctor could treat
npm install
errors the same as when errors occurred duringnpm test
instead of aborting. Otherwise TypeScript projects and other similar projects which performs compilation in the prepare stage can't be doctored by ncu.The text was updated successfully, but these errors were encountered: