File tree 1 file changed +4
-2
lines changed
tests/legacy-cli/e2e/tests/build
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change
1
+ import { SemVer } from 'semver' ;
1
2
import { getGlobalVariable } from '../../utils/env' ;
2
3
import { replaceInFile } from '../../utils/fs' ;
3
4
import { installPackage , installWorkspacePackages } from '../../utils/packages' ;
4
5
import { ng } from '../../utils/process' ;
5
6
import { isPrereleaseCli , updateJsonFile } from '../../utils/project' ;
7
+ import { readNgVersion } from '../../utils/version' ;
6
8
7
9
const snapshots = require ( '../../ng-snapshot/package.json' ) ;
8
10
9
11
export default async function ( ) {
10
- const tag = await isPrereleaseCli ( ) ? '@next' : '' ;
12
+ const tag = ( await isPrereleaseCli ( ) ) ? '@next' : `@ ${ new SemVer ( readNgVersion ( ) ) . major } ` ;
11
13
await ng ( 'add' , `@angular/material${ tag } ` , '--skip-confirmation' ) ;
12
14
13
15
const isSnapshotBuild = getGlobalVariable ( 'argv' ) [ 'ng-snapshots' ] ;
@@ -28,7 +30,7 @@ export default async function () {
28
30
29
31
await installWorkspacePackages ( ) ;
30
32
} else {
31
- await installPackage ( ' @angular/material-moment-adapter' ) ;
33
+ await installPackage ( ` @angular/material-moment-adapter${ tag } ` ) ;
32
34
}
33
35
34
36
await installPackage ( 'moment' ) ;
You can’t perform that action at this time.
0 commit comments