-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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(core): migration error if program contains files outside of the project #39790
fix(core): migration error if program contains files outside of the project #39790
Conversation
@@ -13,9 +13,7 @@ import {UpdateRecorder} from './update_recorder'; | |||
export class InitialNavigationTransform { | |||
private printer = ts.createPrinter(); | |||
|
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.
The changes in this file aren't required for the fix, they just remove unused code.
…roject Currently all of our migrations are set up to find the tsconfig paths within a project, create a `Program` out of each and migrate the files inside of the `Program`. The problem is that the `Program` can include files outside of the project and the CLI APIs that we use to interact with the file system assume that all files are within the project. These changes consolidate the logic, that determines whether a file can be migrated, in a single place and add an extra check to exclude files outside of the root. Fixes angular#39778.
af761e8
to
001d49a
Compare
…roject (#39790) Currently all of our migrations are set up to find the tsconfig paths within a project, create a `Program` out of each and migrate the files inside of the `Program`. The problem is that the `Program` can include files outside of the project and the CLI APIs that we use to interact with the file system assume that all files are within the project. These changes consolidate the logic, that determines whether a file can be migrated, in a single place and add an extra check to exclude files outside of the root. Fixes #39778. PR Close #39790
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. |
Currently all of our migrations are set up to find the tsconfig paths within a project, create a
Program
out of each and migrate the files inside of theProgram
. The problem is that theProgram
can include files outside of the project and the CLI APIs that we use to interact with the file system assume that all files are within the project.These changes consolidate the logic, that determines whether a file can be migrated, in a single place and add an extra check to exclude files outside of the root.
Fixes #39778.
Note: I wasn't able to reproduce this in a test, because it has to run in an actual CLI project.