@angular/cdk 8.0.0-rc.2 → 8.1.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/a11y/typings/aria-describer/aria-describer.d.ts +4 -3
- package/a11y/typings/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +42 -10
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +1 -1
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +532 -87
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -2
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +5 -1
- package/bundles/cdk-layout.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.min.js +1 -1
- package/bundles/cdk-layout.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +31 -23
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +6 -7
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +8 -6
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/drag-drop/typings/directives/drag.d.ts +1 -1
- package/drag-drop/typings/directives/drop-list.d.ts +2 -0
- package/drag-drop/typings/drag-drop-registry.d.ts +2 -0
- package/drag-drop/typings/drag-ref.d.ts +10 -1
- package/drag-drop/typings/drop-list-ref.d.ts +59 -3
- package/drag-drop/typings/index.metadata.json +1 -1
- package/esm2015/a11y.js +35 -10
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/cdk.js +1 -1
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/drag-drop.js +467 -85
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/layout.js +7 -3
- package/esm2015/layout.js.map +1 -1
- package/esm2015/overlay.js +31 -23
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/scrolling.js +6 -7
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/tree.js +7 -6
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +42 -10
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/cdk.es5.js +1 -1
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +530 -85
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/layout.es5.js +7 -3
- package/esm5/layout.es5.js.map +1 -1
- package/esm5/overlay.es5.js +32 -24
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +6 -7
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/tree.es5.js +8 -6
- package/esm5/tree.es5.js.map +1 -1
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-ref.d.ts +1 -0
- package/package.json +4 -4
- package/schematics/index.d.ts +1 -0
- package/schematics/index.js +1 -0
- package/schematics/index.js.map +1 -1
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.__style__ → __name@dasherize__.component.__style__.template} +0 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.html → __name@dasherize__.component.html.template} +0 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.spec.ts → __name@dasherize__.component.spec.ts.template} +0 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.ts → __name@dasherize__.component.ts.template} +0 -0
- package/schematics/ng-generate/drag-drop/index.js +2 -2
- package/schematics/ng-generate/drag-drop/index.js.map +1 -1
- package/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
- package/schematics/ng-update/data/attribute-selectors.js +5 -13
- package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
- package/schematics/ng-update/data/class-names.d.ts +1 -1
- package/schematics/ng-update/data/class-names.js +5 -21
- package/schematics/ng-update/data/class-names.js.map +1 -1
- package/schematics/ng-update/data/constructor-checks.d.ts +1 -1
- package/schematics/ng-update/data/constructor-checks.js +3 -5
- package/schematics/ng-update/data/constructor-checks.js.map +1 -1
- package/schematics/ng-update/data/css-selectors.d.ts +1 -1
- package/schematics/ng-update/data/css-selectors.js +1 -1
- package/schematics/ng-update/data/css-selectors.js.map +1 -1
- package/schematics/ng-update/data/element-selectors.d.ts +1 -1
- package/schematics/ng-update/data/element-selectors.js +1 -1
- package/schematics/ng-update/data/element-selectors.js.map +1 -1
- package/schematics/ng-update/data/input-names.d.ts +1 -1
- package/schematics/ng-update/data/input-names.js +13 -37
- package/schematics/ng-update/data/input-names.js.map +1 -1
- package/schematics/ng-update/data/method-call-checks.d.ts +1 -1
- package/schematics/ng-update/data/method-call-checks.js +6 -15
- package/schematics/ng-update/data/method-call-checks.js.map +1 -1
- package/schematics/ng-update/data/output-names.d.ts +1 -1
- package/schematics/ng-update/data/output-names.js +1 -1
- package/schematics/ng-update/data/output-names.js.map +1 -1
- package/schematics/ng-update/data/property-names.d.ts +1 -1
- package/schematics/ng-update/data/property-names.js +19 -59
- package/schematics/ng-update/data/property-names.js.map +1 -1
- package/schematics/ng-update/html-parsing/elements.js.map +1 -1
- package/schematics/ng-update/index.d.ts +0 -2
- package/schematics/ng-update/index.js +13 -24
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/public-api.d.ts +0 -5
- package/schematics/ng-update/public-api.js +0 -5
- package/schematics/ng-update/public-api.js.map +1 -1
- package/schematics/ng-update/typescript/base-types.js.map +1 -1
- package/schematics/ng-update/typescript/module-specifiers.js.map +1 -1
- package/schematics/ng-update/upgrade-data.d.ts +5 -30
- package/schematics/ng-update/upgrade-data.js +4 -34
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
- package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js +66 -0
- package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
- package/schematics/ng-update/upgrade-rules/{class-inheritance/classInheritanceCheckRule.js → class-inheritance-rule.js} +24 -20
- package/schematics/ng-update/upgrade-rules/class-inheritance-rule.js.map +1 -0
- package/{typings/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
- package/schematics/ng-update/upgrade-rules/{class-names/classNamesIdentifierRule.js → class-names-rule.js} +19 -24
- package/schematics/ng-update/upgrade-rules/class-names-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
- package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js +134 -0
- package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
- package/schematics/ng-update/upgrade-rules/css-selectors-rule.js +73 -0
- package/schematics/ng-update/upgrade-rules/css-selectors-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
- package/schematics/ng-update/upgrade-rules/element-selectors-rule.js +64 -0
- package/schematics/ng-update/upgrade-rules/element-selectors-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
- package/schematics/ng-update/upgrade-rules/index.js +49 -29
- package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
- package/schematics/ng-update/upgrade-rules/input-names-rule.js +59 -0
- package/schematics/ng-update/upgrade-rules/input-names-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/{signature-check/methodCallsCheckRule.d.ts → method-call-arguments-rule.d.ts} +8 -9
- package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js +60 -0
- package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
- package/schematics/ng-update/upgrade-rules/misc-template-rule.js +37 -0
- package/schematics/ng-update/upgrade-rules/misc-template-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
- package/schematics/ng-update/upgrade-rules/output-names-rule.js +46 -0
- package/schematics/ng-update/upgrade-rules/output-names-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
- package/schematics/ng-update/upgrade-rules/property-names-rule.js +46 -0
- package/schematics/ng-update/upgrade-rules/property-names-rule.js.map +1 -0
- package/schematics/tsconfig.tsbuildinfo +2896 -3609
- package/schematics/update-tool/component-resource-collector.d.ts +41 -0
- package/schematics/update-tool/component-resource-collector.js +141 -0
- package/schematics/update-tool/component-resource-collector.js.map +1 -0
- package/schematics/update-tool/index.d.ts +13 -0
- package/schematics/update-tool/index.js +117 -0
- package/schematics/update-tool/index.js.map +1 -0
- package/schematics/update-tool/migration-rule.d.ts +45 -0
- package/schematics/update-tool/migration-rule.js +50 -0
- package/schematics/update-tool/migration-rule.js.map +1 -0
- package/schematics/update-tool/public-api.d.ts +12 -0
- package/schematics/update-tool/public-api.js +18 -0
- package/schematics/update-tool/public-api.js.map +1 -0
- package/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
- package/schematics/{ng-update → update-tool}/target-version.js +3 -3
- package/schematics/update-tool/target-version.js.map +1 -0
- package/schematics/update-tool/utils/decorators.d.ts +23 -0
- package/schematics/update-tool/utils/decorators.js +37 -0
- package/schematics/update-tool/utils/decorators.js.map +1 -0
- package/schematics/update-tool/utils/functions.d.ts +14 -0
- package/schematics/update-tool/utils/functions.js +20 -0
- package/schematics/update-tool/utils/functions.js.map +1 -0
- package/schematics/update-tool/utils/imports.d.ts +15 -0
- package/schematics/update-tool/utils/imports.js +35 -0
- package/schematics/update-tool/utils/imports.js.map +1 -0
- package/schematics/update-tool/utils/line-mappings.d.ts +21 -0
- package/schematics/update-tool/utils/line-mappings.js +75 -0
- package/schematics/update-tool/utils/line-mappings.js.map +1 -0
- package/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
- package/schematics/update-tool/utils/parse-tsconfig.js +22 -0
- package/schematics/update-tool/utils/parse-tsconfig.js.map +1 -0
- package/schematics/update-tool/utils/property-name.d.ts +18 -0
- package/schematics/update-tool/utils/property-name.js +27 -0
- package/schematics/update-tool/utils/property-name.js.map +1 -0
- package/schematics/update-tool/version-changes.d.ts +32 -0
- package/schematics/update-tool/version-changes.js +41 -0
- package/schematics/update-tool/version-changes.js.map +1 -0
- package/schematics/utils/build-component.js +4 -4
- package/schematics/utils/build-component.js.map +1 -1
- package/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
- package/schematics/utils/project-tsconfig-paths.js +77 -0
- package/schematics/utils/project-tsconfig-paths.js.map +1 -0
- package/typings/a11y/aria-describer/aria-describer.d.ts +4 -3
- package/typings/a11y/index.metadata.json +1 -1
- package/typings/drag-drop/directives/drag.d.ts +1 -1
- package/typings/drag-drop/directives/drop-list.d.ts +2 -0
- package/typings/drag-drop/drag-drop-registry.d.ts +2 -0
- package/typings/drag-drop/drag-ref.d.ts +10 -1
- package/typings/drag-drop/drop-list-ref.d.ts +59 -3
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/a11y/aria-describer/aria-describer.d.ts +4 -3
- package/typings/esm5/a11y/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/directives/drag.d.ts +1 -1
- package/typings/esm5/drag-drop/directives/drop-list.d.ts +2 -0
- package/typings/esm5/drag-drop/drag-drop-registry.d.ts +2 -0
- package/typings/esm5/drag-drop/drag-ref.d.ts +10 -1
- package/typings/esm5/drag-drop/drop-list-ref.d.ts +59 -3
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/overlay-ref.d.ts +1 -0
- package/typings/index.metadata.json +1 -1
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-ref.d.ts +1 -0
- package/typings/schematics/index.d.ts +1 -0
- package/typings/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
- package/typings/schematics/ng-update/data/class-names.d.ts +1 -1
- package/typings/schematics/ng-update/data/constructor-checks.d.ts +1 -1
- package/typings/schematics/ng-update/data/css-selectors.d.ts +1 -1
- package/typings/schematics/ng-update/data/element-selectors.d.ts +1 -1
- package/typings/schematics/ng-update/data/input-names.d.ts +1 -1
- package/typings/schematics/ng-update/data/method-call-checks.d.ts +1 -1
- package/typings/schematics/ng-update/data/output-names.d.ts +1 -1
- package/typings/schematics/ng-update/data/property-names.d.ts +1 -1
- package/typings/schematics/ng-update/index.d.ts +0 -2
- package/typings/schematics/ng-update/public-api.d.ts +0 -5
- package/typings/schematics/ng-update/upgrade-data.d.ts +5 -30
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
- package/typings/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
- package/{schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → typings/schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
- package/typings/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
- package/typings/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
- package/typings/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
- package/typings/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
- package/typings/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
- package/typings/schematics/ng-update/upgrade-rules/{signature-check/methodCallsCheckRule.d.ts → method-call-arguments-rule.d.ts} +8 -9
- package/typings/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
- package/typings/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
- package/typings/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
- package/typings/schematics/update-tool/component-resource-collector.d.ts +41 -0
- package/typings/schematics/update-tool/index.d.ts +13 -0
- package/typings/schematics/update-tool/migration-rule.d.ts +45 -0
- package/typings/schematics/update-tool/public-api.d.ts +12 -0
- package/typings/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
- package/typings/schematics/update-tool/utils/decorators.d.ts +23 -0
- package/typings/schematics/update-tool/utils/functions.d.ts +14 -0
- package/typings/schematics/update-tool/utils/imports.d.ts +15 -0
- package/typings/schematics/update-tool/utils/line-mappings.d.ts +21 -0
- package/typings/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
- package/typings/schematics/update-tool/utils/property-name.d.ts +18 -0
- package/typings/schematics/update-tool/version-changes.d.ts +32 -0
- package/typings/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
- package/schematics/ng-update/target-version.js.map +0 -1
- package/schematics/ng-update/tslint/component-file.d.ts +0 -14
- package/schematics/ng-update/tslint/component-file.js +0 -31
- package/schematics/ng-update/tslint/component-file.js.map +0 -1
- package/schematics/ng-update/tslint/component-walker.d.ts +0 -47
- package/schematics/ng-update/tslint/component-walker.js +0 -142
- package/schematics/ng-update/tslint/component-walker.js.map +0 -1
- package/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
- package/schematics/ng-update/tslint/external-failure-walker.js +0 -38
- package/schematics/ng-update/tslint/external-failure-walker.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js +0 -49
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js +0 -62
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js +0 -59
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
- package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js +0 -53
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js +0 -63
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js +0 -62
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js +0 -50
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js +0 -60
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js +0 -59
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js +0 -67
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js +0 -67
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js +0 -49
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js +0 -67
- package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js +0 -64
- package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
- package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js +0 -46
- package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +0 -132
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js +0 -58
- package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
- package/schematics/ng-update/upgrade-rules/tslint-config.js +0 -76
- package/schematics/ng-update/upgrade-rules/tslint-config.js.map +0 -1
- package/typings/schematics/ng-update/tslint/component-file.d.ts +0 -14
- package/typings/schematics/ng-update/tslint/component-walker.d.ts +0 -47
- package/typings/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
- package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
- package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
- package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
- package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
- package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
- package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
- package/typings/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
- package/typings/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
- package/typings/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright Google LLC All Rights Reserved.
|
|
5
|
-
*
|
|
6
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.io/license
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const chalk_1 = require("chalk");
|
|
11
|
-
const tslint_1 = require("tslint");
|
|
12
|
-
const ts = require("typescript");
|
|
13
|
-
const upgrade_data_1 = require("../../upgrade-data");
|
|
14
|
-
/**
|
|
15
|
-
* List of diagnostic codes that refer to pre-emit diagnostics which indicate invalid
|
|
16
|
-
* new expression or super call signatures. See the list of diagnostics here:
|
|
17
|
-
*
|
|
18
|
-
* https://github.com/Microsoft/TypeScript/blob/master/src/compiler/diagnosticMessages.json
|
|
19
|
-
*/
|
|
20
|
-
const signatureErrorDiagnostics = [
|
|
21
|
-
// Type not assignable error diagnostic.
|
|
22
|
-
2345,
|
|
23
|
-
// Constructor argument length invalid diagnostics
|
|
24
|
-
2554, 2555, 2556, 2557,
|
|
25
|
-
];
|
|
26
|
-
/**
|
|
27
|
-
* Rule that visits every TypeScript new expression or super call and checks if the parameter
|
|
28
|
-
* type signature is invalid and needs to be updated manually.
|
|
29
|
-
*/
|
|
30
|
-
class Rule extends tslint_1.Rules.TypedRule {
|
|
31
|
-
applyWithProgram(sourceFile, program) {
|
|
32
|
-
// Note that the data for this rule is not distinguished based on the target version because
|
|
33
|
-
// we don't keep track of the new signature and don't want to update incrementally.
|
|
34
|
-
// See: https://github.com/angular/components/pull/12970#issuecomment-418337566
|
|
35
|
-
const data = upgrade_data_1.getAllChanges(this.getOptions().ruleArguments[1].constructorChecks);
|
|
36
|
-
return this.applyWithFunction(sourceFile, visitSourceFile, data, program);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.Rule = Rule;
|
|
40
|
-
/**
|
|
41
|
-
* Function that will be called for each source file of the upgrade project. In order to properly
|
|
42
|
-
* determine invalid constructor signatures, we take advantage of the pre-emit diagnostics from
|
|
43
|
-
* TypeScript.
|
|
44
|
-
*
|
|
45
|
-
* By using the diagnostics we can properly respect type assignability because otherwise we
|
|
46
|
-
* would need to rely on type equality checking which is too strict.
|
|
47
|
-
* See related issue: https://github.com/Microsoft/TypeScript/issues/9879
|
|
48
|
-
*/
|
|
49
|
-
function visitSourceFile(context, program) {
|
|
50
|
-
// List of classes of which the constructor signature has changed.
|
|
51
|
-
const signatureChangeData = context.options;
|
|
52
|
-
const sourceFile = context.sourceFile;
|
|
53
|
-
const diagnostics = ts.getPreEmitDiagnostics(program, sourceFile)
|
|
54
|
-
.filter(diagnostic => signatureErrorDiagnostics.includes(diagnostic.code))
|
|
55
|
-
.filter(diagnostic => diagnostic.start !== undefined);
|
|
56
|
-
for (const diagnostic of diagnostics) {
|
|
57
|
-
const node = findConstructorNode(diagnostic, sourceFile);
|
|
58
|
-
if (!node) {
|
|
59
|
-
continue;
|
|
60
|
-
}
|
|
61
|
-
const classType = program.getTypeChecker().getTypeAtLocation(node.expression);
|
|
62
|
-
const className = classType.symbol && classType.symbol.name;
|
|
63
|
-
const isNewExpression = ts.isNewExpression(node);
|
|
64
|
-
// Determine the class names of the actual construct signatures because we cannot assume
|
|
65
|
-
// that the diagnostic refers to a constructor of the actual expression. In case the constructor
|
|
66
|
-
// is inherited, we need to detect that the owner-class of the constructor is added to the
|
|
67
|
-
// constructor checks upgrade data. e.g. `class CustomCalendar extends MatCalendar {}`.
|
|
68
|
-
const signatureClassNames = classType.getConstructSignatures()
|
|
69
|
-
.map(signature => getClassDeclarationOfSignature(signature))
|
|
70
|
-
.map(declaration => declaration && declaration.name ? declaration.name.text : null)
|
|
71
|
-
.filter(Boolean);
|
|
72
|
-
// Besides checking the signature class names, we need to check the actual class name because
|
|
73
|
-
// there can be classes without an explicit constructor.
|
|
74
|
-
if (!signatureChangeData.includes(className) &&
|
|
75
|
-
!signatureClassNames.some(name => signatureChangeData.includes(name))) {
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
const classSignatures = classType.getConstructSignatures()
|
|
79
|
-
.map(signature => getParameterTypesFromSignature(signature, program));
|
|
80
|
-
const expressionName = isNewExpression ? `new ${className}` : 'super';
|
|
81
|
-
const signatures = classSignatures
|
|
82
|
-
.map(signature => signature.map(t => program.getTypeChecker().typeToString(t)))
|
|
83
|
-
.map(signature => `${expressionName}(${signature.join(', ')})`)
|
|
84
|
-
.join(' or ');
|
|
85
|
-
context.addFailureAtNode(node, `Found "${chalk_1.bold(className)}" constructed with ` +
|
|
86
|
-
`an invalid signature. Please manually update the ${chalk_1.bold(expressionName)} expression to ` +
|
|
87
|
-
`match the new signature${classSignatures.length > 1 ? 's' : ''}: ${chalk_1.green(signatures)}`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
/** Resolves the type for each parameter in the specified signature. */
|
|
91
|
-
function getParameterTypesFromSignature(signature, program) {
|
|
92
|
-
return signature.getParameters()
|
|
93
|
-
.map(param => param.declarations[0])
|
|
94
|
-
.map(node => node.type)
|
|
95
|
-
.map(typeNode => program.getTypeChecker().getTypeFromTypeNode(typeNode));
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Walks through each node of a source file in order to find a new-expression node or super-call
|
|
99
|
-
* expression node that is captured by the specified diagnostic.
|
|
100
|
-
*/
|
|
101
|
-
function findConstructorNode(diagnostic, sourceFile) {
|
|
102
|
-
let resolvedNode = null;
|
|
103
|
-
const _visitNode = (node) => {
|
|
104
|
-
// Check whether the current node contains the diagnostic. If the node contains the diagnostic,
|
|
105
|
-
// walk deeper in order to find all constructor expression nodes.
|
|
106
|
-
if (node.getStart() <= diagnostic.start && node.getEnd() >= diagnostic.start) {
|
|
107
|
-
if (ts.isNewExpression(node) ||
|
|
108
|
-
(ts.isCallExpression(node) && node.expression.kind === ts.SyntaxKind.SuperKeyword)) {
|
|
109
|
-
resolvedNode = node;
|
|
110
|
-
}
|
|
111
|
-
ts.forEachChild(node, _visitNode);
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
ts.forEachChild(sourceFile, _visitNode);
|
|
115
|
-
return resolvedNode;
|
|
116
|
-
}
|
|
117
|
-
/** Determines the class declaration of the specified construct signature. */
|
|
118
|
-
function getClassDeclarationOfSignature(signature) {
|
|
119
|
-
let node = signature.getDeclaration();
|
|
120
|
-
// Handle signatures which don't have an actual declaration. This happens if a class
|
|
121
|
-
// does not have an explicitly written constructor.
|
|
122
|
-
if (!node) {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
while (!ts.isSourceFile(node = node.parent)) {
|
|
126
|
-
if (ts.isClassDeclaration(node)) {
|
|
127
|
-
return node;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return null;
|
|
131
|
-
}
|
|
132
|
-
//# sourceMappingURL=constructorSignatureCheckRule.js.map
|
package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constructorSignatureCheckRule.js","sourceRoot":"","sources":["../../../../../../../src/cdk/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright Google LLC All Rights Reserved.
|
|
5
|
-
*
|
|
6
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.io/license
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const chalk_1 = require("chalk");
|
|
11
|
-
const tslint_1 = require("tslint");
|
|
12
|
-
const ts = require("typescript");
|
|
13
|
-
const upgrade_data_1 = require("../../upgrade-data");
|
|
14
|
-
/**
|
|
15
|
-
* Rule that visits every TypeScript method call expression and checks if the argument count
|
|
16
|
-
* is invalid and needs to be *manually* updated.
|
|
17
|
-
*/
|
|
18
|
-
class Rule extends tslint_1.Rules.TypedRule {
|
|
19
|
-
applyWithProgram(sourceFile, program) {
|
|
20
|
-
return this.applyWithWalker(new Walker(sourceFile, this.getOptions(), program));
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.Rule = Rule;
|
|
24
|
-
class Walker extends tslint_1.ProgramAwareRuleWalker {
|
|
25
|
-
constructor() {
|
|
26
|
-
super(...arguments);
|
|
27
|
-
/** Change data that upgrades to the specified target version. */
|
|
28
|
-
this.data = upgrade_data_1.getUpgradeDataFromWalker(this, 'methodCallChecks');
|
|
29
|
-
}
|
|
30
|
-
visitCallExpression(node) {
|
|
31
|
-
if (ts.isPropertyAccessExpression(node.expression)) {
|
|
32
|
-
this._checkPropertyAccessMethodCall(node);
|
|
33
|
-
}
|
|
34
|
-
return super.visitCallExpression(node);
|
|
35
|
-
}
|
|
36
|
-
_checkPropertyAccessMethodCall(node) {
|
|
37
|
-
const propertyAccess = node.expression;
|
|
38
|
-
if (!ts.isIdentifier(propertyAccess.name)) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
const hostType = this.getTypeChecker().getTypeAtLocation(propertyAccess.expression);
|
|
42
|
-
const hostTypeName = hostType.symbol && hostType.symbol.name;
|
|
43
|
-
const methodName = propertyAccess.name.text;
|
|
44
|
-
if (!hostTypeName) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
const failure = this.data
|
|
48
|
-
.filter(data => data.method === methodName && data.className === hostTypeName)
|
|
49
|
-
.map(data => data.invalidArgCounts.find(f => f.count === node.arguments.length))[0];
|
|
50
|
-
if (!failure) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
this.addFailureAtNode(node, `Found call to "${chalk_1.bold(hostTypeName + '.' + methodName)}" ` +
|
|
54
|
-
`with ${chalk_1.bold(`${failure.count}`)} arguments. Message: ${failure.message}`);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.Walker = Walker;
|
|
58
|
-
//# sourceMappingURL=methodCallsCheckRule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"methodCallsCheckRule.js","sourceRoot":"","sources":["../../../../../../../src/cdk/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,iCAA2B;AAC3B,mCAAkE;AAClE,iCAAiC;AAGjC,qDAA4D;AAE5D;;;GAGG;AACH,MAAa,IAAK,SAAQ,cAAK,CAAC,SAAS;IACvC,gBAAgB,CAAC,UAAyB,EAAE,OAAmB;QAC7D,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC;CACF;AAJD,oBAIC;AAED,MAAa,MAAO,SAAQ,+BAAsB;IAAlD;;QAEE,iEAAiE;QACjE,SAAI,GAA4B,uCAAwB,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;IAoCrF,CAAC;IAlCC,mBAAmB,CAAC,IAAuB;QACzC,IAAI,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YAClD,IAAI,CAAC,8BAA8B,CAAC,IAAI,CAAC,CAAC;SAC3C;QAED,OAAO,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAEO,8BAA8B,CAAC,IAAuB;QAC5D,MAAM,cAAc,GAAG,IAAI,CAAC,UAAyC,CAAC;QAEtE,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;YACzC,OAAO;SACR;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,iBAAiB,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACpF,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;QAC7D,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;QAE5C,IAAI,CAAC,YAAY,EAAE;YACjB,OAAO;SACR;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI;aACpB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,UAAU,IAAI,IAAI,CAAC,SAAS,KAAK,YAAY,CAAC;aAC7E,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAExF,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO;SACR;QAED,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,kBAAkB,YAAI,CAAC,YAAY,GAAG,GAAG,GAAG,UAAU,CAAC,IAAI;YACnF,QAAQ,YAAI,CAAC,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,wBAAwB,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AAvCD,wBAuCC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { TargetVersion } from '../target-version';
|
|
9
|
-
import { RuleUpgradeData } from '../upgrade-data';
|
|
10
|
-
/** Optional upgrade configuration for TSLint. */
|
|
11
|
-
export interface UpgradeTSLintConfig {
|
|
12
|
-
upgradeData: RuleUpgradeData;
|
|
13
|
-
extraRuleDirectories?: string[];
|
|
14
|
-
extraUpgradeRules?: UpgradeRules;
|
|
15
|
-
extraStyleFiles?: string[];
|
|
16
|
-
}
|
|
17
|
-
/** Type for the configuration list of upgrade rules. */
|
|
18
|
-
export declare type UpgradeRules = (string | (string | TargetVersion)[])[];
|
|
19
|
-
/**
|
|
20
|
-
* Creates a TSLint configuration object that can be passed to the schematic `TSLintFixTask`.
|
|
21
|
-
* Each rule will have the specified target version as option which can be used to swap out
|
|
22
|
-
* the upgrade data based on the given target version.
|
|
23
|
-
*
|
|
24
|
-
* @param target Target version that will be used to reduce the upgrade data to the necessary
|
|
25
|
-
* changes that are affected by the target version.
|
|
26
|
-
* @param config Configuration object that can be specified to add additional rules or
|
|
27
|
-
* specify additional external stylesheets which are not referenced by Angular.
|
|
28
|
-
*/
|
|
29
|
-
export declare function createTslintConfig(target: TargetVersion, config: UpgradeTSLintConfig): {
|
|
30
|
-
rulesDirectory: string[];
|
|
31
|
-
rules: {};
|
|
32
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright Google LLC All Rights Reserved.
|
|
5
|
-
*
|
|
6
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.io/license
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const glob_1 = require("glob");
|
|
11
|
-
/**
|
|
12
|
-
* List of upgrade rules that will be always enabled because the upgrade data for these rules
|
|
13
|
-
* can be swapped out dynamically.
|
|
14
|
-
*
|
|
15
|
-
* Rules which are specific to CDK breaking changes and are not based on the upgrade data,
|
|
16
|
-
* shouldn't be listed here because those cannot be disabled if Angular Material runs its
|
|
17
|
-
* update schematic using these base rules.
|
|
18
|
-
*/
|
|
19
|
-
const baseUpgradeRules = [
|
|
20
|
-
// Attribute selector update rules.
|
|
21
|
-
'attribute-selectors-string-literal',
|
|
22
|
-
'attribute-selectors-stylesheet',
|
|
23
|
-
'attribute-selectors-template',
|
|
24
|
-
// Class inheritance
|
|
25
|
-
'class-inheritance-check',
|
|
26
|
-
// Class name update rules
|
|
27
|
-
'class-names-identifier',
|
|
28
|
-
// CSS selectors update rules
|
|
29
|
-
'css-selectors-string-literal',
|
|
30
|
-
'css-selectors-stylesheet',
|
|
31
|
-
'css-selectors-template',
|
|
32
|
-
// Element selector update rules
|
|
33
|
-
'element-selectors-string-literal',
|
|
34
|
-
'element-selectors-stylesheet',
|
|
35
|
-
'element-selectors-template',
|
|
36
|
-
// Input name update rules
|
|
37
|
-
'input-names-stylesheet',
|
|
38
|
-
'input-names-template',
|
|
39
|
-
// Output name update rules
|
|
40
|
-
'output-names-template',
|
|
41
|
-
// Property name update rules
|
|
42
|
-
'property-names-access',
|
|
43
|
-
// Signature and method call checks
|
|
44
|
-
'constructor-signature-check',
|
|
45
|
-
'method-calls-check',
|
|
46
|
-
];
|
|
47
|
-
/** List of absolute paths that refer to directories that contain the upgrade rules. */
|
|
48
|
-
const ruleDirectories = glob_1.sync('./**/', { cwd: __dirname, absolute: true });
|
|
49
|
-
/**
|
|
50
|
-
* Creates a TSLint configuration object that can be passed to the schematic `TSLintFixTask`.
|
|
51
|
-
* Each rule will have the specified target version as option which can be used to swap out
|
|
52
|
-
* the upgrade data based on the given target version.
|
|
53
|
-
*
|
|
54
|
-
* @param target Target version that will be used to reduce the upgrade data to the necessary
|
|
55
|
-
* changes that are affected by the target version.
|
|
56
|
-
* @param config Configuration object that can be specified to add additional rules or
|
|
57
|
-
* specify additional external stylesheets which are not referenced by Angular.
|
|
58
|
-
*/
|
|
59
|
-
function createTslintConfig(target, config) {
|
|
60
|
-
const configuredRules = baseUpgradeRules.concat(config.extraUpgradeRules || []);
|
|
61
|
-
const configuredRuleDirs = ruleDirectories.concat(config.extraRuleDirectories || []);
|
|
62
|
-
const enabledRules = configuredRules.reduce((result, data) => {
|
|
63
|
-
const ruleName = data instanceof Array ? data[0] : data;
|
|
64
|
-
const versionConstraints = data instanceof Array ? data.slice(1) : null;
|
|
65
|
-
if (!versionConstraints || versionConstraints.includes(target)) {
|
|
66
|
-
result[ruleName] = [true, target, config.upgradeData, config.extraStyleFiles];
|
|
67
|
-
}
|
|
68
|
-
return result;
|
|
69
|
-
}, {});
|
|
70
|
-
return {
|
|
71
|
-
rulesDirectory: configuredRuleDirs,
|
|
72
|
-
rules: enabledRules
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
exports.createTslintConfig = createTslintConfig;
|
|
76
|
-
//# sourceMappingURL=tslint-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tslint-config.js","sourceRoot":"","sources":["../../../../../../src/cdk/schematics/ng-update/upgrade-rules/tslint-config.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,+BAAsC;AAetC;;;;;;;GAOG;AACH,MAAM,gBAAgB,GAAiB;IACrC,mCAAmC;IACnC,oCAAoC;IACpC,gCAAgC;IAChC,8BAA8B;IAE9B,oBAAoB;IACpB,yBAAyB;IAEzB,0BAA0B;IAC1B,wBAAwB;IAExB,6BAA6B;IAC7B,8BAA8B;IAC9B,0BAA0B;IAC1B,wBAAwB;IAExB,gCAAgC;IAChC,kCAAkC;IAClC,8BAA8B;IAC9B,4BAA4B;IAE5B,0BAA0B;IAC1B,wBAAwB;IACxB,sBAAsB;IAEtB,2BAA2B;IAC3B,uBAAuB;IAEvB,6BAA6B;IAC7B,uBAAuB;IAEvB,mCAAmC;IACnC,6BAA6B;IAC7B,oBAAoB;CACrB,CAAC;AAEF,uFAAuF;AACvF,MAAM,eAAe,GAAG,WAAQ,CAAC,OAAO,EAAE,EAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;AAE5E;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAAC,MAAqB,EAAE,MAA2B;IACnF,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IAChF,MAAM,kBAAkB,GAAG,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IAErF,MAAM,YAAY,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;QAC3D,MAAM,QAAQ,GAAG,IAAI,YAAY,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACxD,MAAM,kBAAkB,GAAG,IAAI,YAAY,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAExE,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YAC9D,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC;SAC/E;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,cAAc,EAAE,kBAAkB;QAClC,KAAK,EAAE,YAAY;KACpB,CAAC;AACJ,CAAC;AAnBD,gDAmBC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import * as ts from 'typescript';
|
|
9
|
-
export declare type ExternalResource = ts.SourceFile;
|
|
10
|
-
/**
|
|
11
|
-
* Creates a fake TypeScript source file that can contain content of templates or stylesheets.
|
|
12
|
-
* The fake TypeScript source file then can be passed to TSLint in combination with a rule failure.
|
|
13
|
-
*/
|
|
14
|
-
export declare function createComponentFile(filePath: string, content: string): ExternalResource;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import * as ts from 'typescript';
|
|
9
|
-
import { ExternalResource } from './component-file';
|
|
10
|
-
import { ExternalFailureWalker } from './external-failure-walker';
|
|
11
|
-
/**
|
|
12
|
-
* Custom TSLint rule walker that identifies Angular components and visits specific parts of
|
|
13
|
-
* the component metadata.
|
|
14
|
-
*/
|
|
15
|
-
export declare class ComponentWalker extends ExternalFailureWalker {
|
|
16
|
-
visitInlineTemplate(_template: ts.StringLiteralLike): void;
|
|
17
|
-
visitInlineStylesheet(_stylesheet: ts.StringLiteralLike): void;
|
|
18
|
-
visitExternalTemplate(_template: ExternalResource): void;
|
|
19
|
-
visitExternalStylesheet(_stylesheet: ExternalResource): void;
|
|
20
|
-
/**
|
|
21
|
-
* We keep track of all visited stylesheet files because we allow manually reporting external
|
|
22
|
-
* stylesheets which couldn't be detected by the component walker. Reporting these files multiple
|
|
23
|
-
* times will result in duplicated TSLint failures and replacements.
|
|
24
|
-
*/
|
|
25
|
-
private _visitedStylesheetFiles;
|
|
26
|
-
visitNode(node: ts.Node): void;
|
|
27
|
-
private _visitDirectiveCallExpression;
|
|
28
|
-
private _reportExternalTemplate;
|
|
29
|
-
private _reportInlineStyles;
|
|
30
|
-
private _visitExternalStylesArrayLiteral;
|
|
31
|
-
private _reportExternalStyle;
|
|
32
|
-
/**
|
|
33
|
-
* Recursively searches for the metadata object literal expression inside of a directive call
|
|
34
|
-
* expression. Since expression calls can be nested through *parenthesized* expressions, we
|
|
35
|
-
* need to recursively visit and check every expression inside of a parenthesized expression.
|
|
36
|
-
*
|
|
37
|
-
* e.g. @Component((({myMetadataExpression}))) will return `myMetadataExpression`.
|
|
38
|
-
*/
|
|
39
|
-
private _findMetadataFromExpression;
|
|
40
|
-
/**
|
|
41
|
-
* Creates a TSLint failure that reports that the resource file that belongs to the specified
|
|
42
|
-
* TypeScript node could not be resolved in the file system.
|
|
43
|
-
*/
|
|
44
|
-
private _createResourceNotFoundFailure;
|
|
45
|
-
/** Reports the specified additional stylesheets. */
|
|
46
|
-
_reportExtraStylesheetFiles(filePaths: string[]): void;
|
|
47
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { Fix, Replacement, RuleWalker } from 'tslint';
|
|
9
|
-
import { ExternalResource } from './component-file';
|
|
10
|
-
/**
|
|
11
|
-
* Enhanced TSLint rule walker that makes it easier to create rule failures that don't belong to
|
|
12
|
-
* the source file that has been passed to the rule walker.
|
|
13
|
-
*/
|
|
14
|
-
export declare class ExternalFailureWalker extends RuleWalker {
|
|
15
|
-
/** Adds a failure for the external resource at the specified position with the given width. */
|
|
16
|
-
addExternalFailureAt(node: ExternalResource, start: number, width: number, message: string, fix?: Fix): void;
|
|
17
|
-
/** Adds a failure at the specified range for the external resource. */
|
|
18
|
-
addExternalFailureFromStartToEnd(node: ExternalResource, start: number, end: number, message: string, fix?: Fix): void;
|
|
19
|
-
/** Adds a failure for the whole external resource node. */
|
|
20
|
-
addExternalFailure(node: ExternalResource, message: string, fix?: Fix): void;
|
|
21
|
-
/** Adds a failure to the external resource at the location of the specified replacement. */
|
|
22
|
-
addExternalFailureAtReplacement(node: ExternalResource, message: string, replacement: Replacement): void;
|
|
23
|
-
/** Adds a failure at the location of the specified replacement. */
|
|
24
|
-
addFailureAtReplacement(message: string, replacement: Replacement): void;
|
|
25
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { RuleFailure, Rules } from 'tslint';
|
|
9
|
-
import * as ts from 'typescript';
|
|
10
|
-
/**
|
|
11
|
-
* Rule that walks through every string literal that is part of a call expression and
|
|
12
|
-
* switches deprecated attribute selectors to the updated selector.
|
|
13
|
-
*/
|
|
14
|
-
export declare class Rule extends Rules.AbstractRule {
|
|
15
|
-
apply(sourceFile: ts.SourceFile): RuleFailure[];
|
|
16
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { IOptions, RuleFailure, Rules } from 'tslint';
|
|
9
|
-
import * as ts from 'typescript';
|
|
10
|
-
import { AttributeSelectorUpgradeData } from '../../data';
|
|
11
|
-
import { ExternalResource } from '../../tslint/component-file';
|
|
12
|
-
import { ComponentWalker } from '../../tslint/component-walker';
|
|
13
|
-
/**
|
|
14
|
-
* Rule that walks through every stylesheet in the application and updates outdated
|
|
15
|
-
* attribute selectors to the updated selector.
|
|
16
|
-
*/
|
|
17
|
-
export declare class Rule extends Rules.AbstractRule {
|
|
18
|
-
apply(sourceFile: ts.SourceFile): RuleFailure[];
|
|
19
|
-
}
|
|
20
|
-
export declare class Walker extends ComponentWalker {
|
|
21
|
-
/** Change data that upgrades to the specified target version. */
|
|
22
|
-
data: AttributeSelectorUpgradeData[];
|
|
23
|
-
constructor(sourceFile: ts.SourceFile, options: IOptions);
|
|
24
|
-
visitInlineStylesheet(literal: ts.StringLiteralLike): void;
|
|
25
|
-
visitExternalStylesheet(node: ExternalResource): void;
|
|
26
|
-
/**
|
|
27
|
-
* Searches for outdated attribute selectors in the specified content and creates replacements
|
|
28
|
-
* with the according messages that can be added to a rule failure.
|
|
29
|
-
*/
|
|
30
|
-
private _createReplacementsForContent;
|
|
31
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { RuleFailure, Rules } from 'tslint';
|
|
9
|
-
import * as ts from 'typescript';
|
|
10
|
-
import { AttributeSelectorUpgradeData } from '../../data';
|
|
11
|
-
import { ExternalResource } from '../../tslint/component-file';
|
|
12
|
-
import { ComponentWalker } from '../../tslint/component-walker';
|
|
13
|
-
/**
|
|
14
|
-
* Rule that walks through every component template and switches outdated attribute
|
|
15
|
-
* selectors to the updated selector.
|
|
16
|
-
*/
|
|
17
|
-
export declare class Rule extends Rules.AbstractRule {
|
|
18
|
-
apply(sourceFile: ts.SourceFile): RuleFailure[];
|
|
19
|
-
}
|
|
20
|
-
export declare class Walker extends ComponentWalker {
|
|
21
|
-
/** Change data that upgrades to the specified target version. */
|
|
22
|
-
data: AttributeSelectorUpgradeData[];
|
|
23
|
-
visitInlineTemplate(node: ts.StringLiteralLike): void;
|
|
24
|
-
visitExternalTemplate(node: ExternalResource): void;
|
|
25
|
-
/**
|
|
26
|
-
* Searches for outdated attribute selectors in the specified content and creates replacements
|
|
27
|
-
* with the according messages that can be added to a rule failure.
|
|
28
|
-
*/
|
|
29
|
-
private _createReplacementsForContent;
|
|
30
|
-
}
|
package/typings/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { IOptions, ProgramAwareRuleWalker, RuleFailure, Rules } from 'tslint';
|
|
9
|
-
import * as ts from 'typescript';
|
|
10
|
-
import { PropertyNameUpgradeData } from '../../data/property-names';
|
|
11
|
-
/**
|
|
12
|
-
* Rule that identifies class declarations that extend CDK or Material classes and had
|
|
13
|
-
* a public property change.
|
|
14
|
-
*/
|
|
15
|
-
export declare class Rule extends Rules.TypedRule {
|
|
16
|
-
applyWithProgram(sourceFile: ts.SourceFile, program: ts.Program): RuleFailure[];
|
|
17
|
-
}
|
|
18
|
-
export declare class Walker extends ProgramAwareRuleWalker {
|
|
19
|
-
/**
|
|
20
|
-
* Map of classes that have been updated. Each class name maps to the according property
|
|
21
|
-
* change data.
|
|
22
|
-
*/
|
|
23
|
-
propertyNames: Map<string, PropertyNameUpgradeData>;
|
|
24
|
-
constructor(sourceFile: ts.SourceFile, options: IOptions, program: ts.Program);
|
|
25
|
-
visitClassDeclaration(node: ts.ClassDeclaration): void;
|
|
26
|
-
}
|
package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { RuleFailure, Rules, RuleWalker } from 'tslint';
|
|
9
|
-
import * as ts from 'typescript';
|
|
10
|
-
import { CssSelectorUpgradeData } from '../../data/css-selectors';
|
|
11
|
-
/**
|
|
12
|
-
* Rule that walks through every string literal that is wrapped inside of a call expression.
|
|
13
|
-
* All string literals which include an outdated CSS selector will be migrated.
|
|
14
|
-
*/
|
|
15
|
-
export declare class Rule extends Rules.AbstractRule {
|
|
16
|
-
apply(sourceFile: ts.SourceFile): RuleFailure[];
|
|
17
|
-
}
|
|
18
|
-
export declare class Walker extends RuleWalker {
|
|
19
|
-
/** Change data that upgrades to the specified target version. */
|
|
20
|
-
data: CssSelectorUpgradeData[];
|
|
21
|
-
visitStringLiteral(node: ts.StringLiteral): void;
|
|
22
|
-
/** Adds a css selector failure with the given replacement at the specified node. */
|
|
23
|
-
private _addFailureWithReplacement;
|
|
24
|
-
}
|
package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { IOptions, RuleFailure, Rules } from 'tslint';
|
|
9
|
-
import * as ts from 'typescript';
|
|
10
|
-
import { CssSelectorUpgradeData } from '../../data';
|
|
11
|
-
import { ExternalResource } from '../../tslint/component-file';
|
|
12
|
-
import { ComponentWalker } from '../../tslint/component-walker';
|
|
13
|
-
/**
|
|
14
|
-
* Rule that walks through every inline or external CSs stylesheet and updates outdated
|
|
15
|
-
* CSS selectors.
|
|
16
|
-
*/
|
|
17
|
-
export declare class Rule extends Rules.AbstractRule {
|
|
18
|
-
apply(sourceFile: ts.SourceFile): RuleFailure[];
|
|
19
|
-
}
|
|
20
|
-
export declare class Walker extends ComponentWalker {
|
|
21
|
-
/** Change data that upgrades to the specified target version. */
|
|
22
|
-
data: CssSelectorUpgradeData[];
|
|
23
|
-
constructor(sourceFile: ts.SourceFile, options: IOptions);
|
|
24
|
-
visitInlineStylesheet(node: ts.StringLiteralLike): void;
|
|
25
|
-
visitExternalStylesheet(node: ExternalResource): void;
|
|
26
|
-
/**
|
|
27
|
-
* Searches for outdated CSS selectors in the specified content and creates replacements
|
|
28
|
-
* with the according messages that can be added to a rule failure.
|
|
29
|
-
*/
|
|
30
|
-
private _createReplacementsForContent;
|
|
31
|
-
}
|
package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { RuleFailure, Rules } from 'tslint';
|
|
9
|
-
import * as ts from 'typescript';
|
|
10
|
-
import { CssSelectorUpgradeData } from '../../data';
|
|
11
|
-
import { ExternalResource } from '../../tslint/component-file';
|
|
12
|
-
import { ComponentWalker } from '../../tslint/component-walker';
|
|
13
|
-
/**
|
|
14
|
-
* Rule that walks through every inline or external HTML template and updates outdated
|
|
15
|
-
* CSS selectors.
|
|
16
|
-
*/
|
|
17
|
-
export declare class Rule extends Rules.AbstractRule {
|
|
18
|
-
apply(sourceFile: ts.SourceFile): RuleFailure[];
|
|
19
|
-
}
|
|
20
|
-
export declare class Walker extends ComponentWalker {
|
|
21
|
-
/** Change data that upgrades to the specified target version. */
|
|
22
|
-
data: CssSelectorUpgradeData[];
|
|
23
|
-
visitInlineTemplate(node: ts.StringLiteralLike): void;
|
|
24
|
-
visitExternalTemplate(node: ExternalResource): void;
|
|
25
|
-
/**
|
|
26
|
-
* Searches for outdated css selectors in the specified content and creates replacements
|
|
27
|
-
* with the according messages that can be added to a rule failure.
|
|
28
|
-
*/
|
|
29
|
-
private _createReplacementsForContent;
|
|
30
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { RuleFailure, Rules, RuleWalker } from 'tslint';
|
|
9
|
-
import * as ts from 'typescript';
|
|
10
|
-
import { ElementSelectorUpgradeData } from '../../data/element-selectors';
|
|
11
|
-
/**
|
|
12
|
-
* Rule that walks through every string literal that is wrapped inside of a call expression.
|
|
13
|
-
* All string literals which include an outdated element selector will be migrated.
|
|
14
|
-
*/
|
|
15
|
-
export declare class Rule extends Rules.AbstractRule {
|
|
16
|
-
apply(sourceFile: ts.SourceFile): RuleFailure[];
|
|
17
|
-
}
|
|
18
|
-
export declare class Walker extends RuleWalker {
|
|
19
|
-
/** Change data that upgrades to the specified target version. */
|
|
20
|
-
data: ElementSelectorUpgradeData[];
|
|
21
|
-
visitStringLiteral(node: ts.StringLiteral): void;
|
|
22
|
-
/** Adds an element selector failure with the given replacement at the specified node. */
|
|
23
|
-
private _addFailureWithReplacement;
|
|
24
|
-
}
|