@servicetitan/startup 30.3.0 → 31.0.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 (725) hide show
  1. package/bin/index.js +5 -6
  2. package/dist/cli/commands/build.d.ts +10 -3
  3. package/dist/cli/commands/build.d.ts.map +1 -1
  4. package/dist/cli/commands/build.js +124 -48
  5. package/dist/cli/commands/build.js.map +1 -1
  6. package/dist/cli/commands/bundle-package.d.ts +0 -2
  7. package/dist/cli/commands/bundle-package.d.ts.map +1 -1
  8. package/dist/cli/commands/bundle-package.js +54 -36
  9. package/dist/cli/commands/bundle-package.js.map +1 -1
  10. package/dist/cli/commands/clean.d.ts +6 -0
  11. package/dist/cli/commands/clean.d.ts.map +1 -0
  12. package/dist/cli/commands/clean.js +55 -0
  13. package/dist/cli/commands/clean.js.map +1 -0
  14. package/dist/cli/commands/convert-eslint-config.js +163 -107
  15. package/dist/cli/commands/convert-eslint-config.js.map +1 -1
  16. package/dist/cli/commands/eslint.d.ts.map +1 -1
  17. package/dist/cli/commands/eslint.js +43 -24
  18. package/dist/cli/commands/eslint.js.map +1 -1
  19. package/dist/cli/commands/get-command.d.ts.map +1 -1
  20. package/dist/cli/commands/get-command.js +50 -53
  21. package/dist/cli/commands/get-command.js.map +1 -1
  22. package/dist/cli/commands/get-user-commands.js +21 -11
  23. package/dist/cli/commands/get-user-commands.js.map +1 -1
  24. package/dist/cli/commands/index.d.ts +1 -1
  25. package/dist/cli/commands/index.d.ts.map +1 -1
  26. package/dist/cli/commands/index.js +31 -30
  27. package/dist/cli/commands/index.js.map +1 -1
  28. package/dist/cli/commands/init.js +74 -48
  29. package/dist/cli/commands/init.js.map +1 -1
  30. package/dist/cli/commands/install.d.ts +8 -1
  31. package/dist/cli/commands/install.d.ts.map +1 -1
  32. package/dist/cli/commands/install.js +61 -23
  33. package/dist/cli/commands/install.js.map +1 -1
  34. package/dist/cli/commands/kendo-ui-license.js +48 -31
  35. package/dist/cli/commands/kendo-ui-license.js.map +1 -1
  36. package/dist/cli/commands/lint.d.ts +3 -1
  37. package/dist/cli/commands/lint.d.ts.map +1 -1
  38. package/dist/cli/commands/lint.js +112 -73
  39. package/dist/cli/commands/lint.js.map +1 -1
  40. package/dist/cli/commands/mfe-package-clean.js +80 -57
  41. package/dist/cli/commands/mfe-package-clean.js.map +1 -1
  42. package/dist/cli/commands/mfe-package-publish.d.ts +1 -0
  43. package/dist/cli/commands/mfe-package-publish.d.ts.map +1 -1
  44. package/dist/cli/commands/mfe-package-publish.js +124 -70
  45. package/dist/cli/commands/mfe-package-publish.js.map +1 -1
  46. package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
  47. package/dist/cli/commands/mfe-publish.js +83 -48
  48. package/dist/cli/commands/mfe-publish.js.map +1 -1
  49. package/dist/cli/commands/prepare-package.d.ts +3 -2
  50. package/dist/cli/commands/prepare-package.d.ts.map +1 -1
  51. package/dist/cli/commands/prepare-package.js +44 -32
  52. package/dist/cli/commands/prepare-package.js.map +1 -1
  53. package/dist/cli/commands/review/__mocks__/expect-calls.d.ts +23 -0
  54. package/dist/cli/commands/review/__mocks__/expect-calls.d.ts.map +1 -0
  55. package/dist/cli/commands/review/__mocks__/index.d.ts +2 -0
  56. package/dist/cli/commands/review/__mocks__/index.d.ts.map +1 -0
  57. package/dist/cli/commands/review/index.d.ts +3 -0
  58. package/dist/cli/commands/review/index.d.ts.map +1 -0
  59. package/dist/cli/commands/review/index.js +20 -0
  60. package/dist/cli/commands/review/index.js.map +1 -0
  61. package/dist/cli/commands/review/review.d.ts +28 -0
  62. package/dist/cli/commands/review/review.d.ts.map +1 -0
  63. package/dist/cli/commands/review/review.js +239 -0
  64. package/dist/cli/commands/review/review.js.map +1 -0
  65. package/dist/cli/commands/review/rules/__mocks__/index.d.ts +4 -0
  66. package/dist/cli/commands/review/rules/__mocks__/index.d.ts.map +1 -0
  67. package/dist/cli/commands/review/rules/__mocks__/mock-config.d.ts +7 -0
  68. package/dist/cli/commands/review/rules/__mocks__/mock-config.d.ts.map +1 -0
  69. package/dist/cli/commands/review/rules/__mocks__/mock-packages.d.ts +21 -0
  70. package/dist/cli/commands/review/rules/__mocks__/mock-packages.d.ts.map +1 -0
  71. package/dist/cli/commands/review/rules/__mocks__/mock-project.d.ts +3 -0
  72. package/dist/cli/commands/review/rules/__mocks__/mock-project.d.ts.map +1 -0
  73. package/dist/cli/commands/review/rules/index.d.ts +3 -0
  74. package/dist/cli/commands/review/rules/index.d.ts.map +1 -0
  75. package/dist/cli/commands/review/rules/index.js +30 -0
  76. package/dist/cli/commands/review/rules/index.js.map +1 -0
  77. package/dist/cli/commands/review/rules/no-typescript-entry-point.d.ts +14 -0
  78. package/dist/cli/commands/review/rules/no-typescript-entry-point.d.ts.map +1 -0
  79. package/dist/cli/commands/review/rules/no-typescript-entry-point.js +89 -0
  80. package/dist/cli/commands/review/rules/no-typescript-entry-point.js.map +1 -0
  81. package/dist/cli/commands/review/rules/require-explicit-side-effects.d.ts +7 -0
  82. package/dist/cli/commands/review/rules/require-explicit-side-effects.d.ts.map +1 -0
  83. package/dist/cli/commands/review/rules/require-explicit-side-effects.js +37 -0
  84. package/dist/cli/commands/review/rules/require-explicit-side-effects.js.map +1 -0
  85. package/dist/cli/commands/review/rules/require-npmrc.d.ts +7 -0
  86. package/dist/cli/commands/review/rules/require-npmrc.d.ts.map +1 -0
  87. package/dist/cli/commands/review/rules/require-npmrc.js +38 -0
  88. package/dist/cli/commands/review/rules/require-npmrc.js.map +1 -0
  89. package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.d.ts +5 -0
  90. package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.d.ts.map +1 -0
  91. package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.js +33 -0
  92. package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.js.map +1 -0
  93. package/dist/cli/commands/review/rules/require-one-collection-version.d.ts +45 -0
  94. package/dist/cli/commands/review/rules/require-one-collection-version.d.ts.map +1 -0
  95. package/dist/cli/commands/review/rules/require-one-collection-version.js +140 -0
  96. package/dist/cli/commands/review/rules/require-one-collection-version.js.map +1 -0
  97. package/dist/cli/commands/review/rules/require-one-package-version.d.ts +20 -0
  98. package/dist/cli/commands/review/rules/require-one-package-version.d.ts.map +1 -0
  99. package/dist/cli/commands/review/rules/require-one-package-version.js +70 -0
  100. package/dist/cli/commands/review/rules/require-one-package-version.js.map +1 -0
  101. package/dist/cli/commands/review/rules/require-one-uikit-version.d.ts +5 -0
  102. package/dist/cli/commands/review/rules/require-one-uikit-version.d.ts.map +1 -0
  103. package/dist/cli/commands/review/rules/require-one-uikit-version.js +40 -0
  104. package/dist/cli/commands/review/rules/require-one-uikit-version.js.map +1 -0
  105. package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.d.ts +19 -0
  106. package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.d.ts.map +1 -0
  107. package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.js +103 -0
  108. package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.js.map +1 -0
  109. package/dist/cli/commands/review/rules/require-servicetitan-scope.d.ts +7 -0
  110. package/dist/cli/commands/review/rules/require-servicetitan-scope.d.ts.map +1 -0
  111. package/dist/cli/commands/review/rules/require-servicetitan-scope.js +37 -0
  112. package/dist/cli/commands/review/rules/require-servicetitan-scope.js.map +1 -0
  113. package/dist/cli/commands/review/types.d.ts +72 -0
  114. package/dist/cli/commands/review/types.d.ts.map +1 -0
  115. package/dist/cli/commands/review/types.js +36 -0
  116. package/dist/cli/commands/review/types.js.map +1 -0
  117. package/dist/cli/commands/review/utils/apply-filter.d.ts +3 -0
  118. package/dist/cli/commands/review/utils/apply-filter.d.ts.map +1 -0
  119. package/dist/cli/commands/review/utils/apply-filter.js +20 -0
  120. package/dist/cli/commands/review/utils/apply-filter.js.map +1 -0
  121. package/dist/cli/commands/review/utils/collate-dependencies.d.ts +29 -0
  122. package/dist/cli/commands/review/utils/collate-dependencies.d.ts.map +1 -0
  123. package/dist/cli/commands/review/utils/collate-dependencies.js +31 -0
  124. package/dist/cli/commands/review/utils/collate-dependencies.js.map +1 -0
  125. package/dist/cli/commands/review/utils/compare-version.d.ts +9 -0
  126. package/dist/cli/commands/review/utils/compare-version.d.ts.map +1 -0
  127. package/dist/cli/commands/review/utils/compare-version.js +137 -0
  128. package/dist/cli/commands/review/utils/compare-version.js.map +1 -0
  129. package/dist/cli/commands/review/utils/format-depends-on.d.ts +2 -0
  130. package/dist/cli/commands/review/utils/format-depends-on.d.ts.map +1 -0
  131. package/dist/cli/commands/review/utils/format-depends-on.js +21 -0
  132. package/dist/cli/commands/review/utils/format-depends-on.js.map +1 -0
  133. package/dist/cli/commands/review/utils/format-location.d.ts +2 -0
  134. package/dist/cli/commands/review/utils/format-location.d.ts.map +1 -0
  135. package/dist/cli/commands/review/utils/format-location.js +25 -0
  136. package/dist/cli/commands/review/utils/format-location.js.map +1 -0
  137. package/dist/cli/commands/review/utils/get-key.d.ts +3 -0
  138. package/dist/cli/commands/review/utils/get-key.d.ts.map +1 -0
  139. package/dist/cli/commands/review/utils/get-key.js +20 -0
  140. package/dist/cli/commands/review/utils/get-key.js.map +1 -0
  141. package/dist/cli/commands/review/utils/get-max-version.d.ts +2 -0
  142. package/dist/cli/commands/review/utils/get-max-version.d.ts.map +1 -0
  143. package/dist/cli/commands/review/utils/get-max-version.js +16 -0
  144. package/dist/cli/commands/review/utils/get-max-version.js.map +1 -0
  145. package/dist/cli/commands/review/utils/indent.d.ts +2 -0
  146. package/dist/cli/commands/review/utils/indent.d.ts.map +1 -0
  147. package/dist/cli/commands/review/utils/indent.js +17 -0
  148. package/dist/cli/commands/review/utils/indent.js.map +1 -0
  149. package/dist/cli/commands/review/utils/index.d.ts +14 -0
  150. package/dist/cli/commands/review/utils/index.d.ts.map +1 -0
  151. package/dist/cli/commands/review/utils/index.js +32 -0
  152. package/dist/cli/commands/review/utils/index.js.map +1 -0
  153. package/dist/cli/commands/review/utils/is-library.d.ts +3 -0
  154. package/dist/cli/commands/review/utils/is-library.d.ts.map +1 -0
  155. package/dist/cli/commands/review/utils/is-library.js +15 -0
  156. package/dist/cli/commands/review/utils/is-library.js.map +1 -0
  157. package/dist/cli/commands/review/utils/name-to-location.d.ts +3 -0
  158. package/dist/cli/commands/review/utils/name-to-location.d.ts.map +1 -0
  159. package/dist/cli/commands/review/utils/name-to-location.js +18 -0
  160. package/dist/cli/commands/review/utils/name-to-location.js.map +1 -0
  161. package/dist/cli/commands/review/utils/pluralize.d.ts +2 -0
  162. package/dist/cli/commands/review/utils/pluralize.d.ts.map +1 -0
  163. package/dist/cli/commands/review/utils/pluralize.js +15 -0
  164. package/dist/cli/commands/review/utils/pluralize.js.map +1 -0
  165. package/dist/cli/commands/review/utils/set-version.d.ts +10 -0
  166. package/dist/cli/commands/review/utils/set-version.d.ts.map +1 -0
  167. package/dist/cli/commands/review/utils/set-version.js +33 -0
  168. package/dist/cli/commands/review/utils/set-version.js.map +1 -0
  169. package/dist/cli/commands/review/utils/summarize.d.ts +11 -0
  170. package/dist/cli/commands/review/utils/summarize.d.ts.map +1 -0
  171. package/dist/cli/commands/review/utils/summarize.js +30 -0
  172. package/dist/cli/commands/review/utils/summarize.js.map +1 -0
  173. package/dist/cli/commands/run-task.js +50 -31
  174. package/dist/cli/commands/run-task.js.map +1 -1
  175. package/dist/cli/commands/run-task.test.d.ts +2 -0
  176. package/dist/cli/commands/run-task.test.d.ts.map +1 -0
  177. package/dist/cli/commands/start.d.ts +11 -3
  178. package/dist/cli/commands/start.d.ts.map +1 -1
  179. package/dist/cli/commands/start.js +166 -69
  180. package/dist/cli/commands/start.js.map +1 -1
  181. package/dist/cli/commands/styles-check.js +73 -59
  182. package/dist/cli/commands/styles-check.js.map +1 -1
  183. package/dist/cli/commands/tests.d.ts +1 -0
  184. package/dist/cli/commands/tests.d.ts.map +1 -1
  185. package/dist/cli/commands/tests.js +45 -28
  186. package/dist/cli/commands/tests.js.map +1 -1
  187. package/dist/cli/commands/types.d.ts +1 -0
  188. package/dist/cli/commands/types.d.ts.map +1 -1
  189. package/dist/cli/commands/types.js +4 -1
  190. package/dist/cli/commands/types.js.map +1 -1
  191. package/dist/cli/index.js +43 -34
  192. package/dist/cli/index.js.map +1 -1
  193. package/dist/cli/tasks/cli-task.d.ts +0 -1
  194. package/dist/cli/tasks/cli-task.d.ts.map +1 -1
  195. package/dist/cli/tasks/cli-task.js +52 -41
  196. package/dist/cli/tasks/cli-task.js.map +1 -1
  197. package/dist/cli/tasks/swc-compile-package.d.ts +0 -1
  198. package/dist/cli/tasks/swc-compile-package.d.ts.map +1 -1
  199. package/dist/cli/tasks/swc-compile-package.js +75 -34
  200. package/dist/cli/tasks/swc-compile-package.js.map +1 -1
  201. package/dist/cli/tasks/task.d.ts +0 -2
  202. package/dist/cli/tasks/task.d.ts.map +1 -1
  203. package/dist/cli/tasks/task.js +60 -65
  204. package/dist/cli/tasks/task.js.map +1 -1
  205. package/dist/cli/tasks/tsc-compile-package.d.ts +0 -1
  206. package/dist/cli/tasks/tsc-compile-package.d.ts.map +1 -1
  207. package/dist/cli/tasks/tsc-compile-package.js +26 -22
  208. package/dist/cli/tasks/tsc-compile-package.js.map +1 -1
  209. package/dist/cli/tasks/tsc-compile.d.ts +0 -2
  210. package/dist/cli/tasks/tsc-compile.d.ts.map +1 -1
  211. package/dist/cli/tasks/tsc-compile.js +51 -31
  212. package/dist/cli/tasks/tsc-compile.js.map +1 -1
  213. package/dist/cli/utils/bundle.d.ts +0 -2
  214. package/dist/cli/utils/bundle.d.ts.map +1 -1
  215. package/dist/cli/utils/bundle.js +118 -70
  216. package/dist/cli/utils/bundle.js.map +1 -1
  217. package/dist/cli/utils/check-args.d.ts +6 -0
  218. package/dist/cli/utils/check-args.d.ts.map +1 -0
  219. package/dist/cli/utils/check-args.js +20 -0
  220. package/dist/cli/utils/check-args.js.map +1 -0
  221. package/dist/cli/utils/cli-git.js +23 -9
  222. package/dist/cli/utils/cli-git.js.map +1 -1
  223. package/dist/cli/utils/cli-npm.js +62 -23
  224. package/dist/cli/utils/cli-npm.js.map +1 -1
  225. package/dist/cli/utils/cli-os.js +34 -33
  226. package/dist/cli/utils/cli-os.js.map +1 -1
  227. package/dist/cli/utils/compile-less.d.ts.map +1 -1
  228. package/dist/cli/utils/compile-less.js +27 -11
  229. package/dist/cli/utils/compile-less.js.map +1 -1
  230. package/dist/cli/utils/compile-sass.d.ts.map +1 -1
  231. package/dist/cli/utils/compile-sass.js +25 -9
  232. package/dist/cli/utils/compile-sass.js.map +1 -1
  233. package/dist/cli/utils/compile.d.ts +6 -0
  234. package/dist/cli/utils/compile.d.ts.map +1 -0
  235. package/dist/cli/utils/compile.js +33 -0
  236. package/dist/cli/utils/compile.js.map +1 -0
  237. package/dist/cli/utils/copy-files.d.ts +8 -0
  238. package/dist/cli/utils/copy-files.d.ts.map +1 -0
  239. package/dist/cli/utils/copy-files.js +112 -0
  240. package/dist/cli/utils/copy-files.js.map +1 -0
  241. package/dist/cli/utils/eslint.d.ts.map +1 -1
  242. package/dist/cli/utils/eslint.js +22 -12
  243. package/dist/cli/utils/eslint.js.map +1 -1
  244. package/dist/cli/utils/get-module-type.d.ts.map +1 -1
  245. package/dist/cli/utils/get-module-type.js +21 -13
  246. package/dist/cli/utils/get-module-type.js.map +1 -1
  247. package/dist/cli/utils/index.d.ts +7 -5
  248. package/dist/cli/utils/index.d.ts.map +1 -1
  249. package/dist/cli/utils/index.js +33 -30
  250. package/dist/cli/utils/index.js.map +1 -1
  251. package/dist/cli/utils/is-module-installed.js +11 -4
  252. package/dist/cli/utils/is-module-installed.js.map +1 -1
  253. package/dist/cli/utils/lerna-exec.d.ts +4 -3
  254. package/dist/cli/utils/lerna-exec.d.ts.map +1 -1
  255. package/dist/cli/utils/lerna-exec.js +40 -19
  256. package/dist/cli/utils/lerna-exec.js.map +1 -1
  257. package/dist/cli/utils/maybe-create-git-folder.js +20 -18
  258. package/dist/cli/utils/maybe-create-git-folder.js.map +1 -1
  259. package/dist/cli/utils/pipe-stdout.d.ts +3 -0
  260. package/dist/cli/utils/pipe-stdout.d.ts.map +1 -0
  261. package/dist/cli/utils/pipe-stdout.js +19 -0
  262. package/dist/cli/utils/pipe-stdout.js.map +1 -0
  263. package/dist/cli/utils/process-tree.d.ts +14 -0
  264. package/dist/cli/utils/process-tree.d.ts.map +1 -0
  265. package/dist/cli/utils/process-tree.js +78 -0
  266. package/dist/cli/utils/process-tree.js.map +1 -0
  267. package/dist/cli/utils/publish.js +12 -6
  268. package/dist/cli/utils/publish.js.map +1 -1
  269. package/dist/cli/utils/set-node-options.d.ts +2 -1
  270. package/dist/cli/utils/set-node-options.d.ts.map +1 -1
  271. package/dist/cli/utils/set-node-options.js +39 -30
  272. package/dist/cli/utils/set-node-options.js.map +1 -1
  273. package/dist/cli/utils/style-extensions.d.ts +2 -0
  274. package/dist/cli/utils/style-extensions.d.ts.map +1 -0
  275. package/dist/cli/utils/style-extensions.js +17 -0
  276. package/dist/cli/utils/style-extensions.js.map +1 -0
  277. package/dist/cli/utils/tcm.d.ts +5 -2
  278. package/dist/cli/utils/tcm.d.ts.map +1 -1
  279. package/dist/cli/utils/tcm.js +51 -46
  280. package/dist/cli/utils/tcm.js.map +1 -1
  281. package/dist/cli/utils/type-check.d.ts +7 -0
  282. package/dist/cli/utils/type-check.d.ts.map +1 -0
  283. package/dist/cli/utils/type-check.js +33 -0
  284. package/dist/cli/utils/type-check.js.map +1 -0
  285. package/dist/cli/utils/watch-stdout.d.ts +3 -0
  286. package/dist/cli/utils/watch-stdout.d.ts.map +1 -0
  287. package/dist/cli/utils/watch-stdout.js +26 -0
  288. package/dist/cli/utils/watch-stdout.js.map +1 -0
  289. package/dist/index.js +20 -18
  290. package/dist/index.js.map +1 -1
  291. package/dist/jest/index.js +12 -4
  292. package/dist/jest/index.js.map +1 -1
  293. package/dist/utils/debug.js +23 -11
  294. package/dist/utils/debug.js.map +1 -1
  295. package/dist/utils/find-packages.d.ts.map +1 -1
  296. package/dist/utils/find-packages.js +46 -34
  297. package/dist/utils/find-packages.js.map +1 -1
  298. package/dist/utils/format-duration.d.ts +2 -0
  299. package/dist/utils/format-duration.d.ts.map +1 -0
  300. package/dist/utils/format-duration.js +24 -0
  301. package/dist/utils/format-duration.js.map +1 -0
  302. package/dist/utils/get-branch-configs.js +24 -8
  303. package/dist/utils/get-branch-configs.js.map +1 -1
  304. package/dist/utils/get-configuration.d.ts +10 -2
  305. package/dist/utils/get-configuration.d.ts.map +1 -1
  306. package/dist/utils/get-configuration.js +120 -52
  307. package/dist/utils/get-configuration.js.map +1 -1
  308. package/dist/utils/get-destination-folders.js +25 -18
  309. package/dist/utils/get-destination-folders.js.map +1 -1
  310. package/dist/utils/get-folders.d.ts +2 -2
  311. package/dist/utils/get-folders.d.ts.map +1 -1
  312. package/dist/utils/get-folders.js +20 -13
  313. package/dist/utils/get-folders.js.map +1 -1
  314. package/dist/utils/get-jest-config.js +65 -38
  315. package/dist/utils/get-jest-config.js.map +1 -1
  316. package/dist/utils/get-package-data.js +26 -12
  317. package/dist/utils/get-package-data.js.map +1 -1
  318. package/dist/utils/get-package-name.js +18 -8
  319. package/dist/utils/get-package-name.js.map +1 -1
  320. package/dist/utils/get-packages.d.ts +1 -1
  321. package/dist/utils/get-packages.d.ts.map +1 -1
  322. package/dist/utils/get-packages.js +72 -57
  323. package/dist/utils/get-packages.js.map +1 -1
  324. package/dist/utils/get-startup-version.js +18 -8
  325. package/dist/utils/get-startup-version.js.map +1 -1
  326. package/dist/utils/get-tsconfig.js +19 -12
  327. package/dist/utils/get-tsconfig.js.map +1 -1
  328. package/dist/utils/index.d.ts +3 -0
  329. package/dist/utils/index.d.ts.map +1 -1
  330. package/dist/utils/index.js +34 -29
  331. package/dist/utils/index.js.map +1 -1
  332. package/dist/utils/load-shared-dependencies.js +23 -17
  333. package/dist/utils/load-shared-dependencies.js.map +1 -1
  334. package/dist/utils/log-errors.d.ts +2 -0
  335. package/dist/utils/log-errors.d.ts.map +1 -0
  336. package/dist/utils/log-errors.js +36 -0
  337. package/dist/utils/log-errors.js.map +1 -0
  338. package/dist/utils/log.d.ts +0 -1
  339. package/dist/utils/log.d.ts.map +1 -1
  340. package/dist/utils/log.js +38 -43
  341. package/dist/utils/log.js.map +1 -1
  342. package/dist/utils/pick.js +11 -3
  343. package/dist/utils/pick.js.map +1 -1
  344. package/dist/utils/read-json.js +27 -11
  345. package/dist/utils/read-json.js.map +1 -1
  346. package/dist/utils/to-array.js +13 -3
  347. package/dist/utils/to-array.js.map +1 -1
  348. package/dist/webpack/__mocks__/file-rules.d.ts.map +1 -1
  349. package/dist/webpack/configs/amd-config.js +13 -3
  350. package/dist/webpack/configs/amd-config.js.map +1 -1
  351. package/dist/webpack/configs/cache-config.js +20 -9
  352. package/dist/webpack/configs/cache-config.js.map +1 -1
  353. package/dist/webpack/configs/dev-server-config.d.ts +1 -1
  354. package/dist/webpack/configs/dev-server-config.d.ts.map +1 -1
  355. package/dist/webpack/configs/dev-server-config.js +47 -45
  356. package/dist/webpack/configs/dev-server-config.js.map +1 -1
  357. package/dist/webpack/configs/devtool-config.js +16 -7
  358. package/dist/webpack/configs/devtool-config.js.map +1 -1
  359. package/dist/webpack/configs/entry.config.d.ts.map +1 -1
  360. package/dist/webpack/configs/entry.config.js +28 -7
  361. package/dist/webpack/configs/entry.config.js.map +1 -1
  362. package/dist/webpack/configs/externals-config.js +17 -7
  363. package/dist/webpack/configs/externals-config.js.map +1 -1
  364. package/dist/webpack/configs/index.d.ts +2 -1
  365. package/dist/webpack/configs/index.d.ts.map +1 -1
  366. package/dist/webpack/configs/index.js +30 -28
  367. package/dist/webpack/configs/index.js.map +1 -1
  368. package/dist/webpack/configs/loaders/css-loader.js +22 -14
  369. package/dist/webpack/configs/loaders/css-loader.js.map +1 -1
  370. package/dist/webpack/configs/loaders/index.d.ts +1 -1
  371. package/dist/webpack/configs/loaders/index.d.ts.map +1 -1
  372. package/dist/webpack/configs/loaders/index.js +20 -19
  373. package/dist/webpack/configs/loaders/index.js.map +1 -1
  374. package/dist/webpack/configs/loaders/less-loader.js +18 -3
  375. package/dist/webpack/configs/loaders/less-loader.js.map +1 -1
  376. package/dist/webpack/configs/loaders/style-loader.js +23 -8
  377. package/dist/webpack/configs/loaders/style-loader.js.map +1 -1
  378. package/dist/webpack/configs/loaders/types.js +4 -1
  379. package/dist/webpack/configs/loaders/types.js.map +1 -1
  380. package/dist/webpack/configs/module-config.js +17 -5
  381. package/dist/webpack/configs/module-config.js.map +1 -1
  382. package/dist/webpack/configs/optimization-config.js +54 -28
  383. package/dist/webpack/configs/optimization-config.js.map +1 -1
  384. package/dist/webpack/configs/output-config.js +26 -12
  385. package/dist/webpack/configs/output-config.js.map +1 -1
  386. package/dist/webpack/configs/plugins/assets-manifest-plugin.js +23 -14
  387. package/dist/webpack/configs/plugins/assets-manifest-plugin.js.map +1 -1
  388. package/dist/webpack/configs/plugins/bundle-analyser-plugin.js +19 -9
  389. package/dist/webpack/configs/plugins/bundle-analyser-plugin.js.map +1 -1
  390. package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js +19 -11
  391. package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js.map +1 -1
  392. package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js +17 -7
  393. package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js.map +1 -1
  394. package/dist/webpack/configs/plugins/define-web-component-name-plugin.js +13 -5
  395. package/dist/webpack/configs/plugins/define-web-component-name-plugin.js.map +1 -1
  396. package/dist/webpack/configs/plugins/filter-warnings-plugin.js +11 -3
  397. package/dist/webpack/configs/plugins/filter-warnings-plugin.js.map +1 -1
  398. package/dist/webpack/configs/plugins/html-plugin.js +28 -20
  399. package/dist/webpack/configs/plugins/html-plugin.js.map +1 -1
  400. package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js +24 -13
  401. package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js.map +1 -1
  402. package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js +26 -16
  403. package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js.map +1 -1
  404. package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js +15 -6
  405. package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js.map +1 -1
  406. package/dist/webpack/configs/plugins/ignore-plugin/index.js +18 -16
  407. package/dist/webpack/configs/plugins/ignore-plugin/index.js.map +1 -1
  408. package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js +22 -12
  409. package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js.map +1 -1
  410. package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js +11 -4
  411. package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js.map +1 -1
  412. package/dist/webpack/configs/plugins/index.d.ts +0 -2
  413. package/dist/webpack/configs/plugins/index.d.ts.map +1 -1
  414. package/dist/webpack/configs/plugins/index.js +29 -29
  415. package/dist/webpack/configs/plugins/index.js.map +1 -1
  416. package/dist/webpack/configs/plugins/mini-css-extract-plugin.js +23 -12
  417. package/dist/webpack/configs/plugins/mini-css-extract-plugin.js.map +1 -1
  418. package/dist/webpack/configs/plugins/moment-locales-plugin.js +18 -8
  419. package/dist/webpack/configs/plugins/moment-locales-plugin.js.map +1 -1
  420. package/dist/webpack/configs/plugins/virtual-modules-plugin.js +32 -22
  421. package/dist/webpack/configs/plugins/virtual-modules-plugin.js.map +1 -1
  422. package/dist/webpack/configs/plugins/watch-run-plugin.js +23 -15
  423. package/dist/webpack/configs/plugins/watch-run-plugin.js.map +1 -1
  424. package/dist/webpack/configs/plugins-config.d.ts.map +1 -1
  425. package/dist/webpack/configs/plugins-config.js +27 -21
  426. package/dist/webpack/configs/plugins-config.js.map +1 -1
  427. package/dist/webpack/configs/resolve-config.js +16 -4
  428. package/dist/webpack/configs/resolve-config.js.map +1 -1
  429. package/dist/webpack/configs/rules/css-rules.js +43 -18
  430. package/dist/webpack/configs/rules/css-rules.js.map +1 -1
  431. package/dist/webpack/configs/rules/font-rules.js +13 -5
  432. package/dist/webpack/configs/rules/font-rules.js.map +1 -1
  433. package/dist/webpack/configs/rules/image-rules.js +13 -5
  434. package/dist/webpack/configs/rules/image-rules.js.map +1 -1
  435. package/dist/webpack/configs/rules/index.d.ts +0 -1
  436. package/dist/webpack/configs/rules/index.d.ts.map +1 -1
  437. package/dist/webpack/configs/rules/index.js +24 -23
  438. package/dist/webpack/configs/rules/index.js.map +1 -1
  439. package/dist/webpack/configs/rules/js-rules.d.ts +1 -1
  440. package/dist/webpack/configs/rules/js-rules.d.ts.map +1 -1
  441. package/dist/webpack/configs/rules/js-rules.js +47 -7
  442. package/dist/webpack/configs/rules/js-rules.js.map +1 -1
  443. package/dist/webpack/configs/rules/less-rules.js +25 -9
  444. package/dist/webpack/configs/rules/less-rules.js.map +1 -1
  445. package/dist/webpack/configs/rules/scss-rules.js +25 -9
  446. package/dist/webpack/configs/rules/scss-rules.js.map +1 -1
  447. package/dist/webpack/configs/rules/svg-rules.js +40 -20
  448. package/dist/webpack/configs/rules/svg-rules.js.map +1 -1
  449. package/dist/webpack/configs/rules-config.d.ts.map +1 -1
  450. package/dist/webpack/configs/rules-config.js +34 -19
  451. package/dist/webpack/configs/rules-config.js.map +1 -1
  452. package/dist/webpack/configs/stats-config.js +14 -4
  453. package/dist/webpack/configs/stats-config.js.map +1 -1
  454. package/dist/webpack/configs/types.d.ts +1 -3
  455. package/dist/webpack/configs/types.d.ts.map +1 -1
  456. package/dist/webpack/configs/types.js +4 -1
  457. package/dist/webpack/configs/types.js.map +1 -1
  458. package/dist/webpack/configs/utils/generate-metadata.js +40 -22
  459. package/dist/webpack/configs/utils/generate-metadata.js.map +1 -1
  460. package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js +20 -11
  461. package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js.map +1 -1
  462. package/dist/webpack/configs/utils/get-web-components-version.js +18 -8
  463. package/dist/webpack/configs/utils/get-web-components-version.js.map +1 -1
  464. package/dist/webpack/configs/utils/index.js +18 -16
  465. package/dist/webpack/configs/utils/index.js.map +1 -1
  466. package/dist/webpack/configs/watch-options-config.d.ts +6 -0
  467. package/dist/webpack/configs/watch-options-config.d.ts.map +1 -0
  468. package/dist/webpack/configs/watch-options-config.js +24 -0
  469. package/dist/webpack/configs/watch-options-config.js.map +1 -0
  470. package/dist/webpack/create-webpack-config.d.ts.map +1 -1
  471. package/dist/webpack/create-webpack-config.js +62 -50
  472. package/dist/webpack/create-webpack-config.js.map +1 -1
  473. package/dist/webpack/index.d.ts +1 -1
  474. package/dist/webpack/index.d.ts.map +1 -1
  475. package/dist/webpack/index.js +18 -17
  476. package/dist/webpack/index.js.map +1 -1
  477. package/dist/webpack/loaders/expose-loader/index.js +15 -15
  478. package/dist/webpack/loaders/expose-loader/index.js.map +1 -1
  479. package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js +5 -6
  480. package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js.map +1 -1
  481. package/dist/webpack/loaders/expose-loader/utils/contextify-request.js +20 -13
  482. package/dist/webpack/loaders/expose-loader/utils/contextify-request.js.map +1 -1
  483. package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js +22 -11
  484. package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js.map +1 -1
  485. package/dist/webpack/loaders/expose-loader/utils/index.js +20 -18
  486. package/dist/webpack/loaders/expose-loader/utils/index.js.map +1 -1
  487. package/dist/webpack/loaders/expose-loader/utils/stringify-request.js +20 -12
  488. package/dist/webpack/loaders/expose-loader/utils/stringify-request.js.map +1 -1
  489. package/dist/webpack/types.d.ts +0 -4
  490. package/dist/webpack/types.d.ts.map +1 -1
  491. package/dist/webpack/types.js +4 -1
  492. package/dist/webpack/types.js.map +1 -1
  493. package/dist/webpack/utils/feature-cohort.js +17 -12
  494. package/dist/webpack/utils/feature-cohort.js.map +1 -1
  495. package/dist/webpack/utils/get-caller-filename.js +14 -7
  496. package/dist/webpack/utils/get-caller-filename.js.map +1 -1
  497. package/dist/webpack/utils/{bundle.d.ts → get-module-entry-path.d.ts} +1 -1
  498. package/dist/webpack/utils/get-module-entry-path.d.ts.map +1 -0
  499. package/dist/webpack/utils/get-module-entry-path.js +21 -0
  500. package/dist/webpack/utils/get-module-entry-path.js.map +1 -0
  501. package/dist/webpack/utils/hash-mod.js +16 -11
  502. package/dist/webpack/utils/hash-mod.js.map +1 -1
  503. package/dist/webpack/utils/index.d.ts +1 -1
  504. package/dist/webpack/utils/index.d.ts.map +1 -1
  505. package/dist/webpack/utils/index.js +21 -19
  506. package/dist/webpack/utils/index.js.map +1 -1
  507. package/dist/webpack/utils/split-by-entry.js +17 -7
  508. package/dist/webpack/utils/split-by-entry.js.map +1 -1
  509. package/dist/webpack/utils/testing/compile.js +12 -4
  510. package/dist/webpack/utils/testing/compile.js.map +1 -1
  511. package/dist/webpack/utils/testing/execute.js +26 -13
  512. package/dist/webpack/utils/testing/execute.js.map +1 -1
  513. package/dist/webpack/utils/testing/get-compiler.js +34 -24
  514. package/dist/webpack/utils/testing/get-compiler.js.map +1 -1
  515. package/dist/webpack/utils/testing/get-errors.js +12 -4
  516. package/dist/webpack/utils/testing/get-errors.js.map +1 -1
  517. package/dist/webpack/utils/testing/get-module-source.js +18 -5
  518. package/dist/webpack/utils/testing/get-module-source.js.map +1 -1
  519. package/dist/webpack/utils/testing/get-warnings.js +12 -4
  520. package/dist/webpack/utils/testing/get-warnings.js.map +1 -1
  521. package/dist/webpack/utils/testing/index.js +28 -20
  522. package/dist/webpack/utils/testing/index.js.map +1 -1
  523. package/dist/webpack/utils/testing/normalize-errors.js +11 -3
  524. package/dist/webpack/utils/testing/normalize-errors.js.map +1 -1
  525. package/dist/webpack/utils/testing/read-asset.js +20 -11
  526. package/dist/webpack/utils/testing/read-asset.js.map +1 -1
  527. package/dist/webpack/utils/testing/read-assets.js +13 -5
  528. package/dist/webpack/utils/testing/read-assets.js.map +1 -1
  529. package/package.json +20 -20
  530. package/src/cli/commands/__tests__/build.test.ts +69 -44
  531. package/src/cli/commands/__tests__/clean.test.ts +32 -0
  532. package/src/cli/commands/__tests__/install.test.ts +50 -8
  533. package/src/cli/commands/__tests__/kendo-ui-license.test.ts +5 -5
  534. package/src/cli/commands/__tests__/lint.test.ts +4 -0
  535. package/src/cli/commands/__tests__/mfe-package-publish.test.ts +21 -2
  536. package/src/cli/commands/__tests__/mfe-publish.test.ts +19 -23
  537. package/src/cli/commands/__tests__/prepare-package.test.ts +17 -36
  538. package/src/cli/commands/__tests__/start.test.ts +81 -44
  539. package/src/cli/commands/__tests__/tests.test.ts +4 -0
  540. package/src/cli/commands/build.ts +73 -35
  541. package/src/cli/commands/bundle-package.ts +0 -4
  542. package/src/cli/commands/clean.ts +24 -0
  543. package/src/cli/commands/eslint.ts +1 -1
  544. package/src/cli/commands/get-command.ts +25 -35
  545. package/src/cli/commands/index.ts +1 -1
  546. package/src/cli/commands/install.ts +29 -8
  547. package/src/cli/commands/lint.ts +22 -17
  548. package/src/cli/commands/mfe-package-publish.ts +22 -5
  549. package/src/cli/commands/mfe-publish.ts +5 -18
  550. package/src/cli/commands/prepare-package.ts +8 -12
  551. package/src/cli/commands/review/__mocks__/expect-calls.ts +48 -0
  552. package/src/cli/commands/review/__mocks__/index.ts +1 -0
  553. package/src/cli/commands/review/__tests__/review.test.ts +483 -0
  554. package/src/cli/commands/review/index.ts +3 -0
  555. package/src/cli/commands/review/review.ts +247 -0
  556. package/src/cli/commands/review/rules/__mocks__/index.ts +3 -0
  557. package/src/cli/commands/review/rules/__mocks__/mock-config.ts +14 -0
  558. package/src/cli/commands/review/rules/__mocks__/mock-packages.ts +41 -0
  559. package/src/cli/commands/review/rules/__mocks__/mock-project.ts +11 -0
  560. package/src/cli/commands/review/rules/__tests__/no-typescript-entry-point.test.ts +166 -0
  561. package/src/cli/commands/review/rules/__tests__/require-explicit-side-effects.test.ts +113 -0
  562. package/src/cli/commands/review/rules/__tests__/require-npmrc.test.ts +71 -0
  563. package/src/cli/commands/review/rules/__tests__/require-one-anvil-uikit-contrib-version.test.ts +33 -0
  564. package/src/cli/commands/review/rules/__tests__/require-one-collection-version.test.ts +155 -0
  565. package/src/cli/commands/review/rules/__tests__/require-one-package-version.test.ts +135 -0
  566. package/src/cli/commands/review/rules/__tests__/require-one-uikit-version.ts +40 -0
  567. package/src/cli/commands/review/rules/__tests__/require-project-version-in-root-node-modules.test.ts +186 -0
  568. package/src/cli/commands/review/rules/__tests__/require-servicetitan-scope.test.ts +83 -0
  569. package/src/cli/commands/review/rules/index.ts +20 -0
  570. package/src/cli/commands/review/rules/no-typescript-entry-point.ts +78 -0
  571. package/src/cli/commands/review/rules/require-explicit-side-effects.ts +31 -0
  572. package/src/cli/commands/review/rules/require-npmrc.ts +27 -0
  573. package/src/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.ts +20 -0
  574. package/src/cli/commands/review/rules/require-one-collection-version.ts +169 -0
  575. package/src/cli/commands/review/rules/require-one-package-version.ts +76 -0
  576. package/src/cli/commands/review/rules/require-one-uikit-version.ts +27 -0
  577. package/src/cli/commands/review/rules/require-project-version-in-root-node-modules.ts +104 -0
  578. package/src/cli/commands/review/rules/require-servicetitan-scope.ts +27 -0
  579. package/src/cli/commands/review/types.ts +72 -0
  580. package/src/cli/commands/review/utils/__tests__/compare-version.test.ts +73 -0
  581. package/src/cli/commands/review/utils/__tests__/get-max-version.test.ts +17 -0
  582. package/src/cli/commands/review/utils/__tests__/indent.test.ts +41 -0
  583. package/src/cli/commands/review/utils/__tests__/name-to-location.test.ts +39 -0
  584. package/src/cli/commands/review/utils/__tests__/set-version.test.ts +84 -0
  585. package/src/cli/commands/review/utils/apply-filter.ts +14 -0
  586. package/src/cli/commands/review/utils/collate-dependencies.ts +46 -0
  587. package/src/cli/commands/review/utils/compare-version.ts +82 -0
  588. package/src/cli/commands/review/utils/format-depends-on.ts +11 -0
  589. package/src/cli/commands/review/utils/format-location.ts +8 -0
  590. package/src/cli/commands/review/utils/get-key.ts +10 -0
  591. package/src/cli/commands/review/utils/get-max-version.ts +5 -0
  592. package/src/cli/commands/review/utils/indent.ts +8 -0
  593. package/src/cli/commands/review/utils/index.ts +13 -0
  594. package/src/cli/commands/review/utils/is-library.ts +5 -0
  595. package/src/cli/commands/review/utils/name-to-location.ts +7 -0
  596. package/src/cli/commands/review/utils/pluralize.ts +3 -0
  597. package/src/cli/commands/review/utils/set-version.ts +26 -0
  598. package/src/cli/commands/review/utils/summarize.ts +21 -0
  599. package/src/cli/commands/run-task.test.ts +60 -0
  600. package/src/cli/commands/start.ts +130 -55
  601. package/src/cli/commands/tests.ts +2 -0
  602. package/src/cli/commands/types.ts +1 -0
  603. package/src/cli/index.ts +4 -4
  604. package/src/cli/tasks/__tests__/cli-task.test.ts +16 -4
  605. package/src/cli/tasks/__tests__/{swc-compile.test.ts → swc-compile-package.test.ts} +75 -36
  606. package/src/cli/tasks/__tests__/tsc-compile-package.test.ts +1 -0
  607. package/src/cli/tasks/__tests__/tsc-compile.test.ts +12 -23
  608. package/src/cli/tasks/cli-task.ts +12 -18
  609. package/src/cli/tasks/swc-cli.d.ts +12 -1
  610. package/src/cli/tasks/swc-compile-package.ts +71 -45
  611. package/src/cli/tasks/task.ts +2 -11
  612. package/src/cli/tasks/tsc-compile-package.ts +0 -4
  613. package/src/cli/tasks/tsc-compile.ts +14 -17
  614. package/src/cli/types/cpx2.d.ts +8 -1
  615. package/src/cli/utils/__tests__/bundle.test.ts +1 -1
  616. package/src/cli/utils/__tests__/check-args.test.ts +34 -0
  617. package/src/cli/utils/__tests__/compile.test.ts +59 -0
  618. package/src/cli/utils/__tests__/copy-files.test.ts +157 -0
  619. package/src/cli/utils/__tests__/get-module-type.test.ts +19 -0
  620. package/src/cli/utils/__tests__/lerna-exec.test.ts +58 -11
  621. package/src/cli/utils/__tests__/pipe-stdout.test.ts +39 -0
  622. package/src/cli/utils/__tests__/process-tree.test.ts +175 -0
  623. package/src/cli/utils/__tests__/set-node-options.test.ts +51 -6
  624. package/src/cli/utils/__tests__/tcm.test.ts +90 -86
  625. package/src/cli/utils/__tests__/type-check.test.ts +47 -0
  626. package/src/cli/utils/__tests__/watch-stdout.test.ts +68 -0
  627. package/src/cli/utils/bundle.ts +5 -18
  628. package/src/cli/utils/check-args.ts +13 -0
  629. package/src/cli/utils/compile-less.ts +0 -1
  630. package/src/cli/utils/compile-sass.ts +0 -1
  631. package/src/cli/utils/compile.ts +22 -0
  632. package/src/cli/utils/copy-files.ts +76 -0
  633. package/src/cli/utils/eslint.ts +1 -0
  634. package/src/cli/utils/get-module-type.ts +4 -6
  635. package/src/cli/utils/index.ts +7 -6
  636. package/src/cli/utils/lerna-exec.ts +17 -10
  637. package/src/cli/utils/pipe-stdout.ts +10 -0
  638. package/src/cli/utils/process-tree.ts +57 -0
  639. package/src/cli/utils/set-node-options.ts +15 -12
  640. package/src/cli/utils/style-extensions.ts +1 -0
  641. package/src/cli/utils/tcm.ts +22 -32
  642. package/src/cli/utils/type-check.ts +19 -0
  643. package/src/cli/utils/watch-stdout.ts +24 -0
  644. package/src/utils/__tests__/format-duration.test.ts +22 -0
  645. package/src/utils/__tests__/get-configuration.test.ts +44 -2
  646. package/src/utils/__tests__/get-packages.test.ts +58 -49
  647. package/src/utils/__tests__/log-errors.test.ts +102 -0
  648. package/src/utils/__tests__/log.test.ts +1 -86
  649. package/src/utils/find-packages.ts +12 -6
  650. package/src/utils/format-duration.ts +13 -0
  651. package/src/utils/get-configuration.ts +19 -5
  652. package/src/utils/get-folders.ts +3 -1
  653. package/src/utils/get-packages.ts +9 -16
  654. package/src/utils/index.ts +3 -0
  655. package/src/utils/log-errors.ts +29 -0
  656. package/src/utils/log.ts +0 -26
  657. package/src/webpack/__mocks__/file-rules.ts +0 -5
  658. package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +4 -5
  659. package/src/webpack/__tests__/create-webpack-config.test.ts +33 -112
  660. package/src/webpack/configs/dev-server-config.ts +4 -27
  661. package/src/webpack/configs/devtool-config.ts +2 -2
  662. package/src/webpack/configs/entry.config.ts +7 -2
  663. package/src/webpack/configs/index.ts +2 -1
  664. package/src/webpack/configs/loaders/index.ts +1 -1
  665. package/src/webpack/configs/optimization-config.ts +2 -2
  666. package/src/webpack/configs/plugins/index.ts +0 -2
  667. package/src/webpack/configs/plugins/virtual-modules-plugin.ts +3 -3
  668. package/src/webpack/configs/plugins-config.ts +0 -4
  669. package/src/webpack/configs/resolve-config.ts +1 -1
  670. package/src/webpack/configs/rules/index.ts +0 -1
  671. package/src/webpack/configs/rules/js-rules.ts +27 -2
  672. package/src/webpack/configs/rules-config.ts +1 -11
  673. package/src/webpack/configs/types.ts +1 -3
  674. package/src/webpack/configs/watch-options-config.ts +17 -0
  675. package/src/webpack/create-webpack-config.ts +3 -4
  676. package/src/webpack/index.ts +1 -1
  677. package/src/webpack/types.ts +0 -4
  678. package/src/webpack/utils/index.ts +1 -1
  679. package/dist/__mocks__/create-package.js +0 -17
  680. package/dist/__mocks__/create-package.js.map +0 -1
  681. package/dist/__mocks__/index.js +0 -18
  682. package/dist/__mocks__/index.js.map +0 -1
  683. package/dist/cli/utils/assets-copy.d.ts +0 -3
  684. package/dist/cli/utils/assets-copy.d.ts.map +0 -1
  685. package/dist/cli/utils/assets-copy.js +0 -25
  686. package/dist/cli/utils/assets-copy.js.map +0 -1
  687. package/dist/cli/utils/styles-copy.d.ts +0 -3
  688. package/dist/cli/utils/styles-copy.d.ts.map +0 -1
  689. package/dist/cli/utils/styles-copy.js +0 -25
  690. package/dist/cli/utils/styles-copy.js.map +0 -1
  691. package/dist/cli/utils/tsc.d.ts +0 -5
  692. package/dist/cli/utils/tsc.d.ts.map +0 -1
  693. package/dist/cli/utils/tsc.js +0 -37
  694. package/dist/cli/utils/tsc.js.map +0 -1
  695. package/dist/webpack/__mocks__/file-rules.js +0 -79
  696. package/dist/webpack/__mocks__/file-rules.js.map +0 -1
  697. package/dist/webpack/__mocks__/index.js +0 -19
  698. package/dist/webpack/__mocks__/index.js.map +0 -1
  699. package/dist/webpack/__mocks__/style-rules.js +0 -124
  700. package/dist/webpack/__mocks__/style-rules.js.map +0 -1
  701. package/dist/webpack/configs/plugins/provide-react-plugin.d.ts +0 -4
  702. package/dist/webpack/configs/plugins/provide-react-plugin.d.ts.map +0 -1
  703. package/dist/webpack/configs/plugins/provide-react-plugin.js +0 -13
  704. package/dist/webpack/configs/plugins/provide-react-plugin.js.map +0 -1
  705. package/dist/webpack/configs/plugins/ts-checker-plugin.d.ts +0 -4
  706. package/dist/webpack/configs/plugins/ts-checker-plugin.d.ts.map +0 -1
  707. package/dist/webpack/configs/plugins/ts-checker-plugin.js +0 -30
  708. package/dist/webpack/configs/plugins/ts-checker-plugin.js.map +0 -1
  709. package/dist/webpack/configs/rules/tsx-rules.d.ts +0 -4
  710. package/dist/webpack/configs/rules/tsx-rules.d.ts.map +0 -1
  711. package/dist/webpack/configs/rules/tsx-rules.js +0 -44
  712. package/dist/webpack/configs/rules/tsx-rules.js.map +0 -1
  713. package/dist/webpack/utils/bundle.d.ts.map +0 -1
  714. package/dist/webpack/utils/bundle.js +0 -19
  715. package/dist/webpack/utils/bundle.js.map +0 -1
  716. package/src/cli/utils/__tests__/assets-copy.test.ts +0 -52
  717. package/src/cli/utils/__tests__/styles-copy.test.ts +0 -52
  718. package/src/cli/utils/__tests__/tsc.test.ts +0 -63
  719. package/src/cli/utils/assets-copy.ts +0 -23
  720. package/src/cli/utils/styles-copy.ts +0 -23
  721. package/src/cli/utils/tsc.ts +0 -38
  722. package/src/webpack/configs/plugins/provide-react-plugin.ts +0 -12
  723. package/src/webpack/configs/plugins/ts-checker-plugin.ts +0 -33
  724. package/src/webpack/configs/rules/tsx-rules.ts +0 -48
  725. /package/src/webpack/utils/{bundle.ts → get-module-entry-path.ts} +0 -0
@@ -1,12 +1,6 @@
1
1
  import path from 'path';
2
2
  import { fs, vol } from 'memfs';
3
- import {
4
- Package,
5
- PackageType,
6
- getPackages,
7
- getPackagesGraph,
8
- splitPackagesByType,
9
- } from '../get-packages';
3
+ import { PackageType, getPackages, getPackagesGraph } from '../get-packages';
10
4
 
11
5
  jest.mock('fs', () => fs);
12
6
 
@@ -48,6 +42,13 @@ describe('[startup] Utils', () => {
48
42
  cli: { webpack: false },
49
43
  }),
50
44
  },
45
+ qux: {
46
+ 'package.json': JSON.stringify({
47
+ name: 'qux',
48
+ version: '4.0.0',
49
+ cli: { webpack: false },
50
+ }),
51
+ },
51
52
  },
52
53
  });
53
54
  });
@@ -80,9 +81,35 @@ describe('[startup] Utils', () => {
80
81
  location: path.resolve('./examples/baz'),
81
82
  type: PackageType.TSC,
82
83
  },
84
+ {
85
+ name: 'qux',
86
+ version: '4.0.0',
87
+ private: false,
88
+ location: path.resolve('./examples/qux'),
89
+ type: PackageType.TSC,
90
+ },
83
91
  ]);
84
92
  });
85
93
 
94
+ describe('when workspaces excludes package', () => {
95
+ beforeEach(() => {
96
+ const packageJSON = JSON.parse(fs.readFileSync('package.json', 'utf8').toString());
97
+ fs.writeFileSync(
98
+ 'package.json',
99
+ JSON.stringify({
100
+ ...packageJSON,
101
+ workspaces: [...packageJSON.workspaces, '!examples/baz'],
102
+ })
103
+ );
104
+ });
105
+
106
+ test('omits excluded package', () => {
107
+ expect(subject()).toEqual(
108
+ ['foo', 'bar', 'qux'].map(name => expect.objectContaining({ name }))
109
+ );
110
+ });
111
+ });
112
+
86
113
  describe('with "scope"', () => {
87
114
  beforeEach(() => (options = { scope: 'foo' }));
88
115
 
@@ -101,10 +128,9 @@ describe('[startup] Utils', () => {
101
128
  });
102
129
 
103
130
  test('also returns internal dependencies', () => {
104
- expect(subject()).toEqual([
105
- expect.objectContaining({ name: 'foo' }),
106
- expect.objectContaining({ name: 'bar' }),
107
- ]);
131
+ expect(subject()).toEqual(
132
+ ['foo', 'bar'].map(name => expect.objectContaining({ name }))
133
+ );
108
134
  });
109
135
  });
110
136
 
@@ -112,10 +138,9 @@ describe('[startup] Utils', () => {
112
138
  beforeEach(() => (options = { scope: 'ba*' }));
113
139
 
114
140
  test('returns only the specified packages', () => {
115
- expect(subject()).toEqual([
116
- expect.objectContaining({ name: 'bar' }),
117
- expect.objectContaining({ name: 'baz' }),
118
- ]);
141
+ expect(subject()).toEqual(
142
+ ['bar', 'baz'].map(name => expect.objectContaining({ name }))
143
+ );
119
144
  });
120
145
  });
121
146
  });
@@ -138,6 +163,24 @@ describe('[startup] Utils', () => {
138
163
  });
139
164
  });
140
165
 
166
+ describe('with "type"', () => {
167
+ beforeEach(() => (options = { type: PackageType.Webpack }));
168
+
169
+ test('returns only the specified packages', () => {
170
+ expect(subject()).toEqual([expect.objectContaining({ name: 'foo' })]);
171
+ });
172
+
173
+ describe('when "type" is an array', () => {
174
+ beforeEach(() => (options = { type: [PackageType.TSC, PackageType.Webpack] }));
175
+
176
+ test('returns only the specified packages', () => {
177
+ expect(subject()).toEqual(
178
+ ['foo', 'baz', 'qux'].map(name => expect.objectContaining({ name }))
179
+ );
180
+ });
181
+ });
182
+ });
183
+
141
184
  function itReturnsEmptyArray() {
142
185
  test('returns empty array', () => {
143
186
  expect(subject()).toEqual([]);
@@ -216,38 +259,4 @@ describe('[startup] Utils', () => {
216
259
  });
217
260
  });
218
261
  });
219
-
220
- describe(`${splitPackagesByType.name}`, () => {
221
- const packages: Pick<Package, 'name' | 'location' | 'type'>[] = [
222
- { name: 'foo', location: 'packages/foo', type: PackageType.Legacy },
223
- { name: 'bar', location: 'packages/bar', type: PackageType.TSC },
224
- { name: 'baz', location: 'packages/baz', type: PackageType.Webpack },
225
- ];
226
-
227
- const subject = (packages: Package[]) => splitPackagesByType(packages);
228
-
229
- test('groups packages by type', () => {
230
- expect(subject(packages as Package[])).toEqual(
231
- packages.reduce<ReturnType<typeof splitPackagesByType>>(
232
- (result, pkg) => {
233
- result[pkg.type].push(pkg as Package);
234
- return result;
235
- },
236
- {
237
- [PackageType.TSC]: [],
238
- [PackageType.Webpack]: [],
239
- [PackageType.Legacy]: [],
240
- }
241
- )
242
- );
243
- });
244
-
245
- test('grouping always includes all types', () => {
246
- expect(subject([])).toEqual({
247
- [PackageType.TSC]: [],
248
- [PackageType.Webpack]: [],
249
- [PackageType.Legacy]: [],
250
- });
251
- });
252
- });
253
262
  });
@@ -0,0 +1,102 @@
1
+ /* eslint-disable @typescript-eslint/only-throw-error */
2
+ import { log } from '../log';
3
+ import { logErrors } from '../log-errors';
4
+
5
+ describe(`[startup] Utils`, () => {
6
+ describe(`${logErrors.name}`, () => {
7
+ let error: Error | undefined;
8
+
9
+ beforeEach(() => (error = new Error('Oops!')));
10
+
11
+ class SubjectClass {
12
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
+ private _foo: boolean;
14
+
15
+ constructor() {
16
+ this._foo = false;
17
+ }
18
+
19
+ @logErrors
20
+ execute(callback: Function) {
21
+ return callback();
22
+ }
23
+
24
+ @logErrors
25
+ async executeAsync(callback: Function) {
26
+ await callback();
27
+ }
28
+
29
+ @logErrors
30
+ get foo() {
31
+ throw error;
32
+ }
33
+
34
+ set foo(value: boolean) {
35
+ this._foo = value;
36
+ }
37
+ }
38
+
39
+ const instance = new SubjectClass();
40
+
41
+ beforeEach(() => {
42
+ jest.resetAllMocks();
43
+ jest.spyOn(log, 'error').mockImplementation(jest.fn());
44
+ });
45
+
46
+ describe('when decorated function raises no error', () => {
47
+ const subject = () => instance.execute(jest.fn());
48
+
49
+ test('logs nothing', () => {
50
+ subject();
51
+
52
+ expect(log.error).not.toHaveBeenCalled();
53
+ });
54
+ });
55
+
56
+ describe('when decorated function throws error', () => {
57
+ const subject = () =>
58
+ instance.execute(() => {
59
+ throw error;
60
+ });
61
+
62
+ test('logs error', () => {
63
+ expect(subject).toThrow(error);
64
+
65
+ expect(log.error).toHaveBeenCalledWith(String(error));
66
+ });
67
+ });
68
+
69
+ describe('when decorated asynchronous function rejects', () => {
70
+ const subject = async () =>
71
+ instance.executeAsync(() => {
72
+ throw error;
73
+ });
74
+
75
+ test('logs error', async () => {
76
+ await expect(subject).rejects.toThrow(error);
77
+
78
+ expect(log.error).toHaveBeenCalledWith(String(error));
79
+ });
80
+
81
+ describe('when function rejects with undefined', () => {
82
+ beforeEach(() => (error = undefined));
83
+
84
+ test('does not log error', async () => {
85
+ await expect(subject).rejects.toBe(undefined);
86
+
87
+ expect(log.error).not.toHaveBeenCalled();
88
+ });
89
+ });
90
+ });
91
+
92
+ describe('when decorated accessor throws error', () => {
93
+ const subject = () => instance.foo;
94
+
95
+ test('logs nothing', () => {
96
+ expect(subject).toThrow(error);
97
+
98
+ expect(log.error).not.toHaveBeenCalled();
99
+ });
100
+ });
101
+ });
102
+ });
@@ -1,5 +1,5 @@
1
1
  import chalk from 'chalk';
2
- import { log, logErrors } from '../log';
2
+ import { log } from '../log';
3
3
  import { createDebug } from '../debug';
4
4
 
5
5
  jest.mock('../debug');
@@ -83,89 +83,4 @@ describe(`[startup] Utils`, () => {
83
83
  });
84
84
  });
85
85
  });
86
-
87
- describe(`${logErrors.name}`, () => {
88
- const error = new Error('Oops!');
89
-
90
- class SubjectClass {
91
- // eslint-disable-next-line @typescript-eslint/naming-convention
92
- private _foo: boolean;
93
-
94
- constructor() {
95
- this._foo = false;
96
- }
97
-
98
- @logErrors
99
- execute(callback: Function) {
100
- return callback();
101
- }
102
-
103
- @logErrors
104
- async executeAsync(callback: Function) {
105
- await callback();
106
- }
107
-
108
- @logErrors
109
- get foo() {
110
- throw error;
111
- }
112
-
113
- set foo(value: boolean) {
114
- this._foo = value;
115
- }
116
- }
117
-
118
- const instance = new SubjectClass();
119
-
120
- beforeEach(() => {
121
- jest.resetAllMocks();
122
- jest.spyOn(log, 'error').mockImplementation(jest.fn());
123
- });
124
-
125
- describe('when decorated function raises no error', () => {
126
- const subject = () => instance.execute(jest.fn());
127
-
128
- test('logs nothing', () => {
129
- subject();
130
-
131
- expect(log.error).not.toHaveBeenCalled();
132
- });
133
- });
134
-
135
- describe('when decorated function throws error', () => {
136
- const subject = () =>
137
- instance.execute(() => {
138
- throw error;
139
- });
140
-
141
- test('logs error', () => {
142
- expect(subject).toThrow(error);
143
-
144
- expect(log.error).toHaveBeenCalledWith(String(error));
145
- });
146
- });
147
-
148
- describe('when decorated asynchronous function throws error', () => {
149
- const subject = async () =>
150
- instance.executeAsync(() => {
151
- throw error;
152
- });
153
-
154
- test('logs error', async () => {
155
- await expect(subject).rejects.toThrow(error);
156
-
157
- expect(log.error).toHaveBeenCalledWith(String(error));
158
- });
159
- });
160
-
161
- describe('when decorated accessor throws error', () => {
162
- const subject = () => instance.foo;
163
-
164
- test('logs nothing', () => {
165
- expect(subject).toThrow(error);
166
-
167
- expect(log.error).not.toHaveBeenCalled();
168
- });
169
- });
170
- });
171
86
  });
@@ -1,4 +1,5 @@
1
1
  import { globSync } from 'glob';
2
+ import multimatch from 'multimatch';
2
3
  import path from 'path';
3
4
  import { readJsonSafe } from './read-json';
4
5
  import { log } from './log';
@@ -14,8 +15,10 @@ export function findPackages(): ProjectPackage[] {
14
15
  return [];
15
16
  }
16
17
 
17
- const result = workspaces
18
- .flatMap(pattern => globSync(pattern))
18
+ const result = multimatch(
19
+ workspaces.flatMap(pattern => globSync(pattern)),
20
+ workspaces
21
+ )
19
22
  .map(location => {
20
23
  const dir = path.resolve(location);
21
24
  const file = path.join(dir, 'package.json');
@@ -25,7 +28,7 @@ export function findPackages(): ProjectPackage[] {
25
28
 
26
29
  /* istanbul ignore next: debug only */
27
30
  log.debug(
28
- `find-packages`,
31
+ 'find-packages',
29
32
  () => `found packages: ${JSON.stringify(result.map(({ name }) => name))}`
30
33
  );
31
34
 
@@ -47,10 +50,13 @@ function findWorkspaces() {
47
50
  }
48
51
 
49
52
  if (workspaces) {
50
- workspaces = workspaces.map(
53
+ workspaces = workspaces.map(workspace => {
54
+ const result = workspace.startsWith('!')
55
+ ? `!${path.join(directory, workspace.slice(1))}`
56
+ : path.join(directory, workspace);
51
57
  // Note, glob requires "/" as path separator, even on Windows
52
- workspace => path.join(directory, workspace).replace(/\\/g, '/')
53
- );
58
+ return result.replace(/\\/g, '/');
59
+ });
54
60
  /* istanbul ignore next: debug only */
55
61
  log.debug('find-packages', () => `found workspaces: ${JSON.stringify(workspaces)}`);
56
62
  return workspaces;
@@ -0,0 +1,13 @@
1
+ const SECOND = 1000;
2
+ const MINUTE = 60 * SECOND;
3
+
4
+ export function formatDuration(duration: number) {
5
+ if (duration < SECOND) {
6
+ return `${duration.toFixed(0)}ms`;
7
+ } else if (duration < MINUTE) {
8
+ return `${(duration / SECOND).toFixed(2)}s`;
9
+ }
10
+ const minutes = Math.floor(duration / MINUTE);
11
+ const seconds = Math.round((duration - minutes * MINUTE) / SECOND);
12
+ return `${minutes}m ${seconds}s`;
13
+ }
@@ -1,12 +1,14 @@
1
+ import { Config } from '@jest/types';
2
+ import { swcDir } from '@swc/cli';
3
+ import { ESLint } from 'eslint';
1
4
  import fs from 'fs';
2
5
  import path from 'path';
3
-
4
- import { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';
5
- import { ESLint } from 'eslint';
6
6
  import { LinterOptions } from 'stylelint';
7
- import { Config } from '@jest/types';
8
- import { readJson, readJsonSafe } from './read-json';
7
+ import { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';
8
+
9
+ import { ReviewConfiguration } from '../cli/commands/review';
9
10
  import { log } from './log';
11
+ import { readJson, readJsonSafe } from './read-json';
10
12
 
11
13
  export const allowedWebpackDevServerOptions = ['headers', 'port', 'proxy', 'static'] as const;
12
14
 
@@ -58,6 +60,7 @@ export interface NodeConfiguration {
58
60
  export enum CommandName {
59
61
  'build' = 'build',
60
62
  'bundle-package' = 'bundle-package',
63
+ 'clean' = 'clean',
61
64
  'convert-eslint-config' = 'convert-eslint-config',
62
65
  'eslint' = 'eslint',
63
66
  'init' = 'init',
@@ -68,6 +71,7 @@ export enum CommandName {
68
71
  'mfe-package-publish' = 'mfe-package-publish',
69
72
  'mfe-publish' = 'mfe-publish',
70
73
  'prepare-package' = 'prepare-package',
74
+ 'review' = 'review',
71
75
  'start' = 'start',
72
76
  'styles-check' = 'styles-check',
73
77
  'test' = 'test',
@@ -91,6 +95,8 @@ interface WebComponentOptions {
91
95
  type Configuration = {
92
96
  'legacy'?: boolean;
93
97
  'lint'?: { eslint: ESLintConfiguration; stylelint: StylelintConfiguration };
98
+ 'review'?: ReviewConfiguration;
99
+ 'swc-compile-package'?: Parameters<typeof swcDir>[0];
94
100
  'test'?: JestConfiguration;
95
101
  'web-component'?: boolean | string | WebComponentOptions;
96
102
  'webpack'?: false | WebpackConfiguration;
@@ -124,6 +130,10 @@ export function getJestConfiguration() {
124
130
  return getConfiguration().test ?? {};
125
131
  }
126
132
 
133
+ export function getReviewConfiguration() {
134
+ return getConfiguration().review ?? {};
135
+ }
136
+
127
137
  export function getStylelintConfiguration() {
128
138
  return getConfiguration().lint?.stylelint ?? {};
129
139
  }
@@ -165,6 +175,10 @@ export function getWebComponentBranchConfigs(locationOrJson: LocationOrJson = '.
165
175
  return config?.branches;
166
176
  }
167
177
 
178
+ export function getSwcCompilePackageConfiguration() {
179
+ return getConfiguration()['swc-compile-package'] ?? {};
180
+ }
181
+
168
182
  export function isBundle(locationOrJson?: LocationOrJson) {
169
183
  return getConfiguration(locationOrJson).webpack !== false;
170
184
  }
@@ -7,7 +7,9 @@ import { readJson } from './read-json';
7
7
  */
8
8
  export function getFolders(location = './') {
9
9
  const { rootDir, outDir } =
10
- readJson(path.join(location, 'tsconfig.json')).compilerOptions ?? {};
10
+ readJson<{ compilerOptions: { rootDir?: string; outDir?: string } }>(
11
+ path.join(location, 'tsconfig.json')
12
+ ).compilerOptions ?? {};
11
13
 
12
14
  if (!rootDir) {
13
15
  throw new Error('"compilerOptions.rootDir" must be defined in the "tsconfig.json"!');
@@ -20,14 +20,16 @@ export interface Package {
20
20
  interface GetPackagesOptions {
21
21
  scope?: string | string[];
22
22
  ignore?: string | string[];
23
+ type?: PackageType | PackageType[];
23
24
  }
24
25
 
25
26
  export function getPackages(options: GetPackagesOptions = {}) {
26
27
  const scope = toArray(options.scope);
27
28
  const ignore = toArray(options.ignore);
29
+ const type = toArray(options.type);
28
30
 
29
31
  const allPackages = findPackages();
30
- if (scope.length === 0 && ignore.length === 0) {
32
+ if (scope.length === 0 && ignore.length === 0 && type.length === 0) {
31
33
  return withMetadata(allPackages);
32
34
  }
33
35
 
@@ -59,7 +61,12 @@ export function getPackages(options: GetPackagesOptions = {}) {
59
61
  }
60
62
  }
61
63
 
62
- return withMetadata(allPackages.filter(({ name }) => used[name]));
64
+ let result = withMetadata(allPackages.filter(({ name }) => used[name]));
65
+ if (type.length > 0) {
66
+ result = result.filter(pkg => type.includes(pkg.type));
67
+ }
68
+
69
+ return result;
63
70
  }
64
71
 
65
72
  /**
@@ -129,20 +136,6 @@ function getPackageType(packageJson: ProjectPackage) {
129
136
  return PackageType.TSC;
130
137
  }
131
138
 
132
- export function splitPackagesByType(packages: Package[]) {
133
- const result: Record<PackageType, Package[]> = {
134
- [PackageType.TSC]: [],
135
- [PackageType.Webpack]: [],
136
- [PackageType.Legacy]: [],
137
- };
138
-
139
- for (const pkg of packages) {
140
- result[pkg.type].push(pkg);
141
- }
142
-
143
- return result;
144
- }
145
-
146
139
  function negate(patterns: string[]) {
147
140
  return patterns.map(pattern => `!${pattern}`);
148
141
  }
@@ -1,3 +1,5 @@
1
+ export * from './find-packages';
2
+ export * from './format-duration';
1
3
  export * from './get-configuration';
2
4
  export * from './get-destination-folders';
3
5
  export * from './get-folders';
@@ -9,6 +11,7 @@ export * from './get-startup-version';
9
11
  export * from './get-tsconfig';
10
12
  export * from './load-shared-dependencies';
11
13
  export * from './log';
14
+ export * from './log-errors';
12
15
  export * from './pick';
13
16
  export * from './read-json';
14
17
  export * from './to-array';
@@ -0,0 +1,29 @@
1
+ import { log } from './log';
2
+
3
+ export function logErrors(_0: any, _1: string, descriptor: PropertyDescriptor) {
4
+ const origin = descriptor.value;
5
+
6
+ if (typeof origin !== 'function') {
7
+ return;
8
+ }
9
+
10
+ descriptor.value = function (...args: any[]) {
11
+ try {
12
+ const result = origin.apply(this, args);
13
+
14
+ if (result instanceof Promise) {
15
+ return result.catch(e => {
16
+ if (e !== undefined) {
17
+ log.error(String(e));
18
+ }
19
+ throw e;
20
+ });
21
+ }
22
+
23
+ return result;
24
+ } catch (e) {
25
+ log.error(String(e));
26
+ throw e;
27
+ }
28
+ };
29
+ }
package/src/utils/log.ts CHANGED
@@ -45,29 +45,3 @@ class Log {
45
45
  }
46
46
 
47
47
  export const log = new Log();
48
-
49
- export function logErrors(_0: any, _1: string, descriptor: PropertyDescriptor) {
50
- const origin = descriptor.value;
51
-
52
- if (typeof origin !== 'function') {
53
- return;
54
- }
55
-
56
- descriptor.value = function (...args: any[]) {
57
- try {
58
- const result = origin.apply(this, args);
59
-
60
- if (result instanceof Promise) {
61
- return result.catch(e => {
62
- log.error(String(e));
63
- throw e;
64
- });
65
- }
66
-
67
- return result;
68
- } catch (e) {
69
- log.error(String(e));
70
- throw e;
71
- }
72
- };
73
- }
@@ -70,9 +70,4 @@ export const fileRules: Record<string, RuleSetRule> = {
70
70
  filename: 'images/[contenthash][ext][query]',
71
71
  },
72
72
  },
73
- '.tsx': {
74
- test: /\.tsx?$/,
75
- exclude: /node_modules/,
76
- use: [{ loader: 'ts-loader', options: { transpileOnly: true } }],
77
- },
78
73
  };
@@ -22,7 +22,6 @@ import { featureCohort, getCallerFile, splitByEntry } from '../utils';
22
22
  import { createWebpackConfig } from '../index';
23
23
 
24
24
  jest.mock('fs', () => fs);
25
- jest.mock('fork-ts-checker-webpack-plugin', () => jest.fn());
26
25
  jest.mock('html-webpack-plugin', () => jest.fn());
27
26
  jest.mock('mini-css-extract-plugin', () =>
28
27
  Object.assign(jest.fn(), { loader: 'MiniCssExtractPlugin.loader' })
@@ -57,14 +56,14 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
57
56
  const packageVersion = '1.0.0';
58
57
  const packageJson = 'package.json';
59
58
  const tsConfig = 'tsconfig.build.json';
60
- const designSystemPath = () => path.join(process.cwd(), `${source}/design-system.css`);
59
+ const designSystemPath = () => path.join(process.cwd(), `${destination}/design-system.css`);
61
60
  const designSystemCode = [
62
61
  `@import '~@servicetitan/tokens/core/tokens.css';`,
63
62
  `@import '~@servicetitan/anvil-fonts/dist/css/anvil-fonts.css';`,
64
63
  `@import '~@servicetitan/design-system/dist/system.min.css';`,
65
64
  ].join('\n');
66
65
 
67
- const indexPath = () => path.join(process.cwd(), `${source}/index.ts`);
66
+ const indexPath = () => path.join(process.cwd(), `${destination}/index`);
68
67
  const indexCode = ({
69
68
  embed = false,
70
69
  legacyRoot = false,
@@ -264,7 +263,7 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
264
263
  beforeEach(() => {
265
264
  vol.fromJSON({
266
265
  [packageJson]: JSON.stringify({ name: packageName }),
267
- [`${source}/design-system.css`]: '',
266
+ [`${destination}/design-system.css`]: '',
268
267
  });
269
268
  });
270
269
 
@@ -366,7 +365,7 @@ describe(`[startup] ${createWebpackConfig.name}`, () => {
366
365
  );
367
366
 
368
367
  test('configures "devtool"', () => {
369
- expect(subject().devtool).toBe(false);
368
+ expect(subject().devtool).toBe('source-map');
370
369
  });
371
370
 
372
371
  test('configures "optimization.splitChunks.cacheGroups"', () => {