@skyux/packages 5.1009.4 → 6.0.0-beta.10
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 +53 -53
- package/src/schematics/migrations/migration-collection.json +42 -17
- package/src/schematics/migrations/{add-cdk → update-6}/add-cdk.schematic.d.ts +0 -0
- package/src/schematics/migrations/update-6/add-cdk.schematic.js +8 -0
- package/src/schematics/migrations/update-6/add-cdk.schematic.js.map +1 -0
- package/src/schematics/migrations/{remove-package-json-scripts/remove-package-json-scripts.schematic.d.ts → update-6/crossvent.schematic.d.ts} +1 -1
- package/src/schematics/migrations/update-6/crossvent.schematic.js +12 -0
- package/src/schematics/migrations/update-6/crossvent.schematic.js.map +1 -0
- package/src/schematics/migrations/update-6/disable-strict-mode-rules.schematic.d.ts +2 -0
- package/src/schematics/migrations/update-6/disable-strict-mode-rules.schematic.js +24 -0
- package/src/schematics/migrations/update-6/disable-strict-mode-rules.schematic.js.map +1 -0
- package/src/schematics/migrations/update-6/ensure-theme-stylesheets.schematic.d.ts +2 -0
- package/src/schematics/migrations/update-6/ensure-theme-stylesheets.schematic.js +8 -0
- package/src/schematics/migrations/update-6/ensure-theme-stylesheets.schematic.js.map +1 -0
- package/src/schematics/migrations/update-6/fix-deep-imports.schematic.d.ts +5 -0
- package/src/schematics/migrations/update-6/fix-deep-imports.schematic.js +19 -0
- package/src/schematics/migrations/update-6/fix-deep-imports.schematic.js.map +1 -0
- package/src/schematics/migrations/update-6/fix-imports-with-trailing-slash.schematic.d.ts +2 -0
- package/src/schematics/migrations/update-6/fix-imports-with-trailing-slash.schematic.js +13 -0
- package/src/schematics/migrations/update-6/fix-imports-with-trailing-slash.schematic.js.map +1 -0
- package/src/schematics/migrations/update-6/fix-ng-unsubscribe.schematic.d.ts +6 -0
- package/src/schematics/migrations/update-6/fix-ng-unsubscribe.schematic.js +28 -0
- package/src/schematics/migrations/update-6/fix-ng-unsubscribe.schematic.js.map +1 -0
- package/src/schematics/migrations/update-6/fix-rxjs-internal-compatibility-imports.schematic.d.ts +6 -0
- package/src/schematics/migrations/update-6/fix-rxjs-internal-compatibility-imports.schematic.js +23 -0
- package/src/schematics/migrations/update-6/fix-rxjs-internal-compatibility-imports.schematic.js.map +1 -0
- package/src/schematics/migrations/update-6/fix-scss-tilde-imports.schematic.d.ts +7 -0
- package/src/schematics/migrations/update-6/fix-scss-tilde-imports.schematic.js +33 -0
- package/src/schematics/migrations/update-6/fix-scss-tilde-imports.schematic.js.map +1 -0
- package/src/schematics/ng-add/ng-add.schematic.js +29 -20
- package/src/schematics/ng-add/ng-add.schematic.js.map +1 -1
- package/src/schematics/rules/add-crossvent-fix.d.ts +3 -0
- package/src/schematics/rules/add-crossvent-fix.js +34 -0
- package/src/schematics/rules/add-crossvent-fix.js.map +1 -0
- package/src/schematics/rules/apply-skyux-stylesheets-to-workspace.d.ts +2 -0
- package/src/schematics/rules/apply-skyux-stylesheets-to-workspace.js +26 -0
- package/src/schematics/rules/apply-skyux-stylesheets-to-workspace.js.map +1 -0
- package/src/schematics/{migrations/setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic.d.ts → rules/install-angular-cdk.d.ts} +1 -1
- package/src/schematics/rules/install-angular-cdk.js +18 -0
- package/src/schematics/rules/install-angular-cdk.js.map +1 -0
- package/src/schematics/rules/replace-typescript-imports.d.ts +9 -0
- package/src/schematics/rules/replace-typescript-imports.js +32 -0
- package/src/schematics/rules/replace-typescript-imports.js.map +1 -0
- package/src/schematics/testing/scaffold.js +33 -33
- package/src/schematics/testing/scaffold.js.map +1 -1
- package/src/schematics/utility/json-file.d.ts +23 -0
- package/src/schematics/utility/json-file.js +74 -0
- package/src/schematics/utility/json-file.js.map +1 -0
- package/src/schematics/utility/theme.d.ts +2 -0
- package/src/schematics/utility/theme.js +22 -0
- package/src/schematics/utility/theme.js.map +1 -0
- package/src/schematics/utility/workspace.js +24 -37
- package/src/schematics/utility/workspace.js.map +1 -1
- package/src/schematics/migrations/add-cdk/add-cdk.schematic.js +0 -32
- package/src/schematics/migrations/add-cdk/add-cdk.schematic.js.map +0 -1
- package/src/schematics/migrations/remove-package-json-scripts/remove-package-json-scripts.schematic.js +0 -16
- package/src/schematics/migrations/remove-package-json-scripts/remove-package-json-scripts.schematic.js.map +0 -1
- package/src/schematics/migrations/setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic.js +0 -51
- package/src/schematics/migrations/setup-coverage-for-testing-module/setup-coverage-for-testing-module.schematic.js.map +0 -1
- package/src/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.d.ts +0 -2
- package/src/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.js +0 -39
- package/src/schematics/migrations/update-peer-dependencies/update-peer-dependencies.schematic.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/packages",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-beta.10",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"description": "Handles the `ng update` command for SKY UX component libraries.",
|
|
6
6
|
"keywords": [
|
|
@@ -27,65 +27,65 @@
|
|
|
27
27
|
"@blackbaud/skyux-lib-code-block": "^5.0.0-beta.0",
|
|
28
28
|
"@blackbaud/skyux-lib-media": "^5.0.0-beta.0",
|
|
29
29
|
"@blackbaud/skyux-lib-stache": "^5.0.0-beta.0",
|
|
30
|
-
"@skyux-sdk/
|
|
31
|
-
"@skyux-sdk/
|
|
32
|
-
"@skyux
|
|
33
|
-
"@skyux-
|
|
34
|
-
"@skyux-
|
|
35
|
-
"@skyux/
|
|
36
|
-
"@skyux/
|
|
37
|
-
"@skyux/
|
|
38
|
-
"@skyux/
|
|
39
|
-
"@skyux/
|
|
40
|
-
"@skyux/
|
|
41
|
-
"@skyux/
|
|
42
|
-
"@skyux/
|
|
43
|
-
"@skyux/
|
|
44
|
-
"@skyux/
|
|
45
|
-
"@skyux/
|
|
46
|
-
"@skyux/
|
|
47
|
-
"@skyux/
|
|
48
|
-
"@skyux/
|
|
49
|
-
"@skyux/
|
|
50
|
-
"@skyux/
|
|
51
|
-
"@skyux/
|
|
52
|
-
"@skyux/forms": "5.9.4",
|
|
53
|
-
"@skyux/grids": "5.9.4",
|
|
54
|
-
"@skyux/http": "5.9.4",
|
|
55
|
-
"@skyux/i18n": "5.9.4",
|
|
30
|
+
"@skyux-sdk/prettier-schematics": "6.0.0-beta.10",
|
|
31
|
+
"@skyux-sdk/testing": "6.0.0-beta.10",
|
|
32
|
+
"@skyux/a11y": "6.0.0-beta.10",
|
|
33
|
+
"@skyux/action-bars": "6.0.0-beta.10",
|
|
34
|
+
"@skyux/ag-grid": "6.0.0-beta.10",
|
|
35
|
+
"@skyux/angular-tree-component": "6.0.0-beta.10",
|
|
36
|
+
"@skyux/animations": "6.0.0-beta.10",
|
|
37
|
+
"@skyux/assets": "6.0.0-beta.10",
|
|
38
|
+
"@skyux/autonumeric": "6.0.0-beta.10",
|
|
39
|
+
"@skyux/avatar": "6.0.0-beta.10",
|
|
40
|
+
"@skyux/colorpicker": "6.0.0-beta.10",
|
|
41
|
+
"@skyux/config": "6.0.0-beta.10",
|
|
42
|
+
"@skyux/core": "6.0.0-beta.10",
|
|
43
|
+
"@skyux/data-manager": "6.0.0-beta.10",
|
|
44
|
+
"@skyux/datetime": "6.0.0-beta.10",
|
|
45
|
+
"@skyux/docs-tools": "^6.0.0-beta.0",
|
|
46
|
+
"@skyux/errors": "6.0.0-beta.10",
|
|
47
|
+
"@skyux/flyout": "6.0.0-beta.10",
|
|
48
|
+
"@skyux/forms": "6.0.0-beta.10",
|
|
49
|
+
"@skyux/grids": "6.0.0-beta.10",
|
|
50
|
+
"@skyux/http": "6.0.0-beta.10",
|
|
51
|
+
"@skyux/i18n": "6.0.0-beta.10",
|
|
56
52
|
"@skyux/icons": "^5.0.0",
|
|
57
|
-
"@skyux/indicators": "
|
|
58
|
-
"@skyux/inline-form": "
|
|
59
|
-
"@skyux/layout": "
|
|
60
|
-
"@skyux/list-builder": "
|
|
61
|
-
"@skyux/list-builder-common": "
|
|
62
|
-
"@skyux/list-builder-view-checklist": "
|
|
63
|
-
"@skyux/list-builder-view-grids": "
|
|
64
|
-
"@skyux/lists": "
|
|
65
|
-
"@skyux/lookup": "
|
|
66
|
-
"@skyux/modals": "
|
|
67
|
-
"@skyux/navbar": "
|
|
68
|
-
"@skyux/omnibar-interop": "
|
|
69
|
-
"@skyux/pages": "
|
|
70
|
-
"@skyux/phone-field": "
|
|
71
|
-
"@skyux/popovers": "
|
|
72
|
-
"@skyux/progress-indicator": "
|
|
73
|
-
"@skyux/router": "
|
|
74
|
-
"@skyux/select-field": "
|
|
75
|
-
"@skyux/split-view": "
|
|
76
|
-
"@skyux/tabs": "
|
|
77
|
-
"@skyux/text-editor": "
|
|
78
|
-
"@skyux/theme": "
|
|
79
|
-
"@skyux/tiles": "
|
|
80
|
-
"@skyux/toast": "
|
|
81
|
-
"@skyux/validation": "
|
|
53
|
+
"@skyux/indicators": "6.0.0-beta.10",
|
|
54
|
+
"@skyux/inline-form": "6.0.0-beta.10",
|
|
55
|
+
"@skyux/layout": "6.0.0-beta.10",
|
|
56
|
+
"@skyux/list-builder": "6.0.0-beta.10",
|
|
57
|
+
"@skyux/list-builder-common": "6.0.0-beta.10",
|
|
58
|
+
"@skyux/list-builder-view-checklist": "6.0.0-beta.10",
|
|
59
|
+
"@skyux/list-builder-view-grids": "6.0.0-beta.10",
|
|
60
|
+
"@skyux/lists": "6.0.0-beta.10",
|
|
61
|
+
"@skyux/lookup": "6.0.0-beta.10",
|
|
62
|
+
"@skyux/modals": "6.0.0-beta.10",
|
|
63
|
+
"@skyux/navbar": "6.0.0-beta.10",
|
|
64
|
+
"@skyux/omnibar-interop": "6.0.0-beta.10",
|
|
65
|
+
"@skyux/pages": "6.0.0-beta.10",
|
|
66
|
+
"@skyux/phone-field": "6.0.0-beta.10",
|
|
67
|
+
"@skyux/popovers": "6.0.0-beta.10",
|
|
68
|
+
"@skyux/progress-indicator": "6.0.0-beta.10",
|
|
69
|
+
"@skyux/router": "6.0.0-beta.10",
|
|
70
|
+
"@skyux/select-field": "6.0.0-beta.10",
|
|
71
|
+
"@skyux/split-view": "6.0.0-beta.10",
|
|
72
|
+
"@skyux/tabs": "6.0.0-beta.10",
|
|
73
|
+
"@skyux/text-editor": "6.0.0-beta.10",
|
|
74
|
+
"@skyux/theme": "6.0.0-beta.10",
|
|
75
|
+
"@skyux/tiles": "6.0.0-beta.10",
|
|
76
|
+
"@skyux/toast": "6.0.0-beta.10",
|
|
77
|
+
"@skyux/validation": "6.0.0-beta.10",
|
|
78
|
+
"ag-grid-angular": "^27.2.0",
|
|
79
|
+
"ag-grid-community": "^27.2.0",
|
|
80
|
+
"ag-grid-enterprise": "^27.2.0"
|
|
82
81
|
}
|
|
83
82
|
},
|
|
84
83
|
"peerDependencies": {
|
|
85
|
-
"@angular/cli": "^
|
|
84
|
+
"@angular/cli": "^13.3.2"
|
|
86
85
|
},
|
|
87
86
|
"dependencies": {
|
|
88
87
|
"fs-extra": "10.0.0",
|
|
88
|
+
"jsonc-parser": "3.0.0",
|
|
89
89
|
"latest-version": "5.1.0"
|
|
90
90
|
},
|
|
91
91
|
"main": "./src/index.js",
|
|
@@ -1,29 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schematics": {
|
|
3
3
|
"noop": {
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "6.0.0-beta.10",
|
|
5
5
|
"factory": "./noop/noop.schematic",
|
|
6
6
|
"description": "Update all SKY UX component packages"
|
|
7
7
|
},
|
|
8
|
-
"
|
|
9
|
-
"version": "
|
|
10
|
-
"factory": "./update-
|
|
11
|
-
"description": "
|
|
8
|
+
"add-cdk": {
|
|
9
|
+
"version": "6.0.0",
|
|
10
|
+
"factory": "./update-6/add-cdk.schematic",
|
|
11
|
+
"description": "Add @angular/cdk if applicable"
|
|
12
12
|
},
|
|
13
|
-
"
|
|
14
|
-
"version": "
|
|
15
|
-
"factory": "./
|
|
16
|
-
"description": "
|
|
13
|
+
"disable-strict-mode-rules": {
|
|
14
|
+
"version": "6.0.0",
|
|
15
|
+
"factory": "./update-6/disable-strict-mode-rules.schematic",
|
|
16
|
+
"description": "Disable 'strictNullChecks' due to some breaking changes introduced in TypeScript 4.4."
|
|
17
17
|
},
|
|
18
|
-
"
|
|
19
|
-
"version": "
|
|
20
|
-
"factory": "./
|
|
21
|
-
"description": "
|
|
18
|
+
"fix-deep-imports": {
|
|
19
|
+
"version": "6.0.0",
|
|
20
|
+
"factory": "./update-6/fix-deep-imports.schematic",
|
|
21
|
+
"description": "Fix deep imports into @skyux packages"
|
|
22
22
|
},
|
|
23
|
-
"
|
|
24
|
-
"version": "
|
|
25
|
-
"factory": "./
|
|
26
|
-
"description": "
|
|
23
|
+
"fix-imports-with-trailing-slash": {
|
|
24
|
+
"version": "6.0.0",
|
|
25
|
+
"factory": "./update-6/fix-imports-with-trailing-slash.schematic",
|
|
26
|
+
"description": "Remove trailing slashes from TypeScript import statements"
|
|
27
|
+
},
|
|
28
|
+
"fix-ng-unsubscribe": {
|
|
29
|
+
"version": "6.0.0",
|
|
30
|
+
"factory": "./update-6/fix-ng-unsubscribe.schematic",
|
|
31
|
+
"description": "Set 'ngUnsubscribe' Subject<any> to Subject<void>"
|
|
32
|
+
},
|
|
33
|
+
"fix-rxjs-internal-compatibility-imports": {
|
|
34
|
+
"version": "6.0.0",
|
|
35
|
+
"factory": "./update-6/fix-rxjs-internal-compatibility-imports.schematic",
|
|
36
|
+
"description": "Fix imports from 'rxjs/internal-compatibility'"
|
|
37
|
+
},
|
|
38
|
+
"fix-scss-tilde-imports": {
|
|
39
|
+
"version": "6.0.0",
|
|
40
|
+
"factory": "./update-6/fix-scss-tilde-imports.schematic",
|
|
41
|
+
"description": "Remove tilde character from SCSS imports"
|
|
42
|
+
},
|
|
43
|
+
"crossvent": {
|
|
44
|
+
"version": "6.0.0",
|
|
45
|
+
"factory": "./update-6/crossvent.schematic",
|
|
46
|
+
"description": "Apply fix for crossvent 'global is not defined' error"
|
|
47
|
+
},
|
|
48
|
+
"ensure-theme-stylesheets": {
|
|
49
|
+
"version": "6.0.0",
|
|
50
|
+
"factory": "./update-6/ensure-theme-stylesheets.schematic",
|
|
51
|
+
"description": "Ensure applications reference SKY UX stylesheets correctly"
|
|
27
52
|
}
|
|
28
53
|
}
|
|
29
54
|
}
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const install_angular_cdk_1 = require("../../rules/install-angular-cdk");
|
|
4
|
+
function default_1() {
|
|
5
|
+
return (0, install_angular_cdk_1.installAngularCdk)();
|
|
6
|
+
}
|
|
7
|
+
exports.default = default_1;
|
|
8
|
+
//# sourceMappingURL=add-cdk.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-cdk.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/migrations/update-6/add-cdk.schematic.ts"],"names":[],"mappings":";;AAEA,yEAAoE;AAEpE;IACE,OAAO,IAAA,uCAAiB,GAAE,CAAC;AAC7B,CAAC;AAFD,4BAEC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
-
export default function (): Rule;
|
|
2
|
+
export default function crossventFix(): Rule;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const add_crossvent_fix_1 = require("../../rules/add-crossvent-fix");
|
|
4
|
+
const workspace_1 = require("../../utility/workspace");
|
|
5
|
+
function crossventFix() {
|
|
6
|
+
return async (tree) => {
|
|
7
|
+
const { workspace } = await (0, workspace_1.getWorkspace)(tree);
|
|
8
|
+
return (0, add_crossvent_fix_1.addCrossventFix)(workspace);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.default = crossventFix;
|
|
12
|
+
//# sourceMappingURL=crossvent.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crossvent.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/migrations/update-6/crossvent.schematic.ts"],"names":[],"mappings":";;AAEA,qEAAgE;AAChE,uDAAuD;AAEvD,SAAwB,YAAY;IAClC,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAA,wBAAY,EAAC,IAAI,CAAC,CAAC;QAE/C,OAAO,IAAA,mCAAe,EAAC,SAAS,CAAC,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC;AAND,+BAMC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const json_file_1 = require("../../utility/json-file");
|
|
4
|
+
const tree_1 = require("../../utility/tree");
|
|
5
|
+
function disableStrictModeRules() {
|
|
6
|
+
return async (tree, context) => {
|
|
7
|
+
const tsConfig = new json_file_1.JsonFile(tree, 'tsconfig.json');
|
|
8
|
+
if (tsConfig.get(['compilerOptions', 'strict']) === true &&
|
|
9
|
+
tsConfig.get(['compilerOptions', 'strictNullChecks']) !== false) {
|
|
10
|
+
const contents = (0, tree_1.readRequiredFile)(tree, 'tsconfig.json').replace(/"compilerOptions": +{/, `"compilerOptions": {
|
|
11
|
+
// TypeScript 4.4 introduces breaking changes for the rule "strictNullChecks".
|
|
12
|
+
// See: https://github.com/microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#any-and-unknown-are-considered-possibly-falsy-in--expressions
|
|
13
|
+
// TODO: Remove "strictNullChecks" and address any build errors.
|
|
14
|
+
"strictNullChecks": false,`);
|
|
15
|
+
tree.overwrite('tsconfig.json', contents);
|
|
16
|
+
context.logger.warn('\nStrict mode is enabled for your project. ' +
|
|
17
|
+
'The latest version of TypeScript introduces new implementations for strict mode which may result in build errors that you will need to resolve manually. ' +
|
|
18
|
+
"We've disabled the affected rules in your tsconfig.json file, but you can enable them later if you wish. " +
|
|
19
|
+
'\nFor more information, see: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-4.html.\n');
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
exports.default = disableStrictModeRules;
|
|
24
|
+
//# sourceMappingURL=disable-strict-mode-rules.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disable-strict-mode-rules.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/migrations/update-6/disable-strict-mode-rules.schematic.ts"],"names":[],"mappings":";;AAEA,uDAAmD;AACnD,6CAAsD;AAEtD,SAAwB,sBAAsB;IAC5C,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,MAAM,QAAQ,GAAG,IAAI,oBAAQ,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAErD,IACE,QAAQ,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC,KAAK,IAAI;YACpD,QAAQ,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,KAAK,KAAK,EAC/D;YACA,MAAM,QAAQ,GAAG,IAAA,uBAAgB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC,OAAO,CAC9D,uBAAuB,EACvB;;;;+BAIuB,CACxB,CAAC;YAEF,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;YAE1C,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,6CAA6C;gBAC3C,2JAA2J;gBAC3J,2GAA2G;gBAC3G,gHAAgH,CACnH,CAAC;SACH;IACH,CAAC,CAAC;AACJ,CAAC;AA3BD,yCA2BC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const apply_skyux_stylesheets_to_workspace_1 = require("../../rules/apply-skyux-stylesheets-to-workspace");
|
|
4
|
+
function ensureSkyuxThemeStylesheets() {
|
|
5
|
+
return (0, apply_skyux_stylesheets_to_workspace_1.applySkyuxStylesheetsToWorkspace)();
|
|
6
|
+
}
|
|
7
|
+
exports.default = ensureSkyuxThemeStylesheets;
|
|
8
|
+
//# sourceMappingURL=ensure-theme-stylesheets.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensure-theme-stylesheets.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/migrations/update-6/ensure-theme-stylesheets.schematic.ts"],"names":[],"mappings":";;AAEA,2GAAoG;AAEpG,SAAwB,2BAA2B;IACjD,OAAO,IAAA,uEAAgC,GAAE,CAAC;AAC5C,CAAC;AAFD,8CAEC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const replace_typescript_imports_1 = require("../../rules/replace-typescript-imports");
|
|
4
|
+
/**
|
|
5
|
+
* Remove deep imports to '@skyux' packages.
|
|
6
|
+
*/
|
|
7
|
+
function fixDeepImports() {
|
|
8
|
+
return (0, replace_typescript_imports_1.replaceTypeScriptImports)((importStatement, importPath) => {
|
|
9
|
+
const fragments = importPath.split('/');
|
|
10
|
+
if (fragments.length > 2 &&
|
|
11
|
+
fragments[0] === '@skyux' &&
|
|
12
|
+
fragments[2] !== 'testing') {
|
|
13
|
+
return importStatement.replace(importPath, `${fragments[0]}/${fragments[1]}`);
|
|
14
|
+
}
|
|
15
|
+
return importStatement;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
exports.default = fixDeepImports;
|
|
19
|
+
//# sourceMappingURL=fix-deep-imports.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix-deep-imports.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/migrations/update-6/fix-deep-imports.schematic.ts"],"names":[],"mappings":";;AAEA,uFAAkF;AAElF;;GAEG;AACH,SAAwB,cAAc;IACpC,OAAO,IAAA,qDAAwB,EAAC,CAAC,eAAe,EAAE,UAAU,EAAE,EAAE;QAC9D,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,IACE,SAAS,CAAC,MAAM,GAAG,CAAC;YACpB,SAAS,CAAC,CAAC,CAAC,KAAK,QAAQ;YACzB,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,EAC1B;YACA,OAAO,eAAe,CAAC,OAAO,CAC5B,UAAU,EACV,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,CAClC,CAAC;SACH;QACD,OAAO,eAAe,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC;AAfD,iCAeC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const replace_typescript_imports_1 = require("../../rules/replace-typescript-imports");
|
|
4
|
+
function fixImportsWithTrailingSlash() {
|
|
5
|
+
return (0, replace_typescript_imports_1.replaceTypeScriptImports)((importStatement, importPath) => {
|
|
6
|
+
if (importPath.endsWith('/')) {
|
|
7
|
+
return importStatement.replace(importPath, importPath.slice(0, -1));
|
|
8
|
+
}
|
|
9
|
+
return importStatement;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
exports.default = fixImportsWithTrailingSlash;
|
|
13
|
+
//# sourceMappingURL=fix-imports-with-trailing-slash.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix-imports-with-trailing-slash.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/migrations/update-6/fix-imports-with-trailing-slash.schematic.ts"],"names":[],"mappings":";;AAEA,uFAAkF;AAElF,SAAwB,2BAA2B;IACjD,OAAO,IAAA,qDAAwB,EAAC,CAAC,eAAe,EAAE,UAAU,EAAE,EAAE;QAC9D,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC5B,OAAO,eAAe,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;SACrE;QACD,OAAO,eAAe,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,8CAOC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
/**
|
|
3
|
+
* Convert any occurance of `ngUnsubscribe` from `Subject<any>` to `Subject<void>`.
|
|
4
|
+
* @see https://github.com/ReactiveX/rxjs/issues/6324#issuecomment-831645897
|
|
5
|
+
*/
|
|
6
|
+
export default function fixNgUnsubscribeGenerics(): Rule;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@angular-devkit/core");
|
|
4
|
+
const tree_1 = require("../../utility/tree");
|
|
5
|
+
/**
|
|
6
|
+
* Convert any occurance of `ngUnsubscribe` from `Subject<any>` to `Subject<void>`.
|
|
7
|
+
* @see https://github.com/ReactiveX/rxjs/issues/6324#issuecomment-831645897
|
|
8
|
+
*/
|
|
9
|
+
function fixNgUnsubscribeGenerics() {
|
|
10
|
+
return (tree) => {
|
|
11
|
+
const visitor = (filePath) => {
|
|
12
|
+
const extension = (0, core_1.extname)(filePath);
|
|
13
|
+
if (extension === '.ts') {
|
|
14
|
+
const content = (0, tree_1.readRequiredFile)(tree, filePath);
|
|
15
|
+
const migratedContent = content.replace(/(?:ngUnsubscribe).*(Subject<any>)/g, (match, group) => {
|
|
16
|
+
return match.replace(group, group.replace('<any>', '<void>'));
|
|
17
|
+
});
|
|
18
|
+
if (migratedContent !== content) {
|
|
19
|
+
tree.overwrite(filePath, migratedContent);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
tree.getDir('projects').visit(visitor);
|
|
24
|
+
tree.getDir('src').visit(visitor);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.default = fixNgUnsubscribeGenerics;
|
|
28
|
+
//# sourceMappingURL=fix-ng-unsubscribe.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix-ng-unsubscribe.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/migrations/update-6/fix-ng-unsubscribe.schematic.ts"],"names":[],"mappings":";;AAAA,+CAA+C;AAG/C,6CAAsD;AAEtD;;;GAGG;AACH,SAAwB,wBAAwB;IAC9C,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,OAAO,GAAgB,CAAC,QAAQ,EAAE,EAAE;YACxC,MAAM,SAAS,GAAG,IAAA,cAAO,EAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,SAAS,KAAK,KAAK,EAAE;gBACvB,MAAM,OAAO,GAAG,IAAA,uBAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAEjD,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CACrC,oCAAoC,EACpC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;oBACf,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;gBAChE,CAAC,CACF,CAAC;gBAEF,IAAI,eAAe,KAAK,OAAO,EAAE;oBAC/B,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;iBAC3C;aACF;QACH,CAAC,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC;AAvBD,2CAuBC"}
|
package/src/schematics/migrations/update-6/fix-rxjs-internal-compatibility-imports.schematic.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const replace_typescript_imports_1 = require("../../rules/replace-typescript-imports");
|
|
4
|
+
/**
|
|
5
|
+
* Replace imports from 'rxjs/internal-compatibility' with 'rxjs' since
|
|
6
|
+
* this entry point was removed in RxJS v7.
|
|
7
|
+
*/
|
|
8
|
+
function fixRxJsInternalCompatibilityImports() {
|
|
9
|
+
return (0, replace_typescript_imports_1.replaceTypeScriptImports)((importStatement, importPath, fileContents) => {
|
|
10
|
+
if (importPath === 'rxjs/internal-compatibility') {
|
|
11
|
+
// Make sure 'from' isn't already imported.
|
|
12
|
+
importStatement =
|
|
13
|
+
/import +{[\s\w,]*from[\s\w,]*} +from\s+['"]rxjs['"]/.test(fileContents)
|
|
14
|
+
? ''
|
|
15
|
+
: "import { from } from 'rxjs';";
|
|
16
|
+
}
|
|
17
|
+
return importStatement;
|
|
18
|
+
},
|
|
19
|
+
// Replace all occurances of 'fromPromise' with 'from'.
|
|
20
|
+
(fileContents) => fileContents.replace(/fromPromise\(/g, 'from('));
|
|
21
|
+
}
|
|
22
|
+
exports.default = fixRxJsInternalCompatibilityImports;
|
|
23
|
+
//# sourceMappingURL=fix-rxjs-internal-compatibility-imports.schematic.js.map
|
package/src/schematics/migrations/update-6/fix-rxjs-internal-compatibility-imports.schematic.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix-rxjs-internal-compatibility-imports.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/migrations/update-6/fix-rxjs-internal-compatibility-imports.schematic.ts"],"names":[],"mappings":";;AAEA,uFAAkF;AAElF;;;GAGG;AACH,SAAwB,mCAAmC;IACzD,OAAO,IAAA,qDAAwB,EAC7B,CAAC,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE;QAC5C,IAAI,UAAU,KAAK,6BAA6B,EAAE;YAChD,2CAA2C;YAC3C,eAAe;gBACb,qDAAqD,CAAC,IAAI,CACxD,YAAY,CACb;oBACC,CAAC,CAAC,EAAE;oBACJ,CAAC,CAAC,8BAA8B,CAAC;SACtC;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;IACD,uDAAuD;IACvD,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAClE,CAAC;AACJ,CAAC;AAlBD,sDAkBC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
/**
|
|
3
|
+
* Replaces the tilde character in SCSS import statements with 'node_modules', since
|
|
4
|
+
* support for the tilde was dropped in Angular 13.
|
|
5
|
+
* @see: https://github.com/angular/components/commit/f2ff9e31425f0e395e6926bcaf48f876688000d8
|
|
6
|
+
*/
|
|
7
|
+
export default function fixScssTildeImports(): Rule;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@angular-devkit/core");
|
|
4
|
+
const tree_1 = require("../../utility/tree");
|
|
5
|
+
/**
|
|
6
|
+
* Replaces the tilde character in SCSS import statements with 'node_modules', since
|
|
7
|
+
* support for the tilde was dropped in Angular 13.
|
|
8
|
+
* @see: https://github.com/angular/components/commit/f2ff9e31425f0e395e6926bcaf48f876688000d8
|
|
9
|
+
*/
|
|
10
|
+
function fixScssTildeImports() {
|
|
11
|
+
return async (tree) => {
|
|
12
|
+
const visitor = (filePath) => {
|
|
13
|
+
const extension = (0, core_1.extname)(filePath);
|
|
14
|
+
if (extension === '.scss' || extension === '.css') {
|
|
15
|
+
const content = (0, tree_1.readRequiredFile)(tree, filePath);
|
|
16
|
+
const migratedContent = content.replace(/@(?:import|use) +['"](~.*)['"].*;?/g, (match, importPath) => {
|
|
17
|
+
return match.replace(importPath, importPath
|
|
18
|
+
// Replace leading tilde.
|
|
19
|
+
.replace(/^~/, 'node_modules/')
|
|
20
|
+
// Remove path extensions.
|
|
21
|
+
.replace(/\.(s?css)$/, ''));
|
|
22
|
+
});
|
|
23
|
+
if (content !== migratedContent) {
|
|
24
|
+
tree.overwrite(filePath, migratedContent);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
tree.getDir('projects').visit(visitor);
|
|
29
|
+
tree.getDir('src').visit(visitor);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
exports.default = fixScssTildeImports;
|
|
33
|
+
//# sourceMappingURL=fix-scss-tilde-imports.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix-scss-tilde-imports.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/migrations/update-6/fix-scss-tilde-imports.schematic.ts"],"names":[],"mappings":";;AAAA,+CAA+C;AAG/C,6CAAsD;AAEtD;;;;GAIG;AACH,SAAwB,mBAAmB;IACzC,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,MAAM,OAAO,GAAgB,CAAC,QAAQ,EAAE,EAAE;YACxC,MAAM,SAAS,GAAG,IAAA,cAAO,EAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,SAAS,KAAK,OAAO,IAAI,SAAS,KAAK,MAAM,EAAE;gBACjD,MAAM,OAAO,GAAG,IAAA,uBAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAEjD,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CACrC,qCAAqC,EACrC,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE;oBACpB,OAAO,KAAK,CAAC,OAAO,CAClB,UAAU,EACV,UAAU;wBACR,yBAAyB;yBACxB,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC;wBAC/B,0BAA0B;yBACzB,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAC7B,CAAC;gBACJ,CAAC,CACF,CAAC;gBAEF,IAAI,OAAO,KAAK,eAAe,EAAE;oBAC/B,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;iBAC3C;aACF;QACH,CAAC,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC;AA9BD,sCA8BC"}
|
|
@@ -1,39 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
6
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
7
|
const latest_version_1 = tslib_1.__importDefault(require("latest-version"));
|
|
7
8
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
9
|
+
const add_crossvent_fix_1 = require("../rules/add-crossvent-fix");
|
|
10
|
+
const apply_skyux_stylesheets_to_workspace_1 = require("../rules/apply-skyux-stylesheets-to-workspace");
|
|
11
|
+
const install_angular_cdk_1 = require("../rules/install-angular-cdk");
|
|
8
12
|
const tree_1 = require("../utility/tree");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
13
|
+
const workspace_1 = require("../utility/workspace");
|
|
14
|
+
async function ensureLatestVersions(context, dependencies, packageGroup) {
|
|
15
|
+
for (const packageName in dependencies) {
|
|
16
|
+
const version = packageGroup[packageName];
|
|
17
|
+
if (version) {
|
|
18
|
+
// Get the latest version from NPM.
|
|
19
|
+
const latestVersion = await (0, latest_version_1.default)(packageName, { version });
|
|
20
|
+
if (latestVersion !== dependencies[packageName]) {
|
|
21
|
+
context.logger.info(`Updated "${packageName}" from version (${dependencies[packageName]}) to (${latestVersion}).`);
|
|
22
|
+
dependencies[packageName] = latestVersion;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
context.logger.info(`Skipped "${packageName}" because it is already on the latest version.`);
|
|
23
26
|
}
|
|
24
27
|
}
|
|
25
|
-
}
|
|
28
|
+
}
|
|
26
29
|
}
|
|
27
30
|
function ngAdd() {
|
|
28
|
-
return (tree, context) =>
|
|
31
|
+
return async (tree, context) => {
|
|
32
|
+
const { workspace } = await (0, workspace_1.getWorkspace)(tree);
|
|
29
33
|
const packageJsonPath = 'package.json';
|
|
30
|
-
const packageJson = JSON.parse(tree_1.readRequiredFile(tree, packageJsonPath));
|
|
34
|
+
const packageJson = JSON.parse((0, tree_1.readRequiredFile)(tree, packageJsonPath));
|
|
31
35
|
const { packageGroup } = fs_extra_1.default.readJsonSync(path_1.default.resolve(__dirname, '../../../package.json'))['ng-update'];
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
await ensureLatestVersions(context, packageJson.dependencies, packageGroup);
|
|
37
|
+
await ensureLatestVersions(context, packageJson.devDependencies, packageGroup);
|
|
34
38
|
tree.overwrite(packageJsonPath, JSON.stringify(packageJson, undefined, 2));
|
|
35
39
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
36
|
-
|
|
40
|
+
return (0, schematics_1.chain)([
|
|
41
|
+
(0, install_angular_cdk_1.installAngularCdk)(),
|
|
42
|
+
(0, add_crossvent_fix_1.addCrossventFix)(workspace),
|
|
43
|
+
(0, apply_skyux_stylesheets_to_workspace_1.applySkyuxStylesheetsToWorkspace)(),
|
|
44
|
+
]);
|
|
45
|
+
};
|
|
37
46
|
}
|
|
38
47
|
exports.default = ngAdd;
|
|
39
48
|
//# sourceMappingURL=ng-add.schematic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-add.schematic.js","sourceRoot":"","sources":["../../../../../../../libs/components/packages/src/schematics/ng-add/ng-add.schematic.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ng-add.schematic.js","sourceRoot":"","sources":["../../../../../../../libs/components/packages/src/schematics/ng-add/ng-add.schematic.ts"],"names":[],"mappings":";;;AAAA,2DAA2E;AAC3E,4DAA0E;AAE1E,gEAA0B;AAC1B,4EAA8C;AAC9C,wDAAwB;AAExB,kEAA6D;AAC7D,wGAAiG;AACjG,sEAAiE;AACjE,0CAAmD;AACnD,oDAAoD;AAEpD,KAAK,UAAU,oBAAoB,CACjC,OAAyB,EACzB,YAEC,EACD,YAEC;IAED,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE;QACtC,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;QAE1C,IAAI,OAAO,EAAE;YACX,mCAAmC;YACnC,MAAM,aAAa,GAAG,MAAM,IAAA,wBAAgB,EAAC,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;YAEvE,IAAI,aAAa,KAAK,YAAY,CAAC,WAAW,CAAC,EAAE;gBAC/C,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,YAAY,WAAW,mBAAmB,YAAY,CAAC,WAAW,CAAC,SAAS,aAAa,IAAI,CAC9F,CAAC;gBAEF,YAAY,CAAC,WAAW,CAAC,GAAG,aAAa,CAAC;aAC3C;iBAAM;gBACL,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,YAAY,WAAW,gDAAgD,CACxE,CAAC;aACH;SACF;KACF;AACH,CAAC;AAED,SAAwB,KAAK;IAC3B,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAA,wBAAY,EAAC,IAAI,CAAC,CAAC;QAE/C,MAAM,eAAe,GAAG,cAAc,CAAC;QACvC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,uBAAgB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC;QAExE,MAAM,EAAE,YAAY,EAAE,GAAG,kBAAE,CAAC,YAAY,CACtC,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,uBAAuB,CAAC,CACjD,CAAC,WAAW,CAAC,CAAC;QAEf,MAAM,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;QAC5E,MAAM,oBAAoB,CACxB,OAAO,EACP,WAAW,CAAC,eAAe,EAC3B,YAAY,CACb,CAAC;QAEF,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;QAE3E,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAE9C,OAAO,IAAA,kBAAK,EAAC;YACX,IAAA,uCAAiB,GAAE;YACnB,IAAA,mCAAe,EAAC,SAAS,CAAC;YAC1B,IAAA,uEAAgC,GAAE;SACnC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA5BD,wBA4BC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addCrossventFix = void 0;
|
|
4
|
+
const tree_1 = require("../utility/tree");
|
|
5
|
+
const CROSSVENT_FIX = '(window as any).global = window;';
|
|
6
|
+
function addCrossventFix(workspace) {
|
|
7
|
+
return (tree, context) => {
|
|
8
|
+
for (const project of workspace.projects.values()) {
|
|
9
|
+
const testTarget = project.targets.get('test');
|
|
10
|
+
/*istanbul ignore else*/
|
|
11
|
+
if (testTarget) {
|
|
12
|
+
if (testTarget.options.main) {
|
|
13
|
+
// Get the 'test.ts' entry point file path from the 'test' target.
|
|
14
|
+
const filePath = testTarget.options.main.toString();
|
|
15
|
+
const contents = (0, tree_1.readRequiredFile)(tree, filePath);
|
|
16
|
+
if (contents.includes(CROSSVENT_FIX)) {
|
|
17
|
+
context.logger.info('Fix for crossvent library already applied. Skipping.');
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
tree.overwrite(filePath, contents.replace(/(declare\sconst\srequire:)/, (_, group) => {
|
|
21
|
+
return `// Fix for crossvent "global is not defined" error. The crossvent library
|
|
22
|
+
// is used by Dragula, which in turn is used by multiple SKY UX components.
|
|
23
|
+
// See: https://github.com/bevacqua/dragula/issues/602
|
|
24
|
+
${CROSSVENT_FIX}
|
|
25
|
+
|
|
26
|
+
${group}`;
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
exports.addCrossventFix = addCrossventFix;
|
|
34
|
+
//# sourceMappingURL=add-crossvent-fix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-crossvent-fix.js","sourceRoot":"","sources":["../../../../../../../libs/components/packages/src/schematics/rules/add-crossvent-fix.ts"],"names":[],"mappings":";;;AAGA,0CAAmD;AAEnD,MAAM,aAAa,GAAG,kCAAkC,CAAC;AAEzD,SAAgB,eAAe,CAAC,SAA8B;IAC5D,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,KAAK,MAAM,OAAO,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE;YACjD,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAE/C,wBAAwB;YACxB,IAAI,UAAU,EAAE;gBACd,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE;oBAC3B,kEAAkE;oBAClE,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACpD,MAAM,QAAQ,GAAG,IAAA,uBAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;oBAElD,IAAI,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;wBACpC,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,sDAAsD,CACvD,CAAC;wBACF,OAAO;qBACR;oBAED,IAAI,CAAC,SAAS,CACZ,QAAQ,EACR,QAAQ,CAAC,OAAO,CAAC,4BAA4B,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;wBAC1D,OAAO;;;EAGnB,aAAa;;EAEb,KAAK,EAAE,CAAC;oBACE,CAAC,CAAC,CACH,CAAC;iBACH;aACF;SACF;IACH,CAAC,CAAC;AACJ,CAAC;AAlCD,0CAkCC"}
|