-
Notifications
You must be signed in to change notification settings - Fork 6.8k
chore(schematics): create upgrade schematic for v8 #15442
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
chore(schematics): create upgrade schematic for v8 #15442
Conversation
josephperrott
commented
Mar 11, 2019
- Create the initial v8 upgrade schematic
- Create TSLint rule schematic to update imports to subpackage imports for @angular/material
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.
Very nice! 🎉 Just a few nits.
MatTabsModule, | ||
MatToolbarModule, | ||
MatTooltipModule | ||
} from '@angular/material'; |
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.
Is that test-case incorrect? Shouldn't it import from the secondary entry-points?
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 think you might have not added the rule to he upgrade rules right?
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.
Your right, it looks like it is still not executing. I am not sure what I am missing to have it included as it should be matched by the glob in the BAZEL file.
...ib/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.ts
Show resolved
Hide resolved
...ib/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.ts
Outdated
Show resolved
Hide resolved
...ib/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.ts
Outdated
Show resolved
Hide resolved
...ib/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.ts
Outdated
Show resolved
Hide resolved
...ib/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.ts
Outdated
Show resolved
Hide resolved
...ib/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.ts
Outdated
Show resolved
Hide resolved
...ib/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.ts
Show resolved
Hide resolved
...ib/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.ts
Outdated
Show resolved
Hide resolved
- Create the initial v8 upgrade schematic - Create TSLint rule schematic to update imports to subpackage imports for @angular/material
de06c55
to
272f96d
Compare
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. Some very small whitespace nits.
As mentioned on Slack. I'm not sure if we can get the test case working without bring in Material into the testing environment, or creating a mock. Maybe better in a follow-up?
} | ||
|
||
// The filename for the source file of the node that contains the | ||
// first declaration of the symbol. All symbol declarations must be |
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.
Extra whitespace
return ctx.addFailureAtNode( | ||
element, element.getFullText(sf) + Rule.SYMBOL_FILE_NOT_FOUND_FAILURE_STR); | ||
} | ||
// The module name where the symbol is defined e.g. card, dialog. The |
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.
Extra whitespace
|
||
// If the symbol has no declarations, add failure saying the symbol can't | ||
// be found. | ||
if (!symbol.declarations || !symbol.declarations.length) { |
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.
This should not be necessary now.
|
||
/** | ||
* Builds the recommended fix from a map of the imported symbols found in the | ||
* import declaration. Imports declarations are sorted by module, then by |
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.
Extra whitespace.
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
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. |