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
Improve compiler options migration error reporting #18467
Improve compiler options migration error reporting #18467
Conversation
…porting This change provides more fine-grained warnings during the `update-module-and-target-compiler-options` migration for V10.0 in the event a TypeScript configuration file could not be updated. The `JSONFile` utility class was also augmented to directly throw when created to ensure that the `content` property is always initialized.
8f8ceef
to
0c59b90
Compare
@@ -26,7 +25,7 @@ export class JSONFile { | |||
if (buffer) { | |||
this.content = buffer.toString(); | |||
} else { | |||
this.error = new Error(`Could not read ${path}.`); | |||
throw new Error(`Could not read '${path}'.`); |
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.
Much better. :)
Changed to target to |
Hi @filipesilva , @clydin Thanks for the above changes in update-module-and-target-compiler-options.ts. Actually my angular migration from 9 to 10 halted as due to error on in switch case for Builders.NgPackagr in file update-module-and-target-compiler-options.ts. Can you please let me know when would be the master branch containing these above changes done here Thanks, |
Hi @ChaitanyaBabar, this will available in 10.1.0, which will be released as stable some time around end of this month. You can already try this by running |
Thanks for the update. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This change provides more fine-grained warnings during the
update-module-and-target-compiler-options
migration for V10.0 in the event a TypeScript configuration file could not be updated. This can help prevent update issues where, for instance, a tsconfig path was misspelled prior to the update. TheJSONFile
utility class was also augmented to directly throw when creating to ensure that thecontent
property is always initialized.