@ihk-gfi/lux-components-update 14.1.1 → 14.2.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 +8 -4
- package/src/collection.json +5 -0
- package/src/updates/update140100/index_spec.js +1 -1
- package/src/updates/update140100/index_spec.js.map +1 -1
- package/src/updates/update140100/index_spec.ts +1 -1
- package/src/updates/update140200/index.d.ts +8 -0
- package/src/updates/update140200/index.js +40 -0
- package/src/updates/update140200/index.js.map +1 -0
- package/src/updates/update140200/index.ts +38 -0
- package/src/updates/update140200/index_spec.d.ts +1 -0
- package/src/updates/update140200/index_spec.js +75 -0
- package/src/updates/update140200/index_spec.js.map +1 -0
- package/src/updates/update140200/index_spec.ts +81 -0
- package/src/updates/update140200/schema.json +23 -0
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ihk-gfi/lux-components-update",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.2.0",
|
|
4
4
|
"description": "Schematics für die Aktualisierung von LUX-Applikationen",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc -p tsconfig.json",
|
|
7
|
-
"
|
|
8
|
-
"security": "npm audit --registry=https://registry.npmjs.org --audit-level high"
|
|
7
|
+
"husky-init": "husky install",
|
|
8
|
+
"security": "npm audit --registry=https://registry.npmjs.org --audit-level high",
|
|
9
|
+
"smoketest": "npm run build && jasmine src/**/*_spec.js",
|
|
10
|
+
"test": "jasmine src/**/*_spec.js"
|
|
9
11
|
},
|
|
10
12
|
"keywords": [
|
|
11
13
|
"schematics",
|
|
@@ -48,6 +50,8 @@
|
|
|
48
50
|
"typescript": "4.7.3"
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
51
|
-
"
|
|
53
|
+
"husky": "8.0.3",
|
|
54
|
+
"prettier": "2.6.2",
|
|
55
|
+
"pretty-quick": "3.1.3"
|
|
52
56
|
}
|
|
53
57
|
}
|
package/src/collection.json
CHANGED
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
"factory": "./updates/update140000/index#update",
|
|
7
7
|
"schema": "./updates/update140000/schema.json"
|
|
8
8
|
},
|
|
9
|
+
"update-14.2.0": {
|
|
10
|
+
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 14.2.0",
|
|
11
|
+
"factory": "./updates/update140200/index#update140200",
|
|
12
|
+
"schema": "./updates/update140200/schema.json"
|
|
13
|
+
},
|
|
9
14
|
"update-14.1.0": {
|
|
10
15
|
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 14.1.0",
|
|
11
16
|
"factory": "./updates/update140100/index#update140100",
|
|
@@ -68,7 +68,7 @@ describe('update140100', () => {
|
|
|
68
68
|
done();
|
|
69
69
|
}, (reason) => expect(reason).toBeUndefined());
|
|
70
70
|
});
|
|
71
|
-
it('Sollte die
|
|
71
|
+
it('Sollte die I18N-Dateien aktualisieren', (done) => {
|
|
72
72
|
appTree.create('/src/locale/messages.xlf', i18nDe);
|
|
73
73
|
appTree.create('/src/locale/messages.en.xlf', i18nEn);
|
|
74
74
|
(0, schematics_1.callRule)((0, index_1.update140100)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAwE;AACxE,gEAAuF;AACvF,6BAA6B;AAC7B,+BAA0C;AAC1C,6DAAsE;AACtE,6CAAkE;AAClE,6CAAgD;AAChD,mCAAmE;AAEnE,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC;AAErE,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,IAAI,OAAqB,CAAC;IAC1B,IAAI,MAA2B,CAAC;IAChC,IAAI,OAAyB,CAAC;IAE9B,MAAM,WAAW,GAAQ,EAAE,CAAC;IAE5B,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QACJ,CAAC,CAAC,CAAC;IAEL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;CAkBd,CAAC;AAEF,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;CAmBd,CAAC"}
|
|
@@ -75,7 +75,7 @@ describe('update140100', () => {
|
|
|
75
75
|
);
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
it('Sollte die
|
|
78
|
+
it('Sollte die I18N-Dateien aktualisieren', (done) => {
|
|
79
79
|
appTree.create('/src/locale/messages.xlf', i18nDe);
|
|
80
80
|
appTree.create('/src/locale/messages.en.xlf', i18nEn);
|
|
81
81
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
export declare const logosAssetBlock: {
|
|
3
|
+
glob: string;
|
|
4
|
+
input: string;
|
|
5
|
+
output: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function update140200(options: any): Rule;
|
|
8
|
+
export declare function addLogosAssets(options: any): Rule;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addLogosAssets = exports.update140200 = exports.logosAssetBlock = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const chalk = require("chalk");
|
|
6
|
+
const index_1 = require("../../update-dependencies/index");
|
|
7
|
+
const json_1 = require("../../utility/json");
|
|
8
|
+
const util_1 = require("../../utility/util");
|
|
9
|
+
exports.logosAssetBlock = {
|
|
10
|
+
glob: '**/*',
|
|
11
|
+
input: './node_modules/@ihk-gfi/lux-components-icons-and-fonts/assets/logos/',
|
|
12
|
+
output: './assets/logos'
|
|
13
|
+
};
|
|
14
|
+
function update140200(options) {
|
|
15
|
+
return (_tree, _context) => {
|
|
16
|
+
return (0, schematics_1.chain)([
|
|
17
|
+
(0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 14.2.0 aktualisiert...`),
|
|
18
|
+
(0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
|
|
19
|
+
(0, index_1.updateDep)('@ihk-gfi/lux-components', '14.2.0', false),
|
|
20
|
+
(0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '14.2.0', false),
|
|
21
|
+
(0, index_1.updateDep)('@ihk-gfi/lux-components-icons-and-fonts', '1.3.0', false),
|
|
22
|
+
addLogosAssets(options),
|
|
23
|
+
(0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 14.2.0 aktualisiert.`),
|
|
24
|
+
(0, util_1.finish)(true, `${chalk.yellowBright('Fertig!')}`)
|
|
25
|
+
]);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.update140200 = update140200;
|
|
29
|
+
function addLogosAssets(options) {
|
|
30
|
+
const assetPath = ['projects', options.project, 'architect', 'build', 'options', 'assets'];
|
|
31
|
+
const testAssetPath = ['projects', options.project, 'architect', 'test', 'options', 'assets'];
|
|
32
|
+
return (0, schematics_1.chain)([
|
|
33
|
+
(0, util_1.messageInfoRule)(`Die Logos werden in den Asset-Abschnitten ergänzt...`),
|
|
34
|
+
(0, json_1.updateJsonArray)('/angular.json', assetPath, exports.logosAssetBlock),
|
|
35
|
+
(0, json_1.updateJsonArray)('/angular.json', testAssetPath, exports.logosAssetBlock),
|
|
36
|
+
(0, util_1.messageSuccessRule)(`Die Logos wurden in den Asset-Abschnitten ergänzt.`)
|
|
37
|
+
]);
|
|
38
|
+
}
|
|
39
|
+
exports.addLogosAssets = addLogosAssets;
|
|
40
|
+
//# 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,2DAA4D;AAC5D,6CAAqD;AACrD,6CAAiF;AAEpE,QAAA,eAAe,GAAG;IAC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AAC;AAVD,wCAUC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import * as chalk from 'chalk';
|
|
3
|
+
import { updateDep } from '../../update-dependencies/index';
|
|
4
|
+
import { updateJsonArray } from '../../utility/json';
|
|
5
|
+
import { finish, messageInfoRule, messageSuccessRule } from '../../utility/util';
|
|
6
|
+
|
|
7
|
+
export const logosAssetBlock = {
|
|
8
|
+
glob: '**/*',
|
|
9
|
+
input: './node_modules/@ihk-gfi/lux-components-icons-and-fonts/assets/logos/',
|
|
10
|
+
output: './assets/logos'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export function update140200(options: any): Rule {
|
|
14
|
+
return (_tree: Tree, _context: SchematicContext) => {
|
|
15
|
+
return chain([
|
|
16
|
+
messageInfoRule(`Die LUX-Components werden auf die Version 14.2.0 aktualisiert...`),
|
|
17
|
+
messageInfoRule(`Die Datei "package.json" wird angepasst...`),
|
|
18
|
+
updateDep('@ihk-gfi/lux-components', '14.2.0', false),
|
|
19
|
+
updateDep('@ihk-gfi/lux-components-theme', '14.2.0', false),
|
|
20
|
+
updateDep('@ihk-gfi/lux-components-icons-and-fonts', '1.3.0', false),
|
|
21
|
+
addLogosAssets(options),
|
|
22
|
+
messageSuccessRule(`Die LUX-Components wurden auf die Version 14.2.0 aktualisiert.`),
|
|
23
|
+
finish(true, `${chalk.yellowBright('Fertig!')}`)
|
|
24
|
+
]);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function addLogosAssets(options: any): Rule {
|
|
29
|
+
const assetPath = ['projects', options.project, 'architect', 'build', 'options', 'assets'];
|
|
30
|
+
const testAssetPath = ['projects', options.project, 'architect', 'test', 'options', 'assets'];
|
|
31
|
+
|
|
32
|
+
return chain([
|
|
33
|
+
messageInfoRule(`Die Logos werden in den Asset-Abschnitten ergänzt...`),
|
|
34
|
+
updateJsonArray('/angular.json', assetPath, logosAssetBlock),
|
|
35
|
+
updateJsonArray('/angular.json', testAssetPath, logosAssetBlock),
|
|
36
|
+
messageSuccessRule(`Die Logos wurden in den Asset-Abschnitten ergänzt.`)
|
|
37
|
+
]);
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
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('update140200', () => {
|
|
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.runExternalSchematicAsync('@schematics/angular', 'application', test_1.appOptions, appTree).toPromise();
|
|
30
|
+
util_1.UtilConfig.defaultWaitMS = 0;
|
|
31
|
+
const collection = runner.engine.createCollection(collectionPath);
|
|
32
|
+
const schematic = runner.engine.createSchematic('update-14.2.0', collection);
|
|
33
|
+
context = runner.engine.createContext(schematic);
|
|
34
|
+
testOptions.project = test_1.appOptions.name;
|
|
35
|
+
testOptions.path = test_1.workspaceOptions.newProjectRoot + '/' + test_1.appOptions.name;
|
|
36
|
+
testOptions.verbose = true;
|
|
37
|
+
}));
|
|
38
|
+
describe('[Rule] update140200', () => {
|
|
39
|
+
it('Sollte die Abhängigkeiten aktualisieren', (done) => {
|
|
40
|
+
appTree.overwrite('/package.json', `
|
|
41
|
+
{
|
|
42
|
+
"name": "Lorem ipsum",
|
|
43
|
+
"version": "0.0.32",
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -p tsconfig.json",
|
|
46
|
+
"test": "npm run build && jasmine src/**/*_spec.js"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@angular/animations": "14.3.7",
|
|
50
|
+
"@angular/cdk": "14.3.7",
|
|
51
|
+
"@angular/common": "14.3.7",
|
|
52
|
+
"@ihk-gfi/lux-components": "14.1.0",
|
|
53
|
+
"@ihk-gfi/lux-components-theme": "14.1.0",
|
|
54
|
+
"@angular/compiler": "14.3.7",
|
|
55
|
+
"@ihk-gfi/lux-components-icons-and-fonts": "1.1.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@angular-devkit/build-angular": "14.3.5",
|
|
59
|
+
"@angular-eslint/builder": "14.2.1"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`);
|
|
63
|
+
(0, schematics_1.callRule)((0, index_1.update140200)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe(() => {
|
|
64
|
+
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).not.toEqual('14.1.0');
|
|
65
|
+
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).toEqual('14.2.0');
|
|
66
|
+
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-theme').version).not.toEqual('14.1.0');
|
|
67
|
+
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('14.2.0');
|
|
68
|
+
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).not.toEqual('1.1.0');
|
|
69
|
+
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).toEqual('1.3.0');
|
|
70
|
+
done();
|
|
71
|
+
}, (reason) => expect(reason).toBeUndefined());
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
//# sourceMappingURL=index_spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAwE;AACxE,gEAAuF;AACvF,6BAA6B;AAC7B,+BAA0C;AAC1C,6DAAsE;AACtE,6CAAkE;AAClE,6CAAgD;AAChD,mCAAuC;AAEvC,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC;AAErE,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,IAAI,OAAqB,CAAC;IAC1B,IAAI,MAA2B,CAAC;IAChC,IAAI,OAAyB,CAAC;IAE9B,MAAM,WAAW,GAAQ,EAAE,CAAC;IAE5B,UAAU,CAAC,GAAS,EAAE;QACpB,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QAE/D,OAAO,GAAG,MAAM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,OAAO,EAAE,yBAAyB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAE/F,MAAM,CAAC,IAAA,uCAAwB,EAAC,OAAO,EAAE,+BAA+B,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACzG,MAAM,CAAC,IAAA,uCAAwB,EAAC,OAAO,EAAE,+BAA+B,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAErG,MAAM,CAAC,IAAA,uCAAwB,EAAC,OAAO,EAAE,yCAAyC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBAClH,MAAM,CAAC,IAAA,uCAAwB,EAAC,OAAO,EAAE,yCAAyC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBAC9G,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,81 @@
|
|
|
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 } from '../../utility/dependencies';
|
|
6
|
+
import { appOptions, workspaceOptions } from '../../utility/test';
|
|
7
|
+
import { UtilConfig } from '../../utility/util';
|
|
8
|
+
import { update140200 } from './index';
|
|
9
|
+
|
|
10
|
+
const collectionPath = path.join(__dirname, '../../collection.json');
|
|
11
|
+
|
|
12
|
+
describe('update140200', () => {
|
|
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.runExternalSchematicAsync('@schematics/angular', 'application', appOptions, appTree).toPromise();
|
|
24
|
+
|
|
25
|
+
UtilConfig.defaultWaitMS = 0;
|
|
26
|
+
|
|
27
|
+
const collection = runner.engine.createCollection(collectionPath);
|
|
28
|
+
const schematic = runner.engine.createSchematic('update-14.2.0', collection);
|
|
29
|
+
context = runner.engine.createContext(schematic);
|
|
30
|
+
|
|
31
|
+
testOptions.project = appOptions.name;
|
|
32
|
+
testOptions.path = workspaceOptions.newProjectRoot + '/' + appOptions.name;
|
|
33
|
+
testOptions.verbose = true;
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe('[Rule] update140200', () => {
|
|
37
|
+
it('Sollte die Abhängigkeiten aktualisieren', (done) => {
|
|
38
|
+
appTree.overwrite(
|
|
39
|
+
'/package.json',
|
|
40
|
+
`
|
|
41
|
+
{
|
|
42
|
+
"name": "Lorem ipsum",
|
|
43
|
+
"version": "0.0.32",
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -p tsconfig.json",
|
|
46
|
+
"test": "npm run build && jasmine src/**/*_spec.js"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@angular/animations": "14.3.7",
|
|
50
|
+
"@angular/cdk": "14.3.7",
|
|
51
|
+
"@angular/common": "14.3.7",
|
|
52
|
+
"@ihk-gfi/lux-components": "14.1.0",
|
|
53
|
+
"@ihk-gfi/lux-components-theme": "14.1.0",
|
|
54
|
+
"@angular/compiler": "14.3.7",
|
|
55
|
+
"@ihk-gfi/lux-components-icons-and-fonts": "1.1.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@angular-devkit/build-angular": "14.3.5",
|
|
59
|
+
"@angular-eslint/builder": "14.2.1"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
callRule(update140200(testOptions), observableOf(appTree), context).subscribe(
|
|
66
|
+
() => {
|
|
67
|
+
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).not.toEqual('14.1.0');
|
|
68
|
+
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('14.2.0');
|
|
69
|
+
|
|
70
|
+
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).not.toEqual('14.1.0');
|
|
71
|
+
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('14.2.0');
|
|
72
|
+
|
|
73
|
+
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).not.toEqual('1.1.0');
|
|
74
|
+
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).toEqual('1.3.0');
|
|
75
|
+
done();
|
|
76
|
+
},
|
|
77
|
+
(reason) => expect(reason).toBeUndefined()
|
|
78
|
+
);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "luxUpdate130200Schema",
|
|
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
|
+
}
|