@skyux/packages 9.0.0-alpha.7 → 9.0.0-alpha.9
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 +50 -49
- package/src/schematics/migrations/migration-collection.json +11 -1
- package/src/schematics/migrations/update-9/add-compat-stylesheets/add-compat-stylesheet.schematic.d.ts +2 -0
- package/src/schematics/migrations/update-9/add-compat-stylesheets/add-compat-stylesheet.schematic.js +148 -0
- package/src/schematics/migrations/update-9/add-compat-stylesheets/add-compat-stylesheet.schematic.js.map +1 -0
- package/src/schematics/migrations/update-9/legacy-services/legacy-services.schematic.d.ts +10 -0
- package/src/schematics/migrations/update-9/legacy-services/legacy-services.schematic.js +70 -0
- package/src/schematics/migrations/update-9/legacy-services/legacy-services.schematic.js.map +1 -0
- package/src/schematics/utility/typescript/imports.d.ts +11 -0
- package/src/schematics/utility/typescript/imports.js +83 -0
- package/src/schematics/utility/typescript/imports.js.map +1 -0
- package/src/schematics/utility/typescript/source-file.d.ts +2 -0
- package/src/schematics/utility/typescript/source-file.js +10 -0
- package/src/schematics/utility/typescript/source-file.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/packages",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.9",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"description": "Handles the `ng update` command for SKY UX component libraries.",
|
|
6
6
|
"keywords": [
|
|
@@ -37,54 +37,54 @@
|
|
|
37
37
|
"migrations": "./src/schematics/migrations/migration-collection.json",
|
|
38
38
|
"packageGroup": {
|
|
39
39
|
"@blackbaud/angular-tree-component": "^1.0.0-alpha.0",
|
|
40
|
-
"@skyux-sdk/eslint-config": "9.0.0-alpha.
|
|
41
|
-
"@skyux-sdk/prettier-schematics": "9.0.0-alpha.
|
|
42
|
-
"@skyux-sdk/testing": "9.0.0-alpha.
|
|
43
|
-
"@skyux/a11y": "9.0.0-alpha.
|
|
44
|
-
"@skyux/action-bars": "9.0.0-alpha.
|
|
45
|
-
"@skyux/ag-grid": "9.0.0-alpha.
|
|
46
|
-
"@skyux/angular-tree-component": "9.0.0-alpha.
|
|
47
|
-
"@skyux/animations": "9.0.0-alpha.
|
|
48
|
-
"@skyux/assets": "9.0.0-alpha.
|
|
49
|
-
"@skyux/autonumeric": "9.0.0-alpha.
|
|
50
|
-
"@skyux/avatar": "9.0.0-alpha.
|
|
51
|
-
"@skyux/colorpicker": "9.0.0-alpha.
|
|
52
|
-
"@skyux/config": "9.0.0-alpha.
|
|
53
|
-
"@skyux/core": "9.0.0-alpha.
|
|
54
|
-
"@skyux/data-manager": "9.0.0-alpha.
|
|
55
|
-
"@skyux/datetime": "9.0.0-alpha.
|
|
56
|
-
"@skyux/errors": "9.0.0-alpha.
|
|
57
|
-
"@skyux/flyout": "9.0.0-alpha.
|
|
58
|
-
"@skyux/forms": "9.0.0-alpha.
|
|
59
|
-
"@skyux/grids": "9.0.0-alpha.
|
|
60
|
-
"@skyux/http": "9.0.0-alpha.
|
|
61
|
-
"@skyux/i18n": "9.0.0-alpha.
|
|
40
|
+
"@skyux-sdk/eslint-config": "9.0.0-alpha.9",
|
|
41
|
+
"@skyux-sdk/prettier-schematics": "9.0.0-alpha.9",
|
|
42
|
+
"@skyux-sdk/testing": "9.0.0-alpha.9",
|
|
43
|
+
"@skyux/a11y": "9.0.0-alpha.9",
|
|
44
|
+
"@skyux/action-bars": "9.0.0-alpha.9",
|
|
45
|
+
"@skyux/ag-grid": "9.0.0-alpha.9",
|
|
46
|
+
"@skyux/angular-tree-component": "9.0.0-alpha.9",
|
|
47
|
+
"@skyux/animations": "9.0.0-alpha.9",
|
|
48
|
+
"@skyux/assets": "9.0.0-alpha.9",
|
|
49
|
+
"@skyux/autonumeric": "9.0.0-alpha.9",
|
|
50
|
+
"@skyux/avatar": "9.0.0-alpha.9",
|
|
51
|
+
"@skyux/colorpicker": "9.0.0-alpha.9",
|
|
52
|
+
"@skyux/config": "9.0.0-alpha.9",
|
|
53
|
+
"@skyux/core": "9.0.0-alpha.9",
|
|
54
|
+
"@skyux/data-manager": "9.0.0-alpha.9",
|
|
55
|
+
"@skyux/datetime": "9.0.0-alpha.9",
|
|
56
|
+
"@skyux/errors": "9.0.0-alpha.9",
|
|
57
|
+
"@skyux/flyout": "9.0.0-alpha.9",
|
|
58
|
+
"@skyux/forms": "9.0.0-alpha.9",
|
|
59
|
+
"@skyux/grids": "9.0.0-alpha.9",
|
|
60
|
+
"@skyux/http": "9.0.0-alpha.9",
|
|
61
|
+
"@skyux/i18n": "9.0.0-alpha.9",
|
|
62
62
|
"@skyux/icons": "^6.0.0",
|
|
63
|
-
"@skyux/indicators": "9.0.0-alpha.
|
|
64
|
-
"@skyux/inline-form": "9.0.0-alpha.
|
|
65
|
-
"@skyux/layout": "9.0.0-alpha.
|
|
66
|
-
"@skyux/list-builder": "9.0.0-alpha.
|
|
67
|
-
"@skyux/list-builder-common": "9.0.0-alpha.
|
|
68
|
-
"@skyux/list-builder-view-checklist": "9.0.0-alpha.
|
|
69
|
-
"@skyux/list-builder-view-grids": "9.0.0-alpha.
|
|
70
|
-
"@skyux/lists": "9.0.0-alpha.
|
|
71
|
-
"@skyux/lookup": "9.0.0-alpha.
|
|
72
|
-
"@skyux/modals": "9.0.0-alpha.
|
|
73
|
-
"@skyux/navbar": "9.0.0-alpha.
|
|
74
|
-
"@skyux/omnibar-interop": "9.0.0-alpha.
|
|
75
|
-
"@skyux/pages": "9.0.0-alpha.
|
|
76
|
-
"@skyux/phone-field": "9.0.0-alpha.
|
|
77
|
-
"@skyux/popovers": "9.0.0-alpha.
|
|
78
|
-
"@skyux/progress-indicator": "9.0.0-alpha.
|
|
79
|
-
"@skyux/router": "9.0.0-alpha.
|
|
80
|
-
"@skyux/select-field": "9.0.0-alpha.
|
|
81
|
-
"@skyux/split-view": "9.0.0-alpha.
|
|
82
|
-
"@skyux/tabs": "9.0.0-alpha.
|
|
83
|
-
"@skyux/text-editor": "9.0.0-alpha.
|
|
84
|
-
"@skyux/theme": "9.0.0-alpha.
|
|
85
|
-
"@skyux/tiles": "9.0.0-alpha.
|
|
86
|
-
"@skyux/toast": "9.0.0-alpha.
|
|
87
|
-
"@skyux/validation": "9.0.0-alpha.
|
|
63
|
+
"@skyux/indicators": "9.0.0-alpha.9",
|
|
64
|
+
"@skyux/inline-form": "9.0.0-alpha.9",
|
|
65
|
+
"@skyux/layout": "9.0.0-alpha.9",
|
|
66
|
+
"@skyux/list-builder": "9.0.0-alpha.9",
|
|
67
|
+
"@skyux/list-builder-common": "9.0.0-alpha.9",
|
|
68
|
+
"@skyux/list-builder-view-checklist": "9.0.0-alpha.9",
|
|
69
|
+
"@skyux/list-builder-view-grids": "9.0.0-alpha.9",
|
|
70
|
+
"@skyux/lists": "9.0.0-alpha.9",
|
|
71
|
+
"@skyux/lookup": "9.0.0-alpha.9",
|
|
72
|
+
"@skyux/modals": "9.0.0-alpha.9",
|
|
73
|
+
"@skyux/navbar": "9.0.0-alpha.9",
|
|
74
|
+
"@skyux/omnibar-interop": "9.0.0-alpha.9",
|
|
75
|
+
"@skyux/pages": "9.0.0-alpha.9",
|
|
76
|
+
"@skyux/phone-field": "9.0.0-alpha.9",
|
|
77
|
+
"@skyux/popovers": "9.0.0-alpha.9",
|
|
78
|
+
"@skyux/progress-indicator": "9.0.0-alpha.9",
|
|
79
|
+
"@skyux/router": "9.0.0-alpha.9",
|
|
80
|
+
"@skyux/select-field": "9.0.0-alpha.9",
|
|
81
|
+
"@skyux/split-view": "9.0.0-alpha.9",
|
|
82
|
+
"@skyux/tabs": "9.0.0-alpha.9",
|
|
83
|
+
"@skyux/text-editor": "9.0.0-alpha.9",
|
|
84
|
+
"@skyux/theme": "9.0.0-alpha.9",
|
|
85
|
+
"@skyux/tiles": "9.0.0-alpha.9",
|
|
86
|
+
"@skyux/toast": "9.0.0-alpha.9",
|
|
87
|
+
"@skyux/validation": "9.0.0-alpha.9",
|
|
88
88
|
"ag-grid-angular": "^29.3.5",
|
|
89
89
|
"ag-grid-community": "^29.3.5",
|
|
90
90
|
"ag-grid-enterprise": "^29.3.5",
|
|
@@ -92,7 +92,8 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@angular/cli": "^16.2.0"
|
|
95
|
+
"@angular/cli": "^16.2.0",
|
|
96
|
+
"@angular/core": "^16.2.1"
|
|
96
97
|
},
|
|
97
98
|
"dependencies": {
|
|
98
99
|
"fs-extra": "10.1.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schematics": {
|
|
3
3
|
"noop": {
|
|
4
|
-
"version": "9.0.0-alpha.
|
|
4
|
+
"version": "9.0.0-alpha.9",
|
|
5
5
|
"factory": "./noop/noop.schematic",
|
|
6
6
|
"description": "Update all SKY UX component packages"
|
|
7
7
|
},
|
|
@@ -15,10 +15,20 @@
|
|
|
15
15
|
"factory": "./update-9/add-forms-popovers-peer-dependency/add-forms-popovers-peer-dependency.schematic",
|
|
16
16
|
"description": "Add @skyux/popovers peer dependency for @skyux/forms"
|
|
17
17
|
},
|
|
18
|
+
"add-compat-stylesheets": {
|
|
19
|
+
"version": "9.0.0-0",
|
|
20
|
+
"factory": "./update-9/add-compat-stylesheets/add-compat-stylesheet.schematic",
|
|
21
|
+
"description": "Add a backwards-compatible stylesheet with styles that have been removed from components in SKY UX 9."
|
|
22
|
+
},
|
|
18
23
|
"ag-grid-29": {
|
|
19
24
|
"version": "9.0.0-0",
|
|
20
25
|
"factory": "./update-9/ag-grid-29/ag-grid-29.schematic",
|
|
21
26
|
"description": "Apply changes to support AG Grid 29"
|
|
27
|
+
},
|
|
28
|
+
"legacy-services": {
|
|
29
|
+
"version": "9.0.0-0",
|
|
30
|
+
"factory": "./update-9/legacy-services/legacy-services.schematic",
|
|
31
|
+
"description": "Modal and flyout services were previously provided in 'any' but are now provided in 'root'. Replace with a 'legacy' version for backward compatibility."
|
|
22
32
|
}
|
|
23
33
|
}
|
|
24
34
|
}
|
package/src/schematics/migrations/update-9/add-compat-stylesheets/add-compat-stylesheet.schematic.js
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
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 = 'skyux9-compat.css';
|
|
7
|
+
const compatStyles = {
|
|
8
|
+
libraries: [
|
|
9
|
+
{
|
|
10
|
+
name: '@skyux/forms',
|
|
11
|
+
components: [
|
|
12
|
+
{
|
|
13
|
+
name: 'input box',
|
|
14
|
+
styles: [
|
|
15
|
+
{
|
|
16
|
+
css: `
|
|
17
|
+
:root {
|
|
18
|
+
--sky-compat-sky-form-group-margin-bottom: 10px
|
|
19
|
+
}
|
|
20
|
+
`,
|
|
21
|
+
instructions: `
|
|
22
|
+
The bottom margin has been removed from the \`sky-input-box\`. To address this, remove this block of CSS and use \`stacked="true"\` to automatically have the latest vertical spacing added.`,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: '@skyux/theme',
|
|
30
|
+
components: [
|
|
31
|
+
{
|
|
32
|
+
name: 'styles',
|
|
33
|
+
styles: [
|
|
34
|
+
{
|
|
35
|
+
css: `
|
|
36
|
+
:root {
|
|
37
|
+
--sky-compat-sky-form-group-margin-bottom: 10px
|
|
38
|
+
}
|
|
39
|
+
`,
|
|
40
|
+
instructions: `
|
|
41
|
+
The bottom margin has been removed from \`sky-form-group\` style class. To address this, remove this block of css and change \`sky-form-group\` to \`sky-margin-stacked-sm\` or other appropriate spacing classes. See https://developer.blackbaud.com/skyux/design/styles/spacing for a list of supported spacing classes.`,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
function getProjectSourcePath(projectDefinition) {
|
|
50
|
+
/*istanbul ignore else*/
|
|
51
|
+
if (projectDefinition.sourceRoot) {
|
|
52
|
+
return `${projectDefinition.sourceRoot}/app`;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return `${projectDefinition.root}/src/app`;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function buildCommentBlock(message) {
|
|
59
|
+
return `/${'*'.repeat(79)}
|
|
60
|
+
* ${message.replace(/(?![^\n]{1,75}$)([^\n]{1,75})\s/g, '$1\n * ')}
|
|
61
|
+
${'*'.repeat(79)}/`;
|
|
62
|
+
}
|
|
63
|
+
function buildComponentCss(component) {
|
|
64
|
+
let contents = buildCommentBlock(`COMPONENT: ${component.name.toUpperCase()}`);
|
|
65
|
+
for (const style of component.styles) {
|
|
66
|
+
contents += `
|
|
67
|
+
|
|
68
|
+
${buildCommentBlock(style.instructions.trim())}
|
|
69
|
+
|
|
70
|
+
${style.css.trim()}
|
|
71
|
+
`;
|
|
72
|
+
}
|
|
73
|
+
return contents;
|
|
74
|
+
}
|
|
75
|
+
function writeStylesheet(sourceRoot, contents) {
|
|
76
|
+
const filePath = `${sourceRoot}/${COMPAT_CSS_FILE_NAME}`;
|
|
77
|
+
return (tree) => {
|
|
78
|
+
if (tree.exists(filePath)) {
|
|
79
|
+
tree.overwrite(filePath, contents);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
tree.create(filePath, contents);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function addStylesheetToWorkspace() {
|
|
87
|
+
return () => (0, workspace_1.updateWorkspace)((workspace) => {
|
|
88
|
+
for (const project of workspace.projects.values()) {
|
|
89
|
+
for (const targetName of ['build', 'test']) {
|
|
90
|
+
if (project.extensions['projectType'] === 'application') {
|
|
91
|
+
const target = project.targets.get(targetName);
|
|
92
|
+
const sourceRoot = getProjectSourcePath(project);
|
|
93
|
+
const filePath = `${sourceRoot}/${COMPAT_CSS_FILE_NAME}`;
|
|
94
|
+
/* istanbul ignore else */
|
|
95
|
+
if (target && target.options) {
|
|
96
|
+
const styles = (target.options['styles'] = (target.options['styles'] || []));
|
|
97
|
+
if (!styles.includes(filePath)) {
|
|
98
|
+
styles.push(filePath);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function getCompatStyles(tree) {
|
|
107
|
+
let contents = '';
|
|
108
|
+
const packageJson = JSON.parse((0, tree_1.readRequiredFile)(tree, '/package.json'));
|
|
109
|
+
for (const library of compatStyles.libraries) {
|
|
110
|
+
if (packageJson.dependencies?.[library.name] ||
|
|
111
|
+
packageJson.devDependencies?.[library.name]) {
|
|
112
|
+
for (const component of library.components) {
|
|
113
|
+
contents += `
|
|
114
|
+
${buildComponentCss(component)}`;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return contents
|
|
119
|
+
? `${buildCommentBlock(`TODO: The following component libraries introduced visual breaking changes in SKY UX 9. 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:
|
|
120
|
+
- Address each of the changes by following the instructions
|
|
121
|
+
in each block of CSS, then remove the block.
|
|
122
|
+
- Delete this file after all blocks have been addressed.
|
|
123
|
+
- Remove each occurrence of this file in your project's
|
|
124
|
+
angular.json file.`)}
|
|
125
|
+
${contents}`
|
|
126
|
+
: undefined;
|
|
127
|
+
}
|
|
128
|
+
function default_1() {
|
|
129
|
+
return async (tree) => {
|
|
130
|
+
const { workspace } = await (0, workspace_1.getWorkspace)(tree);
|
|
131
|
+
const styles = getCompatStyles(tree);
|
|
132
|
+
const rules = [];
|
|
133
|
+
for (const [, projectDefinition] of workspace.projects.entries()) {
|
|
134
|
+
if (projectDefinition.extensions['projectType'] === 'application') {
|
|
135
|
+
if (styles) {
|
|
136
|
+
const sourcePath = getProjectSourcePath(projectDefinition);
|
|
137
|
+
rules.push(writeStylesheet(sourcePath, styles));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (styles) {
|
|
142
|
+
rules.push(addStylesheetToWorkspace());
|
|
143
|
+
}
|
|
144
|
+
return (0, schematics_1.chain)(rules);
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
exports.default = default_1;
|
|
148
|
+
//# sourceMappingURL=add-compat-stylesheet.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-compat-stylesheet.schematic.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/packages/src/schematics/migrations/update-9/add-compat-stylesheets/add-compat-stylesheet.schematic.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,WAAW;oBACjB,MAAM,EAAE;wBACN;4BACE,GAAG,EAAE;;;;CAIlB;4BACa,YAAY,EAAE;8LACkK;yBACjL;qBACF;iBACF;aACF;SACF;QACD;YACE,IAAI,EAAE,cAAc;YACpB,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE;wBACN;4BACE,GAAG,EAAE;;;;CAIlB;4BACa,YAAY,EAAE;4TACgS;yBAC/S;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,SAAS,oBAAoB,CAAC,iBAAoC;IAChE,wBAAwB;IACxB,IAAI,iBAAiB,CAAC,UAAU,EAAE;QAChC,OAAO,GAAG,iBAAiB,CAAC,UAAU,MAAM,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AAG,iBAAiB,CAClB;;;;;qBAKa,CACd;EACL,QAAQ,EAAE;QACR,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED;IACE,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The contents of this file are heavily inspired by Angular's "untyped forms" migration.
|
|
3
|
+
* @see https://github.com/angular/angular/blob/14.3.x/packages/core/schematics/migrations/typed-forms/index.ts
|
|
4
|
+
*/
|
|
5
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
6
|
+
/**
|
|
7
|
+
* Replaces certain SKY UX services with their "legacy" equivalents.
|
|
8
|
+
* For example, `SkyModalService` becomes `SkyModalLegacyService`.
|
|
9
|
+
*/
|
|
10
|
+
export default function (): Rule;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tree_1 = require("../../../utility/tree");
|
|
4
|
+
const imports_1 = require("../../../utility/typescript/imports");
|
|
5
|
+
const source_file_1 = require("../../../utility/typescript/source-file");
|
|
6
|
+
const workspace_1 = require("../../../utility/workspace");
|
|
7
|
+
// A collection of services (and their packages) that should be replaced with "legacy" versions.
|
|
8
|
+
const packages = new Map([
|
|
9
|
+
['@skyux/core', ['SkyDynamicComponentService', 'SkyOverlayService']],
|
|
10
|
+
['@skyux/flyout', ['SkyFlyoutService']],
|
|
11
|
+
['@skyux/modals', ['SkyModalService']],
|
|
12
|
+
['@skyux/toast', ['SkyToastService']],
|
|
13
|
+
]);
|
|
14
|
+
function runLegacyServicesMigration(tree, filePath) {
|
|
15
|
+
const sourceFile = (0, source_file_1.createSourceFile)(filePath, (0, tree_1.readRequiredFile)(tree, filePath));
|
|
16
|
+
let update = null;
|
|
17
|
+
const rewriter = (startPos, origLength, text) => {
|
|
18
|
+
if (update === null) {
|
|
19
|
+
// Lazily initialize update, because most files will not require migration.
|
|
20
|
+
update = tree.beginUpdate(sourceFile.fileName);
|
|
21
|
+
}
|
|
22
|
+
update.remove(startPos, origLength);
|
|
23
|
+
update.insertLeft(startPos, text);
|
|
24
|
+
};
|
|
25
|
+
const imports = (0, imports_1.getImports)(sourceFile, packages);
|
|
26
|
+
// If no relevant classes are imported, we can exit early.
|
|
27
|
+
if (imports.length === 0) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
// For each control class, migrate all of its uses.
|
|
31
|
+
for (const imp of imports) {
|
|
32
|
+
const usages = (0, imports_1.getUsages)(sourceFile, imp);
|
|
33
|
+
for (const usage of usages) {
|
|
34
|
+
const newName = getLegacyVersionOfName(imp.getText(sourceFile));
|
|
35
|
+
if (newName) {
|
|
36
|
+
rewriter(usage.node.getStart(sourceFile), usage.node.getWidth(sourceFile), newName);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// For each imported control class, migrate to the corresponding legacy import.
|
|
41
|
+
for (const imp of imports) {
|
|
42
|
+
// If the import specifier has a property name, use that instead (for example, `import {PropertyName as Foo}`).
|
|
43
|
+
const item = imp.propertyName ?? imp;
|
|
44
|
+
rewriter(item.getStart(sourceFile), item.getWidth(sourceFile), getLegacyVersionOfName(item.getText(sourceFile)));
|
|
45
|
+
}
|
|
46
|
+
if (update) {
|
|
47
|
+
tree.commitUpdate(update);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function getLegacyVersionOfName(name) {
|
|
51
|
+
return name.replace(/(?:Service)$/, 'LegacyService');
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Replaces certain SKY UX services with their "legacy" equivalents.
|
|
55
|
+
* For example, `SkyModalService` becomes `SkyModalLegacyService`.
|
|
56
|
+
*/
|
|
57
|
+
function default_1() {
|
|
58
|
+
return async (tree) => {
|
|
59
|
+
const { workspace } = await (0, workspace_1.getWorkspace)(tree);
|
|
60
|
+
workspace.projects.forEach((project) => {
|
|
61
|
+
tree.getDir(project.root).visit((filePath) => {
|
|
62
|
+
if (filePath.endsWith('.ts') && !filePath.includes('node_modules')) {
|
|
63
|
+
runLegacyServicesMigration(tree, filePath);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
exports.default = default_1;
|
|
70
|
+
//# sourceMappingURL=legacy-services.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-services.schematic.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/packages/src/schematics/migrations/update-9/legacy-services/legacy-services.schematic.ts"],"names":[],"mappings":";;AAMA,gDAAyD;AACzD,iEAA4E;AAC5E,yEAA2E;AAC3E,0DAA0D;AAI1D,gGAAgG;AAChG,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAmB;IACzC,CAAC,aAAa,EAAE,CAAC,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
+
/**
|
|
2
|
+
* The contents of this file are heavily inspired by Angular's source code.
|
|
3
|
+
* @see https://github.com/angular/angular/blob/14.3.x/packages/core/schematics/utils/typescript/imports.ts
|
|
4
|
+
*/
|
|
5
|
+
import * as ts from '@schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript';
|
|
6
|
+
export interface ImportUsage {
|
|
7
|
+
node: ts.Node;
|
|
8
|
+
importName: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function getImports(sourceFile: ts.SourceFile, packages: Map<string, string[]>): ts.ImportSpecifier[];
|
|
11
|
+
export declare function getUsages(sourceFile: ts.SourceFile, importSpecifier: ts.ImportSpecifier): ImportUsage[];
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUsages = exports.getImports = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/**
|
|
6
|
+
* The contents of this file are heavily inspired by Angular's source code.
|
|
7
|
+
* @see https://github.com/angular/angular/blob/14.3.x/packages/core/schematics/utils/typescript/imports.ts
|
|
8
|
+
*/
|
|
9
|
+
const ts = tslib_1.__importStar(require("@schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
10
|
+
function getImports(sourceFile, packages) {
|
|
11
|
+
const importSpecifiers = [];
|
|
12
|
+
for (const [packageName, classes] of packages.entries()) {
|
|
13
|
+
for (const cc of classes) {
|
|
14
|
+
const specifiers = getImportSpecifiers(sourceFile, packageName, cc);
|
|
15
|
+
if (specifiers) {
|
|
16
|
+
importSpecifiers.push(...specifiers);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return importSpecifiers;
|
|
21
|
+
}
|
|
22
|
+
exports.getImports = getImports;
|
|
23
|
+
function getUsages(sourceFile, importSpecifier) {
|
|
24
|
+
const usages = [];
|
|
25
|
+
const visitNode = (node) => {
|
|
26
|
+
// Skip this node and all of its children; imports are a special case.
|
|
27
|
+
if (ts.isImportSpecifier(node)) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const importName = importSpecifier.getText(sourceFile);
|
|
31
|
+
if (ts.isIdentifier(node) && node.escapedText === importName) {
|
|
32
|
+
usages.push({ node, importName });
|
|
33
|
+
}
|
|
34
|
+
ts.forEachChild(node, visitNode);
|
|
35
|
+
};
|
|
36
|
+
ts.forEachChild(sourceFile, visitNode);
|
|
37
|
+
return usages;
|
|
38
|
+
}
|
|
39
|
+
exports.getUsages = getUsages;
|
|
40
|
+
/**
|
|
41
|
+
* Gets top-level import specifiers with a specific name that is imported from a particular module.
|
|
42
|
+
* E.g. given a file that looks like:
|
|
43
|
+
*
|
|
44
|
+
* ```
|
|
45
|
+
* import { Component, Directive } from '@angular/core';
|
|
46
|
+
* import { Foo } from './foo';
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* Calling `getImportSpecifiers(sourceFile, '@angular/core', 'Directive')` will yield the nodes
|
|
50
|
+
* referring to `Directive` in the top import.
|
|
51
|
+
*
|
|
52
|
+
* @param sourceFile File in which to look for imports.
|
|
53
|
+
* @param moduleName Name of the import's module.
|
|
54
|
+
* @param specifierName Original name of the specifier to look for. Aliases will be resolved to
|
|
55
|
+
* their original name.
|
|
56
|
+
*/
|
|
57
|
+
function getImportSpecifiers(sourceFile, moduleName, specifierName) {
|
|
58
|
+
const importSpecifiers = [];
|
|
59
|
+
for (const node of sourceFile.statements) {
|
|
60
|
+
if (ts.isImportDeclaration(node) &&
|
|
61
|
+
ts.isStringLiteral(node.moduleSpecifier) &&
|
|
62
|
+
node.moduleSpecifier.text === moduleName) {
|
|
63
|
+
const namedBindings = node.importClause && node.importClause.namedBindings;
|
|
64
|
+
if (namedBindings && ts.isNamedImports(namedBindings)) {
|
|
65
|
+
const match = findImportSpecifier(namedBindings.elements, specifierName);
|
|
66
|
+
if (match) {
|
|
67
|
+
importSpecifiers.push(match);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return importSpecifiers;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Finds an import specifier with a particular name.
|
|
76
|
+
*/
|
|
77
|
+
function findImportSpecifier(nodes, specifierName) {
|
|
78
|
+
return nodes.find((element) => {
|
|
79
|
+
const { name, propertyName } = element;
|
|
80
|
+
return propertyName?.text === specifierName || name.text === specifierName;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imports.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/utility/typescript/imports.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,2HAAqG;AAOrG,SAAgB,UAAU,CACxB,UAAyB,EACzB,QAA+B;IAE/B,MAAM,gBAAgB,GAAyB,EAAE,CAAC;IAElD,KAAK,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;QACvD,KAAK,MAAM,EAAE,IAAI,OAAO,EAAE;YACxB,MAAM,UAAU,GAAG,mBAAmB,CAAC,UAAU,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;YAEpE,IAAI,UAAU,EAAE;gBACd,gBAAgB,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;aACtC;SACF;KACF;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAjBD,gCAiBC;AAED,SAAgB,SAAS,CACvB,UAAyB,EACzB,eAAmC;IAEnC,MAAM,MAAM,GAAkB,EAAE,CAAC;IAEjC,MAAM,SAAS,GAAG,CAAC,IAAa,EAAE,EAAE;QAClC,sEAAsE;QACtE,IAAI,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE;YAC9B,OAAO;SACR;QAED,MAAM,UAAU,GAAG,eAAe,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAEvD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AAG,OAAO,CAAC;QAEvC,OAAO,YAAY,EAAE,IAAI,KAAK,aAAa,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC;IAC7E,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSourceFile = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const ts = tslib_1.__importStar(require("@schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
6
|
+
function createSourceFile(filePath, fileContents) {
|
|
7
|
+
return ts.createSourceFile(filePath, fileContents, ts.ScriptTarget.Latest, false, ts.ScriptKind.TS);
|
|
8
|
+
}
|
|
9
|
+
exports.createSourceFile = createSourceFile;
|
|
10
|
+
//# sourceMappingURL=source-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-file.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/utility/typescript/source-file.ts"],"names":[],"mappings":";;;;AAAA,2HAAqG;AAErG,SAAgB,gBAAgB,CAC9B,QAAgB,EAChB,YAAoB;IAEpB,OAAO,EAAE,CAAC,gBAAgB,CACxB,QAAQ,EACR,YAAY,EACZ,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,KAAK,EACL,EAAE,CAAC,UAAU,CAAC,EAAE,CACjB,CAAC;AACJ,CAAC;AAXD,4CAWC"}
|