@skyux/packages 8.6.0 → 9.0.0-alpha.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 +49 -49
- package/src/schematics/migrations/migration-collection.json +4 -14
- package/src/schematics/migrations/update-9/update-angular-tree-component/update-angular-tree-component.schematic.js +19 -0
- package/src/schematics/migrations/update-9/update-angular-tree-component/update-angular-tree-component.schematic.js.map +1 -0
- package/src/schematics/rules/ensure-peers-installed.d.ts +2 -1
- package/src/schematics/rules/ensure-peers-installed.js +18 -3
- package/src/schematics/rules/ensure-peers-installed.js.map +1 -1
- package/src/schematics/utility/workspace.d.ts +7 -7
- package/src/schematics/utility/workspace.js +3 -3
- package/src/schematics/utility/workspace.js.map +1 -1
- package/src/schematics/migrations/update-8/add-compat-stylesheets/add-compat-stylesheets.js +0 -221
- package/src/schematics/migrations/update-8/add-compat-stylesheets/add-compat-stylesheets.js.map +0 -1
- package/src/schematics/migrations/update-8/update-autonumeric/update-autonumeric.d.ts +0 -6
- package/src/schematics/migrations/update-8/update-autonumeric/update-autonumeric.js +0 -37
- package/src/schematics/migrations/update-8/update-autonumeric/update-autonumeric.js.map +0 -1
- package/src/schematics/migrations/update-8/update-polyfill/update-polyfill.schematic.d.ts +0 -6
- package/src/schematics/migrations/update-8/update-polyfill/update-polyfill.schematic.js +0 -119
- package/src/schematics/migrations/update-8/update-polyfill/update-polyfill.schematic.js.map +0 -1
- /package/src/schematics/migrations/{update-8/add-compat-stylesheets/add-compat-stylesheets.d.ts → update-9/update-angular-tree-component/update-angular-tree-component.schematic.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/packages",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-alpha.0",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"description": "Handles the `ng update` command for SKY UX component libraries.",
|
|
6
6
|
"keywords": [
|
|
@@ -37,61 +37,61 @@
|
|
|
37
37
|
"ng-update": {
|
|
38
38
|
"migrations": "./src/schematics/migrations/migration-collection.json",
|
|
39
39
|
"packageGroup": {
|
|
40
|
-
"@skyux-sdk/eslint-config": "
|
|
41
|
-
"@skyux-sdk/prettier-schematics": "
|
|
42
|
-
"@skyux-sdk/testing": "
|
|
43
|
-
"@skyux/a11y": "
|
|
44
|
-
"@skyux/action-bars": "
|
|
45
|
-
"@skyux/ag-grid": "
|
|
46
|
-
"@skyux/angular-tree-component": "
|
|
47
|
-
"@skyux/animations": "
|
|
48
|
-
"@skyux/assets": "
|
|
49
|
-
"@skyux/autonumeric": "
|
|
50
|
-
"@skyux/avatar": "
|
|
51
|
-
"@skyux/colorpicker": "
|
|
52
|
-
"@skyux/config": "
|
|
53
|
-
"@skyux/core": "
|
|
54
|
-
"@skyux/data-manager": "
|
|
55
|
-
"@skyux/datetime": "
|
|
56
|
-
"@skyux/errors": "
|
|
57
|
-
"@skyux/flyout": "
|
|
58
|
-
"@skyux/forms": "
|
|
59
|
-
"@skyux/grids": "
|
|
60
|
-
"@skyux/http": "
|
|
61
|
-
"@skyux/i18n": "
|
|
40
|
+
"@skyux-sdk/eslint-config": "9.0.0-alpha.0",
|
|
41
|
+
"@skyux-sdk/prettier-schematics": "9.0.0-alpha.0",
|
|
42
|
+
"@skyux-sdk/testing": "9.0.0-alpha.0",
|
|
43
|
+
"@skyux/a11y": "9.0.0-alpha.0",
|
|
44
|
+
"@skyux/action-bars": "9.0.0-alpha.0",
|
|
45
|
+
"@skyux/ag-grid": "9.0.0-alpha.0",
|
|
46
|
+
"@skyux/angular-tree-component": "9.0.0-alpha.0",
|
|
47
|
+
"@skyux/animations": "9.0.0-alpha.0",
|
|
48
|
+
"@skyux/assets": "9.0.0-alpha.0",
|
|
49
|
+
"@skyux/autonumeric": "9.0.0-alpha.0",
|
|
50
|
+
"@skyux/avatar": "9.0.0-alpha.0",
|
|
51
|
+
"@skyux/colorpicker": "9.0.0-alpha.0",
|
|
52
|
+
"@skyux/config": "9.0.0-alpha.0",
|
|
53
|
+
"@skyux/core": "9.0.0-alpha.0",
|
|
54
|
+
"@skyux/data-manager": "9.0.0-alpha.0",
|
|
55
|
+
"@skyux/datetime": "9.0.0-alpha.0",
|
|
56
|
+
"@skyux/errors": "9.0.0-alpha.0",
|
|
57
|
+
"@skyux/flyout": "9.0.0-alpha.0",
|
|
58
|
+
"@skyux/forms": "9.0.0-alpha.0",
|
|
59
|
+
"@skyux/grids": "9.0.0-alpha.0",
|
|
60
|
+
"@skyux/http": "9.0.0-alpha.0",
|
|
61
|
+
"@skyux/i18n": "9.0.0-alpha.0",
|
|
62
62
|
"@skyux/icons": "^6.0.0",
|
|
63
|
-
"@skyux/indicators": "
|
|
64
|
-
"@skyux/inline-form": "
|
|
65
|
-
"@skyux/layout": "
|
|
66
|
-
"@skyux/list-builder": "
|
|
67
|
-
"@skyux/list-builder-common": "
|
|
68
|
-
"@skyux/list-builder-view-checklist": "
|
|
69
|
-
"@skyux/list-builder-view-grids": "
|
|
70
|
-
"@skyux/lists": "
|
|
71
|
-
"@skyux/lookup": "
|
|
72
|
-
"@skyux/modals": "
|
|
73
|
-
"@skyux/navbar": "
|
|
74
|
-
"@skyux/omnibar-interop": "
|
|
75
|
-
"@skyux/pages": "
|
|
76
|
-
"@skyux/phone-field": "
|
|
77
|
-
"@skyux/popovers": "
|
|
78
|
-
"@skyux/progress-indicator": "
|
|
79
|
-
"@skyux/router": "
|
|
80
|
-
"@skyux/select-field": "
|
|
81
|
-
"@skyux/split-view": "
|
|
82
|
-
"@skyux/tabs": "
|
|
83
|
-
"@skyux/text-editor": "
|
|
84
|
-
"@skyux/theme": "
|
|
85
|
-
"@skyux/tiles": "
|
|
86
|
-
"@skyux/toast": "
|
|
87
|
-
"@skyux/validation": "
|
|
63
|
+
"@skyux/indicators": "9.0.0-alpha.0",
|
|
64
|
+
"@skyux/inline-form": "9.0.0-alpha.0",
|
|
65
|
+
"@skyux/layout": "9.0.0-alpha.0",
|
|
66
|
+
"@skyux/list-builder": "9.0.0-alpha.0",
|
|
67
|
+
"@skyux/list-builder-common": "9.0.0-alpha.0",
|
|
68
|
+
"@skyux/list-builder-view-checklist": "9.0.0-alpha.0",
|
|
69
|
+
"@skyux/list-builder-view-grids": "9.0.0-alpha.0",
|
|
70
|
+
"@skyux/lists": "9.0.0-alpha.0",
|
|
71
|
+
"@skyux/lookup": "9.0.0-alpha.0",
|
|
72
|
+
"@skyux/modals": "9.0.0-alpha.0",
|
|
73
|
+
"@skyux/navbar": "9.0.0-alpha.0",
|
|
74
|
+
"@skyux/omnibar-interop": "9.0.0-alpha.0",
|
|
75
|
+
"@skyux/pages": "9.0.0-alpha.0",
|
|
76
|
+
"@skyux/phone-field": "9.0.0-alpha.0",
|
|
77
|
+
"@skyux/popovers": "9.0.0-alpha.0",
|
|
78
|
+
"@skyux/progress-indicator": "9.0.0-alpha.0",
|
|
79
|
+
"@skyux/router": "9.0.0-alpha.0",
|
|
80
|
+
"@skyux/select-field": "9.0.0-alpha.0",
|
|
81
|
+
"@skyux/split-view": "9.0.0-alpha.0",
|
|
82
|
+
"@skyux/tabs": "9.0.0-alpha.0",
|
|
83
|
+
"@skyux/text-editor": "9.0.0-alpha.0",
|
|
84
|
+
"@skyux/theme": "9.0.0-alpha.0",
|
|
85
|
+
"@skyux/tiles": "9.0.0-alpha.0",
|
|
86
|
+
"@skyux/toast": "9.0.0-alpha.0",
|
|
87
|
+
"@skyux/validation": "9.0.0-alpha.0",
|
|
88
88
|
"ag-grid-angular": "^28.2.1",
|
|
89
89
|
"ag-grid-community": "^28.2.1",
|
|
90
90
|
"ag-grid-enterprise": "^28.2.1"
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"@angular/cli": "^
|
|
94
|
+
"@angular/cli": "^16.1.6"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
97
|
"fs-extra": "10.1.0",
|
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schematics": {
|
|
3
3
|
"noop": {
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "9.0.0-alpha.0",
|
|
5
5
|
"factory": "./noop/noop.schematic",
|
|
6
6
|
"description": "Update all SKY UX component packages"
|
|
7
7
|
},
|
|
8
|
-
"update-
|
|
8
|
+
"update-angular-tree-component": {
|
|
9
9
|
"version": "8.0.0-alpha.0",
|
|
10
|
-
"factory": "./update-
|
|
11
|
-
"description": "
|
|
12
|
-
},
|
|
13
|
-
"add-compat-stylesheets": {
|
|
14
|
-
"version": "8.0.0-alpha.0",
|
|
15
|
-
"factory": "./update-8/add-compat-stylesheets/add-compat-stylesheets",
|
|
16
|
-
"description": "Add a backwards-compatible stylesheet with styles that have been removed from components in SKY UX 8."
|
|
17
|
-
},
|
|
18
|
-
"update-autonumeric": {
|
|
19
|
-
"version": "8.0.0-alpha.0",
|
|
20
|
-
"factory": "./update-8/update-autonumeric/update-autonumeric",
|
|
21
|
-
"description": "Update autonumeric to version `4.8.1`."
|
|
10
|
+
"factory": "./update-9/update-angular-tree-component/update-angular-tree-component.schematic",
|
|
11
|
+
"description": "Update the angular tree component package to point to the Blackbaud forked version"
|
|
22
12
|
}
|
|
23
13
|
}
|
|
24
14
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
4
|
+
const ensure_peers_installed_1 = require("../../../rules/ensure-peers-installed");
|
|
5
|
+
function default_1() {
|
|
6
|
+
return (0, ensure_peers_installed_1.ensurePeersInstalled)('@skyux/angular-tree-component', [
|
|
7
|
+
{
|
|
8
|
+
name: '@blackbaud/angular-tree-component',
|
|
9
|
+
version: '1.0.0-alpha.0',
|
|
10
|
+
type: dependencies_1.NodeDependencyType.Default,
|
|
11
|
+
},
|
|
12
|
+
], [
|
|
13
|
+
{
|
|
14
|
+
name: '@circlon/angular-tree-component',
|
|
15
|
+
},
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
exports.default = default_1;
|
|
19
|
+
//# sourceMappingURL=update-angular-tree-component.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-angular-tree-component.schematic.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/packages/src/schematics/migrations/update-9/update-angular-tree-component/update-angular-tree-component.schematic.ts"],"names":[],"mappings":";;AACA,2EAA8E;AAE9E,kFAA6E;AAE7E;IACE,OAAO,IAAA,6CAAoB,EACzB,+BAA+B,EAC/B;QACE;YACE,IAAI,EAAE,mCAAmC;YACzC,OAAO,EAAE,eAAe;YACxB,IAAI,EAAE,iCAAkB,CAAC,OAAO;SACjC;KACF,EACD;QACE;YACE,IAAI,EAAE,iCAAiC;SACxC;KACF,CACF,CAAC;AACJ,CAAC;AAhBD,4BAgBC"}
|
|
@@ -10,6 +10,7 @@ type PackageDetails = {
|
|
|
10
10
|
* If the client does not use the target package, this function is skipped.
|
|
11
11
|
* @param targetPackageName The name of the package that has peer dependencies.
|
|
12
12
|
* @param peers The target package's peer dependencies to install on the client's workspace.
|
|
13
|
+
* @param peersToRemove The target package's prior peer dependencies that should be removed. NOTE: This should be done with extreme caution and only on things that we have high certainty won't be there for other reasons.
|
|
13
14
|
*/
|
|
14
|
-
export declare function ensurePeersInstalled(targetPackageName: string, peers: PackageDetails[]): Rule;
|
|
15
|
+
export declare function ensurePeersInstalled(targetPackageName: string, peers: PackageDetails[], peersToRemove?: Pick<PackageDetails, 'name'>[]): Rule;
|
|
15
16
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ensurePeersInstalled = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
6
|
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
6
7
|
const tree_1 = require("../utility/tree");
|
|
@@ -18,20 +19,34 @@ function installPackages(packages) {
|
|
|
18
19
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
19
20
|
};
|
|
20
21
|
}
|
|
22
|
+
function uninstallPackages(packages) {
|
|
23
|
+
return (tree, context) => {
|
|
24
|
+
/* istanbul ignore else */
|
|
25
|
+
if (packages) {
|
|
26
|
+
for (const details of packages) {
|
|
27
|
+
(0, dependencies_1.removePackageJsonDependency)(tree, details.name, '/package.json');
|
|
28
|
+
}
|
|
29
|
+
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
21
33
|
/**
|
|
22
34
|
* Ensures peer dependencies for a given package are installed on the client's workspace.
|
|
23
35
|
* If the client does not use the target package, this function is skipped.
|
|
24
36
|
* @param targetPackageName The name of the package that has peer dependencies.
|
|
25
37
|
* @param peers The target package's peer dependencies to install on the client's workspace.
|
|
38
|
+
* @param peersToRemove The target package's prior peer dependencies that should be removed. NOTE: This should be done with extreme caution and only on things that we have high certainty won't be there for other reasons.
|
|
26
39
|
*/
|
|
27
|
-
function ensurePeersInstalled(targetPackageName, peers) {
|
|
28
|
-
return (tree) => {
|
|
40
|
+
function ensurePeersInstalled(targetPackageName, peers, peersToRemove) {
|
|
41
|
+
return async (tree) => {
|
|
29
42
|
const packageJson = JSON.parse((0, tree_1.readRequiredFile)(tree, '/package.json'));
|
|
30
43
|
const dependencies = {
|
|
31
44
|
...(packageJson.dependencies || {}),
|
|
32
45
|
...(packageJson.devDependencies || {}),
|
|
33
46
|
};
|
|
34
|
-
return dependencies[targetPackageName]
|
|
47
|
+
return dependencies[targetPackageName]
|
|
48
|
+
? (0, schematics_1.chain)([uninstallPackages(peersToRemove), installPackages(peers)])
|
|
49
|
+
: undefined;
|
|
35
50
|
};
|
|
36
51
|
}
|
|
37
52
|
exports.ensurePeersInstalled = ensurePeersInstalled;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensure-peers-installed.js","sourceRoot":"","sources":["../../../../../../../libs/components/packages/src/schematics/rules/ensure-peers-installed.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ensure-peers-installed.js","sourceRoot":"","sources":["../../../../../../../libs/components/packages/src/schematics/rules/ensure-peers-installed.ts"],"names":[],"mappings":";;;AAAA,2DAAyD;AACzD,4DAA0E;AAC1E,2EAIkD;AAElD,0CAAmD;AAQnD,SAAS,eAAe,CAAC,QAA0B;IACjD,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC9B,4FAA4F;YAC5F,IAAA,0CAA2B,EAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YACjE,IAAA,uCAAwB,EAAC,IAAI,EAAE;gBAC7B,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,OAAO,EAAE,OAAO,CAAC,OAAO;aACzB,CAAC,CAAC;SACJ;QAED,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAyC;IAClE,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,0BAA0B;QAC1B,IAAI,QAAQ,EAAE;YACZ,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;gBAC9B,IAAA,0CAA2B,EAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;aAClE;YAED,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;SAC/C;IACH,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAClC,iBAAyB,EACzB,KAAuB,EACvB,aAA8C;IAE9C,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,MAAM,WAAW,GAGb,IAAI,CAAC,KAAK,CAAC,IAAA,uBAAgB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC;QAExD,MAAM,YAAY,GAA2B;YAC3C,GAAG,CAAC,WAAW,CAAC,YAAY,IAAI,EAAE,CAAC;YACnC,GAAG,CAAC,WAAW,CAAC,eAAe,IAAI,EAAE,CAAC;SACvC,CAAC;QAEF,OAAO,YAAY,CAAC,iBAAiB,CAAC;YACpC,CAAC,CAAC,IAAA,kBAAK,EAAC,CAAC,iBAAiB,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;YACnE,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AApBD,oDAoBC"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { workspaces } from '@angular-devkit/core';
|
|
2
2
|
import { Rule, Tree } from '@angular-devkit/schematics';
|
|
3
3
|
/**
|
|
4
4
|
* Returns the workspace host and project config (angular.json).
|
|
5
5
|
*/
|
|
6
6
|
export declare function getWorkspace(tree: Tree): Promise<{
|
|
7
|
-
host: WorkspaceHost;
|
|
8
|
-
workspace: WorkspaceDefinition;
|
|
7
|
+
host: workspaces.WorkspaceHost;
|
|
8
|
+
workspace: workspaces.WorkspaceDefinition;
|
|
9
9
|
}>;
|
|
10
|
-
export declare function getProject(workspace: WorkspaceDefinition, projectName: string): Promise<{
|
|
11
|
-
project: ProjectDefinition;
|
|
10
|
+
export declare function getProject(workspace: workspaces.WorkspaceDefinition, projectName: string): Promise<{
|
|
11
|
+
project: workspaces.ProjectDefinition;
|
|
12
12
|
projectName: string;
|
|
13
13
|
}>;
|
|
14
14
|
/**
|
|
15
15
|
* Allows updates to the Angular project config (angular.json).
|
|
16
16
|
*/
|
|
17
|
-
export declare function updateWorkspace(updater: (workspace: WorkspaceDefinition) => void | Promise<void>): Rule;
|
|
17
|
+
export declare function updateWorkspace(updater: (workspace: workspaces.WorkspaceDefinition) => void | Promise<void>): Rule;
|
|
18
18
|
/**
|
|
19
19
|
* Returns the project definition corresponding to the provided name, or throws an
|
|
20
20
|
* error if the project is not found.
|
|
21
21
|
*/
|
|
22
22
|
export declare function getRequiredProject(tree: Tree, projectName: string | undefined): Promise<{
|
|
23
23
|
projectName: string;
|
|
24
|
-
project: ProjectDefinition;
|
|
24
|
+
project: workspaces.ProjectDefinition;
|
|
25
25
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRequiredProject = exports.updateWorkspace = exports.getProject = exports.getWorkspace = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@angular-devkit/core");
|
|
5
5
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
6
|
const tree_1 = require("./tree");
|
|
7
7
|
/**
|
|
@@ -32,7 +32,7 @@ function createHost(tree) {
|
|
|
32
32
|
*/
|
|
33
33
|
async function getWorkspace(tree) {
|
|
34
34
|
const host = createHost(tree);
|
|
35
|
-
const { workspace } = await
|
|
35
|
+
const { workspace } = await core_1.workspaces.readWorkspace('/', host);
|
|
36
36
|
return { host, workspace };
|
|
37
37
|
}
|
|
38
38
|
exports.getWorkspace = getWorkspace;
|
|
@@ -53,7 +53,7 @@ function updateWorkspace(updater) {
|
|
|
53
53
|
// Send the workspace to the callback to allow it to be modified.
|
|
54
54
|
await updater(workspace);
|
|
55
55
|
// Update the workspace config with any changes.
|
|
56
|
-
await
|
|
56
|
+
await core_1.workspaces.writeWorkspace(workspace, host);
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
exports.updateWorkspace = updateWorkspace;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../../../libs/components/packages/src/schematics/utility/workspace.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../../../libs/components/packages/src/schematics/utility/workspace.ts"],"names":[],"mappings":";;;AAAA,+CAAkD;AAClD,2DAA6E;AAE7E,iCAA0C;AAE1C;;;GAGG;AACH,SAAS,UAAU,CAAC,IAAU;IAC5B,OAAO;QACL,0BAA0B;QAC1B,KAAK,CAAC,QAAQ,CAAC,IAAY;YACzB,OAAO,IAAA,uBAAgB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACtC,CAAC;QACD,0BAA0B;QAC1B,KAAK,CAAC,SAAS,CAAC,IAAY,EAAE,IAAY;YACxC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC;QACD,KAAK,CAAC,WAAW,CAAC,IAAY;YAC5B,gCAAgC;YAChC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QACrE,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,IAAY;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,YAAY,CAAC,IAAU;IAI3C,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,iBAAU,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAChE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC7B,CAAC;AAPD,oCAOC;AAEM,KAAK,UAAU,UAAU,CAC9B,SAAyC,EACzC,WAAmB;IAEnB,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACpD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,gCAAmB,CAC3B,QAAQ,WAAW,yEAAyE,CAC7F,CAAC;KACH;IAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;AAClC,CAAC;AAZD,gCAYC;AAED;;GAEG;AACH,SAAgB,eAAe,CAC7B,OAA4E;IAE5E,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;QAErD,iEAAiE;QACjE,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;QAEzB,gDAAgD;QAChD,MAAM,iBAAU,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC,CAAC;AACJ,CAAC;AAZD,0CAYC;AAED;;;GAGG;AACI,KAAK,UAAU,kBAAkB,CACtC,IAAU,EACV,WAA+B;IAE/B,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAChD;IAED,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAEpD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,gBAAgB,WAAW,iDAAiD,CAC7E,CAAC;KACH;IAED,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AAClC,CAAC;AAlBD,gDAkBC"}
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
|
-
const tree_1 = require("../../../utility/tree");
|
|
5
|
-
const workspace_1 = require("../../../utility/workspace");
|
|
6
|
-
const COMPAT_CSS_FILE_NAME = 'skyux8-compat.css';
|
|
7
|
-
const compatStyles = {
|
|
8
|
-
libraries: [
|
|
9
|
-
{
|
|
10
|
-
name: '@skyux/forms',
|
|
11
|
-
components: [
|
|
12
|
-
{
|
|
13
|
-
name: 'selection box',
|
|
14
|
-
styles: [
|
|
15
|
-
{
|
|
16
|
-
css: `
|
|
17
|
-
:root {
|
|
18
|
-
--sky-compat-selection-box-grid-margin-bottom: 0;
|
|
19
|
-
}
|
|
20
|
-
`,
|
|
21
|
-
instructions: `
|
|
22
|
-
The bottom margin for the \`sky-selection-box-grid\` has been changed to compensate for the spacing applied to its child \`sky-selection-box\` components. To address this, remove this block of CSS and address any spacing issues by adding the appropriate margin class to the selection box grid. See https://developer.blackbaud.com/skyux/design/styles/spacing for a list of supported spacing classes.`,
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: '@skyux/layout',
|
|
30
|
-
components: [
|
|
31
|
-
{
|
|
32
|
-
name: 'action button',
|
|
33
|
-
styles: [
|
|
34
|
-
{
|
|
35
|
-
css: `
|
|
36
|
-
:root {
|
|
37
|
-
--sky-compat-action-button-flex-margin: 0;
|
|
38
|
-
--sky-compat-action-button-flex-sm-padding: 10px;
|
|
39
|
-
}
|
|
40
|
-
`,
|
|
41
|
-
instructions: `
|
|
42
|
-
The top and bottom margins have been removed from the \`sky-action-button-container\` component. To address this, remove this block of CSS and address any spacing issues by adding the appropriate margin class to the action button container. See https://developer.blackbaud.com/skyux/design/styles/spacing for a list of supported spacing classes.`,
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: 'text expand repeater',
|
|
48
|
-
styles: [
|
|
49
|
-
{
|
|
50
|
-
css: `
|
|
51
|
-
:root {
|
|
52
|
-
--sky-compat-text-expand-repeater-margin-top: unset;
|
|
53
|
-
}
|
|
54
|
-
`,
|
|
55
|
-
instructions: `
|
|
56
|
-
The top margin has been removed from the \`sky-text-expand-repeater\` component. To address this, remove this block of CSS and address any spacing issues by adding the appropriate margin class to the element above each text expand repeater or padding class to each text expand repeater's parent element. See https://developer.blackbaud.com/skyux/design/styles/spacing for a list of supported spacing classes.`,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
name: '@skyux/pages',
|
|
64
|
-
components: [
|
|
65
|
-
{
|
|
66
|
-
name: 'page header',
|
|
67
|
-
styles: [
|
|
68
|
-
{
|
|
69
|
-
css: `
|
|
70
|
-
:root {
|
|
71
|
-
--sky-compat-page-header-margin-top-and-bottom: 0.67em;
|
|
72
|
-
}
|
|
73
|
-
`,
|
|
74
|
-
instructions: `
|
|
75
|
-
The top and bottom margins have been removed from the \`sky-page-header\` component. To address this, remove this block of CSS and address any spacing issues by adding the appropriate margin class to the action button container. See https://developer.blackbaud.com/skyux/design/styles/spacing for a list of supported spacing classes.`,
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: '@skyux/tabs',
|
|
83
|
-
components: [
|
|
84
|
-
{
|
|
85
|
-
name: 'tabs',
|
|
86
|
-
styles: [
|
|
87
|
-
{
|
|
88
|
-
css: `
|
|
89
|
-
:root {
|
|
90
|
-
--sky-compat-tabset-tabs-modal-margin: 0;
|
|
91
|
-
--sky-compat-tabset-wizard-modal-margin: 0 0 10px;
|
|
92
|
-
}
|
|
93
|
-
`,
|
|
94
|
-
instructions: `
|
|
95
|
-
The left, right, and bottom margins for the \`sky-tabset\` within a modal have been changed in default theme to follow design best practices. To address this, remove this block of CSS and address any conflicting classes or styles that were previously fixing the incorrect spacing of the tabset.`,
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: '@skyux/modals',
|
|
103
|
-
components: [
|
|
104
|
-
{
|
|
105
|
-
name: 'modal',
|
|
106
|
-
styles: [
|
|
107
|
-
{
|
|
108
|
-
css: `
|
|
109
|
-
:root {
|
|
110
|
-
--sky-compat-modal-footer-adjacent-btn-btn-link-margin: -2px;
|
|
111
|
-
}
|
|
112
|
-
`,
|
|
113
|
-
instructions: `
|
|
114
|
-
Modals have been updated to automatically apply the correct spacing to link buttons in modal footers in modern theme. To address this, remove this block of CSS and address any conflicting classes or styles that were previously fixing the incorrect spacing of the link buttons.`,
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
};
|
|
122
|
-
function getProjectSourcePath(projectDefinition) {
|
|
123
|
-
/*istanbul ignore else*/
|
|
124
|
-
if (projectDefinition.sourceRoot) {
|
|
125
|
-
return `${projectDefinition.sourceRoot}/app`;
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
return `${projectDefinition.root}/src/app`;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
function buildCommentBlock(message) {
|
|
132
|
-
return `/${'*'.repeat(79)}
|
|
133
|
-
* ${message.replace(/(?![^\n]{1,75}$)([^\n]{1,75})\s/g, '$1\n * ')}
|
|
134
|
-
${'*'.repeat(79)}/`;
|
|
135
|
-
}
|
|
136
|
-
function buildComponentCss(component) {
|
|
137
|
-
let contents = buildCommentBlock(`COMPONENT: ${component.name.toUpperCase()}`);
|
|
138
|
-
for (const style of component.styles) {
|
|
139
|
-
contents += `
|
|
140
|
-
|
|
141
|
-
${buildCommentBlock(style.instructions.trim())}
|
|
142
|
-
|
|
143
|
-
${style.css.trim()}
|
|
144
|
-
`;
|
|
145
|
-
}
|
|
146
|
-
return contents;
|
|
147
|
-
}
|
|
148
|
-
function writeStylesheet(sourceRoot, contents) {
|
|
149
|
-
const filePath = `${sourceRoot}/${COMPAT_CSS_FILE_NAME}`;
|
|
150
|
-
return (tree) => {
|
|
151
|
-
if (tree.exists(filePath)) {
|
|
152
|
-
tree.overwrite(filePath, contents);
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
tree.create(filePath, contents);
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
function addStylesheetToWorkspace() {
|
|
160
|
-
return () => (0, workspace_1.updateWorkspace)((workspace) => {
|
|
161
|
-
for (const project of workspace.projects.values()) {
|
|
162
|
-
for (const targetName of ['build', 'test']) {
|
|
163
|
-
if (project.extensions['projectType'] === 'application') {
|
|
164
|
-
const target = project.targets.get(targetName);
|
|
165
|
-
const sourceRoot = getProjectSourcePath(project);
|
|
166
|
-
const filePath = `${sourceRoot}/${COMPAT_CSS_FILE_NAME}`;
|
|
167
|
-
/* istanbul ignore else */
|
|
168
|
-
if (target && target.options) {
|
|
169
|
-
const styles = (target.options['styles'] = (target.options['styles'] || []));
|
|
170
|
-
if (!styles.includes(filePath)) {
|
|
171
|
-
styles.push(filePath);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
function getCompatStyles(tree) {
|
|
180
|
-
let contents = '';
|
|
181
|
-
const packageJson = JSON.parse((0, tree_1.readRequiredFile)(tree, '/package.json'));
|
|
182
|
-
for (const library of compatStyles.libraries) {
|
|
183
|
-
if (packageJson.dependencies?.[library.name] ||
|
|
184
|
-
packageJson.devDependencies?.[library.name]) {
|
|
185
|
-
for (const component of library.components) {
|
|
186
|
-
contents += `
|
|
187
|
-
${buildComponentCss(component)}`;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
return contents
|
|
192
|
-
? `${buildCommentBlock(`TODO: The following component libraries introduced visual breaking changes in SKY UX 8. Each block of CSS reintroduces the styles that were changed or removed for backwards compatibility. You will need to do the following before migrating to the next major version of SKY UX:
|
|
193
|
-
- Address each of the changes by following the instructions
|
|
194
|
-
in each block of CSS, then remove the block.
|
|
195
|
-
- Delete this file after all blocks have been addressed.
|
|
196
|
-
- Remove each occurrence of this file in your project's
|
|
197
|
-
angular.json file.`)}
|
|
198
|
-
${contents}`
|
|
199
|
-
: undefined;
|
|
200
|
-
}
|
|
201
|
-
function default_1() {
|
|
202
|
-
return async (tree) => {
|
|
203
|
-
const { workspace } = await (0, workspace_1.getWorkspace)(tree);
|
|
204
|
-
const styles = getCompatStyles(tree);
|
|
205
|
-
const rules = [];
|
|
206
|
-
for (const [, projectDefinition] of workspace.projects.entries()) {
|
|
207
|
-
if (projectDefinition.extensions['projectType'] === 'application') {
|
|
208
|
-
if (styles) {
|
|
209
|
-
const sourcePath = getProjectSourcePath(projectDefinition);
|
|
210
|
-
rules.push(writeStylesheet(sourcePath, styles));
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
if (styles) {
|
|
215
|
-
rules.push(addStylesheetToWorkspace());
|
|
216
|
-
}
|
|
217
|
-
return (0, schematics_1.chain)(rules);
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
exports.default = default_1;
|
|
221
|
-
//# sourceMappingURL=add-compat-stylesheets.js.map
|
package/src/schematics/migrations/update-8/add-compat-stylesheets/add-compat-stylesheets.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-compat-stylesheets.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/packages/src/schematics/migrations/update-8/add-compat-stylesheets/add-compat-stylesheets.ts"],"names":[],"mappings":";;AACA,2DAA+D;AAE/D,gDAAyD;AACzD,0DAA2E;AAE3E,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AAEjD,MAAM,YAAY,GAAG;IACnB,SAAS,EAAE;QACT;YACE,IAAI,EAAE,cAAc;YACpB,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,eAAe;oBACrB,MAAM,EAAE;wBACN;4BACE,GAAG,EAAE;;;;CAI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,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAA,wBAAY,EAAC,IAAI,CAAC,CAAC;QAC/C,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;QACrC,MAAM,KAAK,GAAW,EAAE,CAAC;QAEzB,KAAK,MAAM,CAAC,EAAE,iBAAiB,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE;YAChE,IAAI,iBAAiB,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,aAAa,EAAE;gBACjE,IAAI,MAAM,EAAE;oBACV,MAAM,UAAU,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;oBAC3D,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;iBACjD;aACF;SACF;QAED,IAAI,MAAM,EAAE;YACV,KAAK,CAAC,IAAI,CAAC,wBAAwB,EAAE,CAAC,CAAC;SACxC;QAED,OAAO,IAAA,kBAAK,EAAC,KAAK,CAAC,CAAC;IACtB,CAAC,CAAC;AACJ,CAAC;AArBD,4BAqBC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UPDATE_TO_VERSION = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
6
|
-
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
7
|
-
exports.UPDATE_TO_VERSION = '4.8.1';
|
|
8
|
-
/**
|
|
9
|
-
* Update the version of the `autonumeric` dependency.
|
|
10
|
-
*/
|
|
11
|
-
function updateVersion() {
|
|
12
|
-
return (tree, context) => {
|
|
13
|
-
const autonumericDependency = (0, dependencies_1.getPackageJsonDependency)(tree, 'autonumeric');
|
|
14
|
-
// Autonumeric is not installed, so we don't need to do anything.
|
|
15
|
-
if (!autonumericDependency) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const type = dependencies_1.NodeDependencyType.Default;
|
|
19
|
-
const overwrite = true;
|
|
20
|
-
const version = exports.UPDATE_TO_VERSION;
|
|
21
|
-
(0, dependencies_1.addPackageJsonDependency)(tree, {
|
|
22
|
-
name: `autonumeric`,
|
|
23
|
-
overwrite,
|
|
24
|
-
type,
|
|
25
|
-
version,
|
|
26
|
-
});
|
|
27
|
-
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Upgrade to `autonumeric` version `4.8.1`.
|
|
32
|
-
*/
|
|
33
|
-
function default_1() {
|
|
34
|
-
return (0, schematics_1.chain)([updateVersion()]);
|
|
35
|
-
}
|
|
36
|
-
exports.default = default_1;
|
|
37
|
-
//# sourceMappingURL=update-autonumeric.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-autonumeric.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/packages/src/schematics/migrations/update-8/update-autonumeric/update-autonumeric.ts"],"names":[],"mappings":";;;AAAA,2DAKoC;AACpC,4DAA0E;AAC1E,2EAIkD;AAErC,QAAA,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;GAEG;AACH,SAAS,aAAa;IACpB,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,MAAM,qBAAqB,GAAG,IAAA,uCAAwB,EAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAE5E,iEAAiE;QACjE,IAAI,CAAC,qBAAqB,EAAE;YAC1B,OAAO;SACR;QAED,MAAM,IAAI,GAAG,iCAAkB,CAAC,OAAO,CAAC;QACxC,MAAM,SAAS,GAAG,IAAI,CAAC;QACvB,MAAM,OAAO,GAAG,yBAAiB,CAAC;QAElC,IAAA,uCAAwB,EAAC,IAAI,EAAE;YAC7B,IAAI,EAAE,aAAa;YACnB,SAAS;YACT,IAAI;YACJ,OAAO;SACR,CAAC,CAAC;QAEH,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH;IACE,OAAO,IAAA,kBAAK,EAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;AAClC,CAAC;AAFD,4BAEC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
-
/**
|
|
3
|
-
* Removes SKY UX specific polyfills from 'src/polyfills.ts' and 'src/test.ts' files.
|
|
4
|
-
* Adds '@skyux/packages/polyfills' to the affected project's configuration.
|
|
5
|
-
*/
|
|
6
|
-
export default function updatePolyfillSchematic(): Rule;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const ts = tslib_1.__importStar(require("@schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
6
|
-
const add_polyfills_config_1 = require("../../../rules/add-polyfills-config");
|
|
7
|
-
const workspace_1 = require("../../../utility/workspace");
|
|
8
|
-
const polyfillBlockStart = `* SKY UX POLYFILLS - DO NOT MODIFY THIS SECTION`;
|
|
9
|
-
const polyfillBlockEnd = `* END SKY UX POLYFILLS`;
|
|
10
|
-
function removePolyfillCode(projectName, project) {
|
|
11
|
-
return async (tree) => {
|
|
12
|
-
// Saves a list of files that need to be checked for SKY UX polyfills.
|
|
13
|
-
const polyfillsFiles = new Set();
|
|
14
|
-
// Saves a list of targets that use each polyfills file.
|
|
15
|
-
const targetsWithPolyfills = new Map();
|
|
16
|
-
// Check each target for 'polyfills' configuration.
|
|
17
|
-
for (const [targetName, target] of project.targets.entries()) {
|
|
18
|
-
const files = [];
|
|
19
|
-
// src/test.ts
|
|
20
|
-
if (targetName === 'test' && target.options?.['main']) {
|
|
21
|
-
files.push(target.options['main']);
|
|
22
|
-
}
|
|
23
|
-
// src/polyfills.ts
|
|
24
|
-
if (target.options?.['polyfills']) {
|
|
25
|
-
files.push(target.options['polyfills']);
|
|
26
|
-
}
|
|
27
|
-
for (const file of files) {
|
|
28
|
-
// Save the file to the list of files that need to be checked.
|
|
29
|
-
polyfillsFiles.add(file);
|
|
30
|
-
// Save a list of targets that use each file.
|
|
31
|
-
const set = targetsWithPolyfills.get(file);
|
|
32
|
-
if (set) {
|
|
33
|
-
set.add(targetName);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
targetsWithPolyfills.set(file, new Set([targetName]));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
// Loop through each file and remove our polyfill, if it exists.
|
|
41
|
-
for (const polyfillsFile of polyfillsFiles) {
|
|
42
|
-
if (tree.exists(polyfillsFile)) {
|
|
43
|
-
const contents = tree.readText(polyfillsFile);
|
|
44
|
-
const polyfillBlockStartIndex = contents.indexOf(polyfillBlockStart);
|
|
45
|
-
const polyfillBlockEndIndex = contents.indexOf(polyfillBlockEnd);
|
|
46
|
-
// Check for comment-block syntax.
|
|
47
|
-
if (polyfillBlockStartIndex !== -1 && polyfillBlockEndIndex !== -1) {
|
|
48
|
-
const changeStart = contents.lastIndexOf(`/*`, polyfillBlockStartIndex);
|
|
49
|
-
const changeEnd = contents.indexOf(`*/`, polyfillBlockEndIndex) + 2;
|
|
50
|
-
const change = tree.beginUpdate(polyfillsFile);
|
|
51
|
-
change.remove(changeStart, changeEnd - changeStart);
|
|
52
|
-
tree.commitUpdate(change);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
const sourceFile = ts.createSourceFile(polyfillsFile, contents, ts.ScriptTarget.Latest, true);
|
|
56
|
-
// Find the expression that assigns the global property to the window object.
|
|
57
|
-
const expression = sourceFile.statements.find((node) => {
|
|
58
|
-
if (ts.isExpressionStatement(node)) {
|
|
59
|
-
const expression = node.expression;
|
|
60
|
-
if (ts.isBinaryExpression(expression)) {
|
|
61
|
-
const left = expression.left;
|
|
62
|
-
if (ts.isPropertyAccessExpression(left)) {
|
|
63
|
-
let leftExpression = left.expression;
|
|
64
|
-
if (ts.isParenthesizedExpression(leftExpression)) {
|
|
65
|
-
leftExpression = leftExpression.expression;
|
|
66
|
-
}
|
|
67
|
-
if (ts.isAsExpression(leftExpression) &&
|
|
68
|
-
ts.isIdentifier(leftExpression.expression) &&
|
|
69
|
-
leftExpression.expression.text === 'window' &&
|
|
70
|
-
left.name.text === 'global') {
|
|
71
|
-
const right = expression.right;
|
|
72
|
-
if (ts.isIdentifier(right) && right.text === 'window') {
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return false;
|
|
80
|
-
});
|
|
81
|
-
if (expression) {
|
|
82
|
-
const change = tree.beginUpdate(polyfillsFile);
|
|
83
|
-
change.remove(expression.pos, expression.end - expression.pos);
|
|
84
|
-
tree.commitUpdate(change);
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
// The file doesn't include our polyfill, so remove it from the list of
|
|
88
|
-
// targets that need the new polyfills config.
|
|
89
|
-
targetsWithPolyfills.delete(polyfillsFile);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
// Only update the project config if our polyfill was found in the files.
|
|
95
|
-
if (targetsWithPolyfills.size > 0) {
|
|
96
|
-
// Flatten all targets into a single array of unique values.
|
|
97
|
-
const targetsToUpdate = Array.from(new Set(Array.from(targetsWithPolyfills.values())
|
|
98
|
-
.map((x) => Array.from(x.values()))
|
|
99
|
-
.flat()));
|
|
100
|
-
return (0, add_polyfills_config_1.addPolyfillsConfig)(projectName, targetsToUpdate);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Removes SKY UX specific polyfills from 'src/polyfills.ts' and 'src/test.ts' files.
|
|
106
|
-
* Adds '@skyux/packages/polyfills' to the affected project's configuration.
|
|
107
|
-
*/
|
|
108
|
-
function updatePolyfillSchematic() {
|
|
109
|
-
return async (tree) => {
|
|
110
|
-
const { workspace } = await (0, workspace_1.getWorkspace)(tree);
|
|
111
|
-
const rules = [];
|
|
112
|
-
for (const [projectName, project] of workspace.projects.entries()) {
|
|
113
|
-
rules.push(removePolyfillCode(projectName, project));
|
|
114
|
-
}
|
|
115
|
-
return (0, schematics_1.chain)(rules);
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
exports.default = updatePolyfillSchematic;
|
|
119
|
-
//# sourceMappingURL=update-polyfill.schematic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-polyfill.schematic.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/packages/src/schematics/migrations/update-8/update-polyfill/update-polyfill.schematic.ts"],"names":[],"mappings":";;;AACA,2DAAyD;AACzD,2HAAqG;AAErG,8EAAyE;AACzE,0DAA0D;AAE1D,MAAM,kBAAkB,GAAG,iDAAiD,CAAC;AAC7E,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAElD,SAAS,kBAAkB,CACzB,WAAmB,EACnB,OAA0B;IAE1B,OAAO,KAAK,EAAE,IAAI,EAAwB,EAAE;QAC1C,sEAAsE;QACtE,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;QAEzC,wDAAwD;QACxD,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAuB,CAAC;QAE5D,mDAAmD;QACnD,KAAK,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAC5D,MAAM,KAAK,GAAG,EAAE,CAAC;YAEjB,cAAc;YACd,IAAI,UAAU,KAAK,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE;gBACrD,KAAK,CAA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