Skip to content

Commit 02cc9c0

Browse files
committedJul 20, 2021
refactor(@angular-devkit/schematics-cli): sync schematics dependencies using Renovate
With this change we sync schematic dependencies using Renovate.
1 parent 14df2aa commit 02cc9c0

File tree

13 files changed

+30
-27
lines changed

13 files changed

+30
-27
lines changed
 

‎.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
/goldens/public-api
44
/packages/angular_devkit/build_angular/test/
55
/packages/angular_devkit/build_webpack/test/
6+
/packages/angular_devkit/schematics_cli/blank/project-files/
7+
/packages/angular_devkit/schematics_cli/blank/schematic-files/
68
/packages/angular_devkit/schematics_cli/schematic/files/
79
/tests/
810
.yarn/

‎.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
/goldens/public-api
55
/packages/angular_devkit/build_angular/test/
66
/packages/angular_devkit/core/src/workspace/json/test/
7+
/packages/angular_devkit/schematics_cli/blank/project-files/
8+
/packages/angular_devkit/schematics_cli/blank/schematic-files/
9+
/packages/angular_devkit/schematics_cli/schematic/files/
710
/README.md
811
/CONTRIBUTING.md
912
.yarn/

‎packages/angular_devkit/schematics_cli/blank/factory.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ import {
2222
Tree,
2323
UpdateRecorder,
2424
apply,
25-
applyTemplates,
2625
chain,
2726
mergeWith,
2827
move,
28+
template,
2929
url,
3030
} from '@angular-devkit/schematics';
3131
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
@@ -116,7 +116,7 @@ export default function (options: Schema): Rule {
116116
} catch {}
117117

118118
let source = apply(url('./schematic-files'), [
119-
applyTemplates({
119+
template({
120120
...options,
121121
coreVersion,
122122
schematicsVersion,
@@ -130,7 +130,7 @@ export default function (options: Schema): Rule {
130130
if (!collectionPath) {
131131
collectionPath = normalize('/' + options.name + '/src/collection.json');
132132
source = apply(url('./project-files'), [
133-
applyTemplates({
133+
template({
134134
...(options as object),
135135
coreVersion,
136136
schematicsVersion,

‎packages/angular_devkit/schematics_cli/blank/project-files/README.md.template renamed to ‎packages/angular_devkit/schematics_cli/blank/project-files/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This repository is a basic Schematic implementation that serves as a starting po
77
To test locally, install `@angular-devkit/schematics-cli` globally and use the `schematics` command line tool. That tool acts the same as the `generate` command of the Angular CLI, but also has a debug mode.
88

99
Check the documentation with
10+
1011
```bash
1112
schematics --help
1213
```
@@ -25,4 +26,3 @@ npm publish
2526
```
2627

2728
That's it!
28-

‎packages/angular_devkit/schematics_cli/blank/project-files/__dot__gitignore.template renamed to ‎packages/angular_devkit/schematics_cli/blank/project-files/__dot__gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Outputs
23
src/**/*.js
34
src/**/*.js.map
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Ignores TypeScript files, but keeps definitions.
23
*.ts
34
!*.d.ts
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
22
"$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
3-
"schematics": {
4-
}
3+
"schematics": {}
54
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
22
"compilerOptions": {
33
"baseUrl": "tsconfig",
4-
"lib": [
5-
"es2018",
6-
"dom"
7-
],
4+
"lib": ["es2018", "dom"],
85
"declaration": true,
96
"module": "commonjs",
107
"moduleResolution": "node",
@@ -20,15 +17,8 @@
2017
"sourceMap": true,
2118
"strictNullChecks": true,
2219
"target": "es6",
23-
"types": [
24-
"jasmine",
25-
"node"
26-
]
20+
"types": ["jasmine", "node"]
2721
},
28-
"include": [
29-
"src/**/*"
30-
],
31-
"exclude": [
32-
"src/*/files/**/*"
33-
]
22+
"include": ["src/**/*"],
23+
"exclude": ["src/*/files/**/*"]
3424
}
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { Tree } from '@angular-devkit/schematics';
22
import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
33
import * as path from 'path';
44

5-
65
const collectionPath = path.join(__dirname, '../collection.json');
76

8-
97
describe('<%= dasherize(name) %>', () => {
108
it('works', async () => {
119
const runner = new SchematicTestRunner('schematics', collectionPath);
12-
const tree = await runner.runSchematicAsync('<%= dasherize(name) %>', {}, Tree.empty()).toPromise();
10+
const tree = await runner
11+
.runSchematicAsync('<%= dasherize(name) %>', {}, Tree.empty())
12+
.toPromise();
1313

1414
expect(tree.files).toEqual([]);
1515
});

‎renovate.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,19 @@
4444
"enabled": false
4545
},
4646
{
47-
"matchPaths": ["packages/schematics/angular/utility/latest-versions/package.json"],
47+
"matchPaths": [
48+
"packages/angular_devkit/schematics_cli/blank/project-files/package.json",
49+
"packages/angular_devkit/schematics_cli/schematic/files/package.json",
50+
"packages/schematics/angular/utility/latest-versions/package.json"
51+
],
4852
"matchPackagePatterns": ["*"],
4953
"groupName": "schematics dependencies",
50-
"groupSlug": "all-schematics-ependencies"
54+
"groupSlug": "all-schematics-dependencies"
5155
},
5256
{
53-
"excludePackagePatterns": [
57+
"matchPaths": [
58+
"!packages/angular_devkit/schematics_cli/blank/project-files/package.json",
59+
"!packages/angular_devkit/schematics_cli/schematic/files/package.json",
5460
"!packages/schematics/angular/utility/latest-versions/package.json"
5561
],
5662
"matchPackagePatterns": ["*"],

‎tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
"goldens/**/*",
5858
"**/node_modules/**/*",
5959
"**/third_party/**/*",
60-
"packages/angular_devkit/schematics_cli/*/files/**/*",
60+
"packages/angular_devkit/schematics_cli/blank/*-files/**/*",
61+
"packages/angular_devkit/schematics_cli/schematic/files/**/*",
6162
"packages/angular_devkit/*/test/**/*",
6263
"packages/schematics/*/*/*files/**/*",
6364
"tests/**/*",

0 commit comments

Comments
 (0)
Please sign in to comment.