@skyux/packages 15.0.0-alpha.5 → 15.0.0-alpha.7
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/migrations.json +17 -7
- package/package.json +61 -60
- package/src/schematics/migrations/update-15/legacy-i18n-services/legacy-i18n-services.schematic.d.ts +7 -0
- package/src/schematics/migrations/update-15/legacy-i18n-services/legacy-i18n-services.schematic.js +59 -0
- package/src/schematics/migrations/update-15/legacy-i18n-services/legacy-i18n-services.schematic.js.map +1 -0
- package/src/schematics/migrations/update-15/migrate-sdk-testing-imports/migrate-sdk-testing-imports.schematic.d.ts +8 -0
- package/src/schematics/migrations/update-15/migrate-sdk-testing-imports/migrate-sdk-testing-imports.schematic.js +58 -0
- package/src/schematics/migrations/update-15/migrate-sdk-testing-imports/migrate-sdk-testing-imports.schematic.js.map +1 -0
- package/src/schematics/rules/convert-grid-to-data-grid/convert-grid-to-data-grid.js +1 -1
- package/src/schematics/rules/convert-page-summary-to-page-header/convert-page-summary-to-page-header.js +1 -1
- package/src/schematics/rules/convert-progress-indicator-wizard-to-tab-wizard/convert-progress-indicator-wizard-to-tab-wizard.js +1 -1
- package/src/schematics/utility/typescript/combine-imports.d.ts +7 -0
- package/src/schematics/utility/typescript/combine-imports.js +52 -0
- package/src/schematics/utility/typescript/combine-imports.js.map +1 -0
- package/src/schematics/utility/typescript/imports.d.ts +25 -0
- package/src/schematics/utility/typescript/imports.js +59 -0
- package/src/schematics/utility/typescript/imports.js.map +1 -0
- package/src/schematics/utility/typescript/remove-import.js +39 -25
- package/src/schematics/utility/typescript/remove-import.js.map +1 -1
- package/src/schematics/utility/typescript/swap-imported-class.js +74 -32
- package/src/schematics/utility/typescript/swap-imported-class.js.map +1 -1
- package/src/version.js +1 -1
package/migrations.json
CHANGED
|
@@ -1,39 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schematics": {
|
|
3
3
|
"noop": {
|
|
4
|
-
"version": "15.0.0-alpha.
|
|
4
|
+
"version": "15.0.0-alpha.7",
|
|
5
5
|
"factory": "./src/schematics/migrations/all/noop/noop.schematic",
|
|
6
6
|
"description": "Update all SKY UX component packages"
|
|
7
7
|
},
|
|
8
8
|
"i18n-resources-module": {
|
|
9
|
-
"version": "15.0.0-alpha.
|
|
9
|
+
"version": "15.0.0-alpha.7",
|
|
10
10
|
"factory": "./src/schematics/migrations/all/i18n-resources-module/i18n-resources-module.schematic",
|
|
11
11
|
"description": "Regenerate i18n resources modules for libraries."
|
|
12
12
|
},
|
|
13
13
|
"remove-old-compat-stylesheets": {
|
|
14
|
-
"version": "15.0.0-alpha.
|
|
14
|
+
"version": "15.0.0-alpha.7",
|
|
15
15
|
"factory": "./src/schematics/migrations/all/remove-old-compat-stylesheets/remove-old-compat-stylesheets.schematic",
|
|
16
16
|
"description": "Remove backward compatible stylesheets for older versions of SKY UX."
|
|
17
17
|
},
|
|
18
18
|
"workspace-check": {
|
|
19
|
-
"version": "15.0.0-alpha.
|
|
19
|
+
"version": "15.0.0-alpha.7",
|
|
20
20
|
"factory": "./src/schematics/migrations/all/workspace-check/workspace-check.schematic",
|
|
21
21
|
"description": "Log warnings if the workspace is not configured correctly."
|
|
22
22
|
},
|
|
23
23
|
"migrate-dragula-polyfill": {
|
|
24
|
-
"version": "15.0.0-alpha.
|
|
24
|
+
"version": "15.0.0-alpha.7",
|
|
25
25
|
"factory": "./src/schematics/migrations/all/migrate-dragula-polyfill/migrate-dragula-polyfill.schematic",
|
|
26
26
|
"description": "Remove the @skyux/packages/polyfills entry from project config, replacing it with a local copy when Dragula is still installed."
|
|
27
27
|
},
|
|
28
28
|
"remove-timepicker-retain-invalid-values": {
|
|
29
|
-
"version": "15.0.0-alpha.
|
|
29
|
+
"version": "15.0.0-alpha.7",
|
|
30
30
|
"factory": "./src/schematics/migrations/update-15/remove-timepicker-retain-invalid-values/remove-timepicker-retain-invalid-values.schematic",
|
|
31
31
|
"description": "Remove the skyTimepickerRetainInvalidValues input from timepicker inputs since retaining invalid values is now the default behavior."
|
|
32
32
|
},
|
|
33
33
|
"add-compat-stylesheets": {
|
|
34
|
-
"version": "15.0.0-alpha.
|
|
34
|
+
"version": "15.0.0-alpha.7",
|
|
35
35
|
"factory": "./src/schematics/migrations/update-15/add-compat-stylesheets/add-compat-stylesheet.schematic",
|
|
36
36
|
"description": "Add a backwards-compatible stylesheet with styles that have been removed from components in SKY UX 15."
|
|
37
|
+
},
|
|
38
|
+
"migrate-sdk-testing-imports": {
|
|
39
|
+
"version": "15.0.0-alpha.7",
|
|
40
|
+
"factory": "./src/schematics/migrations/update-15/migrate-sdk-testing-imports/migrate-sdk-testing-imports.schematic",
|
|
41
|
+
"description": "Move SkyAppTestUtility, SkyAppTestUtilityDomEventOptions, and SkyBy imports from the deprecated @skyux-sdk/testing package to @skyux/core/testing."
|
|
42
|
+
},
|
|
43
|
+
"legacy-i18n-services": {
|
|
44
|
+
"version": "15.0.0-alpha.7",
|
|
45
|
+
"factory": "./src/schematics/migrations/update-15/legacy-i18n-services/legacy-i18n-services.schematic",
|
|
46
|
+
"description": "Replace SkyAppResourcesService and SkyLibResourcesService with their legacy equivalents since the originals now emit whenever the locale changes."
|
|
37
47
|
}
|
|
38
48
|
}
|
|
39
49
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/packages",
|
|
3
|
-
"version": "15.0.0-alpha.
|
|
3
|
+
"version": "15.0.0-alpha.7",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"description": "Handles the `ng update` command for SKY UX component libraries.",
|
|
6
6
|
"keywords": [
|
|
@@ -32,70 +32,71 @@
|
|
|
32
32
|
"ng-update": {
|
|
33
33
|
"migrations": "./migrations.json",
|
|
34
34
|
"packageGroup": {
|
|
35
|
-
"@skyux/packages": "15.0.0-alpha.
|
|
35
|
+
"@skyux/packages": "15.0.0-alpha.7",
|
|
36
36
|
"@blackbaud/angular-tree-component": "^1.0.0",
|
|
37
|
-
"@skyux-sdk/eslint-schematics": "15.0.0-alpha.
|
|
38
|
-
"@skyux-sdk/stylelint-schematics": "15.0.0-alpha.
|
|
39
|
-
"@skyux-sdk/testing": "15.0.0-alpha.
|
|
40
|
-
"@skyux-sdk/testing-schematics": "15.0.0-alpha.
|
|
41
|
-
"@skyux/
|
|
42
|
-
"@skyux/
|
|
43
|
-
"@skyux/
|
|
44
|
-
"@skyux/
|
|
45
|
-
"@skyux/
|
|
46
|
-
"@skyux/
|
|
47
|
-
"@skyux/
|
|
48
|
-
"@skyux/
|
|
49
|
-
"@skyux/
|
|
50
|
-
"@skyux/
|
|
51
|
-
"@skyux/
|
|
52
|
-
"@skyux/
|
|
53
|
-
"@skyux/
|
|
54
|
-
"@skyux/
|
|
55
|
-
"@skyux/data-
|
|
56
|
-
"@skyux/
|
|
57
|
-
"@skyux/
|
|
58
|
-
"@skyux/
|
|
59
|
-
"@skyux/
|
|
60
|
-
"@skyux/
|
|
61
|
-
"@skyux/
|
|
62
|
-
"@skyux/
|
|
63
|
-
"@skyux/
|
|
64
|
-
"@skyux/
|
|
65
|
-
"@skyux/
|
|
37
|
+
"@skyux-sdk/eslint-schematics": "15.0.0-alpha.7",
|
|
38
|
+
"@skyux-sdk/stylelint-schematics": "15.0.0-alpha.7",
|
|
39
|
+
"@skyux-sdk/testing": "15.0.0-alpha.7",
|
|
40
|
+
"@skyux-sdk/testing-schematics": "15.0.0-alpha.7",
|
|
41
|
+
"@skyux-sdk/vitest": "15.0.0-alpha.7",
|
|
42
|
+
"@skyux/a11y": "15.0.0-alpha.7",
|
|
43
|
+
"@skyux/action-bars": "15.0.0-alpha.7",
|
|
44
|
+
"@skyux/ag-grid": "15.0.0-alpha.7",
|
|
45
|
+
"@skyux/angular-tree-component": "15.0.0-alpha.7",
|
|
46
|
+
"@skyux/animations": "15.0.0-alpha.7",
|
|
47
|
+
"@skyux/assets": "15.0.0-alpha.7",
|
|
48
|
+
"@skyux/autonumeric": "15.0.0-alpha.7",
|
|
49
|
+
"@skyux/avatar": "15.0.0-alpha.7",
|
|
50
|
+
"@skyux/charts": "15.0.0-alpha.7",
|
|
51
|
+
"@skyux/code-examples": "15.0.0-alpha.7",
|
|
52
|
+
"@skyux/colorpicker": "15.0.0-alpha.7",
|
|
53
|
+
"@skyux/config": "15.0.0-alpha.7",
|
|
54
|
+
"@skyux/core": "15.0.0-alpha.7",
|
|
55
|
+
"@skyux/data-grid": "15.0.0-alpha.7",
|
|
56
|
+
"@skyux/data-manager": "15.0.0-alpha.7",
|
|
57
|
+
"@skyux/datetime": "15.0.0-alpha.7",
|
|
58
|
+
"@skyux/docs-tools": "15.0.0-alpha.7",
|
|
59
|
+
"@skyux/errors": "15.0.0-alpha.7",
|
|
60
|
+
"@skyux/filter-bar": "15.0.0-alpha.7",
|
|
61
|
+
"@skyux/flyout": "15.0.0-alpha.7",
|
|
62
|
+
"@skyux/forms": "15.0.0-alpha.7",
|
|
63
|
+
"@skyux/grids": "15.0.0-alpha.7",
|
|
64
|
+
"@skyux/help-inline": "15.0.0-alpha.7",
|
|
65
|
+
"@skyux/i18n": "15.0.0-alpha.7",
|
|
66
|
+
"@skyux/icon": "15.0.0-alpha.7",
|
|
66
67
|
"@skyux/icons": "^11.4.0",
|
|
67
|
-
"@skyux/indicators": "15.0.0-alpha.
|
|
68
|
-
"@skyux/inline-form": "15.0.0-alpha.
|
|
69
|
-
"@skyux/layout": "15.0.0-alpha.
|
|
70
|
-
"@skyux/list-builder": "15.0.0-alpha.
|
|
71
|
-
"@skyux/list-builder-common": "15.0.0-alpha.
|
|
72
|
-
"@skyux/list-builder-view-checklist": "15.0.0-alpha.
|
|
73
|
-
"@skyux/list-builder-view-grids": "15.0.0-alpha.
|
|
74
|
-
"@skyux/lists": "15.0.0-alpha.
|
|
75
|
-
"@skyux/lookup": "15.0.0-alpha.
|
|
76
|
-
"@skyux/manifest": "15.0.0-alpha.
|
|
77
|
-
"@skyux/modals": "15.0.0-alpha.
|
|
78
|
-
"@skyux/navbar": "15.0.0-alpha.
|
|
79
|
-
"@skyux/pages": "15.0.0-alpha.
|
|
80
|
-
"@skyux/phone-field": "15.0.0-alpha.
|
|
81
|
-
"@skyux/popovers": "15.0.0-alpha.
|
|
82
|
-
"@skyux/progress-indicator": "15.0.0-alpha.
|
|
83
|
-
"@skyux/router": "15.0.0-alpha.
|
|
84
|
-
"@skyux/split-view": "15.0.0-alpha.
|
|
85
|
-
"@skyux/tabs": "15.0.0-alpha.
|
|
86
|
-
"@skyux/text-editor": "15.0.0-alpha.
|
|
87
|
-
"@skyux/theme": "15.0.0-alpha.
|
|
88
|
-
"@skyux/tiles": "15.0.0-alpha.
|
|
89
|
-
"@skyux/toast": "15.0.0-alpha.
|
|
90
|
-
"@skyux/validation": "15.0.0-alpha.
|
|
68
|
+
"@skyux/indicators": "15.0.0-alpha.7",
|
|
69
|
+
"@skyux/inline-form": "15.0.0-alpha.7",
|
|
70
|
+
"@skyux/layout": "15.0.0-alpha.7",
|
|
71
|
+
"@skyux/list-builder": "15.0.0-alpha.7",
|
|
72
|
+
"@skyux/list-builder-common": "15.0.0-alpha.7",
|
|
73
|
+
"@skyux/list-builder-view-checklist": "15.0.0-alpha.7",
|
|
74
|
+
"@skyux/list-builder-view-grids": "15.0.0-alpha.7",
|
|
75
|
+
"@skyux/lists": "15.0.0-alpha.7",
|
|
76
|
+
"@skyux/lookup": "15.0.0-alpha.7",
|
|
77
|
+
"@skyux/manifest": "15.0.0-alpha.7",
|
|
78
|
+
"@skyux/modals": "15.0.0-alpha.7",
|
|
79
|
+
"@skyux/navbar": "15.0.0-alpha.7",
|
|
80
|
+
"@skyux/pages": "15.0.0-alpha.7",
|
|
81
|
+
"@skyux/phone-field": "15.0.0-alpha.7",
|
|
82
|
+
"@skyux/popovers": "15.0.0-alpha.7",
|
|
83
|
+
"@skyux/progress-indicator": "15.0.0-alpha.7",
|
|
84
|
+
"@skyux/router": "15.0.0-alpha.7",
|
|
85
|
+
"@skyux/split-view": "15.0.0-alpha.7",
|
|
86
|
+
"@skyux/tabs": "15.0.0-alpha.7",
|
|
87
|
+
"@skyux/text-editor": "15.0.0-alpha.7",
|
|
88
|
+
"@skyux/theme": "15.0.0-alpha.7",
|
|
89
|
+
"@skyux/tiles": "15.0.0-alpha.7",
|
|
90
|
+
"@skyux/toast": "15.0.0-alpha.7",
|
|
91
|
+
"@skyux/validation": "15.0.0-alpha.7",
|
|
91
92
|
"ag-grid-angular": "^36.1.0",
|
|
92
93
|
"ag-grid-community": "^36.1.0",
|
|
93
94
|
"ag-grid-enterprise": "^36.0.2",
|
|
94
95
|
"autonumeric": "^4.10.10",
|
|
95
|
-
"eslint-config-skyux": "15.0.0-alpha.
|
|
96
|
-
"skyux-eslint": "15.0.0-alpha.
|
|
97
|
-
"skyux-stylelint": "15.0.0-alpha.
|
|
98
|
-
"stylelint-config-skyux": "15.0.0-alpha.
|
|
96
|
+
"eslint-config-skyux": "15.0.0-alpha.7",
|
|
97
|
+
"skyux-eslint": "15.0.0-alpha.7",
|
|
98
|
+
"skyux-stylelint": "15.0.0-alpha.7",
|
|
99
|
+
"stylelint-config-skyux": "15.0.0-alpha.7"
|
|
99
100
|
}
|
|
100
101
|
},
|
|
101
102
|
"peerDependencies": {
|
|
@@ -104,7 +105,7 @@
|
|
|
104
105
|
"typescript": "^6.0.3"
|
|
105
106
|
},
|
|
106
107
|
"dependencies": {
|
|
107
|
-
"@blackbaud/skyux-design-tokens": "7.0.0-alpha.
|
|
108
|
+
"@blackbaud/skyux-design-tokens": "7.0.0-alpha.3",
|
|
108
109
|
"fs-extra": "11.3.6",
|
|
109
110
|
"jsonc-parser": "3.3.1",
|
|
110
111
|
"parse5": "7.3.0",
|
package/src/schematics/migrations/update-15/legacy-i18n-services/legacy-i18n-services.schematic.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
/**
|
|
3
|
+
* Replaces the resources services with their "legacy" equivalents, which emit
|
|
4
|
+
* once and complete. The original services now emit again whenever the locale
|
|
5
|
+
* changes.
|
|
6
|
+
*/
|
|
7
|
+
export default function (): Rule;
|
package/src/schematics/migrations/update-15/legacy-i18n-services/legacy-i18n-services.schematic.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
6
|
+
const typescript_1 = tslib_1.__importDefault(require("typescript"));
|
|
7
|
+
const ng_ast_1 = require("../../../utility/typescript/ng-ast");
|
|
8
|
+
const swap_imported_class_1 = require("../../../utility/typescript/swap-imported-class");
|
|
9
|
+
const visit_project_files_1 = require("../../../utility/visit-project-files");
|
|
10
|
+
const MODULE_NAME = '@skyux/i18n';
|
|
11
|
+
const CLASS_NAMES = {
|
|
12
|
+
SkyAppResourcesService: 'SkyAppResourcesLegacyService',
|
|
13
|
+
SkyLibResourcesService: 'SkyLibResourcesLegacyService',
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Whether the reference is the `SkyLibResourcesService.addResources()` static
|
|
17
|
+
* call. Only the observables returned by the instance methods changed, so
|
|
18
|
+
* static calls -- which generated resources modules rely on -- are left alone.
|
|
19
|
+
*/
|
|
20
|
+
function isStaticAddResourcesReference(node) {
|
|
21
|
+
const parent = node.parent;
|
|
22
|
+
return (typescript_1.default.isPropertyAccessExpression(parent) &&
|
|
23
|
+
parent.expression === node &&
|
|
24
|
+
parent.name.text === 'addResources');
|
|
25
|
+
}
|
|
26
|
+
async function updateSourceFiles(tree) {
|
|
27
|
+
const workspace = await (0, workspace_1.getWorkspace)(tree);
|
|
28
|
+
workspace.projects.forEach((project) => {
|
|
29
|
+
(0, visit_project_files_1.visitProjectFiles)(tree, project.sourceRoot || project.root, (filePath) => {
|
|
30
|
+
if (!filePath.endsWith('.ts')) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const content = tree.readText(filePath);
|
|
34
|
+
if (!Object.keys(CLASS_NAMES).some((name) => content.includes(name))) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const recorder = tree.beginUpdate(filePath);
|
|
38
|
+
(0, swap_imported_class_1.swapImportedClass)(recorder, filePath, (0, ng_ast_1.parseSourceFile)(tree, filePath), [
|
|
39
|
+
{
|
|
40
|
+
classNames: CLASS_NAMES,
|
|
41
|
+
moduleName: MODULE_NAME,
|
|
42
|
+
filter: (node) => !isStaticAddResourcesReference(node),
|
|
43
|
+
},
|
|
44
|
+
]);
|
|
45
|
+
tree.commitUpdate(recorder);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Replaces the resources services with their "legacy" equivalents, which emit
|
|
51
|
+
* once and complete. The original services now emit again whenever the locale
|
|
52
|
+
* changes.
|
|
53
|
+
*/
|
|
54
|
+
function default_1() {
|
|
55
|
+
return async (tree) => {
|
|
56
|
+
await updateSourceFiles(tree);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=legacy-i18n-services.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-i18n-services.schematic.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/packages/src/schematics/migrations/update-15/legacy-i18n-services/legacy-i18n-services.schematic.ts"],"names":[],"mappings":";;AAkEA,4BAIC;;AArED,qEAAqE;AAErE,oEAA4B;AAE5B,+DAAqE;AACrE,yFAAoF;AACpF,8EAAyE;AAEzE,MAAM,WAAW,GAAG,aAAa,CAAC;AAElC,MAAM,WAAW,GAA2B;IAC1C,sBAAsB,EAAE,8BAA8B;IACtD,sBAAsB,EAAE,8BAA8B;CACvD,CAAC;AAEF;;;;GAIG;AACH,SAAS,6BAA6B,CAAC,IAAmB;IACxD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,C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AACL,CAAC;AAED;;;;GAIG;AACH;IACE,OAAO,KAAK,EAAE,IAAU,EAAiB,EAAE;QACzC,MAAM,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
/**
|
|
3
|
+
* Moves `SkyAppTestUtility`, `SkyAppTestUtilityDomEventOptions`, and `SkyBy`
|
|
4
|
+
* imports from the deprecated `@skyux-sdk/testing` package to
|
|
5
|
+
* `@skyux/core/testing`, and drops the deprecated dependency once nothing else
|
|
6
|
+
* in the workspace imports it.
|
|
7
|
+
*/
|
|
8
|
+
export default function (): Rule;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
4
|
+
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
5
|
+
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
6
|
+
const dependencies_2 = require("../../../utility/dependencies");
|
|
7
|
+
const combine_imports_1 = require("../../../utility/typescript/combine-imports");
|
|
8
|
+
const ng_ast_1 = require("../../../utility/typescript/ng-ast");
|
|
9
|
+
const swap_imported_class_1 = require("../../../utility/typescript/swap-imported-class");
|
|
10
|
+
const visit_project_files_1 = require("../../../utility/visit-project-files");
|
|
11
|
+
const workspace_2 = require("../../../utility/workspace");
|
|
12
|
+
const DEPRECATED_PACKAGE = '@skyux-sdk/testing';
|
|
13
|
+
const SUPPORTED_PACKAGE = '@skyux/core/testing';
|
|
14
|
+
const SWAP_OPTIONS = [
|
|
15
|
+
{
|
|
16
|
+
classNames: {
|
|
17
|
+
SkyAppTestUtility: 'SkyAppTestUtility',
|
|
18
|
+
SkyAppTestUtilityDomEventOptions: 'SkyAppTestUtilityDomEventOptions',
|
|
19
|
+
SkyBy: 'SkyBy',
|
|
20
|
+
},
|
|
21
|
+
moduleName: { old: DEPRECATED_PACKAGE, new: SUPPORTED_PACKAGE },
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
function migrateFile(tree, filePath) {
|
|
25
|
+
if (!tree.readText(filePath).includes(DEPRECATED_PACKAGE)) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const swapRecorder = tree.beginUpdate(filePath);
|
|
29
|
+
(0, swap_imported_class_1.swapImportedClass)(swapRecorder, filePath, (0, ng_ast_1.parseSourceFile)(tree, filePath), SWAP_OPTIONS);
|
|
30
|
+
tree.commitUpdate(swapRecorder);
|
|
31
|
+
// Runs against the swapped file so the moved imports are merged with any
|
|
32
|
+
// that the file already had.
|
|
33
|
+
const combineRecorder = tree.beginUpdate(filePath);
|
|
34
|
+
(0, combine_imports_1.combineImports)(combineRecorder, (0, ng_ast_1.parseSourceFile)(tree, filePath), SUPPORTED_PACKAGE);
|
|
35
|
+
tree.commitUpdate(combineRecorder);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Moves `SkyAppTestUtility`, `SkyAppTestUtilityDomEventOptions`, and `SkyBy`
|
|
39
|
+
* imports from the deprecated `@skyux-sdk/testing` package to
|
|
40
|
+
* `@skyux/core/testing`, and drops the deprecated dependency once nothing else
|
|
41
|
+
* in the workspace imports it.
|
|
42
|
+
*/
|
|
43
|
+
function default_1() {
|
|
44
|
+
return async (tree) => {
|
|
45
|
+
const workspace = await (0, workspace_1.getWorkspace)(tree);
|
|
46
|
+
for (const project of workspace.projects.values()) {
|
|
47
|
+
(0, visit_project_files_1.visitProjectFiles)(tree, (0, workspace_2.getSourceRoot)(project), (filePath) => {
|
|
48
|
+
if (filePath.endsWith('.ts') && !filePath.endsWith('.d.ts')) {
|
|
49
|
+
migrateFile(tree, filePath);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
if (!(await (0, dependencies_2.isPackageUsed)(tree, DEPRECATED_PACKAGE))) {
|
|
54
|
+
(0, dependencies_1.removePackageJsonDependency)(tree, DEPRECATED_PACKAGE);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=migrate-sdk-testing-imports.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-sdk-testing-imports.schematic.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/packages/src/schematics/migrations/update-15/migrate-sdk-testing-imports/migrate-sdk-testing-imports.schematic.ts"],"names":[],"mappings":";;AA+DA,4BAgBC;AA9ED,2EAAuF;AACvF,qEAAqE;AAErE,gEAA8D;AAC9D,iFAA6E;AAC7E,+DAAqE;AACrE,yFAGyD;AACzD,8EAAyE;AACzE,0DAA2D;AAE3D,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAChD,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAEhD,MAAM,YAAY,GAA+B;IAC/C;QACE,UAAU,EAAE;YACV,iBAAiB,EAAE,mBAAmB;YACtC,gCAAgC,EAAE,kCAAkC;YACpE,KAAK,EAAE,OAAO;SACf;QACD,UAAU,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE,iBAAiB,EAAE;KAChE;CACF,CAAC;AAEF,SAAS,WAAW,CAAC,IAAU,EAAE,QAAgB;IAC/C,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAC1D,OAAO;IACT,CAAC;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEhD,IAAA,uCAAiB,EACf,YAAY,EACZ,QAAQ,EACR,IAAA,wBAAe,EAAC,IAAI,EAAE,QAAQ,CAAC,EAC/B,YAAY,CACb,CAAC;IAEF,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAEhC,yEAAyE;IACzE,6BAA6B;IAC7B,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEnD,IAAA,gCAAc,EACZ,eAAe,EACf,IAAA,wBAAe,EAAC,IAAI,EAAE,QAAQ,CAAC,EAC/B,iBAAiB,CAClB,CAAC;IAEF,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC;AAED;;;;;GAKG;AACH;IACE,OAAO,KAAK,EAAE,IAAU,EAAiB,EAAE;QACzC,MAAM,SAAS,GAAG,MAAM,IAAA,wBAAY,EAAC,IAAI,CAAC,CAAC;QAE3C,KAAK,MAAM,OAAO,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC;YAClD,IAAA,uCAAiB,EAAC,IAAI,EAAE,IAAA,yBAAa,EAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE;gBAC3D,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;oBAC5D,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC9B,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,CAAC,MAAM,IAAA,4BAAa,EAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC;YACrD,IAAA,0CAA2B,EAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;QACxD,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -535,7 +535,7 @@ function convertGridToDataGrid(projectPath) {
|
|
|
535
535
|
},
|
|
536
536
|
() => {
|
|
537
537
|
if (anyConverted) {
|
|
538
|
-
return (0, utility_1.addDependency)('@skyux/data-grid', `15.0.0-alpha.
|
|
538
|
+
return (0, utility_1.addDependency)('@skyux/data-grid', `15.0.0-alpha.7`, {
|
|
539
539
|
existing: utility_1.ExistingBehavior.Skip,
|
|
540
540
|
});
|
|
541
541
|
}
|
|
@@ -198,7 +198,7 @@ function convertPageSummaryToPageHeader(projectPath) {
|
|
|
198
198
|
}
|
|
199
199
|
});
|
|
200
200
|
},
|
|
201
|
-
(0, utility_1.addDependency)('@skyux/pages', `15.0.0-alpha.
|
|
201
|
+
(0, utility_1.addDependency)('@skyux/pages', `15.0.0-alpha.7`, {
|
|
202
202
|
existing: utility_1.ExistingBehavior.Skip,
|
|
203
203
|
}),
|
|
204
204
|
]);
|
|
@@ -296,7 +296,7 @@ function convertProgressIndicatorWizardToTabWizard(options) {
|
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
298
|
},
|
|
299
|
-
(0, utility_1.addDependency)('@skyux/tabs', `15.0.0-alpha.
|
|
299
|
+
(0, utility_1.addDependency)('@skyux/tabs', `15.0.0-alpha.7`, {
|
|
300
300
|
existing: utility_1.ExistingBehavior.Skip,
|
|
301
301
|
}),
|
|
302
302
|
]);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UpdateRecorder } from '@angular-devkit/schematics';
|
|
2
|
+
import ts from 'typescript';
|
|
3
|
+
/**
|
|
4
|
+
* Merges every named import of `moduleName` into the first such declaration,
|
|
5
|
+
* dropping specifiers that are imported more than once.
|
|
6
|
+
*/
|
|
7
|
+
export declare function combineImports(recorder: UpdateRecorder, sourceFile: ts.SourceFile, moduleName: string): void;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.combineImports = combineImports;
|
|
4
|
+
const imports_1 = require("./imports");
|
|
5
|
+
function getCombinedSpecifiers(declarations, isTypeOnly) {
|
|
6
|
+
const seen = new Map();
|
|
7
|
+
const combined = [];
|
|
8
|
+
for (const declaration of declarations) {
|
|
9
|
+
for (const specifier of declaration.specifiers) {
|
|
10
|
+
const specifierIsTypeOnly = declaration.importClause.isTypeOnly || specifier.isTypeOnly;
|
|
11
|
+
const text = (0, imports_1.getSpecifierText)(specifier, !isTypeOnly && declaration.importClause.isTypeOnly);
|
|
12
|
+
const existing = seen.get(specifier.name.text);
|
|
13
|
+
if (!existing) {
|
|
14
|
+
seen.set(specifier.name.text, {
|
|
15
|
+
index: combined.length,
|
|
16
|
+
isTypeOnly: specifierIsTypeOnly,
|
|
17
|
+
});
|
|
18
|
+
combined.push(text);
|
|
19
|
+
}
|
|
20
|
+
else if (existing.isTypeOnly && !specifierIsTypeOnly) {
|
|
21
|
+
// A value import of the same name wins, otherwise merging would leave
|
|
22
|
+
// the name usable only as a type.
|
|
23
|
+
combined[existing.index] = text;
|
|
24
|
+
existing.isTypeOnly = false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return combined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Merges every named import of `moduleName` into the first such declaration,
|
|
32
|
+
* dropping specifiers that are imported more than once.
|
|
33
|
+
*/
|
|
34
|
+
function combineImports(recorder, sourceFile, moduleName) {
|
|
35
|
+
// Declarations with a default binding are left alone; the merged clause only
|
|
36
|
+
// carries named specifiers, so folding one in would drop its default.
|
|
37
|
+
const declarations = (0, imports_1.getNamedImportDeclarations)(sourceFile, moduleName).filter(({ importClause }) => !importClause.name);
|
|
38
|
+
if (declarations.length < 2) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const [first, ...rest] = declarations;
|
|
42
|
+
// The merged declaration can only stay `import type` if every source was.
|
|
43
|
+
const isTypeOnly = declarations.every(({ importClause }) => importClause.isTypeOnly);
|
|
44
|
+
const specifiers = getCombinedSpecifiers(declarations, isTypeOnly);
|
|
45
|
+
const start = first.importClause.getStart(sourceFile);
|
|
46
|
+
recorder.remove(start, first.importClause.getEnd() - start);
|
|
47
|
+
recorder.insertRight(start, `${isTypeOnly ? 'type ' : ''}{ ${specifiers.join(', ')} }`);
|
|
48
|
+
for (const { declaration } of rest) {
|
|
49
|
+
(0, imports_1.removeStatement)(recorder, sourceFile, declaration);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=combine-imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combine-imports.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/utility/typescript/combine-imports.ts"],"names":[],"mappings":";;AAmDA,wCAmCC;AAnFD,uCAKmB;AAEnB,SAAS,qBAAqB,CAC5B,YAAsC,EACtC,UAAmB;IAEnB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAkD,CAAC;IACvE,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,KAAK,MAAM,SAAS,IAAI,WAAW,CAAC,UAAU,EAAE,CAAC;YAC/C,MAAM,mBAAmB,GACvB,WAAW,CAAC,YAAY,CAAC,UAAU,IAAI,SAAS,CAAC,UAAU,CAAC;YAE9D,MAAM,IAAI,GAAG,IAAA,0BAAgB,EAC3B,SAAS,EACT,CAAC,UAAU,IAAI,WAAW,CAAC,YAAY,CAAC,UAAU,CACnD,CAAC;YAEF,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAE/C,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE;oBAC5B,KAAK,EAAE,QAAQ,CAAC,MAAM;oBACtB,UAAU,EAAE,mBAAmB;iBAChC,CAAC,CAAC;gBACH,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;iBAAM,IAAI,QAAQ,CAAC,UAAU,IAAI,CAAC,mBAAmB,EAAE,CAAC;gBACvD,sEAAsE;gBACtE,kCAAkC;gBAClC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;gBAChC,QAAQ,CAAC,UAAU,GAAG,KAAK,CAAC;YAC9B,CAAC;QACH,CAAC;IACH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
|
|
2
|
+
import ts from 'typescript';
|
|
3
|
+
export interface NamedImportDeclaration {
|
|
4
|
+
declaration: ts.ImportDeclaration;
|
|
5
|
+
importClause: ts.ImportClause;
|
|
6
|
+
namedBindings: ts.NamedImports;
|
|
7
|
+
specifiers: readonly ts.ImportSpecifier[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns every `import { ... } from '<moduleName>'` declaration in the file.
|
|
11
|
+
* Namespace and default-only imports are skipped since they have no specifiers
|
|
12
|
+
* to operate on.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getNamedImportDeclarations(sourceFile: ts.SourceFile, moduleName: string): NamedImportDeclaration[];
|
|
15
|
+
/**
|
|
16
|
+
* Returns the text of a specifier, moving the declaration's `type` modifier
|
|
17
|
+
* onto the specifier so it survives being merged into a value import.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getSpecifierText(specifier: ts.ImportSpecifier, isTypeOnly: boolean): string;
|
|
20
|
+
export declare function replaceNode(recorder: UpdateRecorder, sourceFile: ts.SourceFile, node: ts.Node, text: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Removes a statement along with the rest of the line it ends on, so deleting
|
|
23
|
+
* an import doesn't leave a blank line behind.
|
|
24
|
+
*/
|
|
25
|
+
export declare function removeStatement(recorder: UpdateRecorder, sourceFile: ts.SourceFile, node: ts.Node): void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNamedImportDeclarations = getNamedImportDeclarations;
|
|
4
|
+
exports.getSpecifierText = getSpecifierText;
|
|
5
|
+
exports.replaceNode = replaceNode;
|
|
6
|
+
exports.removeStatement = removeStatement;
|
|
7
|
+
const tslib_1 = require("tslib");
|
|
8
|
+
const typescript_1 = tslib_1.__importDefault(require("typescript"));
|
|
9
|
+
/**
|
|
10
|
+
* Returns every `import { ... } from '<moduleName>'` declaration in the file.
|
|
11
|
+
* Namespace and default-only imports are skipped since they have no specifiers
|
|
12
|
+
* to operate on.
|
|
13
|
+
*/
|
|
14
|
+
function getNamedImportDeclarations(sourceFile, moduleName) {
|
|
15
|
+
const declarations = [];
|
|
16
|
+
for (const statement of sourceFile.statements) {
|
|
17
|
+
if (!typescript_1.default.isImportDeclaration(statement) ||
|
|
18
|
+
!typescript_1.default.isStringLiteral(statement.moduleSpecifier) ||
|
|
19
|
+
statement.moduleSpecifier.text !== moduleName) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
const importClause = statement.importClause;
|
|
23
|
+
const namedBindings = importClause?.namedBindings;
|
|
24
|
+
if (!importClause || !namedBindings || !typescript_1.default.isNamedImports(namedBindings)) {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
declarations.push({
|
|
28
|
+
declaration: statement,
|
|
29
|
+
importClause,
|
|
30
|
+
namedBindings,
|
|
31
|
+
specifiers: namedBindings.elements,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return declarations;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Returns the text of a specifier, moving the declaration's `type` modifier
|
|
38
|
+
* onto the specifier so it survives being merged into a value import.
|
|
39
|
+
*/
|
|
40
|
+
function getSpecifierText(specifier, isTypeOnly) {
|
|
41
|
+
const text = specifier.getText();
|
|
42
|
+
return isTypeOnly && !specifier.isTypeOnly ? `type ${text}` : text;
|
|
43
|
+
}
|
|
44
|
+
function replaceNode(recorder, sourceFile, node, text) {
|
|
45
|
+
const start = node.getStart(sourceFile);
|
|
46
|
+
recorder.remove(start, node.getEnd() - start);
|
|
47
|
+
recorder.insertRight(start, text);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Removes a statement along with the rest of the line it ends on, so deleting
|
|
51
|
+
* an import doesn't leave a blank line behind.
|
|
52
|
+
*/
|
|
53
|
+
function removeStatement(recorder, sourceFile, node) {
|
|
54
|
+
const start = node.getStart(sourceFile);
|
|
55
|
+
const end = node.getEnd();
|
|
56
|
+
const trailing = /^[^\S\n]*\n?/.exec(sourceFile.text.substring(end));
|
|
57
|
+
recorder.remove(start, end - start + (trailing ? trailing[0].length : 0));
|
|
58
|
+
}
|
|
59
|
+
//# 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":";;AAeA,gEA+BC;AAMD,4CAOC;AAED,kCAUC;AAMD,0CAUC;;AAtFD,oEAA4B;AAS5B;;;;GAIG;AACH,SAAgB,0BAA0B,CACxC,UAAyB,EACzB,UAAkB;IAElB,MAAM,YAAY,GAA6B,EAAE,CAAC;IAElD,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;QAC9C,IACE,CAAC,oBAAE,CAAC,mBAAmB,CAAC,SAAS,CAAC;YAClC,CAAC,oBAAE,CAAC,eAAe,CAAC,SAAS,CAAC,eAAe,CAAC;YAC9C,SAAS,CAAC,eAAe,CAAC,IAAI,KAAK,UAAU,EAC7C,CAAC;YACD,SAAS;QACX,CAAC;QAED,MAAM,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC;QAC5C,MAAM,aAAa,GAAG,YAAY,EAAE,aAAa,CAAC;QAElD,IAAI,CAAC,YAAY,IAAI,CAAC,aAAa,IAAI,CAAC,oBAAE,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;YACzE,SAAS;QACX,CAAC;QAED,YAAY,CAAC,IAAI,CAAC;YAChB,WAAW,EAAE,SAAS;YACtB,YAAY;YACZ,aAAa;YACb,UAAU,EAAE,aAAa,CAAC,QAAQ;SACnC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;GAGG;AACH,SAAgB,gBAAgB,CAC9B,SAA6B,EAC7B,UAAmB;IAEnB,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;IAEjC,OAAO,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACrE,CAAC;AAED,SAAgB,WAAW,CACzB,QAAwB,EACxB,UAAyB,EACzB,IAAa,EACb,IAAY;IAEZ,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAExC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC;IAC9C,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAED;;;GAGG;AACH,SAAgB,eAAe,CAC7B,QAAwB,EACxB,UAAyB,EACzB,IAAa;IAEb,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACxC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAC1B,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAErE,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -1,32 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.removeImport = removeImport;
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const imports_1 = require("./imports");
|
|
5
|
+
/**
|
|
6
|
+
* Removes specifiers from a named import, consuming the separating comma so the
|
|
7
|
+
* remaining specifiers stay well-formed. Contiguous specifiers are removed as a
|
|
8
|
+
* single range to keep the edits from overlapping.
|
|
9
|
+
*/
|
|
10
|
+
function removeSpecifiers(recorder, sourceFile, specifiers, isRemoved) {
|
|
11
|
+
for (let first = 0; first < specifiers.length; first++) {
|
|
12
|
+
if (!isRemoved(specifiers[first])) {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
let last = first;
|
|
16
|
+
while (last + 1 < specifiers.length && isRemoved(specifiers[last + 1])) {
|
|
17
|
+
last++;
|
|
18
|
+
}
|
|
19
|
+
// A run takes the comma that precedes it or, when it starts the list, the
|
|
20
|
+
// comma that follows it. At least one specifier is retained here, so there
|
|
21
|
+
// is always a neighbor on one side.
|
|
22
|
+
const [start, end] = first > 0
|
|
23
|
+
? [specifiers[first - 1].getEnd(), specifiers[last].getEnd()]
|
|
24
|
+
: [
|
|
25
|
+
specifiers[first].getStart(sourceFile),
|
|
26
|
+
specifiers[last + 1].getStart(sourceFile),
|
|
27
|
+
];
|
|
28
|
+
recorder.remove(start, end - start);
|
|
29
|
+
first = last;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
7
32
|
function removeImport(recorder, sourceFile, options) {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const importStart = importSpecifier.getStart(sourceFile);
|
|
20
|
-
const importWidth = importSpecifier.getWidth(sourceFile);
|
|
21
|
-
recorder.remove(importStart, importWidth + 1);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
const importStart = importDeclaration.getStart(sourceFile);
|
|
26
|
-
const importWidth = importDeclaration.getWidth(sourceFile);
|
|
27
|
-
recorder.remove(importStart, importWidth);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
33
|
+
for (const { declaration, specifiers } of (0, imports_1.getNamedImportDeclarations)(sourceFile, options.moduleName)) {
|
|
34
|
+
const isRemoved = (specifier) => options.classNames.includes(specifier.name.text);
|
|
35
|
+
const removedCount = specifiers.filter(isRemoved).length;
|
|
36
|
+
if (removedCount === 0) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if (removedCount === specifiers.length) {
|
|
40
|
+
(0, imports_1.removeStatement)(recorder, sourceFile, declaration);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
removeSpecifiers(recorder, sourceFile, specifiers, isRemoved);
|
|
30
44
|
}
|
|
31
45
|
}
|
|
32
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove-import.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/utility/typescript/remove-import.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"remove-import.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/utility/typescript/remove-import.ts"],"names":[],"mappings":";;AAgDA,oCAwBC;AArED,uCAAwE;AAOxE;;;;GAIG;AACH,SAAS,gBAAgB,CACvB,QAAwB,EACxB,UAAyB,EACzB,UAAyC,EACzC,SAAqD;IAErD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QACvD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAClC,SAAS;QACX,CAAC;QAED,IAAI,IAAI,GAAG,KAAK,CAAC;QAEjB,OAAO,IAAI,GAAG,CAAC,GAAG,UAAU,CAAC,MAAM,IAAI,SAAS,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACvE,IAAI,EAAE,CAAC;QACT,CAAC;QAED,0EAA0E;QAC1E,2EAA2E;QAC3E,oCAAoC;QACpC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAChB,KAAK,GAAG,CAAC;YACP,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;YAC7D,CAAC,CAAC;gBACE,UAAU,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;gBACtC,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;aAC1C,CAAC;QAER,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,CAAC,CAAC;QACpC,KAAK,GAAG,IAAI,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAgB,YAAY,CAC1B,QAAwB,EACxB,UAAyB,EACzB,OAA4B;IAE5B,KAAK,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,IAAA,oCAA0B,EAClE,UAAU,EACV,OAAO,CAAC,UAAU,CACnB,EAAE,CAAC;QACF,MAAM,SAAS,GAAG,CAAC,SAA6B,EAAW,EAAE,CAC3D,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEnD,MAAM,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC;QAEzD,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;YACvB,SAAS;QACX,CAAC;QAED,IAAI,YAAY,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;YACvC,IAAA,yBAAe,EAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACN,gBAAgB,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.swapImportedClass = swapImportedClass;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
6
|
-
const change_1 = require("@schematics/angular/utility/change");
|
|
7
6
|
const eol_1 = require("@schematics/angular/utility/eol");
|
|
8
7
|
const typescript_1 = tslib_1.__importDefault(require("typescript"));
|
|
9
8
|
const ng_ast_1 = require("./ng-ast");
|
|
@@ -11,6 +10,43 @@ const remove_import_1 = require("./remove-import");
|
|
|
11
10
|
function findReferences(sourceFile, className) {
|
|
12
11
|
return (0, ast_utils_1.findNodes)(sourceFile, typescript_1.default.SyntaxKind.Identifier).filter((node) => typescript_1.default.isIdentifier(node) && node.text === className);
|
|
13
12
|
}
|
|
13
|
+
function getNamespaceImportNames(sourceFile) {
|
|
14
|
+
return (0, ast_utils_1.findNodes)(sourceFile, typescript_1.default.SyntaxKind.ImportDeclaration).flatMap((node) => {
|
|
15
|
+
if (!typescript_1.default.isImportDeclaration(node)) {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
const clause = node.importClause;
|
|
19
|
+
const bindings = clause?.namedBindings;
|
|
20
|
+
return clause && bindings && typescript_1.default.isNamespaceImport(bindings)
|
|
21
|
+
? [bindings.name.text]
|
|
22
|
+
: [];
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function getLeftmostIdentifier(node) {
|
|
26
|
+
let current = node;
|
|
27
|
+
while (typescript_1.default.isPropertyAccessExpression(current) ||
|
|
28
|
+
typescript_1.default.isQualifiedName(current)) {
|
|
29
|
+
current = typescript_1.default.isPropertyAccessExpression(current)
|
|
30
|
+
? current.expression
|
|
31
|
+
: current.left;
|
|
32
|
+
}
|
|
33
|
+
return typescript_1.default.isIdentifier(current) ? current : undefined;
|
|
34
|
+
}
|
|
35
|
+
function isNamespaceQualifiedReference(reference, namespaceNames) {
|
|
36
|
+
const parent = reference.parent;
|
|
37
|
+
// Value position, e.g. `namespace.SkyThing`; type position, e.g.
|
|
38
|
+
// `let thing: namespace.SkyThing`.
|
|
39
|
+
const qualifier = typescript_1.default.isPropertyAccessExpression(parent) && parent.name === reference
|
|
40
|
+
? parent.expression
|
|
41
|
+
: typescript_1.default.isQualifiedName(parent) && parent.right === reference
|
|
42
|
+
? parent.left
|
|
43
|
+
: undefined;
|
|
44
|
+
if (!qualifier) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
const namespace = getLeftmostIdentifier(qualifier);
|
|
48
|
+
return !!namespace && namespaceNames.includes(namespace.text);
|
|
49
|
+
}
|
|
14
50
|
function swapReference(recorder, reference, newClassName) {
|
|
15
51
|
const start = reference.getStart();
|
|
16
52
|
recorder.remove(start, reference.getWidth());
|
|
@@ -35,13 +71,20 @@ function swapImportedClass(recorder, filePath, sourceFile, options) {
|
|
|
35
71
|
return;
|
|
36
72
|
}
|
|
37
73
|
const endOfImports = (0, ast_utils_1.findNodes)(sourceFile, typescript_1.default.SyntaxKind.ImportDeclaration).reduce((max, node) => Math.max(max, node.getEnd()), 0);
|
|
74
|
+
const namespaceImportNames = getNamespaceImportNames(sourceFile);
|
|
75
|
+
// `insertImport` reads the original AST, so inserts are batched per module
|
|
76
|
+
// and applied once below. Applying them as they are found would emit a
|
|
77
|
+
// separate import statement for every class name.
|
|
78
|
+
const addImports = {};
|
|
38
79
|
const removeImports = {};
|
|
39
80
|
applicableOptions.forEach(({ classNames, moduleName, filter }) => {
|
|
40
81
|
const oldModuleName = getModuleName(moduleName, 'old');
|
|
41
82
|
const newModuleName = getModuleName(moduleName, 'new');
|
|
42
83
|
Object.entries(classNames).forEach(([oldClassName, newClassName]) => {
|
|
43
84
|
const referencesInCode = findReferences(sourceFile, oldClassName).filter((reference) => reference.getStart() > endOfImports);
|
|
44
|
-
const
|
|
85
|
+
const referencesInCodeWithoutNamespaces = referencesInCode.filter((reference) => !isNamespaceQualifiedReference(reference, namespaceImportNames));
|
|
86
|
+
const referencesFiltered = referencesInCode.filter((reference) => (filter ?? (() => true))(reference) &&
|
|
87
|
+
!isNamespaceQualifiedReference(reference, namespaceImportNames));
|
|
45
88
|
const newClassNameString = Array.isArray(newClassName)
|
|
46
89
|
? newClassName.join(', ')
|
|
47
90
|
: newClassName;
|
|
@@ -49,36 +92,29 @@ function swapImportedClass(recorder, filePath, sourceFile, options) {
|
|
|
49
92
|
swapReference(recorder, reference, newClassNameString);
|
|
50
93
|
});
|
|
51
94
|
if (referencesFiltered.length > 0) {
|
|
52
|
-
const allReferencesToBeReplaced = referencesFiltered.length ===
|
|
95
|
+
const allReferencesToBeReplaced = referencesFiltered.length ===
|
|
96
|
+
referencesInCodeWithoutNamespaces.length;
|
|
53
97
|
const newClassNameArray = Array.isArray(newClassName)
|
|
54
98
|
? newClassName
|
|
55
99
|
: [newClassName];
|
|
56
100
|
const missingClassNames = newClassNameArray.filter((name) => !(0, ng_ast_1.isImportedFromPackage)(sourceFile, name, newModuleName));
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
const change = (0, ast_utils_1.insertImport)(sourceFile, filePath, missingClassNameString, newModuleName);
|
|
69
|
-
shiftLineBreakForInsertedImport(change, eol);
|
|
70
|
-
(0, change_1.applyToUpdateRecorder)(recorder, [change]);
|
|
71
|
-
removeImports[oldModuleName] ??= [];
|
|
72
|
-
removeImports[oldModuleName].push(oldClassName);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
(0, change_1.applyToUpdateRecorder)(recorder, [
|
|
77
|
-
(0, ast_utils_1.insertImport)(sourceFile, filePath, missingClassNameString, newModuleName),
|
|
78
|
-
]);
|
|
101
|
+
// Staying within the same module is a rename, so the existing import
|
|
102
|
+
// specifier is edited in place rather than added and removed.
|
|
103
|
+
const isRename = missingClassNames.length > 0 &&
|
|
104
|
+
allReferencesToBeReplaced &&
|
|
105
|
+
oldModuleName === newModuleName;
|
|
106
|
+
if (isRename) {
|
|
107
|
+
const referencesInImport = findReferences(sourceFile, oldClassName).filter((reference) => reference.getEnd() <= endOfImports);
|
|
108
|
+
if (referencesInImport.length !== 1) {
|
|
109
|
+
throw new Error(`Expected exactly one import for ${oldClassName} from ${oldModuleName}, found ${referencesInImport.length}.`);
|
|
79
110
|
}
|
|
111
|
+
swapReference(recorder, referencesInImport[0], missingClassNames.join(', '));
|
|
80
112
|
}
|
|
81
113
|
else {
|
|
114
|
+
if (missingClassNames.length > 0) {
|
|
115
|
+
addImports[newModuleName] ??= [];
|
|
116
|
+
addImports[newModuleName].push(...missingClassNames.filter((name) => !addImports[newModuleName].includes(name)));
|
|
117
|
+
}
|
|
82
118
|
if (allReferencesToBeReplaced) {
|
|
83
119
|
removeImports[oldModuleName] ??= [];
|
|
84
120
|
removeImports[oldModuleName].push(oldClassName);
|
|
@@ -87,12 +123,18 @@ function swapImportedClass(recorder, filePath, sourceFile, options) {
|
|
|
87
123
|
}
|
|
88
124
|
});
|
|
89
125
|
});
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
126
|
+
Object.entries(addImports).forEach(([moduleName, classNames]) => {
|
|
127
|
+
const change = (0, ast_utils_1.insertImport)(sourceFile, filePath, classNames.join(', '), moduleName);
|
|
128
|
+
shiftLineBreakForInsertedImport(change, eol);
|
|
129
|
+
// `insertRight` rather than `applyToUpdateRecorder`'s `insertLeft`: the
|
|
130
|
+
// import lands at the end of the import block, which is also where a fully
|
|
131
|
+
// removed import declaration ends, and only a right-side insert survives
|
|
132
|
+
// that removal.
|
|
133
|
+
recorder.insertRight(change.pos, change.toAdd);
|
|
134
|
+
});
|
|
135
|
+
Object.entries(removeImports).forEach(([moduleName, classNames]) => (0, remove_import_1.removeImport)(recorder, sourceFile, {
|
|
136
|
+
classNames,
|
|
137
|
+
moduleName,
|
|
138
|
+
}));
|
|
97
139
|
}
|
|
98
140
|
//# sourceMappingURL=swap-imported-class.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap-imported-class.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/utility/typescript/swap-imported-class.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"swap-imported-class.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/utility/typescript/swap-imported-class.ts"],"names":[],"mappings":";;AA6GA,8CA8HC;;AA1OD,qEAAgF;AAEhF,yDAAyD;AACzD,oEAA4B;AAE5B,qCAAiD;AACjD,mDAA+C;AAQ/C,SAAS,cAAc,CACrB,UAAyB,EACzB,SAAiB;IAEjB,OAAO,IAAA,qBAAS,EAAC,UAAU,EAAE,oBAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,MAAM,CAC3D,CAAC,IAAI,EAAyB,EAAE,CAC9B,oBAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,CACnD,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAAC,UAAyB;IACxD,OAAO,IAAA,qBAAS,EAAC,UAAU,EAAE,oBAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,OAAO,CACnE,CAAC,IAAI,EAAE,EAAE;QACP,IAAI,CAAC,oBAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC;YAClC,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC;QACjC,MAAM,QAAQ,GAAG,MAAM,EAAE,aAAa,CAAC;QAEvC,OAAO,MAAM,IAAI,QAAQ,IAAI,oBAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC;YACzD,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YACtB,CAAC,CAAC,EAAE,CAAC;IACT,CAAC,CACF,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAa;IAC1C,IAAI,OAAO,GAAG,I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