File tree 3 files changed +15
-6
lines changed
projects/angular-server-side-configuration 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 109
109
},
110
110
{
111
111
"filename" : " projects/angular-server-side-configuration/package.json" ,
112
- "type " : " json "
112
+ "updater " : " scripts/standard-version-updater.js "
113
113
},
114
114
{
115
115
"filename" : " projects/angular-server-side-configuration/schematics/migration.json" ,
Original file line number Diff line number Diff line change 27
27
"migrations" : " ./schematics/migration.json"
28
28
},
29
29
"peerDependencies" : {
30
- "@angular/common" : " ^17.0.0" ,
31
30
"@angular/core" : " ^17.0.0"
32
31
},
33
32
"dependencies" : {
34
- "tslib" : " ^2.3.0" ,
35
33
"glob" : " ^10.0.0"
36
34
}
37
35
}
Original file line number Diff line number Diff line change 1
1
module . exports . readVersion = function ( _contents ) {
2
- const pkg = require ( '../package.json' ) ;
3
- return pkg . version ;
2
+ return require ( '../package.json' ) . version ;
4
3
} ;
5
4
6
5
module . exports . writeVersion = function ( contents , version ) {
7
6
try {
8
7
const json = JSON . parse ( contents ) ;
9
- json . schematics . dockerfile . version = version ;
8
+ if ( json . name && json . version ) {
9
+ // projects/angular-server-side-configuration/package.json
10
+ json . version = version ;
11
+ const majorVersionRange = `^${ version . split ( '.' ) [ 0 ] } .0.0` ;
12
+ for ( const name of Object . keys ( json . peerDependencies ) . filter ( ( n ) =>
13
+ n . startsWith ( '@angular/' ) ,
14
+ ) ) {
15
+ json . peerDependencies [ name ] = majorVersionRange ;
16
+ }
17
+ } else {
18
+ // projects/angular-server-side-configuration/schematics/migration.json
19
+ json . schematics . dockerfile . version = version ;
20
+ }
10
21
return JSON . stringify ( json , null , 2 ) ;
11
22
} catch {
12
23
return contents . replace (
You can’t perform that action at this time.
0 commit comments