-
Notifications
You must be signed in to change notification settings - Fork 6.8k
cleanup: migrate migration tool to schematics #10736
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
Conversation
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.
Let me know if you run into issues w/ the bazel stuff
src/lib/schematics/collection.json
Outdated
@@ -9,6 +9,10 @@ | |||
"schema": "./shell/schema.json", | |||
"aliases": ["material-shell"] | |||
}, | |||
"ng-update": { | |||
"description": "Attempts to make fixes to the application to make upgrading from Angular Material 5 to 6 easier", |
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.
How about
Updates API usage for the most recent major version of
Angular CDK and Angular Material
src/lib/schematics/update/update.ts
Outdated
import {TslintFixTask} from '@angular-devkit/schematics/tasks'; | ||
import * as path from 'path'; | ||
|
||
export default function(): Rule { |
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.
Add a comment like Entry point for `ng update` from Angular CLI
?
const moduleSpecifier = declaration.moduleSpecifier.getText(); | ||
return moduleSpecifier.indexOf(materialModuleSpecifier) !== -1|| | ||
moduleSpecifier.indexOf(cdkModuleSpecifier) !== -1; | ||
} |
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.
Should have newline at end.
data => data.replace === symbol.name || data.replace === identifier.text); | ||
|
||
if (!classData) { | ||
console.error(`Could not find updated name for identifier "${identifier.getText()}" in ` + |
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.
Should we console.error or throw error here?
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.
console.error
, we still want to continue trying to detect and fix other issues
} else { | ||
return resolveBinSync('tslint', 'tslint'); | ||
} | ||
} |
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.
Should end w/ new line.
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
@mmalerba Please rebase, thanks |
@tinayuangao done |
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. |
Note: everything in the
update/
directory other thanupdate.ts
is lifted out of https://github.com/angular/material-update-tool