@skyux/packages
Advanced tools
{ | ||
"name": "@skyux/packages", | ||
"version": "11.0.0-alpha.11", | ||
"version": "11.0.0-alpha.12", | ||
"author": "Blackbaud, Inc.", | ||
@@ -38,51 +38,51 @@ "description": "Handles the `ng update` command for SKY UX component libraries.", | ||
"packageGroup": { | ||
"@skyux/packages": "11.0.0-alpha.11", | ||
"@skyux/packages": "11.0.0-alpha.12", | ||
"@blackbaud/angular-tree-component": "^1.0.0", | ||
"@skyux-sdk/eslint-config": "11.0.0-alpha.11", | ||
"@skyux-sdk/prettier-schematics": "11.0.0-alpha.11", | ||
"@skyux-sdk/testing": "11.0.0-alpha.11", | ||
"@skyux/a11y": "11.0.0-alpha.11", | ||
"@skyux/action-bars": "11.0.0-alpha.11", | ||
"@skyux/ag-grid": "11.0.0-alpha.11", | ||
"@skyux/angular-tree-component": "11.0.0-alpha.11", | ||
"@skyux/animations": "11.0.0-alpha.11", | ||
"@skyux/assets": "11.0.0-alpha.11", | ||
"@skyux/autonumeric": "11.0.0-alpha.11", | ||
"@skyux/avatar": "11.0.0-alpha.11", | ||
"@skyux/colorpicker": "11.0.0-alpha.11", | ||
"@skyux/config": "11.0.0-alpha.11", | ||
"@skyux/core": "11.0.0-alpha.11", | ||
"@skyux/data-manager": "11.0.0-alpha.11", | ||
"@skyux/datetime": "11.0.0-alpha.11", | ||
"@skyux/errors": "11.0.0-alpha.11", | ||
"@skyux/flyout": "11.0.0-alpha.11", | ||
"@skyux/forms": "11.0.0-alpha.11", | ||
"@skyux/grids": "11.0.0-alpha.11", | ||
"@skyux/help-inline": "11.0.0-alpha.11", | ||
"@skyux/i18n": "11.0.0-alpha.11", | ||
"@skyux-sdk/eslint-config": "11.0.0-alpha.12", | ||
"@skyux-sdk/prettier-schematics": "11.0.0-alpha.12", | ||
"@skyux-sdk/testing": "11.0.0-alpha.12", | ||
"@skyux/a11y": "11.0.0-alpha.12", | ||
"@skyux/action-bars": "11.0.0-alpha.12", | ||
"@skyux/ag-grid": "11.0.0-alpha.12", | ||
"@skyux/angular-tree-component": "11.0.0-alpha.12", | ||
"@skyux/animations": "11.0.0-alpha.12", | ||
"@skyux/assets": "11.0.0-alpha.12", | ||
"@skyux/autonumeric": "11.0.0-alpha.12", | ||
"@skyux/avatar": "11.0.0-alpha.12", | ||
"@skyux/colorpicker": "11.0.0-alpha.12", | ||
"@skyux/config": "11.0.0-alpha.12", | ||
"@skyux/core": "11.0.0-alpha.12", | ||
"@skyux/data-manager": "11.0.0-alpha.12", | ||
"@skyux/datetime": "11.0.0-alpha.12", | ||
"@skyux/errors": "11.0.0-alpha.12", | ||
"@skyux/flyout": "11.0.0-alpha.12", | ||
"@skyux/forms": "11.0.0-alpha.12", | ||
"@skyux/grids": "11.0.0-alpha.12", | ||
"@skyux/help-inline": "11.0.0-alpha.12", | ||
"@skyux/i18n": "11.0.0-alpha.12", | ||
"@skyux/icons": "^7.5.0", | ||
"@skyux/indicators": "11.0.0-alpha.11", | ||
"@skyux/inline-form": "11.0.0-alpha.11", | ||
"@skyux/layout": "11.0.0-alpha.11", | ||
"@skyux/list-builder": "11.0.0-alpha.11", | ||
"@skyux/list-builder-common": "11.0.0-alpha.11", | ||
"@skyux/list-builder-view-checklist": "11.0.0-alpha.11", | ||
"@skyux/list-builder-view-grids": "11.0.0-alpha.11", | ||
"@skyux/lists": "11.0.0-alpha.11", | ||
"@skyux/lookup": "11.0.0-alpha.11", | ||
"@skyux/modals": "11.0.0-alpha.11", | ||
"@skyux/navbar": "11.0.0-alpha.11", | ||
"@skyux/pages": "11.0.0-alpha.11", | ||
"@skyux/phone-field": "11.0.0-alpha.11", | ||
"@skyux/popovers": "11.0.0-alpha.11", | ||
"@skyux/progress-indicator": "11.0.0-alpha.11", | ||
"@skyux/router": "11.0.0-alpha.11", | ||
"@skyux/select-field": "11.0.0-alpha.11", | ||
"@skyux/split-view": "11.0.0-alpha.11", | ||
"@skyux/tabs": "11.0.0-alpha.11", | ||
"@skyux/text-editor": "11.0.0-alpha.11", | ||
"@skyux/theme": "11.0.0-alpha.11", | ||
"@skyux/tiles": "11.0.0-alpha.11", | ||
"@skyux/toast": "11.0.0-alpha.11", | ||
"@skyux/validation": "11.0.0-alpha.11", | ||
"@skyux/indicators": "11.0.0-alpha.12", | ||
"@skyux/inline-form": "11.0.0-alpha.12", | ||
"@skyux/layout": "11.0.0-alpha.12", | ||
"@skyux/list-builder": "11.0.0-alpha.12", | ||
"@skyux/list-builder-common": "11.0.0-alpha.12", | ||
"@skyux/list-builder-view-checklist": "11.0.0-alpha.12", | ||
"@skyux/list-builder-view-grids": "11.0.0-alpha.12", | ||
"@skyux/lists": "11.0.0-alpha.12", | ||
"@skyux/lookup": "11.0.0-alpha.12", | ||
"@skyux/modals": "11.0.0-alpha.12", | ||
"@skyux/navbar": "11.0.0-alpha.12", | ||
"@skyux/pages": "11.0.0-alpha.12", | ||
"@skyux/phone-field": "11.0.0-alpha.12", | ||
"@skyux/popovers": "11.0.0-alpha.12", | ||
"@skyux/progress-indicator": "11.0.0-alpha.12", | ||
"@skyux/router": "11.0.0-alpha.12", | ||
"@skyux/select-field": "11.0.0-alpha.12", | ||
"@skyux/split-view": "11.0.0-alpha.12", | ||
"@skyux/tabs": "11.0.0-alpha.12", | ||
"@skyux/text-editor": "11.0.0-alpha.12", | ||
"@skyux/theme": "11.0.0-alpha.12", | ||
"@skyux/tiles": "11.0.0-alpha.12", | ||
"@skyux/toast": "11.0.0-alpha.12", | ||
"@skyux/validation": "11.0.0-alpha.12", | ||
"ag-grid-angular": "^32.0.2", | ||
@@ -89,0 +89,0 @@ "ag-grid-community": "^32.0.2", |
{ | ||
"schematics": { | ||
"noop": { | ||
"version": "11.0.0-alpha.11", | ||
"version": "11.0.0-alpha.12", | ||
"factory": "./noop/noop.schematic", | ||
@@ -9,3 +9,3 @@ "description": "Update all SKY UX component packages" | ||
"workspace-check": { | ||
"version": "11.0.0-alpha.11", | ||
"version": "11.0.0-alpha.12", | ||
"factory": "./update-11/workspace-check/workspace-check.schematic", | ||
@@ -12,0 +12,0 @@ "description": "Log warnings if the workspace is not configured correctly." |
@@ -11,3 +11,3 @@ "use strict"; | ||
const event_type_strings_1 = require("./event-type-strings/event-type-strings"); | ||
const switch_to_update_grid_options_1 = require("./switch-to-update-grid-options/switch-to-update-grid-options"); | ||
const switch_to_set_grid_option_1 = require("./switch-to-set-grid-option/switch-to-set-grid-option"); | ||
const ANY_MODULE = '@ag-grid-community/'; | ||
@@ -110,3 +110,3 @@ const ENT_MODULE = '@ag-grid-enterprise/'; | ||
swapGridOptionsApiToGridApi(tree, filePath); | ||
(0, switch_to_update_grid_options_1.switchToUpdateGridOptions)(tree, filePath); | ||
(0, switch_to_set_grid_option_1.switchToSetGridOption)(tree, filePath); | ||
}); | ||
@@ -113,0 +113,0 @@ }); |
@@ -9,20 +9,26 @@ "use strict"; | ||
const recorder = tree.beginUpdate(projectPath); | ||
const indicatorsImports = (0, schematics_1.findNodes)(sourceFile, typescript_1.default.SyntaxKind.ImportDeclaration).filter((node) => typescript_1.default.isImportDeclaration(node) && | ||
node.moduleSpecifier.getText() === `'${options.previousLibrary}'`)[0]; | ||
if (indicatorsImports) { | ||
const replacedImports = {}; | ||
const indicatorsImportStart = indicatorsImports.getStart(sourceFile); | ||
const indicatorsImportWidth = indicatorsImports.getWidth(sourceFile); | ||
options.classNames.forEach((importName) => { | ||
const namedImportSpecifier = (0, schematics_1.findNodes)(sourceFile, typescript_1.default.SyntaxKind.ImportSpecifier).filter((node) => typescript_1.default.isImportSpecifier(node) && node.name.text === importName)[0]; | ||
if (namedImportSpecifier) { | ||
replacedImports[importName] = namedImportSpecifier; | ||
} | ||
const moduleImports = (0, schematics_1.findNodes)(sourceFile, typescript_1.default.SyntaxKind.ImportDeclaration).filter((node) => typescript_1.default.isImportDeclaration(node) && | ||
typescript_1.default.isStringLiteral(node.moduleSpecifier) && | ||
node.moduleSpecifier.text === options.previousLibrary); | ||
const replacedImports = {}; | ||
options.classNames.forEach((importName) => { | ||
const namedImportSpecifier = (0, schematics_1.findNodes)(sourceFile, typescript_1.default.SyntaxKind.ImportSpecifier).filter((node) => typescript_1.default.isImportSpecifier(node) && node.name.text === importName)[0]; | ||
if (namedImportSpecifier) { | ||
replacedImports[importName] = namedImportSpecifier; | ||
} | ||
}); | ||
moduleImports.forEach((moduleImport) => { | ||
const moduleImportStart = moduleImport.getStart(sourceFile); | ||
const moduleImportWidth = moduleImport.getWidth(sourceFile); | ||
const moduleReplacements = Object.keys(replacedImports).filter((importName) => { | ||
const namedImportStart = replacedImports[importName].getStart(sourceFile); | ||
return (namedImportStart >= moduleImportStart && | ||
namedImportStart <= moduleImportStart + moduleImportWidth); | ||
}); | ||
if (Object.keys(replacedImports).length > 0) { | ||
if (indicatorsImports.importClause?.namedBindings && | ||
typescript_1.default.isNamedImports(indicatorsImports.importClause.namedBindings) && | ||
indicatorsImports.importClause.namedBindings.elements.length > | ||
Object.keys(replacedImports).length) { | ||
Object.keys(replacedImports).forEach((importName) => { | ||
if (moduleReplacements.length > 0) { | ||
if (moduleImport.importClause?.namedBindings && | ||
typescript_1.default.isNamedImports(moduleImport.importClause.namedBindings) && | ||
moduleImport.importClause.namedBindings.elements.length > | ||
moduleReplacements.length) { | ||
moduleReplacements.forEach((importName) => { | ||
const namedImportStart = replacedImports[importName].getStart(sourceFile); | ||
@@ -37,9 +43,11 @@ const namedImportWidth = replacedImports[importName].getWidth(sourceFile); | ||
else { | ||
recorder.remove(indicatorsImportStart, indicatorsImportWidth); | ||
recorder.remove(moduleImportStart, moduleImportWidth); | ||
} | ||
recorder.insertLeft(indicatorsImportStart, `import { ${Object.keys(replacedImports).join(', ')} } from '${options.newLibrary}';\n`); | ||
} | ||
tree.commitUpdate(recorder); | ||
}); | ||
if (Object.keys(replacedImports).length > 0) { | ||
recorder.insertLeft(moduleImports[0].getStart(sourceFile), `import { ${Object.keys(replacedImports).join(', ')} } from '${options.newLibrary}';\n`); | ||
} | ||
tree.commitUpdate(recorder); | ||
} | ||
//# sourceMappingURL=move-class-to-library.js.map |
@@ -22,3 +22,3 @@ "use strict"; | ||
*/ | ||
exports.VERSION = new Version('11.0.0-alpha.11'); | ||
exports.VERSION = new Version('11.0.0-alpha.12'); | ||
//# sourceMappingURL=version.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
196337
4.01%2058
4.95%