@angular/cdk 8.0.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.
Files changed (307) hide show
  1. package/a11y/typings/aria-describer/aria-describer.d.ts +4 -3
  2. package/a11y/typings/index.metadata.json +1 -1
  3. package/bundles/cdk-a11y.umd.js +42 -10
  4. package/bundles/cdk-a11y.umd.js.map +1 -1
  5. package/bundles/cdk-a11y.umd.min.js +1 -1
  6. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  7. package/bundles/cdk-drag-drop.umd.js +511 -81
  8. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  9. package/bundles/cdk-drag-drop.umd.min.js +2 -2
  10. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  11. package/bundles/cdk-overlay.umd.js +15 -13
  12. package/bundles/cdk-overlay.umd.js.map +1 -1
  13. package/bundles/cdk-overlay.umd.min.js +2 -2
  14. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  15. package/bundles/cdk-tree.umd.js +8 -6
  16. package/bundles/cdk-tree.umd.js.map +1 -1
  17. package/bundles/cdk-tree.umd.min.js +1 -1
  18. package/bundles/cdk-tree.umd.min.js.map +1 -1
  19. package/bundles/cdk.umd.js +1 -1
  20. package/bundles/cdk.umd.js.map +1 -1
  21. package/bundles/cdk.umd.min.js +1 -1
  22. package/bundles/cdk.umd.min.js.map +1 -1
  23. package/drag-drop/typings/directives/drag.d.ts +1 -1
  24. package/drag-drop/typings/directives/drop-list.d.ts +2 -0
  25. package/drag-drop/typings/drag-drop-registry.d.ts +2 -0
  26. package/drag-drop/typings/drag-ref.d.ts +10 -1
  27. package/drag-drop/typings/drop-list-ref.d.ts +59 -3
  28. package/drag-drop/typings/index.metadata.json +1 -1
  29. package/esm2015/a11y.js +35 -10
  30. package/esm2015/a11y.js.map +1 -1
  31. package/esm2015/cdk.js +1 -1
  32. package/esm2015/cdk.js.map +1 -1
  33. package/esm2015/drag-drop.js +446 -79
  34. package/esm2015/drag-drop.js.map +1 -1
  35. package/esm2015/overlay.js +14 -12
  36. package/esm2015/overlay.js.map +1 -1
  37. package/esm2015/tree.js +7 -6
  38. package/esm2015/tree.js.map +1 -1
  39. package/esm5/a11y.es5.js +42 -10
  40. package/esm5/a11y.es5.js.map +1 -1
  41. package/esm5/cdk.es5.js +1 -1
  42. package/esm5/cdk.es5.js.map +1 -1
  43. package/esm5/drag-drop.es5.js +509 -79
  44. package/esm5/drag-drop.es5.js.map +1 -1
  45. package/esm5/overlay.es5.js +15 -13
  46. package/esm5/overlay.es5.js.map +1 -1
  47. package/esm5/tree.es5.js +8 -6
  48. package/esm5/tree.es5.js.map +1 -1
  49. package/package.json +4 -4
  50. package/schematics/index.d.ts +1 -0
  51. package/schematics/index.js +1 -0
  52. package/schematics/index.js.map +1 -1
  53. package/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
  54. package/schematics/ng-update/data/attribute-selectors.js +5 -13
  55. package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
  56. package/schematics/ng-update/data/class-names.d.ts +1 -1
  57. package/schematics/ng-update/data/class-names.js +5 -21
  58. package/schematics/ng-update/data/class-names.js.map +1 -1
  59. package/schematics/ng-update/data/constructor-checks.d.ts +1 -1
  60. package/schematics/ng-update/data/constructor-checks.js +3 -5
  61. package/schematics/ng-update/data/constructor-checks.js.map +1 -1
  62. package/schematics/ng-update/data/css-selectors.d.ts +1 -1
  63. package/schematics/ng-update/data/css-selectors.js +1 -1
  64. package/schematics/ng-update/data/css-selectors.js.map +1 -1
  65. package/schematics/ng-update/data/element-selectors.d.ts +1 -1
  66. package/schematics/ng-update/data/element-selectors.js +1 -1
  67. package/schematics/ng-update/data/element-selectors.js.map +1 -1
  68. package/schematics/ng-update/data/input-names.d.ts +1 -1
  69. package/schematics/ng-update/data/input-names.js +13 -37
  70. package/schematics/ng-update/data/input-names.js.map +1 -1
  71. package/schematics/ng-update/data/method-call-checks.d.ts +1 -1
  72. package/schematics/ng-update/data/method-call-checks.js +6 -15
  73. package/schematics/ng-update/data/method-call-checks.js.map +1 -1
  74. package/schematics/ng-update/data/output-names.d.ts +1 -1
  75. package/schematics/ng-update/data/output-names.js +1 -1
  76. package/schematics/ng-update/data/output-names.js.map +1 -1
  77. package/schematics/ng-update/data/property-names.d.ts +1 -1
  78. package/schematics/ng-update/data/property-names.js +19 -59
  79. package/schematics/ng-update/data/property-names.js.map +1 -1
  80. package/schematics/ng-update/html-parsing/elements.js.map +1 -1
  81. package/schematics/ng-update/index.d.ts +0 -2
  82. package/schematics/ng-update/index.js +13 -24
  83. package/schematics/ng-update/index.js.map +1 -1
  84. package/schematics/ng-update/public-api.d.ts +0 -5
  85. package/schematics/ng-update/public-api.js +0 -5
  86. package/schematics/ng-update/public-api.js.map +1 -1
  87. package/schematics/ng-update/typescript/base-types.js.map +1 -1
  88. package/schematics/ng-update/typescript/module-specifiers.js.map +1 -1
  89. package/schematics/ng-update/upgrade-data.d.ts +5 -30
  90. package/schematics/ng-update/upgrade-data.js +4 -34
  91. package/schematics/ng-update/upgrade-data.js.map +1 -1
  92. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
  93. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js +66 -0
  94. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js.map +1 -0
  95. package/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
  96. package/schematics/ng-update/upgrade-rules/{class-inheritance/classInheritanceCheckRule.js → class-inheritance-rule.js} +24 -20
  97. package/schematics/ng-update/upgrade-rules/class-inheritance-rule.js.map +1 -0
  98. package/{typings/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
  99. package/schematics/ng-update/upgrade-rules/{class-names/classNamesIdentifierRule.js → class-names-rule.js} +19 -24
  100. package/schematics/ng-update/upgrade-rules/class-names-rule.js.map +1 -0
  101. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
  102. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js +134 -0
  103. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js.map +1 -0
  104. package/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
  105. package/schematics/ng-update/upgrade-rules/css-selectors-rule.js +73 -0
  106. package/schematics/ng-update/upgrade-rules/css-selectors-rule.js.map +1 -0
  107. package/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
  108. package/schematics/ng-update/upgrade-rules/element-selectors-rule.js +64 -0
  109. package/schematics/ng-update/upgrade-rules/element-selectors-rule.js.map +1 -0
  110. package/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
  111. package/schematics/ng-update/upgrade-rules/index.js +49 -29
  112. package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
  113. package/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
  114. package/schematics/ng-update/upgrade-rules/input-names-rule.js +59 -0
  115. package/schematics/ng-update/upgrade-rules/input-names-rule.js.map +1 -0
  116. package/{typings/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.d.ts → schematics/ng-update/upgrade-rules/method-call-arguments-rule.d.ts} +8 -9
  117. package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js +60 -0
  118. package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js.map +1 -0
  119. package/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
  120. package/schematics/ng-update/upgrade-rules/misc-template-rule.js +37 -0
  121. package/schematics/ng-update/upgrade-rules/misc-template-rule.js.map +1 -0
  122. package/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
  123. package/schematics/ng-update/upgrade-rules/output-names-rule.js +46 -0
  124. package/schematics/ng-update/upgrade-rules/output-names-rule.js.map +1 -0
  125. package/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
  126. package/schematics/ng-update/upgrade-rules/property-names-rule.js +46 -0
  127. package/schematics/ng-update/upgrade-rules/property-names-rule.js.map +1 -0
  128. package/schematics/tsconfig.tsbuildinfo +2895 -3608
  129. package/schematics/update-tool/component-resource-collector.d.ts +41 -0
  130. package/schematics/update-tool/component-resource-collector.js +141 -0
  131. package/schematics/update-tool/component-resource-collector.js.map +1 -0
  132. package/schematics/update-tool/index.d.ts +13 -0
  133. package/schematics/update-tool/index.js +117 -0
  134. package/schematics/update-tool/index.js.map +1 -0
  135. package/schematics/update-tool/migration-rule.d.ts +45 -0
  136. package/schematics/update-tool/migration-rule.js +50 -0
  137. package/schematics/update-tool/migration-rule.js.map +1 -0
  138. package/schematics/update-tool/public-api.d.ts +12 -0
  139. package/schematics/update-tool/public-api.js +18 -0
  140. package/schematics/update-tool/public-api.js.map +1 -0
  141. package/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
  142. package/schematics/{ng-update → update-tool}/target-version.js +3 -3
  143. package/schematics/update-tool/target-version.js.map +1 -0
  144. package/schematics/update-tool/utils/decorators.d.ts +23 -0
  145. package/schematics/update-tool/utils/decorators.js +37 -0
  146. package/schematics/update-tool/utils/decorators.js.map +1 -0
  147. package/schematics/update-tool/utils/functions.d.ts +14 -0
  148. package/schematics/update-tool/utils/functions.js +20 -0
  149. package/schematics/update-tool/utils/functions.js.map +1 -0
  150. package/schematics/update-tool/utils/imports.d.ts +15 -0
  151. package/schematics/update-tool/utils/imports.js +35 -0
  152. package/schematics/update-tool/utils/imports.js.map +1 -0
  153. package/schematics/update-tool/utils/line-mappings.d.ts +21 -0
  154. package/schematics/update-tool/utils/line-mappings.js +75 -0
  155. package/schematics/update-tool/utils/line-mappings.js.map +1 -0
  156. package/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
  157. package/schematics/update-tool/utils/parse-tsconfig.js +22 -0
  158. package/schematics/update-tool/utils/parse-tsconfig.js.map +1 -0
  159. package/schematics/update-tool/utils/property-name.d.ts +18 -0
  160. package/schematics/update-tool/utils/property-name.js +27 -0
  161. package/schematics/update-tool/utils/property-name.js.map +1 -0
  162. package/schematics/update-tool/version-changes.d.ts +32 -0
  163. package/schematics/update-tool/version-changes.js +41 -0
  164. package/schematics/update-tool/version-changes.js.map +1 -0
  165. package/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
  166. package/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.js +31 -20
  167. package/schematics/utils/project-tsconfig-paths.js.map +1 -0
  168. package/typings/a11y/aria-describer/aria-describer.d.ts +4 -3
  169. package/typings/a11y/index.metadata.json +1 -1
  170. package/typings/drag-drop/directives/drag.d.ts +1 -1
  171. package/typings/drag-drop/directives/drop-list.d.ts +2 -0
  172. package/typings/drag-drop/drag-drop-registry.d.ts +2 -0
  173. package/typings/drag-drop/drag-ref.d.ts +10 -1
  174. package/typings/drag-drop/drop-list-ref.d.ts +59 -3
  175. package/typings/drag-drop/index.metadata.json +1 -1
  176. package/typings/esm5/a11y/aria-describer/aria-describer.d.ts +4 -3
  177. package/typings/esm5/a11y/index.metadata.json +1 -1
  178. package/typings/esm5/drag-drop/directives/drag.d.ts +1 -1
  179. package/typings/esm5/drag-drop/directives/drop-list.d.ts +2 -0
  180. package/typings/esm5/drag-drop/drag-drop-registry.d.ts +2 -0
  181. package/typings/esm5/drag-drop/drag-ref.d.ts +10 -1
  182. package/typings/esm5/drag-drop/drop-list-ref.d.ts +59 -3
  183. package/typings/esm5/drag-drop/index.metadata.json +1 -1
  184. package/typings/esm5/index.metadata.json +1 -1
  185. package/typings/index.metadata.json +1 -1
  186. package/typings/schematics/index.d.ts +1 -0
  187. package/typings/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
  188. package/typings/schematics/ng-update/data/class-names.d.ts +1 -1
  189. package/typings/schematics/ng-update/data/constructor-checks.d.ts +1 -1
  190. package/typings/schematics/ng-update/data/css-selectors.d.ts +1 -1
  191. package/typings/schematics/ng-update/data/element-selectors.d.ts +1 -1
  192. package/typings/schematics/ng-update/data/input-names.d.ts +1 -1
  193. package/typings/schematics/ng-update/data/method-call-checks.d.ts +1 -1
  194. package/typings/schematics/ng-update/data/output-names.d.ts +1 -1
  195. package/typings/schematics/ng-update/data/property-names.d.ts +1 -1
  196. package/typings/schematics/ng-update/index.d.ts +0 -2
  197. package/typings/schematics/ng-update/public-api.d.ts +0 -5
  198. package/typings/schematics/ng-update/upgrade-data.d.ts +5 -30
  199. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
  200. package/typings/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
  201. package/{schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → typings/schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
  202. package/typings/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
  203. package/typings/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
  204. package/typings/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
  205. package/typings/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
  206. package/typings/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
  207. package/{schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.d.ts → typings/schematics/ng-update/upgrade-rules/method-call-arguments-rule.d.ts} +8 -9
  208. package/typings/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
  209. package/typings/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
  210. package/typings/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
  211. package/typings/schematics/update-tool/component-resource-collector.d.ts +41 -0
  212. package/typings/schematics/update-tool/index.d.ts +13 -0
  213. package/typings/schematics/update-tool/migration-rule.d.ts +45 -0
  214. package/typings/schematics/update-tool/public-api.d.ts +12 -0
  215. package/typings/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
  216. package/typings/schematics/update-tool/utils/decorators.d.ts +23 -0
  217. package/typings/schematics/update-tool/utils/functions.d.ts +14 -0
  218. package/typings/schematics/update-tool/utils/imports.d.ts +15 -0
  219. package/typings/schematics/update-tool/utils/line-mappings.d.ts +21 -0
  220. package/typings/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
  221. package/typings/schematics/update-tool/utils/property-name.d.ts +18 -0
  222. package/typings/schematics/update-tool/version-changes.d.ts +32 -0
  223. package/typings/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
  224. package/schematics/ng-update/target-version.js.map +0 -1
  225. package/schematics/ng-update/tslint/component-file.d.ts +0 -14
  226. package/schematics/ng-update/tslint/component-file.js +0 -31
  227. package/schematics/ng-update/tslint/component-file.js.map +0 -1
  228. package/schematics/ng-update/tslint/component-walker.d.ts +0 -47
  229. package/schematics/ng-update/tslint/component-walker.js +0 -142
  230. package/schematics/ng-update/tslint/component-walker.js.map +0 -1
  231. package/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
  232. package/schematics/ng-update/tslint/external-failure-walker.js +0 -38
  233. package/schematics/ng-update/tslint/external-failure-walker.js.map +0 -1
  234. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
  235. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js +0 -49
  236. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js.map +0 -1
  237. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
  238. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js +0 -62
  239. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js.map +0 -1
  240. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
  241. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js +0 -59
  242. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js.map +0 -1
  243. package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
  244. package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.js.map +0 -1
  245. package/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.js.map +0 -1
  246. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
  247. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js +0 -53
  248. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js.map +0 -1
  249. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
  250. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js +0 -63
  251. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js.map +0 -1
  252. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
  253. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js +0 -62
  254. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js.map +0 -1
  255. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
  256. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js +0 -50
  257. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js.map +0 -1
  258. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
  259. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js +0 -60
  260. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js.map +0 -1
  261. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
  262. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js +0 -59
  263. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js.map +0 -1
  264. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
  265. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js +0 -67
  266. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js.map +0 -1
  267. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
  268. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js +0 -67
  269. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js.map +0 -1
  270. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
  271. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js +0 -49
  272. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js.map +0 -1
  273. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
  274. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js +0 -67
  275. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js.map +0 -1
  276. package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js.map +0 -1
  277. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
  278. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js +0 -46
  279. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js.map +0 -1
  280. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
  281. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +0 -132
  282. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +0 -1
  283. package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js +0 -58
  284. package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js.map +0 -1
  285. package/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
  286. package/schematics/ng-update/upgrade-rules/tslint-config.js +0 -87
  287. package/schematics/ng-update/upgrade-rules/tslint-config.js.map +0 -1
  288. package/typings/schematics/ng-update/tslint/component-file.d.ts +0 -14
  289. package/typings/schematics/ng-update/tslint/component-walker.d.ts +0 -47
  290. package/typings/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
  291. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
  292. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
  293. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
  294. package/typings/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
  295. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
  296. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
  297. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
  298. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
  299. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
  300. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
  301. package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
  302. package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
  303. package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
  304. package/typings/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
  305. package/typings/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
  306. package/typings/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
  307. package/typings/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
@@ -5,17 +5,15 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { RuleFailure, Rules, RuleWalker } from 'tslint';
9
8
  import * as ts from 'typescript';
10
- import { ClassNameUpgradeData } from '../../data';
9
+ import { MigrationRule } from '../../update-tool/migration-rule';
10
+ import { ClassNameUpgradeData } from '../data';
11
+ import { RuleUpgradeData } from '../upgrade-data';
11
12
  /**
12
13
  * Rule that walks through every identifier that is part of Angular Material or thr CDK
13
14
  * and replaces the outdated name with the new one if specified in the upgrade data.
14
15
  */
15
- export declare class Rule extends Rules.AbstractRule {
16
- apply(sourceFile: ts.SourceFile): RuleFailure[];
17
- }
18
- export declare class Walker extends RuleWalker {
16
+ export declare class ClassNamesRule extends MigrationRule<RuleUpgradeData> {
19
17
  /** Change data that upgrades to the specified target version. */
20
18
  data: ClassNameUpgradeData[];
21
19
  /**
@@ -25,8 +23,10 @@ export declare class Walker extends RuleWalker {
25
23
  trustedIdentifiers: Set<string>;
26
24
  /** List of namespaces that have been imported from `@angular/material` or `@angular/cdk`. */
27
25
  trustedNamespaces: Set<string>;
26
+ ruleEnabled: boolean;
27
+ visitNode(node: ts.Node): void;
28
28
  /** Method that is called for every identifier inside of the specified project. */
29
- visitIdentifier(identifier: ts.Identifier): void;
29
+ private _visitIdentifier;
30
30
  /** Creates a failure and replacement for the specified identifier. */
31
31
  private _createFailureWithReplacement;
32
32
  }
@@ -0,0 +1,29 @@
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 { MigrationRule } from '../../update-tool/migration-rule';
10
+ import { RuleUpgradeData } from '../upgrade-data';
11
+ /**
12
+ * Rule that visits every TypeScript new expression or super call and checks if
13
+ * the parameter type signature is invalid and needs to be updated manually.
14
+ */
15
+ export declare class ConstructorSignatureRule extends MigrationRule<RuleUpgradeData> {
16
+ data: string[];
17
+ ruleEnabled: boolean;
18
+ visitNode(node: ts.Node): void;
19
+ /**
20
+ * Method that will be called for each source file of the upgrade project. In order to
21
+ * properly determine invalid constructor signatures, we take advantage of the pre-emit
22
+ * diagnostics from TypeScript.
23
+ *
24
+ * By using the diagnostics, the migration can handle type assignability. Not using
25
+ * diagnostics would mean that we need to use simple type equality checking which is
26
+ * too strict. See related issue: https://github.com/Microsoft/TypeScript/issues/9879
27
+ */
28
+ private _visitSourceFile;
29
+ }
@@ -0,0 +1,25 @@
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 { ResolvedResource } from '../../update-tool/component-resource-collector';
10
+ import { MigrationRule } from '../../update-tool/migration-rule';
11
+ import { RuleUpgradeData } from '../upgrade-data';
12
+ /**
13
+ * Rule that walks through every string literal, template and stylesheet in
14
+ * order to migrate outdated CSS selectors to the new selector.
15
+ */
16
+ export declare class CssSelectorsRule extends MigrationRule<RuleUpgradeData> {
17
+ /** Change data that upgrades to the specified target version. */
18
+ data: any;
19
+ ruleEnabled: any;
20
+ visitNode(node: ts.Node): void;
21
+ visitTemplate(template: ResolvedResource): void;
22
+ visitStylesheet(stylesheet: ResolvedResource): void;
23
+ private _visitStringLiteralLike;
24
+ private _replaceSelector;
25
+ }
@@ -0,0 +1,25 @@
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 { ResolvedResource } from '../../update-tool/component-resource-collector';
10
+ import { MigrationRule } from '../../update-tool/migration-rule';
11
+ import { RuleUpgradeData } from '../upgrade-data';
12
+ /**
13
+ * Rule that walks through every string literal, template and stylesheet in order
14
+ * to migrate outdated element selectors to the new one.
15
+ */
16
+ export declare class ElementSelectorsRule extends MigrationRule<RuleUpgradeData> {
17
+ /** Change data that upgrades to the specified target version. */
18
+ data: any;
19
+ ruleEnabled: any;
20
+ visitNode(node: ts.Node): void;
21
+ visitTemplate(template: ResolvedResource): void;
22
+ visitStylesheet(stylesheet: ResolvedResource): void;
23
+ private _visitStringLiteralLike;
24
+ private _replaceSelector;
25
+ }
@@ -6,7 +6,16 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  import { Rule } from '@angular-devkit/schematics';
9
- import { TargetVersion } from '../target-version';
10
- import { UpgradeTSLintConfig } from './tslint-config';
11
- /** Creates a Angular schematic rule that runs the upgrade for the specified target version. */
12
- export declare function createUpgradeRule(targetVersion: TargetVersion, upgradeConfig: UpgradeTSLintConfig): Rule;
9
+ import { Constructor } from '../../update-tool';
10
+ import { MigrationRule } from '../../update-tool/migration-rule';
11
+ import { TargetVersion } from '../../update-tool/target-version';
12
+ import { RuleUpgradeData } from '../upgrade-data';
13
+ /** List of migration rules which run for the CDK update. */
14
+ export declare const cdkMigrationRules: Constructor<MigrationRule<RuleUpgradeData>>[];
15
+ declare type NullableMigrationRule = Constructor<MigrationRule<RuleUpgradeData | null>>;
16
+ /**
17
+ * Creates a Angular schematic rule that runs the upgrade for the
18
+ * specified target version.
19
+ */
20
+ export declare function createUpgradeRule(targetVersion: TargetVersion, extraRules: NullableMigrationRule[], upgradeData: RuleUpgradeData, onMigrationCompleteFn?: (targetVersion: TargetVersion, hasFailures: boolean) => void): Rule;
21
+ export {};
@@ -0,0 +1,26 @@
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 { ResolvedResource } from '../../update-tool/component-resource-collector';
9
+ import { MigrationRule } from '../../update-tool/migration-rule';
10
+ import { InputNameUpgradeData } from '../data';
11
+ import { RuleUpgradeData } from '../upgrade-data';
12
+ /**
13
+ * Rule that walks through every template or stylesheet and replaces outdated input
14
+ * names to the new input name. Selectors in stylesheets could also target input
15
+ * bindings declared as static attribute. See for example:
16
+ *
17
+ * e.g. `<my-component color="primary">` becomes `my-component[color]`
18
+ */
19
+ export declare class InputNamesRule extends MigrationRule<RuleUpgradeData> {
20
+ /** Change data that upgrades to the specified target version. */
21
+ data: InputNameUpgradeData[];
22
+ ruleEnabled: boolean;
23
+ visitStylesheet(stylesheet: ResolvedResource): void;
24
+ visitTemplate(template: ResolvedResource): void;
25
+ private _replaceInputName;
26
+ }
@@ -5,19 +5,18 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { ProgramAwareRuleWalker, RuleFailure, Rules } from 'tslint';
9
8
  import * as ts from 'typescript';
10
- import { MethodCallUpgradeData } from '../../data';
9
+ import { MigrationRule } from '../../update-tool/migration-rule';
10
+ import { MethodCallUpgradeData } from '../data';
11
+ import { RuleUpgradeData } from '../upgrade-data';
11
12
  /**
12
- * Rule that visits every TypeScript method call expression and checks if the argument count
13
- * is invalid and needs to be *manually* updated.
13
+ * Rule that visits every TypeScript method call expression and checks if the
14
+ * argument count is invalid and needs to be *manually* updated.
14
15
  */
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 {
16
+ export declare class MethodCallArgumentsRule extends MigrationRule<RuleUpgradeData> {
19
17
  /** Change data that upgrades to the specified target version. */
20
18
  data: MethodCallUpgradeData[];
21
- visitCallExpression(node: ts.CallExpression): void;
19
+ ruleEnabled: boolean;
20
+ visitNode(node: ts.Node): void;
22
21
  private _checkPropertyAccessMethodCall;
23
22
  }
@@ -0,0 +1,18 @@
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 { ResolvedResource } from '../../update-tool/component-resource-collector';
9
+ import { MigrationRule } from '../../update-tool/migration-rule';
10
+ import { RuleUpgradeData } from '../upgrade-data';
11
+ /**
12
+ * Rule that walks through every template and reports if there are
13
+ * instances of outdated Angular CDK API that can't be migrated automatically.
14
+ */
15
+ export declare class MiscTemplateRule extends MigrationRule<RuleUpgradeData> {
16
+ ruleEnabled: boolean;
17
+ visitTemplate(template: ResolvedResource): void;
18
+ }
@@ -0,0 +1,22 @@
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 { ResolvedResource } from '../../update-tool/component-resource-collector';
9
+ import { MigrationRule } from '../../update-tool/migration-rule';
10
+ import { OutputNameUpgradeData } from '../data';
11
+ import { RuleUpgradeData } from '../upgrade-data';
12
+ /**
13
+ * Rule that walks through every inline or external HTML template and switches
14
+ * changed output binding names to the proper new output name.
15
+ */
16
+ export declare class OutputNamesRule extends MigrationRule<RuleUpgradeData> {
17
+ /** Change data that upgrades to the specified target version. */
18
+ data: OutputNameUpgradeData[];
19
+ ruleEnabled: boolean;
20
+ visitTemplate(template: ResolvedResource): void;
21
+ private _replaceOutputName;
22
+ }
@@ -0,0 +1,22 @@
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 { MigrationRule } from '../../update-tool/migration-rule';
10
+ import { PropertyNameUpgradeData } from '../data';
11
+ import { RuleUpgradeData } from '../upgrade-data';
12
+ /**
13
+ * Rule that walks through every property access expression and updates
14
+ * accessed properties that have been updated to a new name.
15
+ */
16
+ export declare class PropertyNamesRule extends MigrationRule<RuleUpgradeData> {
17
+ /** Change data that upgrades to the specified target version. */
18
+ data: PropertyNameUpgradeData[];
19
+ ruleEnabled: boolean;
20
+ visitNode(node: ts.Node): void;
21
+ private _visitPropertyAccessExpression;
22
+ }
@@ -0,0 +1,41 @@
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 { LineAndCharacter } from './utils/line-mappings';
10
+ export interface ResolvedResource {
11
+ /** Class declaration that contains this resource. */
12
+ container: ts.ClassDeclaration | null;
13
+ /** File content of the given template. */
14
+ content: string;
15
+ /** Start offset of the resource content (e.g. in the inline source file) */
16
+ start: number;
17
+ /** Whether the given resource is inline or not. */
18
+ inline: boolean;
19
+ /** Path to the file that contains this resource. */
20
+ filePath: string;
21
+ /**
22
+ * Gets the character and line of a given position index in the resource.
23
+ * If the resource is declared inline within a TypeScript source file, the line and
24
+ * character are based on the full source file content.
25
+ */
26
+ getCharacterAndLineOfPosition: (pos: number) => LineAndCharacter;
27
+ }
28
+ /**
29
+ * Collector that can be used to find Angular templates and stylesheets referenced within
30
+ * given TypeScript source files (inline or external referenced files)
31
+ */
32
+ export declare class ComponentResourceCollector {
33
+ typeChecker: ts.TypeChecker;
34
+ resolvedTemplates: ResolvedResource[];
35
+ resolvedStylesheets: ResolvedResource[];
36
+ constructor(typeChecker: ts.TypeChecker);
37
+ visitNode(node: ts.Node): void;
38
+ private _visitClassDeclaration;
39
+ /** Resolves an external stylesheet by reading its content and computing line mappings. */
40
+ resolveExternalStylesheet(filePath: string, container: ts.ClassDeclaration | null): ResolvedResource;
41
+ }
@@ -0,0 +1,13 @@
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 { logging } from '@angular-devkit/core';
9
+ import { Tree } from '@angular-devkit/schematics';
10
+ import { MigrationRule } from './migration-rule';
11
+ import { TargetVersion } from './target-version';
12
+ export declare type Constructor<T> = new (...args: any[]) => T;
13
+ export declare function runMigrationRules<T>(tree: Tree, logger: logging.LoggerApi, tsconfigPath: string, targetVersion: TargetVersion, ruleTypes: Constructor<MigrationRule<T>>[], upgradeData: T, analyzedFiles: Set<string>): boolean;
@@ -0,0 +1,45 @@
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 { UpdateRecorder } from '@angular-devkit/schematics';
9
+ import * as ts from 'typescript';
10
+ import { ResolvedResource } from './component-resource-collector';
11
+ import { TargetVersion } from './target-version';
12
+ import { LineAndCharacter } from './utils/line-mappings';
13
+ export interface MigrationFailure {
14
+ filePath: string;
15
+ message: string;
16
+ position: LineAndCharacter;
17
+ }
18
+ export declare class MigrationRule<T> {
19
+ program: ts.Program;
20
+ typeChecker: ts.TypeChecker;
21
+ targetVersion: TargetVersion;
22
+ upgradeData: T;
23
+ /** List of migration failures that need to be reported. */
24
+ failures: MigrationFailure[];
25
+ /** Whether the migration rule is enabled or not. */
26
+ ruleEnabled: boolean;
27
+ constructor(program: ts.Program, typeChecker: ts.TypeChecker, targetVersion: TargetVersion, upgradeData: T);
28
+ /** Method can be used to perform global analysis of the program. */
29
+ init(): void;
30
+ /**
31
+ * Method that will be called for each node in a given source file. Unlike tslint, this
32
+ * function will only retrieve TypeScript nodes that need to be casted manually. This
33
+ * allows us to only walk the program source files once per program and not per
34
+ * migration rule (significant performance boost).
35
+ */
36
+ visitNode(node: ts.Node): void;
37
+ /** Method that will be called for each Angular template in the program. */
38
+ visitTemplate(template: ResolvedResource): void;
39
+ /** Method that will be called for each stylesheet in the program. */
40
+ visitStylesheet(stylesheet: ResolvedResource): void;
41
+ /** Gets the update recorder for a given source file or resolved template. */
42
+ getUpdateRecorder(filePath: string): UpdateRecorder;
43
+ /** Creates a failure with a specified message at the given node location. */
44
+ createFailureAtNode(node: ts.Node, message: string): void;
45
+ }
@@ -0,0 +1,12 @@
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
+ export * from './index';
9
+ export * from './target-version';
10
+ export * from './version-changes';
11
+ export * from './migration-rule';
12
+ export * from './component-resource-collector';
@@ -7,9 +7,9 @@
7
7
  */
8
8
  /** Possible versions that can be automatically migrated by `ng update`. */
9
9
  export declare enum TargetVersion {
10
- V6 = 0,
11
- V7 = 1,
12
- V8 = 2
10
+ V6 = "version 6",
11
+ V7 = "version 7",
12
+ V8 = "version 8"
13
13
  }
14
14
  /**
15
15
  * Returns all versions that are supported by "ng update". The versions are determined
@@ -0,0 +1,23 @@
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 { Import } from './imports';
10
+ export declare type CallExpressionDecorator = ts.Decorator & {
11
+ expression: ts.CallExpression;
12
+ };
13
+ export interface NgDecorator {
14
+ name: string;
15
+ node: CallExpressionDecorator;
16
+ importNode: ts.ImportDeclaration;
17
+ }
18
+ /**
19
+ * Gets all decorators which are imported from an Angular package
20
+ * (e.g. "@angular/core") from a list of decorators.
21
+ */
22
+ export declare function getAngularDecorators(typeChecker: ts.TypeChecker, decorators: ReadonlyArray<ts.Decorator>): NgDecorator[];
23
+ export declare function getCallDecoratorImport(typeChecker: ts.TypeChecker, decorator: ts.Decorator): Import | null;
@@ -0,0 +1,14 @@
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
+ /**
10
+ * Unwraps a given expression TypeScript node. Expressions can be wrapped within multiple
11
+ * parentheses. e.g. "(((({exp}))))()". The function should return the TypeScript node
12
+ * referring to the inner expression. e.g "exp".
13
+ */
14
+ export declare function unwrapExpression(node: ts.Expression | ts.ParenthesizedExpression): ts.Expression;
@@ -0,0 +1,15 @@
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 Import = {
10
+ name: string;
11
+ importModule: string;
12
+ node: ts.ImportDeclaration;
13
+ };
14
+ /** Gets import information about the specified identifier by using the type checker. */
15
+ export declare function getImportOfIdentifier(typeChecker: ts.TypeChecker, node: ts.Identifier): Import | null;
@@ -0,0 +1,21 @@
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
+ export interface LineAndCharacter {
9
+ character: number;
10
+ line: number;
11
+ }
12
+ /** Gets the line and character for the given position from the line starts map. */
13
+ export declare function getLineAndCharacterFromPosition(lineStartsMap: number[], position: number): {
14
+ character: number;
15
+ line: number;
16
+ };
17
+ /**
18
+ * Computes the line start map of the given text. This can be used in order to
19
+ * retrieve the line and character of a given text position index.
20
+ */
21
+ export declare function computeLineStartsMap(text: string): number[];
@@ -0,0 +1,9 @@
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 function parseTsconfigFile(tsconfigPath: string, basePath: string): ts.ParsedCommandLine;
@@ -0,0 +1,18 @@
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
+ /** Type that describes a property name with an obtainable text. */
10
+ declare type PropertyNameWithText = Exclude<ts.PropertyName, ts.ComputedPropertyName>;
11
+ /**
12
+ * Gets the text of the given property name. Returns null if the property
13
+ * name couldn't be determined statically.
14
+ */
15
+ export declare function getPropertyNameText(node: ts.PropertyName): string | null;
16
+ /** Checks whether the given property name has a text. */
17
+ export declare function hasPropertyNameText(node: ts.PropertyName): node is PropertyNameWithText;
18
+ export {};
@@ -0,0 +1,32 @@
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
+ export declare type VersionChanges<T> = {
10
+ [target in TargetVersion]?: ReadableChange<T>[];
11
+ };
12
+ export declare type ReadableChange<T> = {
13
+ pr: string;
14
+ changes: T[];
15
+ };
16
+ /** Conditional type that unwraps the value of a version changes type. */
17
+ export declare type ValueOfChanges<T> = T extends VersionChanges<infer X> ? X : null;
18
+ /**
19
+ * Gets the changes for a given target version from the specified version changes object.
20
+ *
21
+ * For readability and a good overview of breaking changes, the version change data always
22
+ * includes the related Pull Request link. Since this data is not needed when performing the
23
+ * upgrade, this unused data can be removed and the changes data can be flattened into an
24
+ * easy iterable array.
25
+ */
26
+ export declare function getChangesForTarget<T>(target: TargetVersion, data: VersionChanges<T>): T[];
27
+ /**
28
+ * Gets all changes from the specified version changes object. This is helpful in case a migration
29
+ * rule does not distinguish data based on the target version, but for readability the
30
+ * upgrade data is separated for each target version.
31
+ */
32
+ export declare function getAllChanges<T>(data: VersionChanges<T>): T[];
@@ -10,4 +10,7 @@ import { Tree } from '@angular-devkit/schematics';
10
10
  * Gets all tsconfig paths from a CLI project by reading the workspace configuration
11
11
  * and looking for common tsconfig locations.
12
12
  */
13
- export declare function getProjectTsConfigPaths(tree: Tree): string[];
13
+ export declare function getProjectTsConfigPaths(tree: Tree): {
14
+ buildPaths: string[];
15
+ testPaths: string[];
16
+ };
@@ -1 +0,0 @@
1
- {"version":3,"file":"target-version.js","sourceRoot":"","sources":["../../../../../src/cdk/schematics/ng-update/target-version.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,2EAA2E;AAC3E,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,6CAAE,CAAA;IACF,6CAAE,CAAA;IACF,6CAAE,CAAA;AACJ,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAED;;;GAGG;AACH,SAAgB,kBAAkB;IAChC,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;SAC9B,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,aAAa,CAAC,SAAS,CAAC,KAAK,QAAQ,CAAC,CAAC;AACvE,CAAC;AAHD,gDAGC"}
@@ -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,31 +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 ts = require("typescript");
11
- /**
12
- * Creates a fake TypeScript source file that can contain content of templates or stylesheets.
13
- * The fake TypeScript source file then can be passed to TSLint in combination with a rule failure.
14
- */
15
- function createComponentFile(filePath, content) {
16
- const sourceFile = ts.createSourceFile(filePath, `\`${content}\``, ts.ScriptTarget.ES5);
17
- // Subtract two characters because the string literal quotes are only needed for parsing
18
- // and are not part of the actual source file.
19
- sourceFile.end = sourceFile.end - 2;
20
- // Note: This does not affect the way TSLint applies replacements for external resource files.
21
- // At the time of writing, TSLint loads files manually if the actual rule source file is not
22
- // equal to the source file of the replacement. This means that the replacements need proper
23
- // offsets without the string literal quote symbols.
24
- sourceFile.getFullText = function () {
25
- return sourceFile.text.substring(1, sourceFile.text.length - 1);
26
- };
27
- sourceFile.getText = sourceFile.getFullText;
28
- return sourceFile;
29
- }
30
- exports.createComponentFile = createComponentFile;
31
- //# sourceMappingURL=component-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-file.js","sourceRoot":"","sources":["../../../../../../src/cdk/schematics/ng-update/tslint/component-file.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,iCAAiC;AAIjC;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,QAAgB,EAAE,OAAe;IACnE,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,OAAO,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAExF,wFAAwF;IACxF,8CAA8C;IAC9C,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC;IAEpC,8FAA8F;IAC9F,4FAA4F;IAC5F,4FAA4F;IAC5F,oDAAoD;IACpD,UAAU,CAAC,WAAW,GAAG;QACvB,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAClE,CAAC,CAAC;IAEF,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC;IAE5C,OAAO,UAAU,CAAC;AACpB,CAAC;AAlBD,kDAkBC"}
@@ -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
- }