File tree Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,15 @@ async function run(): Promise<void> {
13
13
const filePath : string = core . getInput ( 'file_path' ) ;
14
14
core . debug ( `merging found dependencies with file ${ filePath } ` ) ;
15
15
16
- await overrideAngularVersions ( versions , filePath ) ;
16
+ const modified = overrideAngularVersions ( versions , filePath ) ;
17
+
18
+ core . debug (
19
+ `Depedencies merge in package.json: \n ${ JSON . stringify (
20
+ modified ,
21
+ null ,
22
+ 2
23
+ ) } `
24
+ ) ;
17
25
18
26
core . debug ( new Date ( ) . toTimeString ( ) ) ;
19
27
} catch ( error ) {
Original file line number Diff line number Diff line change 1
1
import { PackageJsonVersion } from './types/package-json-version' ;
2
2
import * as fs from 'fs' ;
3
- import * as core from '@actions/core' ;
4
3
5
- export async function overrideAngularVersions (
4
+ export function overrideAngularVersions (
6
5
angularVersions : PackageJsonVersion ,
7
6
path : string
8
- ) : Promise < void > {
7
+ ) : PackageJsonVersion {
9
8
const rawData = fs . readFileSync ( path ) ;
10
9
let packageJson : PackageJsonVersion = JSON . parse ( rawData . toString ( ) ) ;
11
10
packageJson = { ...packageJson , ...angularVersions } ;
12
- core . debug (
13
- `Depedencies merge in package.json: \n ${ JSON . stringify (
14
- packageJson ,
15
- null ,
16
- 2
17
- ) } `
18
- ) ;
11
+
19
12
fs . writeFileSync ( path , JSON . stringify ( packageJson ) ) ;
13
+
14
+ return packageJson ;
20
15
}
You can’t perform that action at this time.
0 commit comments