Skip to content

chore(schematics): fix formatting in workflow document #13216

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions src/lib/schematics/update/update-schematic.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ This also makes the rule walker API consistent with the handling of inline resou
```ts
// PSEUDO CODE
visitExternalTemplate(node: ts.SourceFile) {
const parsed = parse5.parse(node.getFullText()); this._findOutdatedInputs()
.forEach(offsetStart => this._addExternalFailure(offsetStart, 'Outdated input', _myFix);}
const parsedHtml = parse5.parse(node.getFullText());

this._findOutdatedInputs(parsedHtml)
.forEach(offsetStart => this._addExternalFailure(offsetStart, 'Outdated input', _myFix);}
```

### Upgrade data for target versions
Expand Down Expand Up @@ -112,37 +114,47 @@ In the scenario where a property from `MatRipple` has been renamed in V7, we don
_src/lib/schematics/update/test-cases/v7/property-names_input.ts_
```ts
...

/**
* Mock definitions. This test case does not have access to @angular/material. */
* Mock definitions. This test case does not have access to @angular/material.
*/
class MatRipple {
color: string;
}
/*

/*
* Actual test cases using the previously defined definitions.
*/
class A implements OnInit {
constructor(private a: MatRipple) {}
class A implements OnInit {
constructor(private a: MatRipple) {}

ngOnInit() {
this.a.color = 'primary';
} }
}
}
```

_src/lib/schematics/update/test-cases/v7/property-names_expected_output.ts_
```ts
...

/**
* Mock definitions. This test case does not have access to @angular/material. */
* Mock definitions. This test case does not have access to @angular/material.
*/
class MatRipple {
color: string;
}
/*

/*
* Actual test cases using the previously defined definitions.
*/
class A implements OnInit {
constructor(private a: MatRipple) {}
class A implements OnInit {
constructor(private a: MatRipple) {}

ngOnInit() {
this.a.newColor = 'primary';
} }
}
}
```

**Note**: The `_input.ts` file will be just transformed by the V7 migrations and compared to the `_expected_output.ts` file. This means that it's necessary to also include the no longer valid mock declarations to the expected output file.