@@ -41,28 +41,25 @@ export function assertCompatibleAngularVersion(projectRoot: string, logger: logg
41
41
const angularCliPkgPath = require . resolve ( '@angular/cli/package.json' , resolveOptions ) ;
42
42
angularCliPkgJson = require ( angularCliPkgPath ) ;
43
43
if ( ! ( angularCliPkgJson && angularCliPkgJson [ 'version' ] ) ) {
44
- throw new Error ( ) ;
44
+ return ;
45
45
}
46
46
} catch {
47
47
// Not using @angular -devkit/build-angular with @angular/cli is ok too.
48
48
// In this case we don't provide as many version checks.
49
49
return ;
50
50
}
51
51
52
- if ( angularCliPkgJson [ 'version' ] === '0.0.0' ) {
53
- // Internal testing version
52
+ if ( angularCliPkgJson [ 'version' ] === '0.0.0' || angularPkgJson [ 'version' ] === '0.0.0-PLACEHOLDER' ) {
53
+ // Internal CLI testing version or integration testing in the angular/angular
54
+ // repository with the generated development @angular /core npm package which is versioned "0.0.0-PLACEHOLDER".
54
55
return ;
55
56
}
56
57
57
- const cliMajor = new SemVer ( angularCliPkgJson [ 'version' ] ) . major ;
58
- // e.g. CLI 8.0 supports '>=8.0.0 <9.0.0', including pre-releases (betas, rcs, snapshots)
59
- // of both 8 and 9. Also allow version "0.0.0" for integration testing in the angular/angular
60
- // repository with the generated development @angular /core npm package which is versioned "0.0.0".
61
- const supportedAngularSemver =
62
- `0.0.0 || ^${ cliMajor } .0.0-beta || ` + `>=${ cliMajor } .0.0 <${ cliMajor + 1 } .0.0` ;
63
-
64
58
const angularVersion = new SemVer ( angularPkgJson [ 'version' ] ) ;
65
- const rxjsVersion = new SemVer ( rxjsPkgJson [ 'version' ] ) ;
59
+ const cliMajor = new SemVer ( angularCliPkgJson [ 'version' ] ) . major ;
60
+ // e.g. CLI 8.0 supports '>=8.0.0 <9.0.0', including pre-releases (next, rcs, snapshots)
61
+ // of both 8 and 9.
62
+ const supportedAngularSemver = `^${ cliMajor } .0.0-next || >=${ cliMajor } .0.0 <${ cliMajor + 1 } .0.0` ;
66
63
67
64
if ( ! satisfies ( angularVersion , supportedAngularSemver , { includePrerelease : true } ) ) {
68
65
logger . error (
@@ -76,30 +73,5 @@ export function assertCompatibleAngularVersion(projectRoot: string, logger: logg
76
73
) ;
77
74
78
75
process . exit ( 3 ) ;
79
- } else if (
80
- gte ( angularVersion , '6.0.0-rc.0' ) &&
81
- ! gte ( rxjsVersion , '5.6.0-forward-compat.0' ) &&
82
- ! gte ( rxjsVersion , '6.0.0-beta.0' )
83
- ) {
84
- logger . error (
85
- tags . stripIndents `
86
- This project uses version ${ rxjsVersion } of RxJs, which is not supported by Angular v6+.
87
- The official RxJs version that is supported is 5.6.0-forward-compat.0 and greater.
88
-
89
- Please visit the link below to find instructions on how to update RxJs.
90
- https://docs.google.com/document/d/12nlLt71VLKb-z3YaSGzUfx6mJbc34nsMXtByPUN35cg/edit#
91
- ` + '\n' ,
92
- ) ;
93
-
94
- process . exit ( 3 ) ;
95
- } else if ( gte ( angularVersion , '6.0.0-rc.0' ) && ! gte ( rxjsVersion , '6.0.0-beta.0' ) ) {
96
- logger . warn (
97
- tags . stripIndents `
98
- This project uses a temporary compatibility version of RxJs (${ rxjsVersion } ).
99
-
100
- Please visit the link below to find instructions on how to update RxJs.
101
- https://docs.google.com/document/d/12nlLt71VLKb-z3YaSGzUfx6mJbc34nsMXtByPUN35cg/edit#
102
- ` + '\n' ,
103
- ) ;
104
76
}
105
77
}
0 commit comments