@ihk-gfi/lux-components-update 11.6.0 → 11.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ihk-gfi/lux-components-update",
3
- "version": "11.6.0",
3
+ "version": "11.7.0",
4
4
  "description": "Schematics für die Aktualisierung von LUX-Applikationen",
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
@@ -46,6 +46,11 @@
46
46
  "factory": "./update110600/index#update110600",
47
47
  "schema": "./update110600/schema.json"
48
48
  },
49
+ "update-11.7.0": {
50
+ "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.7.0",
51
+ "factory": "./update110700/index#update110700",
52
+ "schema": "./update110700/schema.json"
53
+ },
49
54
  "update-dependencies": {
50
55
  "description": "Aktualisiert die Abhängigkeiten im LUX-Componentsprojekt",
51
56
  "factory": "./update-dependencies/index#updateDependencies",
@@ -0,0 +1,2 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ export declare function update110700(options: any): Rule;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.update110700 = void 0;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const chalk = require("chalk");
6
+ const dependencies_1 = require("../utility/dependencies");
7
+ const util_1 = require("../utility/util");
8
+ function update110700(options) {
9
+ return (tree, context) => {
10
+ return schematics_1.chain([
11
+ util_1.messageInfoRule(`Die LUX-Components werden auf die Version 11.7.0 aktualisiert...`),
12
+ util_1.messageInfoRule(`Die Datei "package.json" wird angepasst...`),
13
+ updateDependencies(),
14
+ util_1.messageSuccessRule(`Die Datei "package.json" wurde angepasst.`),
15
+ util_1.messageSuccessRule(`Die LUX-Components wurden auf die Version 11.7.0 aktualisiert.`),
16
+ util_1.finish(`${chalk.yellowBright('Fertig!')}`)
17
+ ]);
18
+ };
19
+ function updateDependencies() {
20
+ return (tree, _context) => {
21
+ dependencies_1.updateDependency(tree, '@ihk-gfi/lux-components', '11.7.0');
22
+ dependencies_1.updateDependency(tree, '@ihk-gfi/lux-components-theme', '11.9.0');
23
+ dependencies_1.updateDependencyDev(tree, '@angular-devkit/build-angular', '0.1102.17');
24
+ dependencies_1.updateDependencyDev(tree, '@angular/cli', '11.2.17');
25
+ if (dependencies_1.hasPackageJsonDependency(tree, '@angular-eslint/builder')) {
26
+ dependencies_1.updateDependencyDev(tree, '@angular-eslint/builder', '4.3.1');
27
+ }
28
+ if (dependencies_1.hasPackageJsonDependency(tree, '@angular-eslint/eslint-plugin')) {
29
+ dependencies_1.updateDependencyDev(tree, '@angular-eslint/eslint-plugin', '4.3.1');
30
+ }
31
+ if (dependencies_1.hasPackageJsonDependency(tree, '@angular-eslint/eslint-plugin-template')) {
32
+ dependencies_1.updateDependencyDev(tree, '@angular-eslint/eslint-plugin-template', '4.3.1');
33
+ }
34
+ if (dependencies_1.hasPackageJsonDependency(tree, '@angular-eslint/schematics')) {
35
+ dependencies_1.updateDependencyDev(tree, '@angular-eslint/schematics', '4.3.1');
36
+ }
37
+ if (dependencies_1.hasPackageJsonDependency(tree, '@angular-eslint/template-parser')) {
38
+ dependencies_1.updateDependencyDev(tree, '@angular-eslint/template-parser', '4.3.1');
39
+ }
40
+ return tree;
41
+ };
42
+ }
43
+ }
44
+ exports.update110700 = update110700;
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,+BAA+B;AAC/B,0DAA0G;AAC1G,0CAA8E;AAE9E,SAAgB,YAAY,CAAC,OAAY;IACvC,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,OAAO,kBAAK,CAAC;YACX,sBAAe,CAAC,kEAAkE,CAAC;YAEnF,sBAAe,CAAC,4CAA4C,CAAC;YAC7D,kBAAkB,EAAE;YACpB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CAyCC"}
@@ -0,0 +1,47 @@
1
+ import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
2
+ import * as chalk from 'chalk';
3
+ import { hasPackageJsonDependency, updateDependency, updateDependencyDev } from '../utility/dependencies';
4
+ import { finish, messageInfoRule, messageSuccessRule } from '../utility/util';
5
+
6
+ export function update110700(options: any): Rule {
7
+ return (tree: Tree, context: SchematicContext) => {
8
+ return chain([
9
+ messageInfoRule(`Die LUX-Components werden auf die Version 11.7.0 aktualisiert...`),
10
+
11
+ messageInfoRule(`Die Datei "package.json" wird angepasst...`),
12
+ updateDependencies(),
13
+ messageSuccessRule(`Die Datei "package.json" wurde angepasst.`),
14
+
15
+ messageSuccessRule(`Die LUX-Components wurden auf die Version 11.7.0 aktualisiert.`),
16
+ finish(`${chalk.yellowBright('Fertig!')}`)
17
+ ]);
18
+ };
19
+
20
+ function updateDependencies() {
21
+ return (tree: Tree, _context: SchematicContext) => {
22
+ updateDependency(tree, '@ihk-gfi/lux-components', '11.7.0');
23
+ updateDependency(tree, '@ihk-gfi/lux-components-theme', '11.9.0');
24
+
25
+ updateDependencyDev(tree, '@angular-devkit/build-angular', '0.1102.17');
26
+ updateDependencyDev(tree, '@angular/cli', '11.2.17');
27
+
28
+ if (hasPackageJsonDependency(tree, '@angular-eslint/builder')) {
29
+ updateDependencyDev(tree, '@angular-eslint/builder', '4.3.1');
30
+ }
31
+ if (hasPackageJsonDependency(tree, '@angular-eslint/eslint-plugin')) {
32
+ updateDependencyDev(tree, '@angular-eslint/eslint-plugin', '4.3.1');
33
+ }
34
+ if (hasPackageJsonDependency(tree, '@angular-eslint/eslint-plugin-template')) {
35
+ updateDependencyDev(tree, '@angular-eslint/eslint-plugin-template', '4.3.1');
36
+ }
37
+ if (hasPackageJsonDependency(tree, '@angular-eslint/schematics')) {
38
+ updateDependencyDev(tree, '@angular-eslint/schematics', '4.3.1');
39
+ }
40
+ if (hasPackageJsonDependency(tree, '@angular-eslint/template-parser')) {
41
+ updateDependencyDev(tree, '@angular-eslint/template-parser', '4.3.1');
42
+ }
43
+
44
+ return tree;
45
+ };
46
+ }
47
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const schematics_1 = require("@angular-devkit/schematics");
13
+ const testing_1 = require("@angular-devkit/schematics/testing");
14
+ const path = require("path");
15
+ const rxjs_1 = require("rxjs");
16
+ const dependencies_1 = require("../utility/dependencies");
17
+ const test_1 = require("../utility/test");
18
+ const util_1 = require("../utility/util");
19
+ const index_1 = require("./index");
20
+ const collectionPath = path.join(__dirname, '../collection.json');
21
+ describe('update110700', () => {
22
+ let appTree;
23
+ let runner;
24
+ let context;
25
+ const testOptions = {};
26
+ beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
27
+ runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
28
+ appTree = yield runner.runExternalSchematicAsync('@schematics/angular', 'workspace', test_1.workspaceOptions).toPromise();
29
+ appTree = yield runner
30
+ .runExternalSchematicAsync('@schematics/angular', 'application', test_1.appOptions, appTree)
31
+ .toPromise();
32
+ util_1.UtilConfig.defaultWaitMS = 0;
33
+ const collection = runner.engine.createCollection(collectionPath);
34
+ const schematic = runner.engine.createSchematic('update-11.7.0', collection);
35
+ context = runner.engine.createContext(schematic);
36
+ testOptions.project = test_1.appOptions.name;
37
+ testOptions.path = test_1.workspaceOptions.newProjectRoot + '/' + test_1.appOptions.name;
38
+ testOptions.verbose = true;
39
+ }));
40
+ describe('[Rule] update110700', () => {
41
+ it('Sollte die Abhängigkeiten mit ESLint aktualisieren', (done) => {
42
+ appTree.overwrite('/package.json', `
43
+ {
44
+ "name": "Lorem ipsum",
45
+ "version": "0.0.32",
46
+ "scripts": {
47
+ "build": "tsc -p tsconfig.json",
48
+ "test": "npm run build && jasmine src/**/*_spec.js"
49
+ },
50
+ "dependencies": {
51
+ "@ihk-gfi/lux-components": "11.0.0",
52
+ },
53
+ "devDependencies": {
54
+ "@angular-devkit/build-angular": "0.1102.14",
55
+ "@angular-eslint/builder": "4.0.0",
56
+ "@angular-eslint/eslint-plugin": "4.0.0",
57
+ "@angular-eslint/eslint-plugin-template": "4.0.0",
58
+ "@angular-eslint/schematics": "4.0.0",
59
+ "@angular-eslint/template-parser": "4.0.0",
60
+ }
61
+ }
62
+ `);
63
+ schematics_1.callRule(index_1.update110700(testOptions), rxjs_1.of(appTree), context).subscribe(() => {
64
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('11.7.0');
65
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('11.9.0');
66
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@angular-devkit/build-angular').version).toEqual('0.1102.17');
67
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@angular/cli').version).toEqual('11.2.17');
68
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@angular-eslint/builder').version).toEqual('4.3.1');
69
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin').version).toEqual('4.3.1');
70
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin-template').version).toEqual('4.3.1');
71
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@angular-eslint/schematics').version).toEqual('4.3.1');
72
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@angular-eslint/template-parser').version).toEqual('4.3.1');
73
+ done();
74
+ }, (reason) => expect(reason).toBeUndefined());
75
+ });
76
+ it('Sollte die Abhängigkeiten ohne ESLint aktualisieren', (done) => {
77
+ appTree.overwrite('/package.json', `
78
+ {
79
+ "name": "Lorem ipsum",
80
+ "version": "0.0.32",
81
+ "scripts": {
82
+ "build": "tsc -p tsconfig.json",
83
+ "test": "npm run build && jasmine src/**/*_spec.js"
84
+ },
85
+ "dependencies": {
86
+ "@ihk-gfi/lux-components": "11.0.0",
87
+ },
88
+ "devDependencies": {
89
+ "@angular-devkit/build-angular": "0.1102.14",
90
+ }
91
+ }
92
+ `);
93
+ schematics_1.callRule(index_1.update110700(testOptions), rxjs_1.of(appTree), context).subscribe(() => {
94
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('11.7.0');
95
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('11.9.0');
96
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@angular-devkit/build-angular').version).toEqual('0.1102.17');
97
+ expect(dependencies_1.getPackageJsonDependency(appTree, '@angular/cli').version).toEqual('11.2.17');
98
+ expect(dependencies_1.hasPackageJsonDependency(appTree, '@angular-eslint/builder')).toBeUndefined();
99
+ expect(dependencies_1.hasPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin')).toBeUndefined();
100
+ expect(dependencies_1.hasPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin-template')).toBeUndefined();
101
+ expect(dependencies_1.hasPackageJsonDependency(appTree, '@angular-eslint/schematics')).toBeUndefined();
102
+ expect(dependencies_1.hasPackageJsonDependency(appTree, '@angular-eslint/template-parser')).toBeUndefined();
103
+ done();
104
+ }, (reason) => expect(reason).toBeUndefined());
105
+ });
106
+ });
107
+ });
108
+ //# sourceMappingURL=index_spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":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EAAE,CAAC;gBACpG,MAAM,CAAC,uCAAwB,CAAC,OAAO,EAAE,4BAA4B,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;gBACxF,MAAM,CAAC,uCAAwB,CAAC,OAAO,EAAE,iCAAiC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;gBAE7F,IAAI,EAAE,CAAC;YACT,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAC3C,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,122 @@
1
+ import { callRule, SchematicContext } from '@angular-devkit/schematics';
2
+ import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
3
+ import * as path from 'path';
4
+ import { of as observableOf } from 'rxjs';
5
+ import { getPackageJsonDependency, hasPackageJsonDependency, updateDependency } from '../utility/dependencies';
6
+ import { appOptions, workspaceOptions } from '../utility/test';
7
+ import { UtilConfig } from '../utility/util';
8
+ import { update110700 } from './index';
9
+
10
+ const collectionPath = path.join(__dirname, '../collection.json');
11
+
12
+ describe('update110700', () => {
13
+ let appTree: UnitTestTree;
14
+ let runner: SchematicTestRunner;
15
+ let context: SchematicContext;
16
+
17
+ const testOptions: any = {};
18
+
19
+ beforeEach(async () => {
20
+ runner = new SchematicTestRunner('schematics', collectionPath);
21
+
22
+ appTree = await runner.runExternalSchematicAsync('@schematics/angular', 'workspace', workspaceOptions).toPromise();
23
+ appTree = await runner
24
+ .runExternalSchematicAsync('@schematics/angular', 'application', appOptions, appTree)
25
+ .toPromise();
26
+
27
+ UtilConfig.defaultWaitMS = 0;
28
+
29
+ const collection = runner.engine.createCollection(collectionPath);
30
+ const schematic = runner.engine.createSchematic('update-11.7.0', collection);
31
+ context = runner.engine.createContext(schematic);
32
+
33
+ testOptions.project = appOptions.name;
34
+ testOptions.path = workspaceOptions.newProjectRoot + '/' + appOptions.name;
35
+ testOptions.verbose = true;
36
+ });
37
+
38
+ describe('[Rule] update110700', () => {
39
+ it('Sollte die Abhängigkeiten mit ESLint aktualisieren', (done) => {
40
+ appTree.overwrite(
41
+ '/package.json',
42
+ `
43
+ {
44
+ "name": "Lorem ipsum",
45
+ "version": "0.0.32",
46
+ "scripts": {
47
+ "build": "tsc -p tsconfig.json",
48
+ "test": "npm run build && jasmine src/**/*_spec.js"
49
+ },
50
+ "dependencies": {
51
+ "@ihk-gfi/lux-components": "11.0.0",
52
+ },
53
+ "devDependencies": {
54
+ "@angular-devkit/build-angular": "0.1102.14",
55
+ "@angular-eslint/builder": "4.0.0",
56
+ "@angular-eslint/eslint-plugin": "4.0.0",
57
+ "@angular-eslint/eslint-plugin-template": "4.0.0",
58
+ "@angular-eslint/schematics": "4.0.0",
59
+ "@angular-eslint/template-parser": "4.0.0",
60
+ }
61
+ }
62
+ `
63
+ );
64
+
65
+ callRule(update110700(testOptions), observableOf(appTree), context).subscribe(
66
+ () => {
67
+ expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('11.7.0');
68
+ expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('11.9.0');
69
+ expect(getPackageJsonDependency(appTree, '@angular-devkit/build-angular').version).toEqual('0.1102.17');
70
+ expect(getPackageJsonDependency(appTree, '@angular/cli').version).toEqual('11.2.17');
71
+ expect(getPackageJsonDependency(appTree, '@angular-eslint/builder').version).toEqual('4.3.1');
72
+ expect(getPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin').version).toEqual('4.3.1');
73
+ expect(getPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin-template').version).toEqual('4.3.1');
74
+ expect(getPackageJsonDependency(appTree, '@angular-eslint/schematics').version).toEqual('4.3.1');
75
+ expect(getPackageJsonDependency(appTree, '@angular-eslint/template-parser').version).toEqual('4.3.1');
76
+
77
+ done();
78
+ },
79
+ (reason) => expect(reason).toBeUndefined()
80
+ );
81
+ });
82
+
83
+ it('Sollte die Abhängigkeiten ohne ESLint aktualisieren', (done) => {
84
+ appTree.overwrite(
85
+ '/package.json',
86
+ `
87
+ {
88
+ "name": "Lorem ipsum",
89
+ "version": "0.0.32",
90
+ "scripts": {
91
+ "build": "tsc -p tsconfig.json",
92
+ "test": "npm run build && jasmine src/**/*_spec.js"
93
+ },
94
+ "dependencies": {
95
+ "@ihk-gfi/lux-components": "11.0.0",
96
+ },
97
+ "devDependencies": {
98
+ "@angular-devkit/build-angular": "0.1102.14",
99
+ }
100
+ }
101
+ `
102
+ );
103
+
104
+ callRule(update110700(testOptions), observableOf(appTree), context).subscribe(
105
+ () => {
106
+ expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('11.7.0');
107
+ expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('11.9.0');
108
+ expect(getPackageJsonDependency(appTree, '@angular-devkit/build-angular').version).toEqual('0.1102.17');
109
+ expect(getPackageJsonDependency(appTree, '@angular/cli').version).toEqual('11.2.17');
110
+ expect(hasPackageJsonDependency(appTree, '@angular-eslint/builder')).toBeUndefined();
111
+ expect(hasPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin')).toBeUndefined();
112
+ expect(hasPackageJsonDependency(appTree, '@angular-eslint/eslint-plugin-template')).toBeUndefined();
113
+ expect(hasPackageJsonDependency(appTree, '@angular-eslint/schematics')).toBeUndefined();
114
+ expect(hasPackageJsonDependency(appTree, '@angular-eslint/template-parser')).toBeUndefined();
115
+
116
+ done();
117
+ },
118
+ (reason) => expect(reason).toBeUndefined()
119
+ );
120
+ });
121
+ });
122
+ });
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "id": "luxUpdate110700Schema",
4
+ "title": "Aktualisiert das LUX-Componentsprojekt",
5
+ "type": "object",
6
+ "description": "Aktualisiert das LUX-Componentsprojekt",
7
+ "properties": {
8
+ "project": {
9
+ "type": "string",
10
+ "description": "Der Projektname",
11
+ "$default": {
12
+ "$source": "projectName"
13
+ }
14
+ },
15
+ "verbose": {
16
+ "type": "boolean",
17
+ "description": "Generiert mehr Logausgaben",
18
+ "default": false
19
+ }
20
+ },
21
+ "required": [],
22
+ "additionalProperties": false
23
+ }
@@ -10,6 +10,12 @@ export interface NodeDependency {
10
10
  name: string;
11
11
  version: string;
12
12
  }
13
+ /**
14
+ * Liefert die Dependency zurück, wenn es sie gibt, undefined sonst.
15
+ * @param tree
16
+ * @param name
17
+ */
18
+ export declare function hasPackageJsonDependency(tree: Tree, name: string): NodeDependency | undefined;
13
19
  /**
14
20
  * Versucht eine Dependency aus der package.json auslesen und gibt diese zurück.
15
21
  * @param tree
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deletePackageJsonDependency = exports.updatePackageJsonDependency = exports.updateDependencyDev = exports.updateDependency = exports.getPackageJsonDependency = exports.NodeDependencyType = void 0;
3
+ exports.deletePackageJsonDependency = exports.updatePackageJsonDependency = exports.updateDependencyDev = exports.updateDependency = exports.getPackageJsonDependency = exports.hasPackageJsonDependency = exports.NodeDependencyType = void 0;
4
4
  const chalk = require("chalk");
5
5
  const jsonc_parser_1 = require("jsonc-parser");
6
6
  const files_1 = require("./files");
@@ -13,6 +13,27 @@ var NodeDependencyType;
13
13
  NodeDependencyType["Peer"] = "peerDependencies";
14
14
  NodeDependencyType["Optional"] = "optionalDependencies";
15
15
  })(NodeDependencyType = exports.NodeDependencyType || (exports.NodeDependencyType = {}));
16
+ /**
17
+ * Liefert die Dependency zurück, wenn es sie gibt, undefined sonst.
18
+ * @param tree
19
+ * @param name
20
+ */
21
+ function hasPackageJsonDependency(tree, name) {
22
+ const packageJsonNode = json_1.readJson(tree, '/package.json');
23
+ let dependency = undefined;
24
+ [NodeDependencyType.Default, NodeDependencyType.Dev, NodeDependencyType.Optional, NodeDependencyType.Peer].forEach((depType) => {
25
+ let node = jsonc_parser_1.findNodeAtLocation(packageJsonNode, [depType.toString(), name]);
26
+ if (node) {
27
+ dependency = {
28
+ type: depType,
29
+ name: name,
30
+ version: node.value
31
+ };
32
+ }
33
+ });
34
+ return dependency;
35
+ }
36
+ exports.hasPackageJsonDependency = hasPackageJsonDependency;
16
37
  /**
17
38
  * Versucht eine Dependency aus der package.json auslesen und gibt diese zurück.
18
39
  * @param tree
@@ -1 +1 @@
1
- {"version":3,"file":"dependencies.js","sourceRoot":"","sources":["dependencies.ts"],"names":[],"mappings":";;;AACA,+BAA+B;AAC/B,+CAAsE;AACtE,mCAA6C;AAC7C,iCAA2E;AAC3E,uCAAkE;AAElE,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,8CAAwB,CAAA;IACxB,6CAAuB,CAAA;IACvB,+CAAyB,CAAA;IACzB,uDAAiC,CAAA;AACnC,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B;AAQD;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,IAAU,EAAE,IAAY;IAC/D,MAAM,eAAe,GAAG,eAAQ,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IACxD,IAAI,UAAU,GAA0B,IAAI,CAAC;IAE7C,CAAC,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC,GAAG,EAAE,kBAAkB,CAAC,QAAQ,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,OAAO,CAChH,CAAC,OAAO,EAAE,EAAE;QAEV,IAAI,IAAI,GAAG,iCAAkB,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QAC3E,IAAI,IAAI,EAAE;YACR,UAAU,GAAG;gBACX,IAAI,EAAK,OAAO;gBAChB,IAAI,EAAK,IAAI;gBACb,OAAO,EAAE,IAAI,CAAC,KAAK;aACpB,CAAC;SACH;IACH,CAAC,CACF,CAAC;IAEF,IAAI,UAAU,EAAE;QACd,OAAO,UAAU,CAAC;KACnB;SAAM;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,IAAK,EAAE,CAAC;YAC1C,IAAK,UAAU,CAAC,OAAQ,sBAAuB,UAAU,CAAC,IAAK,eAAe,CAC/E,CAAC;KACH;IAED,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC,OAAO,EAAE;QAC9C,MAAM,mBAAmB,GAAG,uBAAgB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QACpE,MAAM,KAAK,GAAG,qBAAM,CAAC,mBAAmB,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,iBAAiB,EAAE,4BAAqB,EAAC,CAAC,CAAC;QAE1J,IAAI,KAAK,EAAE;YACT,IAAI,CAAC,SAAS,CACZ,eAAe,EACf,yBAAU,CAAC,mBAAmB,EAAE,KAAK,CAAC,CACvC,CAAC;SACH;KACF;AACH,CAAC;AA9BD,kEA8BC;AAED,SAAgB,2BAA2B,CAAC,IAAU,EAAE,OAAyB,EAAE,UAA0B;IAC3G,0BAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IACpE,iBAAO,CACL,aAAa,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC,GAAG,4BAA4B,UAAU,CAAC,IAAI,YAAY,CACnH,CAAC;AACJ,CAAC;AALD,kEAKC"}
@@ -18,6 +18,32 @@ export interface NodeDependency {
18
18
  version: string;
19
19
  }
20
20
 
21
+ /**
22
+ * Liefert die Dependency zurück, wenn es sie gibt, undefined sonst.
23
+ * @param tree
24
+ * @param name
25
+ */
26
+ export function hasPackageJsonDependency(tree: Tree, name: string): NodeDependency | undefined {
27
+ const packageJsonNode = readJson(tree, '/package.json');
28
+ let dependency: NodeDependency | undefined = undefined;
29
+
30
+ [NodeDependencyType.Default, NodeDependencyType.Dev, NodeDependencyType.Optional, NodeDependencyType.Peer].forEach(
31
+ (depType) => {
32
+
33
+ let node = findNodeAtLocation(packageJsonNode, [depType.toString(), name]);
34
+ if (node) {
35
+ dependency = {
36
+ type : depType,
37
+ name : name,
38
+ version: node.value
39
+ };
40
+ }
41
+ }
42
+ );
43
+
44
+ return dependency;
45
+ }
46
+
21
47
  /**
22
48
  * Versucht eine Dependency aus der package.json auslesen und gibt diese zurück.
23
49
  * @param tree