Skip to content

Commit be6eeb2

Browse files
committed
fix: 🐛 use real data to replace
1 parent 63b6f68 commit be6eeb2

File tree

5 files changed

+80
-32
lines changed

5 files changed

+80
-32
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
- uses: actions/checkout@v2
2222
- uses: ./
2323
with:
24-
milliseconds: 1000
24+
angular_version: 8.0.0

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# GitHub Action - Match Angular Versions
22

3+
> DISCLAIMER: THIS ACTION IS HIGHLY EXPERIMENTAL.
4+
35
This GitHub Action (written in JavaScript) modifies the root `package.json` of a project and replaces the version of all **Angular** related dependencies for given base version.
46

57
[![ngworker](https://img.shields.io/badge/ngworker-%40-red)](https://github.com/ngworker/)

src/angular-versions.ts

Lines changed: 63 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,83 @@ export const versions = new Map<string, PackageJsonVersion>([
55
'8.0.0',
66
{
77
dependencies: {
8-
'@angular/animations': 'string',
9-
'@angular/common': 'string',
10-
'@angular/compiler': 'string',
11-
'@angular/core': 'string',
12-
'@angular/forms': 'string',
13-
'@angular/platform-browser': 'string',
14-
'@angular/platform-browser-dynamic': 'string',
15-
'@angular/router': 'string',
16-
rxjs: 'string',
17-
'zone.js': 'string'
8+
'@angular/animations': '~8.0.3',
9+
'@angular/common': '~8.0.3',
10+
'@angular/compiler': '~8.0.3',
11+
'@angular/core': '~8.0.3',
12+
'@angular/forms': '~8.0.3',
13+
'@angular/platform-browser': '~8.0.3',
14+
'@angular/platform-browser-dynamic': '~8.0.3',
15+
'@angular/router': '~8.0.3',
16+
rxjs: '~6.4.0',
17+
tslib: '^1.9.0',
18+
'zone.js': '~0.9.1'
19+
},
20+
devDependencies: {
21+
'@angular-devkit/build-angular': '~0.800.6',
22+
'@angular/cli': '~8.0.6',
23+
'@angular/compiler-cli': '~8.0.3',
24+
'@types/node': '~8.9.4',
25+
codelyzer: '^5.0.0',
26+
'ts-node': '~7.0.0',
27+
tslint: '~5.15.0',
28+
typescript: '~3.4.3'
1829
}
1930
}
2031
],
2132
[
2233
'9.0.0',
2334
{
2435
dependencies: {
25-
'@angular/animations': 'string',
26-
'@angular/common': 'string',
27-
'@angular/compiler': 'string',
28-
'@angular/core': 'string',
29-
'@angular/forms': 'string',
30-
'@angular/platform-browser': 'string',
31-
'@angular/platform-browser-dynamic': 'string',
32-
'@angular/router': 'string',
33-
rxjs: 'string',
34-
'zone.js': 'string'
36+
'@angular/animations': '~9.0.7',
37+
'@angular/common': '~9.0.7',
38+
'@angular/compiler': '~9.0.7',
39+
'@angular/core': '~9.0.7',
40+
'@angular/forms': '~9.0.7',
41+
'@angular/platform-browser': '~9.0.7',
42+
'@angular/platform-browser-dynamic': '~9.0.7',
43+
'@angular/router': '~9.0.7',
44+
rxjs: '~6.5.4',
45+
tslib: '^1.10.0',
46+
'zone.js': '~0.10.2'
47+
},
48+
devDependencies: {
49+
'@angular-devkit/build-angular': '~0.900.7',
50+
'@angular/cli': '~9.0.7',
51+
'@angular/compiler-cli': '~9.0.7',
52+
'@types/node': '^12.11.1',
53+
codelyzer: '^5.1.2',
54+
'ts-node': '~8.3.0',
55+
tslint: '~5.18.0',
56+
typescript: '~3.7.5'
3557
}
3658
}
3759
],
3860
[
3961
'10.0.0',
4062
{
4163
dependencies: {
42-
'@angular/animations': 'string',
43-
'@angular/common': 'string',
44-
'@angular/compiler': 'string',
45-
'@angular/core': 'string',
46-
'@angular/forms': 'string',
47-
'@angular/platform-browser': 'string',
48-
'@angular/platform-browser-dynamic': 'string',
49-
'@angular/router': 'string',
50-
rxjs: 'string',
51-
'zone.js': 'string'
64+
'@angular/animations': '~10.0.14',
65+
'@angular/common': '~10.0.14',
66+
'@angular/compiler': '~10.0.14',
67+
'@angular/core': '~10.0.14',
68+
'@angular/forms': '~10.0.14',
69+
'@angular/platform-browser': '~10.0.14',
70+
'@angular/platform-browser-dynamic': '~10.0.14',
71+
'@angular/router': '~10.0.14',
72+
rxjs: '~6.5.5',
73+
tslib: '^2.0.0',
74+
'zone.js': '~0.10.3'
75+
},
76+
devDependencies: {
77+
'@angular-devkit/build-angular': '~0.1000.8',
78+
'@angular/cli': '~10.0.8',
79+
'@angular/compiler-cli': '~10.0.14',
80+
'@types/node': '^12.11.1',
81+
codelyzer: '^6.0.0',
82+
'ts-node': '~8.3.0',
83+
tslint: '~6.1.0',
84+
typescript: '~3.9.5'
5285
}
5386
}
5487
]

src/main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as core from '@actions/core';
2-
import * as fs from 'fs';
32
import {getAngularVersion} from './get-angular-versions';
43
import {overrideAngularVersions} from './override-angular-versions';
54

src/types/package-json-version.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,19 @@ export interface PackageJsonVersion {
1010
'@angular/router': string;
1111
rxjs: string;
1212
'zone.js': string;
13+
tslib: string;
14+
[deps: string]: string;
15+
};
16+
17+
devDependencies: {
18+
'@angular-devkit/build-angular': string;
19+
'@angular/cli': string;
20+
'@angular/compiler-cli': string;
21+
'@types/node': string;
22+
codelyzer: string;
23+
'ts-node': string;
24+
tslint: string;
25+
typescript: string;
26+
[deps: string]: string;
1327
};
1428
}

0 commit comments

Comments
 (0)