All files / src/migrations 2.5.2.ts

100% Statements 8/8
100% Branches 0/0
100% Functions 1/1
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 321x 1x 1x   1x         1x         1x               1x 1x                
import { chain, Rule } from '@angular-devkit/schematics';
import { updateDependency } from './utils/package-json';
import { tryRule } from './utils/rules';
 
const foundationAng = {
  name: '@backbase/foundation-ang',
  version: '^4.12.0',
};
 
const ngBootstrap = {
  name: '@ng-bootstrap/ng-bootstrap',
  version: '5.1.1',
};
 
const manualProcess = `
## Make sure the version of ${foundationAng.name} is ${foundationAng.version}
and version of ${ngBootstrap.name} is ${ngBootstrap.version}
 
For that install it as a dependency using the following command:
$ npm i --save ${foundationAng.name}@${foundationAng.version} ${ngBootstrap.name}@${ngBootstrap.version}
`;
 
export default function (): Rule {
  return tryRule(
    chain([
      updateDependency(foundationAng.name, foundationAng.version),
      updateDependency(ngBootstrap.name, ngBootstrap.version),
    ]),
    manualProcess,
  );
}