source: trip-planner-front/node_modules/@schematics/angular/migrations/update-11/update-dependencies.js@ 6a80231

Last change on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.5 KB
Line 
1"use strict";
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9Object.defineProperty(exports, "__esModule", { value: true });
10const tasks_1 = require("@angular-devkit/schematics/tasks");
11const dependencies_1 = require("../../utility/dependencies");
12function default_1() {
13 return (host, context) => {
14 const dependenciesToUpdate = {
15 '@types/jasmine': '~3.6.0',
16 'codelyzer': '^6.0.0',
17 'jasmine-core': '~3.6.0',
18 'jasmine-spec-reporter': '~5.0.0',
19 'karma-chrome-launcher': '~3.1.0',
20 'karma-coverage': '~2.0.3',
21 'karma-jasmine': '~4.0.0',
22 'karma-jasmine-html-reporter': '^1.5.0',
23 'tslib': '^2.0.0',
24 };
25 let hasChanges = false;
26 for (const [name, version] of Object.entries(dependenciesToUpdate)) {
27 const current = dependencies_1.getPackageJsonDependency(host, name);
28 if (!current || current.version === version) {
29 continue;
30 }
31 dependencies_1.addPackageJsonDependency(host, {
32 type: current.type,
33 name,
34 version,
35 overwrite: true,
36 });
37 hasChanges = true;
38 }
39 if (hasChanges) {
40 context.addTask(new tasks_1.NodePackageInstallTask());
41 }
42 };
43}
44exports.default = default_1;
Note: See TracBrowser for help on using the repository browser.