@nx/js 23.0.0-beta.2 → 23.0.0-beta.21

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 (392) hide show
  1. package/{babel.d.ts → dist/babel.d.ts} +0 -1
  2. package/dist/internal.d.ts +27 -0
  3. package/dist/internal.js +108 -0
  4. package/{plugins → dist/plugins}/jest/local-registry.d.ts +0 -1
  5. package/{src → dist/src}/executors/copy-workspace-modules/copy-workspace-modules.d.ts +0 -1
  6. package/{src → dist/src}/executors/node/lib/coalescing-debounce.d.ts +0 -1
  7. package/{src → dist/src}/executors/node/lib/detect-module-format.d.ts +2 -2
  8. package/{src → dist/src}/executors/node/lib/detect-module-format.js +7 -23
  9. package/{src → dist/src}/executors/node/lib/esm-loader.d.ts +0 -1
  10. package/{src → dist/src}/executors/node/lib/kill-tree.d.ts +0 -1
  11. package/{src → dist/src}/executors/node/lib/line-aware-writer.d.ts +0 -1
  12. package/{src → dist/src}/executors/node/lib/output-file.d.ts +0 -1
  13. package/dist/src/executors/node/node-with-esm-loader.d.ts +1 -0
  14. package/{src → dist/src}/executors/node/node-with-esm-loader.js +2 -0
  15. package/dist/src/executors/node/node-with-require-overrides.d.ts +1 -0
  16. package/{src → dist/src}/executors/node/node-with-require-overrides.js +2 -0
  17. package/{src → dist/src}/executors/node/node.impl.d.ts +0 -1
  18. package/{src → dist/src}/executors/node/node.impl.js +3 -3
  19. package/{src → dist/src}/executors/prune-lockfile/prune-lockfile.d.ts +0 -1
  20. package/{src → dist/src}/executors/release-publish/extract-npm-publish-json-data.d.ts +0 -1
  21. package/{src → dist/src}/executors/release-publish/format-bytes.d.ts +0 -1
  22. package/{src → dist/src}/executors/release-publish/log-tar.d.ts +0 -1
  23. package/{src → dist/src}/executors/release-publish/release-publish.impl.d.ts +0 -1
  24. package/{src → dist/src}/executors/release-publish/release-publish.impl.js +28 -2
  25. package/{src → dist/src}/executors/swc/swc.impl.d.ts +0 -1
  26. package/{src → dist/src}/executors/tsc/lib/batch/build-task-info-per-tsconfig-map.d.ts +0 -1
  27. package/{src → dist/src}/executors/tsc/lib/batch/index.d.ts +0 -1
  28. package/{src → dist/src}/executors/tsc/lib/batch/normalize-tasks-options.d.ts +0 -1
  29. package/{src → dist/src}/executors/tsc/lib/batch/types.d.ts +0 -1
  30. package/{src → dist/src}/executors/tsc/lib/batch/watch.d.ts +0 -1
  31. package/{src → dist/src}/executors/tsc/lib/batch/watch.js +1 -1
  32. package/{src → dist/src}/executors/tsc/lib/get-custom-transformers-factory.d.ts +0 -1
  33. package/{src → dist/src}/executors/tsc/lib/get-task-options.d.ts +0 -1
  34. package/{src → dist/src}/executors/tsc/lib/get-tsconfig.d.ts +0 -1
  35. package/{src → dist/src}/executors/tsc/lib/index.d.ts +0 -1
  36. package/{src → dist/src}/executors/tsc/lib/normalize-options.d.ts +0 -1
  37. package/{src → dist/src}/executors/tsc/lib/typescript-compilation.d.ts +0 -1
  38. package/{src → dist/src}/executors/tsc/lib/typescript-compilation.js +2 -2
  39. package/{src → dist/src}/executors/tsc/lib/typescript-diagnostic-reporters.d.ts +0 -1
  40. package/{src → dist/src}/executors/tsc/tsc.batch-impl.d.ts +0 -1
  41. package/{src → dist/src}/executors/tsc/tsc.impl.d.ts +1 -2
  42. package/{src → dist/src}/executors/verdaccio/verdaccio.impl.d.ts +0 -1
  43. package/{src → dist/src}/generators/convert-to-swc/convert-to-swc.d.ts +0 -1
  44. package/{src → dist/src}/generators/convert-to-swc/convert-to-swc.js +3 -1
  45. package/{src → dist/src}/generators/init/init.d.ts +0 -1
  46. package/{src → dist/src}/generators/init/init.js +15 -42
  47. package/{src → dist/src}/generators/init/schema.json +1 -1
  48. package/{src → dist/src}/generators/library/library.d.ts +0 -1
  49. package/{src → dist/src}/generators/library/library.js +21 -17
  50. package/{src → dist/src}/generators/library/schema.d.ts +1 -1
  51. package/{src → dist/src}/generators/library/utils/add-release-config.d.ts +0 -1
  52. package/dist/src/generators/release-version/release-version.d.ts +1 -0
  53. package/{src → dist/src}/generators/setup-build/generator.d.ts +0 -1
  54. package/{src → dist/src}/generators/setup-build/generator.js +6 -6
  55. package/{src → dist/src}/generators/setup-prettier/generator.d.ts +0 -1
  56. package/{src → dist/src}/generators/setup-prettier/generator.js +2 -0
  57. package/{src → dist/src}/generators/setup-verdaccio/generator.d.ts +0 -1
  58. package/{src → dist/src}/generators/setup-verdaccio/generator.js +3 -1
  59. package/{src → dist/src}/generators/typescript-sync/typescript-sync.d.ts +0 -1
  60. package/{src → dist/src}/generators/typescript-sync/typescript-sync.js +2 -0
  61. package/{src → dist/src}/index.d.ts +0 -1
  62. package/dist/src/internal.d.ts +18 -0
  63. package/dist/src/internal.js +25 -0
  64. package/{src → dist/src}/migrations/update-21-5-0/migrate-development-custom-condition.d.ts +0 -1
  65. package/dist/src/migrations/update-21-5-0/migrate-development-custom-condition.md +87 -0
  66. package/{src → dist/src}/migrations/update-22-0-0/remove-external-options-from-js-executors.d.ts +0 -1
  67. package/dist/src/migrations/update-22-0-0/remove-external-options-from-js-executors.js +94 -0
  68. package/dist/src/migrations/update-22-0-0/remove-external-options-from-js-executors.md +79 -0
  69. package/{src → dist/src}/migrations/update-22-1-0/remove-redundant-ts-project-references.d.ts +0 -1
  70. package/dist/src/migrations/update-22-1-0/remove-redundant-ts-project-references.md +143 -0
  71. package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.d.ts +3 -0
  72. package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.js +144 -0
  73. package/{src → dist/src}/plugins/jest/start-local-registry.d.ts +0 -1
  74. package/{src → dist/src}/plugins/typescript/plugin.d.ts +0 -1
  75. package/{src → dist/src}/plugins/typescript/plugin.js +22 -8
  76. package/{src → dist/src}/plugins/typescript/util.d.ts +0 -1
  77. package/{src → dist/src}/plugins/typescript/util.js +1 -1
  78. package/{src → dist/src}/release/utils/semver.d.ts +0 -1
  79. package/{src → dist/src}/release/utils/update-lock-file.d.ts +0 -1
  80. package/{src → dist/src}/release/version-actions.d.ts +0 -1
  81. package/{src → dist/src}/release/version-actions.js +3 -3
  82. package/{src → dist/src}/utils/add-babel-inputs.d.ts +0 -1
  83. package/{src → dist/src}/utils/add-local-registry-scripts.d.ts +0 -1
  84. package/dist/src/utils/assert-supported-typescript-version.d.ts +2 -0
  85. package/dist/src/utils/assert-supported-typescript-version.js +8 -0
  86. package/{src → dist/src}/utils/assets/assets.d.ts +0 -1
  87. package/{src → dist/src}/utils/assets/copy-assets-handler.d.ts +0 -1
  88. package/{src → dist/src}/utils/assets/index.d.ts +0 -1
  89. package/{src → dist/src}/utils/assets/normalize-assets.d.ts +0 -1
  90. package/{src → dist/src}/utils/buildable-libs-utils.d.ts +0 -1
  91. package/{src → dist/src}/utils/check-dependencies.d.ts +0 -1
  92. package/{src → dist/src}/utils/code-frames/highlight.d.ts +0 -1
  93. package/{src → dist/src}/utils/code-frames/identifiers.d.ts +0 -1
  94. package/{src → dist/src}/utils/compiler-helper-dependency.d.ts +0 -1
  95. package/{src → dist/src}/utils/find-npm-dependencies.d.ts +0 -1
  96. package/{src → dist/src}/utils/generate-globs.d.ts +0 -1
  97. package/{src → dist/src}/utils/generator-prompts.d.ts +0 -1
  98. package/{src → dist/src}/utils/generator-prompts.js +3 -3
  99. package/{src → dist/src}/utils/get-import-path.d.ts +0 -1
  100. package/{src → dist/src}/utils/get-main-file-dir.d.ts +0 -1
  101. package/{src → dist/src}/utils/is-locally-linked-package-version.d.ts +0 -1
  102. package/{src → dist/src}/utils/is-valid-variable.d.ts +0 -1
  103. package/dist/src/utils/module-format/is-esm-project.d.ts +16 -0
  104. package/dist/src/utils/module-format/is-esm-project.js +32 -0
  105. package/dist/src/utils/module-format/module-format.d.ts +17 -0
  106. package/dist/src/utils/module-format/module-format.js +43 -0
  107. package/{src → dist/src}/utils/npm-config.d.ts +0 -1
  108. package/{src → dist/src}/utils/package-json/create-entry-points.d.ts +0 -1
  109. package/{src → dist/src}/utils/package-json/get-npm-scope.d.ts +0 -1
  110. package/{src → dist/src}/utils/package-json/index.d.ts +0 -1
  111. package/{src → dist/src}/utils/package-json/sort-fields.d.ts +0 -1
  112. package/{src → dist/src}/utils/package-json/update-package-json.d.ts +0 -1
  113. package/{src → dist/src}/utils/package-manager-workspaces.d.ts +0 -1
  114. package/{src → dist/src}/utils/prettier.d.ts +0 -1
  115. package/{src → dist/src}/utils/prettier.js +3 -36
  116. package/{src → dist/src}/utils/strip-glob-to-base-dir.d.ts +0 -1
  117. package/{src → dist/src}/utils/swc/add-swc-config.d.ts +0 -1
  118. package/{src → dist/src}/utils/swc/add-swc-dependencies.d.ts +0 -1
  119. package/{src → dist/src}/utils/swc/add-swc-dependencies.js +2 -2
  120. package/{src → dist/src}/utils/swc/compile-swc.d.ts +0 -1
  121. package/{src → dist/src}/utils/swc/compile-swc.js +2 -2
  122. package/{src → dist/src}/utils/swc/get-swcrc-path.d.ts +0 -1
  123. package/{src → dist/src}/utils/typescript/__mocks__/function-after-declarations-plugin.d.ts +0 -1
  124. package/{src → dist/src}/utils/typescript/__mocks__/function-after-plugin.d.ts +0 -1
  125. package/{src → dist/src}/utils/typescript/__mocks__/function-direct-export.d.ts +0 -1
  126. package/{src → dist/src}/utils/typescript/__mocks__/function-multiple-hooks.d.ts +0 -1
  127. package/{src → dist/src}/utils/typescript/__mocks__/plugin-a.d.ts +0 -1
  128. package/{src → dist/src}/utils/typescript/__mocks__/plugin-b.d.ts +0 -1
  129. package/{src → dist/src}/utils/typescript/add-tslib-dependencies.d.ts +0 -1
  130. package/{src → dist/src}/utils/typescript/ast-utils.d.ts +0 -1
  131. package/dist/src/utils/typescript/compilation.d.ts +22 -0
  132. package/dist/src/utils/typescript/compilation.js +119 -0
  133. package/{src → dist/src}/utils/typescript/compile-typescript-files.d.ts +1 -2
  134. package/{src → dist/src}/utils/typescript/compile-typescript-files.js +3 -3
  135. package/{src → dist/src}/utils/typescript/configuration.d.ts +0 -1
  136. package/{src → dist/src}/utils/typescript/create-ts-config.d.ts +0 -1
  137. package/{src → dist/src}/utils/typescript/ensure-typescript.d.ts +0 -1
  138. package/{src → dist/src}/utils/typescript/get-source-nodes.d.ts +0 -1
  139. package/{src → dist/src}/utils/typescript/load-ts-transformers.d.ts +0 -1
  140. package/{src → dist/src}/utils/typescript/plugin.d.ts +0 -1
  141. package/{src → dist/src}/utils/typescript/print-diagnostics.d.ts +0 -1
  142. package/{src → dist/src}/utils/typescript/raw-tsconfig.d.ts +0 -1
  143. package/{src → dist/src}/utils/typescript/run-type-check.d.ts +0 -1
  144. package/{src → dist/src}/utils/typescript/run-type-check.js +1 -1
  145. package/{src → dist/src}/utils/typescript/ts-config.d.ts +0 -1
  146. package/{src → dist/src}/utils/typescript/ts-solution-setup.d.ts +0 -1
  147. package/{src → dist/src}/utils/typescript/types.d.ts +0 -1
  148. package/dist/src/utils/typescript/types.js +2 -0
  149. package/{src → dist/src}/utils/versions.d.ts +2 -3
  150. package/{src → dist/src}/utils/versions.js +5 -4
  151. package/{src → dist/src}/utils/watch-for-single-file-changes.d.ts +0 -1
  152. package/{typescript.d.ts → dist/typescript.d.ts} +0 -1
  153. package/executors.json +15 -15
  154. package/generators.json +14 -14
  155. package/migrations.json +35 -7
  156. package/package.json +102 -11
  157. package/babel.d.ts.map +0 -1
  158. package/plugins/jest/local-registry.d.ts.map +0 -1
  159. package/src/executors/copy-workspace-modules/copy-workspace-modules.d.ts.map +0 -1
  160. package/src/executors/node/lib/coalescing-debounce.d.ts.map +0 -1
  161. package/src/executors/node/lib/detect-module-format.d.ts.map +0 -1
  162. package/src/executors/node/lib/esm-loader.d.ts.map +0 -1
  163. package/src/executors/node/lib/kill-tree.d.ts.map +0 -1
  164. package/src/executors/node/lib/line-aware-writer.d.ts.map +0 -1
  165. package/src/executors/node/lib/output-file.d.ts.map +0 -1
  166. package/src/executors/node/node-with-esm-loader.d.ts +0 -6
  167. package/src/executors/node/node-with-esm-loader.d.ts.map +0 -1
  168. package/src/executors/node/node-with-require-overrides.d.ts +0 -8
  169. package/src/executors/node/node-with-require-overrides.d.ts.map +0 -1
  170. package/src/executors/node/node.impl.d.ts.map +0 -1
  171. package/src/executors/prune-lockfile/prune-lockfile.d.ts.map +0 -1
  172. package/src/executors/release-publish/extract-npm-publish-json-data.d.ts.map +0 -1
  173. package/src/executors/release-publish/format-bytes.d.ts.map +0 -1
  174. package/src/executors/release-publish/log-tar.d.ts.map +0 -1
  175. package/src/executors/release-publish/release-publish.impl.d.ts.map +0 -1
  176. package/src/executors/swc/swc.impl.d.ts.map +0 -1
  177. package/src/executors/tsc/lib/batch/build-task-info-per-tsconfig-map.d.ts.map +0 -1
  178. package/src/executors/tsc/lib/batch/index.d.ts.map +0 -1
  179. package/src/executors/tsc/lib/batch/normalize-tasks-options.d.ts.map +0 -1
  180. package/src/executors/tsc/lib/batch/types.d.ts.map +0 -1
  181. package/src/executors/tsc/lib/batch/watch.d.ts.map +0 -1
  182. package/src/executors/tsc/lib/get-custom-transformers-factory.d.ts.map +0 -1
  183. package/src/executors/tsc/lib/get-task-options.d.ts.map +0 -1
  184. package/src/executors/tsc/lib/get-tsconfig.d.ts.map +0 -1
  185. package/src/executors/tsc/lib/index.d.ts.map +0 -1
  186. package/src/executors/tsc/lib/normalize-options.d.ts.map +0 -1
  187. package/src/executors/tsc/lib/typescript-compilation.d.ts.map +0 -1
  188. package/src/executors/tsc/lib/typescript-diagnostic-reporters.d.ts.map +0 -1
  189. package/src/executors/tsc/tsc.batch-impl.d.ts.map +0 -1
  190. package/src/executors/tsc/tsc.impl.d.ts.map +0 -1
  191. package/src/executors/verdaccio/verdaccio.impl.d.ts.map +0 -1
  192. package/src/generators/convert-to-swc/convert-to-swc.d.ts.map +0 -1
  193. package/src/generators/init/init.d.ts.map +0 -1
  194. package/src/generators/library/library.d.ts.map +0 -1
  195. package/src/generators/library/utils/add-release-config.d.ts.map +0 -1
  196. package/src/generators/release-version/release-version.d.ts +0 -1
  197. package/src/generators/release-version/release-version.d.ts.map +0 -1
  198. package/src/generators/release-version/release-version.js +0 -0
  199. package/src/generators/setup-build/generator.d.ts.map +0 -1
  200. package/src/generators/setup-prettier/generator.d.ts.map +0 -1
  201. package/src/generators/setup-verdaccio/generator.d.ts.map +0 -1
  202. package/src/generators/typescript-sync/typescript-sync.d.ts.map +0 -1
  203. package/src/index.d.ts.map +0 -1
  204. package/src/internal.d.ts +0 -6
  205. package/src/internal.d.ts.map +0 -1
  206. package/src/internal.js +0 -18
  207. package/src/migrations/update-21-5-0/migrate-development-custom-condition.d.ts.map +0 -1
  208. package/src/migrations/update-22-0-0/remove-external-options-from-js-executors.d.ts.map +0 -1
  209. package/src/migrations/update-22-0-0/remove-external-options-from-js-executors.js +0 -65
  210. package/src/migrations/update-22-1-0/remove-redundant-ts-project-references.d.ts.map +0 -1
  211. package/src/plugins/jest/start-local-registry.d.ts.map +0 -1
  212. package/src/plugins/rollup/type-definitions.d.ts +0 -8
  213. package/src/plugins/rollup/type-definitions.d.ts.map +0 -1
  214. package/src/plugins/rollup/type-definitions.js +0 -49
  215. package/src/plugins/typescript/plugin.d.ts.map +0 -1
  216. package/src/plugins/typescript/util.d.ts.map +0 -1
  217. package/src/release/utils/semver.d.ts.map +0 -1
  218. package/src/release/utils/update-lock-file.d.ts.map +0 -1
  219. package/src/release/version-actions.d.ts.map +0 -1
  220. package/src/utils/add-babel-inputs.d.ts.map +0 -1
  221. package/src/utils/add-local-registry-scripts.d.ts.map +0 -1
  222. package/src/utils/assets/assets.d.ts.map +0 -1
  223. package/src/utils/assets/copy-assets-handler.d.ts.map +0 -1
  224. package/src/utils/assets/index.d.ts.map +0 -1
  225. package/src/utils/assets/normalize-assets.d.ts.map +0 -1
  226. package/src/utils/buildable-libs-utils.d.ts.map +0 -1
  227. package/src/utils/check-dependencies.d.ts.map +0 -1
  228. package/src/utils/code-frames/highlight.d.ts.map +0 -1
  229. package/src/utils/code-frames/identifiers.d.ts.map +0 -1
  230. package/src/utils/compiler-helper-dependency.d.ts.map +0 -1
  231. package/src/utils/find-npm-dependencies.d.ts.map +0 -1
  232. package/src/utils/generate-globs.d.ts.map +0 -1
  233. package/src/utils/generator-prompts.d.ts.map +0 -1
  234. package/src/utils/get-import-path.d.ts.map +0 -1
  235. package/src/utils/get-main-file-dir.d.ts.map +0 -1
  236. package/src/utils/is-locally-linked-package-version.d.ts.map +0 -1
  237. package/src/utils/is-valid-variable.d.ts.map +0 -1
  238. package/src/utils/npm-config.d.ts.map +0 -1
  239. package/src/utils/package-json/create-entry-points.d.ts.map +0 -1
  240. package/src/utils/package-json/get-npm-scope.d.ts.map +0 -1
  241. package/src/utils/package-json/index.d.ts.map +0 -1
  242. package/src/utils/package-json/sort-fields.d.ts.map +0 -1
  243. package/src/utils/package-json/update-package-json.d.ts.map +0 -1
  244. package/src/utils/package-manager-workspaces.d.ts.map +0 -1
  245. package/src/utils/prettier.d.ts.map +0 -1
  246. package/src/utils/strip-glob-to-base-dir.d.ts.map +0 -1
  247. package/src/utils/swc/add-swc-config.d.ts.map +0 -1
  248. package/src/utils/swc/add-swc-dependencies.d.ts.map +0 -1
  249. package/src/utils/swc/compile-swc.d.ts.map +0 -1
  250. package/src/utils/swc/get-swcrc-path.d.ts.map +0 -1
  251. package/src/utils/typescript/__mocks__/function-after-declarations-plugin.d.ts.map +0 -1
  252. package/src/utils/typescript/__mocks__/function-after-plugin.d.ts.map +0 -1
  253. package/src/utils/typescript/__mocks__/function-direct-export.d.ts.map +0 -1
  254. package/src/utils/typescript/__mocks__/function-multiple-hooks.d.ts.map +0 -1
  255. package/src/utils/typescript/__mocks__/plugin-a.d.ts.map +0 -1
  256. package/src/utils/typescript/__mocks__/plugin-b.d.ts.map +0 -1
  257. package/src/utils/typescript/add-tslib-dependencies.d.ts.map +0 -1
  258. package/src/utils/typescript/ast-utils.d.ts.map +0 -1
  259. package/src/utils/typescript/compile-typescript-files.d.ts.map +0 -1
  260. package/src/utils/typescript/configuration.d.ts.map +0 -1
  261. package/src/utils/typescript/create-ts-config.d.ts.map +0 -1
  262. package/src/utils/typescript/ensure-typescript.d.ts.map +0 -1
  263. package/src/utils/typescript/get-source-nodes.d.ts.map +0 -1
  264. package/src/utils/typescript/load-ts-transformers.d.ts.map +0 -1
  265. package/src/utils/typescript/plugin.d.ts.map +0 -1
  266. package/src/utils/typescript/print-diagnostics.d.ts.map +0 -1
  267. package/src/utils/typescript/raw-tsconfig.d.ts.map +0 -1
  268. package/src/utils/typescript/run-type-check.d.ts.map +0 -1
  269. package/src/utils/typescript/ts-config.d.ts.map +0 -1
  270. package/src/utils/typescript/ts-solution-setup.d.ts.map +0 -1
  271. package/src/utils/typescript/types.d.ts.map +0 -1
  272. package/src/utils/versions.d.ts.map +0 -1
  273. package/src/utils/watch-for-single-file-changes.d.ts.map +0 -1
  274. package/typescript.d.ts.map +0 -1
  275. /package/{LICENSE → dist/LICENSE} +0 -0
  276. /package/{babel.js → dist/babel.js} +0 -0
  277. /package/{plugins → dist/plugins}/jest/local-registry.js +0 -0
  278. /package/{src → dist/src}/executors/copy-workspace-modules/copy-workspace-modules.js +0 -0
  279. /package/{src → dist/src}/executors/copy-workspace-modules/schema.d.ts +0 -0
  280. /package/{src → dist/src}/executors/copy-workspace-modules/schema.json +0 -0
  281. /package/{src → dist/src}/executors/node/lib/coalescing-debounce.js +0 -0
  282. /package/{src → dist/src}/executors/node/lib/esm-loader.js +0 -0
  283. /package/{src → dist/src}/executors/node/lib/kill-tree.js +0 -0
  284. /package/{src → dist/src}/executors/node/lib/line-aware-writer.js +0 -0
  285. /package/{src → dist/src}/executors/node/lib/output-file.js +0 -0
  286. /package/{src → dist/src}/executors/node/schema.d.ts +0 -0
  287. /package/{src → dist/src}/executors/node/schema.json +0 -0
  288. /package/{src → dist/src}/executors/prune-lockfile/prune-lockfile.js +0 -0
  289. /package/{src → dist/src}/executors/prune-lockfile/schema.d.ts +0 -0
  290. /package/{src → dist/src}/executors/prune-lockfile/schema.json +0 -0
  291. /package/{src → dist/src}/executors/release-publish/extract-npm-publish-json-data.js +0 -0
  292. /package/{src → dist/src}/executors/release-publish/format-bytes.js +0 -0
  293. /package/{src → dist/src}/executors/release-publish/log-tar.js +0 -0
  294. /package/{src → dist/src}/executors/release-publish/schema.d.ts +0 -0
  295. /package/{src → dist/src}/executors/release-publish/schema.json +0 -0
  296. /package/{src → dist/src}/executors/swc/schema.json +0 -0
  297. /package/{src → dist/src}/executors/swc/swc.impl.js +0 -0
  298. /package/{src → dist/src}/executors/tsc/lib/batch/build-task-info-per-tsconfig-map.js +0 -0
  299. /package/{src → dist/src}/executors/tsc/lib/batch/index.js +0 -0
  300. /package/{src → dist/src}/executors/tsc/lib/batch/normalize-tasks-options.js +0 -0
  301. /package/{src → dist/src}/executors/tsc/lib/batch/types.js +0 -0
  302. /package/{src → dist/src}/executors/tsc/lib/get-custom-transformers-factory.js +0 -0
  303. /package/{src → dist/src}/executors/tsc/lib/get-task-options.js +0 -0
  304. /package/{src → dist/src}/executors/tsc/lib/get-tsconfig.js +0 -0
  305. /package/{src → dist/src}/executors/tsc/lib/index.js +0 -0
  306. /package/{src → dist/src}/executors/tsc/lib/normalize-options.js +0 -0
  307. /package/{src → dist/src}/executors/tsc/lib/typescript-diagnostic-reporters.js +0 -0
  308. /package/{src → dist/src}/executors/tsc/schema.json +0 -0
  309. /package/{src → dist/src}/executors/tsc/tsc.batch-impl.js +0 -0
  310. /package/{src → dist/src}/executors/tsc/tsc.impl.js +0 -0
  311. /package/{src → dist/src}/executors/verdaccio/schema.d.ts +0 -0
  312. /package/{src → dist/src}/executors/verdaccio/schema.json +0 -0
  313. /package/{src → dist/src}/executors/verdaccio/verdaccio.impl.js +0 -0
  314. /package/{src → dist/src}/generators/convert-to-swc/schema.d.ts +0 -0
  315. /package/{src → dist/src}/generators/convert-to-swc/schema.json +0 -0
  316. /package/{src → dist/src}/generators/init/files/non-ts-solution/__fileName__ +0 -0
  317. /package/{src → dist/src}/generators/init/files/ts-solution/tsconfig.base.json__tmpl__ +0 -0
  318. /package/{src → dist/src}/generators/init/files/ts-solution/tsconfig.json__tmpl__ +0 -0
  319. /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
  320. /package/{src → dist/src}/generators/library/files/jest-config/jest.config.__ext__ +0 -0
  321. /package/{src → dist/src}/generators/library/files/lib/src/index.ts__tmpl__ +0 -0
  322. /package/{src → dist/src}/generators/library/files/lib/src/lib/__fileName__.spec.ts__tmpl__ +0 -0
  323. /package/{src → dist/src}/generators/library/files/lib/src/lib/__fileName__.ts__tmpl__ +0 -0
  324. /package/{src → dist/src}/generators/library/files/readme/README.md +0 -0
  325. /package/{src → dist/src}/generators/library/files/tsconfig-lib/non-ts-solution/tsconfig.lib.json__tmpl__ +0 -0
  326. /package/{src → dist/src}/generators/library/files/tsconfig-lib/ts-solution/tsconfig.lib.json__tmpl__ +0 -0
  327. /package/{src → dist/src}/generators/library/schema.json +0 -0
  328. /package/{src → dist/src}/generators/library/utils/add-release-config.js +0 -0
  329. /package/{src/utils/typescript/types.js → dist/src/generators/release-version/release-version.js} +0 -0
  330. /package/{src → dist/src}/generators/setup-build/schema.d.ts +0 -0
  331. /package/{src → dist/src}/generators/setup-build/schema.json +0 -0
  332. /package/{src → dist/src}/generators/setup-prettier/schema.d.ts +0 -0
  333. /package/{src → dist/src}/generators/setup-prettier/schema.json +0 -0
  334. /package/{src → dist/src}/generators/setup-verdaccio/files/config.yml +0 -0
  335. /package/{src → dist/src}/generators/setup-verdaccio/schema.d.ts +0 -0
  336. /package/{src → dist/src}/generators/setup-verdaccio/schema.json +0 -0
  337. /package/{src → dist/src}/generators/typescript-sync/schema.d.ts +0 -0
  338. /package/{src → dist/src}/generators/typescript-sync/schema.json +0 -0
  339. /package/{src → dist/src}/index.js +0 -0
  340. /package/{src → dist/src}/migrations/update-21-5-0/migrate-development-custom-condition.js +0 -0
  341. /package/{src → dist/src}/migrations/update-22-1-0/remove-redundant-ts-project-references.js +0 -0
  342. /package/{src → dist/src}/plugins/jest/start-local-registry.js +0 -0
  343. /package/{src → dist/src}/release/utils/semver.js +0 -0
  344. /package/{src → dist/src}/release/utils/update-lock-file.js +0 -0
  345. /package/{src → dist/src}/utils/add-babel-inputs.js +0 -0
  346. /package/{src → dist/src}/utils/add-local-registry-scripts.js +0 -0
  347. /package/{src → dist/src}/utils/assets/assets.js +0 -0
  348. /package/{src → dist/src}/utils/assets/copy-assets-handler.js +0 -0
  349. /package/{src → dist/src}/utils/assets/index.js +0 -0
  350. /package/{src → dist/src}/utils/assets/normalize-assets.js +0 -0
  351. /package/{src → dist/src}/utils/buildable-libs-utils.js +0 -0
  352. /package/{src → dist/src}/utils/check-dependencies.js +0 -0
  353. /package/{src → dist/src}/utils/code-frames/highlight.js +0 -0
  354. /package/{src → dist/src}/utils/code-frames/identifiers.js +0 -0
  355. /package/{src → dist/src}/utils/compiler-helper-dependency.js +0 -0
  356. /package/{src → dist/src}/utils/find-npm-dependencies.js +0 -0
  357. /package/{src → dist/src}/utils/generate-globs.js +0 -0
  358. /package/{src → dist/src}/utils/get-import-path.js +0 -0
  359. /package/{src → dist/src}/utils/get-main-file-dir.js +0 -0
  360. /package/{src → dist/src}/utils/is-locally-linked-package-version.js +0 -0
  361. /package/{src → dist/src}/utils/is-valid-variable.js +0 -0
  362. /package/{src → dist/src}/utils/npm-config.js +0 -0
  363. /package/{src → dist/src}/utils/package-json/create-entry-points.js +0 -0
  364. /package/{src → dist/src}/utils/package-json/get-npm-scope.js +0 -0
  365. /package/{src → dist/src}/utils/package-json/index.js +0 -0
  366. /package/{src → dist/src}/utils/package-json/sort-fields.js +0 -0
  367. /package/{src → dist/src}/utils/package-json/update-package-json.js +0 -0
  368. /package/{src → dist/src}/utils/package-manager-workspaces.js +0 -0
  369. /package/{src → dist/src}/utils/schema.d.ts +0 -0
  370. /package/{src → dist/src}/utils/strip-glob-to-base-dir.js +0 -0
  371. /package/{src → dist/src}/utils/swc/add-swc-config.js +0 -0
  372. /package/{src → dist/src}/utils/swc/get-swcrc-path.js +0 -0
  373. /package/{src → dist/src}/utils/typescript/__mocks__/function-after-declarations-plugin.js +0 -0
  374. /package/{src → dist/src}/utils/typescript/__mocks__/function-after-plugin.js +0 -0
  375. /package/{src → dist/src}/utils/typescript/__mocks__/function-direct-export.js +0 -0
  376. /package/{src → dist/src}/utils/typescript/__mocks__/function-multiple-hooks.js +0 -0
  377. /package/{src → dist/src}/utils/typescript/__mocks__/plugin-a.js +0 -0
  378. /package/{src → dist/src}/utils/typescript/__mocks__/plugin-b.js +0 -0
  379. /package/{src → dist/src}/utils/typescript/add-tslib-dependencies.js +0 -0
  380. /package/{src → dist/src}/utils/typescript/ast-utils.js +0 -0
  381. /package/{src → dist/src}/utils/typescript/configuration.js +0 -0
  382. /package/{src → dist/src}/utils/typescript/create-ts-config.js +0 -0
  383. /package/{src → dist/src}/utils/typescript/ensure-typescript.js +0 -0
  384. /package/{src → dist/src}/utils/typescript/get-source-nodes.js +0 -0
  385. /package/{src → dist/src}/utils/typescript/load-ts-transformers.js +0 -0
  386. /package/{src → dist/src}/utils/typescript/plugin.js +0 -0
  387. /package/{src → dist/src}/utils/typescript/print-diagnostics.js +0 -0
  388. /package/{src → dist/src}/utils/typescript/raw-tsconfig.js +0 -0
  389. /package/{src → dist/src}/utils/typescript/ts-config.js +0 -0
  390. /package/{src → dist/src}/utils/typescript/ts-solution-setup.js +0 -0
  391. /package/{src → dist/src}/utils/watch-for-single-file-changes.js +0 -0
  392. /package/{typescript.js → dist/typescript.js} +0 -0
@@ -3,4 +3,3 @@ import { Tree } from '@nx/devkit';
3
3
  * Prefixes project name with npm scope
4
4
  */
5
5
  export declare function getImportPath(tree: Tree, projectDirectory: string): string;
6
- //# sourceMappingURL=get-import-path.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function getRelativeDirectoryToProjectRoot(file: string, projectRoot: string): string;
2
- //# sourceMappingURL=get-main-file-dir.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function isLocallyLinkedPackageVersion(version: string): boolean;
2
- //# sourceMappingURL=is-locally-linked-package-version.d.ts.map
@@ -7,4 +7,3 @@ export declare function isValidVariable(name: string): {
7
7
  isValid: boolean;
8
8
  message: string;
9
9
  };
10
- //# sourceMappingURL=is-valid-variable.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ /**
3
+ * Determine whether a project should be treated as ESM for the purpose of
4
+ * emitting `.ts` config and source files (e.g. choosing between
5
+ * `__filename`/`__dirname` and `import.meta.dirname`, or `require()` and
6
+ * `import` for sibling subpath imports).
7
+ *
8
+ * Mirrors Node's package.json `type` resolution: the **closest**
9
+ * package.json with a recognized `type` field wins.
10
+ *
11
+ * Resolution order:
12
+ * 1. The project's package.json `type`, if present and recognized.
13
+ * 2. The workspace-root package.json `type`, if present and recognized.
14
+ * 3. Default: `false` (CJS).
15
+ */
16
+ export declare function isEsmProject(tree: Tree, projectRoot: string): boolean;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isEsmProject = isEsmProject;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const module_format_1 = require("./module-format");
6
+ /**
7
+ * Determine whether a project should be treated as ESM for the purpose of
8
+ * emitting `.ts` config and source files (e.g. choosing between
9
+ * `__filename`/`__dirname` and `import.meta.dirname`, or `require()` and
10
+ * `import` for sibling subpath imports).
11
+ *
12
+ * Mirrors Node's package.json `type` resolution: the **closest**
13
+ * package.json with a recognized `type` field wins.
14
+ *
15
+ * Resolution order:
16
+ * 1. The project's package.json `type`, if present and recognized.
17
+ * 2. The workspace-root package.json `type`, if present and recognized.
18
+ * 3. Default: `false` (CJS).
19
+ */
20
+ function isEsmProject(tree, projectRoot) {
21
+ const projectPackageJsonPath = (0, devkit_1.joinPathFragments)(projectRoot, 'package.json');
22
+ if (tree.exists(projectPackageJsonPath)) {
23
+ const projectFmt = (0, module_format_1.getPackageJsonModuleFormat)((0, devkit_1.readJson)(tree, projectPackageJsonPath));
24
+ // Only honor an explicit type field; fall through to workspace when
25
+ // unset so we match Node's "walk up to nearest type field" behavior.
26
+ if (projectFmt !== null) {
27
+ return projectFmt === 'esm';
28
+ }
29
+ }
30
+ const workspaceFmt = (0, module_format_1.getPackageJsonModuleFormat)((0, devkit_1.readJson)(tree, 'package.json'));
31
+ return workspaceFmt === 'esm';
32
+ }
@@ -0,0 +1,17 @@
1
+ import type * as ts from 'typescript';
2
+ export type ModuleFormat = 'cjs' | 'esm';
3
+ /**
4
+ * Decide module format from a parsed package.json `type` field alone.
5
+ * Returns `null` when the field is unset or holds an unrecognized value -
6
+ * callers can then fall back to other signals (tsconfig, defaults).
7
+ */
8
+ export declare function getPackageJsonModuleFormat(packageJson: {
9
+ type?: string;
10
+ } | null | undefined): ModuleFormat | null;
11
+ /**
12
+ * Decide module format from tsconfig compiler options' `module` setting.
13
+ * Returns `null` when the setting is unset OR when it is `NodeNext` /
14
+ * `Node16` (those defer to the package.json `type` field, so the caller
15
+ * should have already checked package.json).
16
+ */
17
+ export declare function getTsConfigModuleFormat(compilerOptions: ts.CompilerOptions | null | undefined): ModuleFormat | null;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPackageJsonModuleFormat = getPackageJsonModuleFormat;
4
+ exports.getTsConfigModuleFormat = getTsConfigModuleFormat;
5
+ /**
6
+ * Decide module format from a parsed package.json `type` field alone.
7
+ * Returns `null` when the field is unset or holds an unrecognized value -
8
+ * callers can then fall back to other signals (tsconfig, defaults).
9
+ */
10
+ function getPackageJsonModuleFormat(packageJson) {
11
+ if (!packageJson)
12
+ return null;
13
+ if (packageJson.type === 'module')
14
+ return 'esm';
15
+ if (packageJson.type === 'commonjs')
16
+ return 'cjs';
17
+ return null;
18
+ }
19
+ /**
20
+ * Decide module format from tsconfig compiler options' `module` setting.
21
+ * Returns `null` when the setting is unset OR when it is `NodeNext` /
22
+ * `Node16` (those defer to the package.json `type` field, so the caller
23
+ * should have already checked package.json).
24
+ */
25
+ function getTsConfigModuleFormat(compilerOptions) {
26
+ const m = compilerOptions?.module;
27
+ if (m === undefined)
28
+ return null;
29
+ // Lazy-require typescript so importing this module (e.g. via
30
+ // @nx/js/internal -> is-esm-project) doesn't fail in workspaces that
31
+ // haven't installed typescript yet (fresh CNW projects before a
32
+ // generator adds it).
33
+ const tsMod = require('typescript');
34
+ if (m === tsMod.ModuleKind.NodeNext || m === tsMod.ModuleKind.Node16)
35
+ return null;
36
+ if (m === tsMod.ModuleKind.ES2015 ||
37
+ m === tsMod.ModuleKind.ES2020 ||
38
+ m === tsMod.ModuleKind.ES2022 ||
39
+ m === tsMod.ModuleKind.ESNext) {
40
+ return 'esm';
41
+ }
42
+ return 'cjs';
43
+ }
@@ -23,4 +23,3 @@ export declare function getNpmRegistry(cwd: string, scope?: string): Promise<str
23
23
  * @param cwd the directory where the npm config should be read from
24
24
  */
25
25
  export declare function getNpmTag(cwd: string): Promise<string>;
26
- //# sourceMappingURL=npm-config.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function createEntryPoints(additionalEntryPoints: undefined | string[], root: string): string[];
2
- //# sourceMappingURL=create-entry-points.d.ts.map
@@ -3,4 +3,3 @@ import { Tree } from '@nx/devkit';
3
3
  * Read the npm scope that a workspace should use by default
4
4
  */
5
5
  export declare function getNpmScope(tree: Tree): string | undefined;
6
- //# sourceMappingURL=get-npm-scope.d.ts.map
@@ -11,4 +11,3 @@ export interface CopyPackageJsonResult {
11
11
  stop?: () => void;
12
12
  }
13
13
  export declare function copyPackageJson(_options: CopyPackageJsonOptions, context: ExecutorContext): Promise<CopyPackageJsonResult>;
14
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import { type Tree } from '@nx/devkit';
2
2
  export declare function sortPackageJsonFields(tree: Tree, projectRoot: string): void;
3
- //# sourceMappingURL=sort-fields.d.ts.map
@@ -32,4 +32,3 @@ export declare function getExports(options: Pick<UpdatePackageJsonOption, 'main'
32
32
  export declare function getUpdatedPackageJsonContent(packageJson: PackageJson, options: UpdatePackageJsonOption): PackageJson;
33
33
  export declare function getOutputDir(options: Pick<UpdatePackageJsonOption, 'main' | 'rootDir' | 'projectRoot' | 'outputFileName' | 'outputPath' | 'packageJsonPath'>): string;
34
34
  export {};
35
- //# sourceMappingURL=update-package-json.d.ts.map
@@ -5,4 +5,3 @@ export declare function getPackageManagerWorkspacesPatterns(tree: Tree): string[
5
5
  export declare function isUsingPackageManagerWorkspaces(tree: Tree): boolean;
6
6
  export declare function isWorkspacesEnabled(tree: Tree): boolean;
7
7
  export declare function getProjectPackageManagerWorkspaceStateWarningTask(projectPackageManagerWorkspaceState: ProjectPackageManagerWorkspaceState, workspaceRoot: string): GeneratorCallback;
8
- //# sourceMappingURL=package-manager-workspaces.d.ts.map
@@ -9,4 +9,3 @@ export declare function generatePrettierSetup(tree: Tree, options: {
9
9
  skipPackageJson?: boolean;
10
10
  }): GeneratorCallback;
11
11
  export declare function resolvePrettierConfigPath(tree: Tree): Promise<string | null>;
12
- //# sourceMappingURL=prettier.d.ts.map
@@ -1,37 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.resolveUserExistingPrettierConfig = resolveUserExistingPrettierConfig;
37
4
  exports.generatePrettierSetup = generatePrettierSetup;
@@ -41,7 +8,7 @@ const versions_1 = require("./versions");
41
8
  async function resolveUserExistingPrettierConfig() {
42
9
  let prettier;
43
10
  try {
44
- prettier = await Promise.resolve().then(() => __importStar(require('prettier')));
11
+ prettier = await import('prettier');
45
12
  }
46
13
  catch {
47
14
  return null;
@@ -111,7 +78,7 @@ function generatePrettierSetup(tree, options) {
111
78
  async function resolvePrettierConfigPath(tree) {
112
79
  let prettier;
113
80
  try {
114
- prettier = await Promise.resolve().then(() => __importStar(require('prettier')));
81
+ prettier = await import('prettier');
115
82
  }
116
83
  catch {
117
84
  return null;
@@ -152,7 +119,7 @@ async function resolvePrettierConfigPath(tree) {
152
119
  }
153
120
  // check the package.yaml file
154
121
  if (tree.exists('package.yaml')) {
155
- const { load } = await Promise.resolve().then(() => __importStar(require('@zkochan/js-yaml')));
122
+ const { load } = await import('@zkochan/js-yaml');
156
123
  const packageYaml = load(tree.read('package.yaml', 'utf-8'));
157
124
  if (packageYaml.prettier) {
158
125
  return 'package.yaml';
@@ -1,2 +1 @@
1
1
  export declare function stripGlobToBaseDir(pathWithGlob: string): string;
2
- //# sourceMappingURL=strip-glob-to-base-dir.d.ts.map
@@ -2,4 +2,3 @@ import { type Tree } from '@nx/devkit';
2
2
  export declare const defaultExclude: string[];
3
3
  export declare function addSwcConfig(tree: Tree, projectDir: string, type?: 'commonjs' | 'es6', supportTsx?: boolean, swcName?: string, additionalExcludes?: string[]): void;
4
4
  export declare function addSwcTestConfig(tree: Tree, projectDir: string, type?: 'commonjs' | 'es6', supportTsx?: boolean): void;
5
- //# sourceMappingURL=add-swc-config.d.ts.map
@@ -5,4 +5,3 @@ export declare function getSwcDependencies(): {
5
5
  };
6
6
  export declare function addSwcDependencies(tree: Tree): import("@nx/devkit").GeneratorCallback;
7
7
  export declare function addSwcRegisterDependencies(tree: Tree): import("@nx/devkit").GeneratorCallback;
8
- //# sourceMappingURL=add-swc-dependencies.d.ts.map
@@ -17,8 +17,8 @@ function getSwcDependencies() {
17
17
  }
18
18
  function addSwcDependencies(tree) {
19
19
  const { dependencies, devDependencies } = getSwcDependencies();
20
- return (0, devkit_1.addDependenciesToPackageJson)(tree, dependencies, devDependencies);
20
+ return (0, devkit_1.addDependenciesToPackageJson)(tree, dependencies, devDependencies, undefined, true);
21
21
  }
22
22
  function addSwcRegisterDependencies(tree) {
23
- return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { '@swc-node/register': versions_1.swcNodeVersion, '@swc/core': versions_1.swcCoreVersion });
23
+ return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { '@swc-node/register': versions_1.swcNodeVersion, '@swc/core': versions_1.swcCoreVersion }, undefined, true);
24
24
  }
@@ -11,4 +11,3 @@ export declare function compileSwcWatch(context: ExecutorContext, normalizedOpti
11
11
  success: boolean;
12
12
  outfile: string;
13
13
  }, any, any>;
14
- //# sourceMappingURL=compile-swc.d.ts.map
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.compileSwc = compileSwc;
4
4
  exports.compileSwcWatch = compileSwcWatch;
5
5
  const devkit_1 = require("@nx/devkit");
6
+ const internal_1 = require("@nx/devkit/internal");
6
7
  const node_child_process_1 = require("node:child_process");
7
8
  const node_fs_1 = require("node:fs");
8
9
  const node_path_1 = require("node:path");
9
- const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
10
10
  const print_diagnostics_1 = require("../typescript/print-diagnostics");
11
11
  const run_type_check_1 = require("../typescript/run-type-check");
12
12
  const path_1 = require("path");
@@ -101,7 +101,7 @@ async function* compileSwcWatch(context, normalizedOptions, postCompilationCallb
101
101
  if (normalizedOptions.clean) {
102
102
  (0, node_fs_1.rmSync)(normalizedOptions.outputPath, { recursive: true, force: true });
103
103
  }
104
- return yield* (0, async_iterable_1.createAsyncIterable)(async ({ next, done }) => {
104
+ return yield* (0, internal_1.createAsyncIterable)(async ({ next, done }) => {
105
105
  let processOnExit;
106
106
  let handleCallback;
107
107
  let stdoutOnData;
@@ -3,4 +3,3 @@ export declare function getSwcrcPath(options: SwcExecutorOptions, contextRoot: s
3
3
  swcrcPath: string;
4
4
  tmpSwcrcPath: string;
5
5
  };
6
- //# sourceMappingURL=get-swcrc-path.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare const afterDeclarations: (options: any, program: any) => () => void;
2
- //# sourceMappingURL=function-after-declarations-plugin.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare const after: (options: any, program: any) => () => void;
2
- //# sourceMappingURL=function-after-plugin.d.ts.map
@@ -1,3 +1,2 @@
1
1
  declare const _default: (options: any, program: any) => () => void;
2
2
  export default _default;
3
- //# sourceMappingURL=function-direct-export.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export declare const before: (options: any, program: any) => () => void;
2
2
  export declare const after: (options: any, program: any) => () => void;
3
3
  export declare const afterDeclarations: (options: any, program: any) => () => void;
4
- //# sourceMappingURL=function-multiple-hooks.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare const before: (options: any, program: any) => () => void;
2
- //# sourceMappingURL=plugin-a.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare const after: (options: any, program: any) => () => void;
2
- //# sourceMappingURL=plugin-b.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import { Tree } from '@nx/devkit';
2
2
  export declare function addTsLibDependencies(tree: Tree): import("@nx/devkit").GeneratorCallback;
3
- //# sourceMappingURL=add-tslib-dependencies.d.ts.map
@@ -30,4 +30,3 @@ export declare function addMethod(tree: Tree, source: ts.SourceFile, modulePath:
30
30
  }): ts.SourceFile;
31
31
  export declare function findClass(source: ts.SourceFile, className: string, silent?: boolean): ts.ClassDeclaration;
32
32
  export declare function findNodes(node: Node, kind: SyntaxKind | SyntaxKind[], max?: number): Node[];
33
- //# sourceMappingURL=ast-utils.d.ts.map
@@ -0,0 +1,22 @@
1
+ import type * as ts from 'typescript';
2
+ import type { CustomTransformers, Diagnostic, Program } from 'typescript';
3
+ export interface TypeScriptCompilationOptions {
4
+ outputPath: string;
5
+ projectName: string;
6
+ projectRoot: string;
7
+ tsConfig: string;
8
+ deleteOutputPath?: boolean;
9
+ rootDir?: string;
10
+ watch?: boolean;
11
+ getCustomTransformers?(program: Program): CustomTransformers;
12
+ }
13
+ export interface TypescriptWatchChangeEvent {
14
+ diagnostic: ts.Diagnostic;
15
+ newLine: string;
16
+ options: ts.CompilerOptions;
17
+ errorCount: number;
18
+ }
19
+ export declare function compileTypeScript(options: TypeScriptCompilationOptions): {
20
+ success: boolean;
21
+ };
22
+ export declare function compileTypeScriptWatcher(options: TypeScriptCompilationOptions, callback: (diagnostic: Diagnostic, newLine: string, options: ts.CompilerOptions, errorCount: number) => void | Promise<void>): ts.WatchOfFilesAndCompilerOptions<ts.BuilderProgram>;
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.compileTypeScript = compileTypeScript;
4
+ exports.compileTypeScriptWatcher = compileTypeScriptWatcher;
5
+ const devkit_1 = require("@nx/devkit");
6
+ const fs_1 = require("fs");
7
+ const ts_config_1 = require("./ts-config");
8
+ const ensure_typescript_1 = require("./ensure-typescript");
9
+ let tsModule;
10
+ function compileTypeScript(options) {
11
+ const normalizedOptions = normalizeOptions(options);
12
+ const tsConfig = getNormalizedTsConfig(normalizedOptions);
13
+ if (normalizedOptions.deleteOutputPath) {
14
+ (0, fs_1.rmSync)(normalizedOptions.outputPath, { recursive: true, force: true });
15
+ }
16
+ return createProgram(tsConfig, normalizedOptions);
17
+ }
18
+ function compileTypeScriptWatcher(options, callback) {
19
+ if (!tsModule) {
20
+ tsModule = (0, ensure_typescript_1.ensureTypescript)();
21
+ }
22
+ const normalizedOptions = normalizeOptions(options);
23
+ const tsConfig = getNormalizedTsConfig(normalizedOptions);
24
+ if (normalizedOptions.deleteOutputPath) {
25
+ (0, fs_1.rmSync)(normalizedOptions.outputPath, { recursive: true, force: true });
26
+ }
27
+ const host = tsModule.createWatchCompilerHost(tsConfig.fileNames, tsConfig.options, tsModule.sys);
28
+ const originalAfterProgramCreate = host.afterProgramCreate;
29
+ host.afterProgramCreate = (builderProgram) => {
30
+ const originalProgramEmit = builderProgram.emit;
31
+ builderProgram.emit = (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) => {
32
+ const consumerCustomTransformers = options.getCustomTransformers?.(builderProgram.getProgram());
33
+ const mergedCustomTransformers = mergeCustomTransformers(customTransformers, consumerCustomTransformers);
34
+ return originalProgramEmit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, mergedCustomTransformers);
35
+ };
36
+ if (originalAfterProgramCreate)
37
+ originalAfterProgramCreate(builderProgram);
38
+ };
39
+ const originalOnWatchStatusChange = host.onWatchStatusChange;
40
+ host.onWatchStatusChange = async (a, b, c, d) => {
41
+ originalOnWatchStatusChange?.(a, b, c, d);
42
+ await callback?.(a, b, c, d);
43
+ };
44
+ return tsModule.createWatchProgram(host);
45
+ }
46
+ function mergeCustomTransformers(originalCustomTransformers, consumerCustomTransformers) {
47
+ if (!consumerCustomTransformers)
48
+ return originalCustomTransformers;
49
+ const mergedCustomTransformers = {};
50
+ if (consumerCustomTransformers.before) {
51
+ mergedCustomTransformers.before = originalCustomTransformers?.before
52
+ ? [
53
+ ...originalCustomTransformers.before,
54
+ ...consumerCustomTransformers.before,
55
+ ]
56
+ : consumerCustomTransformers.before;
57
+ }
58
+ if (consumerCustomTransformers.after) {
59
+ mergedCustomTransformers.after = originalCustomTransformers?.after
60
+ ? [
61
+ ...originalCustomTransformers.after,
62
+ ...consumerCustomTransformers.after,
63
+ ]
64
+ : consumerCustomTransformers.after;
65
+ }
66
+ if (consumerCustomTransformers.afterDeclarations) {
67
+ mergedCustomTransformers.afterDeclarations =
68
+ originalCustomTransformers?.afterDeclarations
69
+ ? [
70
+ ...originalCustomTransformers.afterDeclarations,
71
+ ...consumerCustomTransformers.afterDeclarations,
72
+ ]
73
+ : consumerCustomTransformers.afterDeclarations;
74
+ }
75
+ return mergedCustomTransformers;
76
+ }
77
+ function getNormalizedTsConfig(options) {
78
+ const tsConfig = (0, ts_config_1.readTsConfig)(options.tsConfig);
79
+ tsConfig.options.outDir = options.outputPath;
80
+ tsConfig.options.noEmitOnError = true;
81
+ tsConfig.options.rootDir = options.rootDir;
82
+ if (tsConfig.options.incremental && !tsConfig.options.tsBuildInfoFile) {
83
+ tsConfig.options.tsBuildInfoFile = (0, devkit_1.joinPathFragments)(options.outputPath, 'tsconfig.tsbuildinfo');
84
+ }
85
+ return tsConfig;
86
+ }
87
+ function createProgram(tsconfig, { projectName, getCustomTransformers }) {
88
+ if (!tsModule) {
89
+ tsModule = (0, ensure_typescript_1.ensureTypescript)();
90
+ }
91
+ const host = tsModule.createCompilerHost(tsconfig.options);
92
+ const program = tsModule.createProgram({
93
+ rootNames: tsconfig.fileNames,
94
+ options: tsconfig.options,
95
+ host,
96
+ });
97
+ devkit_1.logger.info(`Compiling TypeScript files for project "${projectName}"...`);
98
+ const results = program.emit(undefined, undefined, undefined, undefined, getCustomTransformers?.(program));
99
+ if (results.emitSkipped) {
100
+ const diagnostics = tsModule.formatDiagnosticsWithColorAndContext(results.diagnostics, {
101
+ getCurrentDirectory: () => tsModule.sys.getCurrentDirectory(),
102
+ getNewLine: () => tsModule.sys.newLine,
103
+ getCanonicalFileName: (name) => name,
104
+ });
105
+ devkit_1.logger.error(diagnostics);
106
+ return { success: false };
107
+ }
108
+ else {
109
+ devkit_1.logger.info(`Done compiling TypeScript files for project "${projectName}".`);
110
+ return { success: true };
111
+ }
112
+ }
113
+ function normalizeOptions(options) {
114
+ return {
115
+ ...options,
116
+ deleteOutputPath: options.deleteOutputPath ?? true,
117
+ rootDir: options.rootDir ?? options.projectRoot,
118
+ };
119
+ }
@@ -1,4 +1,4 @@
1
- import { TypeScriptCompilationOptions } from '@nx/workspace/src/utilities/typescript/compilation';
1
+ import { TypeScriptCompilationOptions } from './compilation';
2
2
  import { NormalizedExecutorOptions } from '../schema';
3
3
  export interface TypescriptCompilationResult {
4
4
  success: boolean;
@@ -8,4 +8,3 @@ export declare function compileTypeScriptFiles(normalizedOptions: NormalizedExec
8
8
  iterator: AsyncIterable<TypescriptCompilationResult>;
9
9
  close: () => void | Promise<void>;
10
10
  };
11
- //# sourceMappingURL=compile-typescript-files.d.ts.map
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.compileTypeScriptFiles = compileTypeScriptFiles;
4
- const compilation_1 = require("@nx/workspace/src/utilities/typescript/compilation");
5
- const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
4
+ const internal_1 = require("@nx/devkit/internal");
5
+ const compilation_1 = require("./compilation");
6
6
  const TYPESCRIPT_FOUND_N_ERRORS_WATCHING_FOR_FILE_CHANGES = 6194;
7
7
  // Typescript diagnostic message for 6194: Found {0} errors. Watching for file changes.
8
8
  // https://github.com/microsoft/TypeScript/blob/d45012c5e2ab122919ee4777a7887307c5f4a1e0/src/compiler/diagnosticMessages.json#L4763-L4766
@@ -17,7 +17,7 @@ function compileTypeScriptFiles(normalizedOptions, tscOptions, postCompilationCa
17
17
  });
18
18
  let tearDown;
19
19
  return {
20
- iterator: (0, async_iterable_1.createAsyncIterable)(async ({ next, done }) => {
20
+ iterator: (0, internal_1.createAsyncIterable)(async ({ next, done }) => {
21
21
  if (normalizedOptions.watch) {
22
22
  const host = (0, compilation_1.compileTypeScriptWatcher)(tscOptions, async (d) => {
23
23
  if (d.code === TYPESCRIPT_FOUND_N_ERRORS_WATCHING_FOR_FILE_CHANGES) {
@@ -5,4 +5,3 @@ import type { CompilerOptions } from 'typescript';
5
5
  * different or not set in the provided tsconfig file.
6
6
  */
7
7
  export declare function getNeededCompilerOptionOverrides(tree: Tree, compilerOptions: Record<keyof CompilerOptions, any>, tsConfigPath: string): Record<keyof CompilerOptions, any>;
8
- //# sourceMappingURL=configuration.d.ts.map
@@ -15,4 +15,3 @@ export declare const tsConfigBaseOptions: {
15
15
  paths: {};
16
16
  };
17
17
  export declare function extractTsConfigBase(host: Tree): void;
18
- //# sourceMappingURL=create-ts-config.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function ensureTypescript(): typeof import("typescript");
2
- //# sourceMappingURL=ensure-typescript.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type * as ts from 'typescript';
2
2
  export declare function getSourceNodes(sourceFile: ts.SourceFile): ts.Node[];
3
- //# sourceMappingURL=get-source-nodes.d.ts.map
@@ -3,4 +3,3 @@ export declare function loadTsTransformers(plugins: TransformerEntry[], moduleRe
3
3
  compilerPluginHooks: CompilerPluginHooks;
4
4
  hasPlugin: boolean;
5
5
  };
6
- //# sourceMappingURL=load-ts-transformers.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type { NxJsonConfiguration } from '@nx/devkit';
2
2
  export declare function ensureProjectIsIncludedInPluginRegistrations(nxJson: NxJsonConfiguration, projectRoot: string, buildTargetName: string | null): void;
3
- //# sourceMappingURL=plugin.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function printDiagnostics(errors?: string[], warnings?: string[]): Promise<void>;
2
- //# sourceMappingURL=print-diagnostics.d.ts.map
@@ -33,4 +33,3 @@ export type RawTsconfigJsonCache = Map<string, unknown | null>;
33
33
  export declare function walkTsconfigExtendsChain(entryAbsolutePath: string, visit: (absolutePath: string, rawJson: unknown) => 'continue' | 'stop', options?: {
34
34
  jsonCache?: RawTsconfigJsonCache;
35
35
  }): void;
36
- //# sourceMappingURL=raw-tsconfig.d.ts.map
@@ -32,4 +32,3 @@ export declare function runTypeCheckWatch(options: TypeCheckOptions, callback: (
32
32
  export declare function runTypeCheck(options: TypeCheckOptions): Promise<TypeCheckResult>;
33
33
  export declare function getFormattedDiagnostic(ts: typeof import('typescript'), workspaceRoot: string, diagnostic: Diagnostic): string;
34
34
  export {};
35
- //# sourceMappingURL=run-type-check.d.ts.map
@@ -57,7 +57,7 @@ async function runTypeCheck(options) {
57
57
  return getTypeCheckResult(ts, allDiagnostics, workspaceRoot, config.fileNames.length, program.getSourceFiles().length, incremental);
58
58
  }
59
59
  async function setupTypeScript(options) {
60
- const ts = await Promise.resolve().then(() => tslib_1.__importStar(require('typescript')));
60
+ const ts = await import('typescript');
61
61
  const { workspaceRoot, tsConfigPath, cacheDir, incremental, projectRoot } = options;
62
62
  const config = (0, ts_config_1.readTsConfig)(tsConfigPath);
63
63
  if (config.errors.length) {
@@ -22,4 +22,3 @@ export declare function addTsConfigPath(tree: Tree, importPath: string, lookupPa
22
22
  */
23
23
  export declare function resolvePathsBaseUrl(tsconfigPath: string): string;
24
24
  export declare function readTsConfigPaths(tsConfig?: string | ts.ParsedCommandLine): ts.MapLike<string[]>;
25
- //# sourceMappingURL=ts-config.d.ts.map
@@ -22,4 +22,3 @@ export declare function getCustomConditionName(tree: Tree, options?: {
22
22
  * Get the already defined custom condition name or null if none is defined.
23
23
  */
24
24
  export declare function getDefinedCustomConditionName(tree: Tree): string | null;
25
- //# sourceMappingURL=ts-solution-setup.d.ts.map
@@ -27,4 +27,3 @@ export interface CompilerPluginHooks {
27
27
  afterDeclarationsHooks: Array<(program?: Program) => TransformerFactory>;
28
28
  }
29
29
  export {};
30
- //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,7 +6,7 @@ export declare const swcCoreVersion = "~1.15.5";
6
6
  export declare const swcHelpersVersion = "~0.5.18";
7
7
  export declare const swcNodeVersion = "~1.11.1";
8
8
  export declare const tsLibVersion = "^2.3.0";
9
- export declare const typesNodeVersion = "20.19.9";
9
+ export declare const typesNodeVersion = "^22.0.0";
10
10
  export declare const verdaccioVersion = "^6.3.2";
11
11
  export declare const typescriptVersion = "~5.9.2";
12
12
  /**
@@ -14,5 +14,4 @@ export declare const typescriptVersion = "~5.9.2";
14
14
  * that's supported by the lowest Angular supported version, e.g.
15
15
  * `npm view @angular/compiler-cli@18.0.0 peerDependencies.typescript`
16
16
  */
17
- export declare const supportedTypescriptVersions = ">=5.4.0";
18
- //# sourceMappingURL=versions.d.ts.map
17
+ export declare const minSupportedTypescriptVersion = "5.4.0";