@nx/expo 23.0.0-beta.23 → 23.0.0-beta.25

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 (268) hide show
  1. package/{index.d.ts → dist/index.d.ts} +0 -1
  2. package/{plugin.d.ts → dist/plugin.d.ts} +0 -1
  3. package/dist/plugins/jest/svg-mock.d.ts +1 -0
  4. package/{plugins → dist/plugins}/jest/svg-mock.js +2 -0
  5. package/{plugins → dist/plugins}/metro-resolver.d.ts +0 -1
  6. package/{plugins → dist/plugins}/plugin.d.ts +0 -1
  7. package/{plugins → dist/plugins}/with-nx-metro.d.ts +0 -1
  8. package/dist/readme-template.md +18 -0
  9. package/{src → dist/src}/executors/build/build.impl.d.ts +0 -1
  10. package/{src → dist/src}/executors/build-list/build-list.impl.d.ts +0 -1
  11. package/{src → dist/src}/executors/ensure-symlink/ensure-symlink.impl.d.ts +0 -1
  12. package/{src → dist/src}/executors/export/export.impl.d.ts +0 -1
  13. package/{src → dist/src}/executors/install/install.impl.d.ts +0 -1
  14. package/{src → dist/src}/executors/prebuild/prebuild.impl.d.ts +0 -1
  15. package/{src → dist/src}/executors/run/run.impl.d.ts +0 -1
  16. package/{src → dist/src}/executors/serve/lib/is-packager-running.d.ts +0 -1
  17. package/{src → dist/src}/executors/serve/serve.impl.d.ts +0 -1
  18. package/{src → dist/src}/executors/start/start.impl.d.ts +0 -1
  19. package/{src → dist/src}/executors/submit/submit.impl.d.ts +0 -1
  20. package/{src → dist/src}/executors/sync-deps/sync-deps.impl.d.ts +0 -1
  21. package/{src → dist/src}/executors/update/update.impl.d.ts +0 -1
  22. package/{src → dist/src}/generators/application/application.d.ts +0 -1
  23. package/{src → dist/src}/generators/application/application.js +2 -0
  24. package/{src → dist/src}/generators/application/lib/add-e2e.d.ts +0 -1
  25. package/{src → dist/src}/generators/application/lib/add-eas-scripts.d.ts +0 -1
  26. package/{src → dist/src}/generators/application/lib/add-project.d.ts +0 -1
  27. package/{src → dist/src}/generators/application/lib/add-project.js +1 -1
  28. package/{src → dist/src}/generators/application/lib/create-application-files.d.ts +0 -1
  29. package/{src → dist/src}/generators/application/lib/normalize-options.d.ts +0 -1
  30. package/{src → dist/src}/generators/application/schema.d.ts +0 -1
  31. package/{src → dist/src}/generators/application/schema.json +0 -6
  32. package/{src → dist/src}/generators/component/component.d.ts +0 -1
  33. package/{src → dist/src}/generators/component/component.js +2 -0
  34. package/{src → dist/src}/generators/component/lib/add-import.d.ts +0 -1
  35. package/{src → dist/src}/generators/component/lib/normalize-options.d.ts +0 -1
  36. package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.d.ts +0 -1
  37. package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.js +2 -0
  38. package/{src → dist/src}/generators/convert-to-inferred/lib/post-target-transformer.d.ts +0 -1
  39. package/{src → dist/src}/generators/convert-to-inferred/lib/process-build-options.d.ts +0 -1
  40. package/{src → dist/src}/generators/convert-to-inferred/lib/process-export-options.d.ts +0 -1
  41. package/{src → dist/src}/generators/convert-to-inferred/lib/process-generic-options.d.ts +0 -1
  42. package/{src → dist/src}/generators/convert-to-inferred/lib/process-install-options.d.ts +0 -1
  43. package/{src → dist/src}/generators/convert-to-inferred/lib/process-prebuild-options.d.ts +0 -1
  44. package/{src → dist/src}/generators/convert-to-inferred/lib/process-run-options.d.ts +0 -1
  45. package/{src → dist/src}/generators/convert-to-inferred/lib/process-serve-options.d.ts +0 -1
  46. package/{src → dist/src}/generators/convert-to-inferred/lib/process-start-options.d.ts +0 -1
  47. package/{src → dist/src}/generators/convert-to-inferred/lib/process-submit-options.d.ts +0 -1
  48. package/{src → dist/src}/generators/init/init.d.ts +0 -1
  49. package/{src → dist/src}/generators/init/init.js +2 -1
  50. package/{src → dist/src}/generators/init/lib/add-git-ignore-entry.d.ts +0 -1
  51. package/{src → dist/src}/generators/init/lib/gitignore-entries.d.ts +0 -1
  52. package/{src → dist/src}/generators/init/schema.d.ts +1 -1
  53. package/{src → dist/src}/generators/init/schema.json +1 -1
  54. package/{src → dist/src}/generators/library/lib/normalize-options.d.ts +0 -1
  55. package/{src → dist/src}/generators/library/library.d.ts +0 -1
  56. package/{src → dist/src}/generators/library/library.js +4 -2
  57. package/{src → dist/src}/migrations/update-21-4-0/add-jest-resolver.d.ts +0 -1
  58. package/{src → dist/src}/migrations/update-21-4-0/remove-deprecated-deps.d.ts +0 -1
  59. package/{src → dist/src}/migrations/update-21-4-0/update-splash-screen-config.d.ts +0 -1
  60. package/{src → dist/src}/migrations/update-22-2-0/add-expo-system-ui.d.ts +0 -1
  61. package/{src → dist/src}/migrations/update-22-2-0/update-jest-for-expo-54.d.ts +0 -1
  62. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts +9 -0
  63. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +134 -0
  64. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +25 -0
  65. package/{src → dist/src}/utils/add-linting.d.ts +0 -1
  66. package/{src → dist/src}/utils/add-linting.js +2 -2
  67. package/{src → dist/src}/utils/deprecation.d.ts +0 -1
  68. package/{src → dist/src}/utils/ensure-dependencies.d.ts +0 -1
  69. package/{src → dist/src}/utils/ensure-dependencies.js +1 -1
  70. package/{src → dist/src}/utils/ensure-node-modules-symlink.d.ts +0 -1
  71. package/{src → dist/src}/utils/expo-project-detection.d.ts +0 -1
  72. package/{src → dist/src}/utils/find-all-npm-dependencies.d.ts +0 -1
  73. package/{src → dist/src}/utils/has-expo-plugin.d.ts +0 -1
  74. package/{src → dist/src}/utils/init-root-babel-config.d.ts +0 -1
  75. package/{src → dist/src}/utils/jest/add-jest.d.ts +0 -1
  76. package/{src → dist/src}/utils/jest/add-jest.js +7 -6
  77. package/{src → dist/src}/utils/pod-install-task.d.ts +0 -1
  78. package/{src → dist/src}/utils/resolve-eas.d.ts +0 -1
  79. package/{src → dist/src}/utils/update-tsconfig-files.d.ts +0 -1
  80. package/{src → dist/src}/utils/version-utils.d.ts +3 -11
  81. package/dist/src/utils/version-utils.js +133 -0
  82. package/{src → dist/src}/utils/versions.d.ts +32 -14
  83. package/dist/src/utils/versions.js +87 -0
  84. package/dist/typings/svg.d.ts +6 -0
  85. package/executors.json +24 -24
  86. package/generators.json +10 -10
  87. package/migrations.json +93 -61
  88. package/package.json +82 -12
  89. package/index.d.ts.map +0 -1
  90. package/plugin.d.ts.map +0 -1
  91. package/plugins/jest/svg-mock.d.ts +0 -1
  92. package/plugins/jest/svg-mock.d.ts.map +0 -1
  93. package/plugins/metro-resolver.d.ts.map +0 -1
  94. package/plugins/plugin.d.ts.map +0 -1
  95. package/plugins/with-nx-metro.d.ts.map +0 -1
  96. package/src/executors/build/build.impl.d.ts.map +0 -1
  97. package/src/executors/build-list/build-list.impl.d.ts.map +0 -1
  98. package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts.map +0 -1
  99. package/src/executors/export/export.impl.d.ts.map +0 -1
  100. package/src/executors/install/install.impl.d.ts.map +0 -1
  101. package/src/executors/prebuild/prebuild.impl.d.ts.map +0 -1
  102. package/src/executors/run/run.impl.d.ts.map +0 -1
  103. package/src/executors/serve/lib/is-packager-running.d.ts.map +0 -1
  104. package/src/executors/serve/serve.impl.d.ts.map +0 -1
  105. package/src/executors/start/start.impl.d.ts.map +0 -1
  106. package/src/executors/submit/submit.impl.d.ts.map +0 -1
  107. package/src/executors/sync-deps/sync-deps.impl.d.ts.map +0 -1
  108. package/src/executors/update/update.impl.d.ts.map +0 -1
  109. package/src/generators/application/application.d.ts.map +0 -1
  110. package/src/generators/application/lib/add-e2e.d.ts.map +0 -1
  111. package/src/generators/application/lib/add-eas-scripts.d.ts.map +0 -1
  112. package/src/generators/application/lib/add-project.d.ts.map +0 -1
  113. package/src/generators/application/lib/create-application-files.d.ts.map +0 -1
  114. package/src/generators/application/lib/normalize-options.d.ts.map +0 -1
  115. package/src/generators/component/component.d.ts.map +0 -1
  116. package/src/generators/component/lib/add-import.d.ts.map +0 -1
  117. package/src/generators/component/lib/normalize-options.d.ts.map +0 -1
  118. package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +0 -1
  119. package/src/generators/convert-to-inferred/lib/post-target-transformer.d.ts.map +0 -1
  120. package/src/generators/convert-to-inferred/lib/process-build-options.d.ts.map +0 -1
  121. package/src/generators/convert-to-inferred/lib/process-export-options.d.ts.map +0 -1
  122. package/src/generators/convert-to-inferred/lib/process-generic-options.d.ts.map +0 -1
  123. package/src/generators/convert-to-inferred/lib/process-install-options.d.ts.map +0 -1
  124. package/src/generators/convert-to-inferred/lib/process-prebuild-options.d.ts.map +0 -1
  125. package/src/generators/convert-to-inferred/lib/process-run-options.d.ts.map +0 -1
  126. package/src/generators/convert-to-inferred/lib/process-serve-options.d.ts.map +0 -1
  127. package/src/generators/convert-to-inferred/lib/process-start-options.d.ts.map +0 -1
  128. package/src/generators/convert-to-inferred/lib/process-submit-options.d.ts.map +0 -1
  129. package/src/generators/init/init.d.ts.map +0 -1
  130. package/src/generators/init/lib/add-git-ignore-entry.d.ts.map +0 -1
  131. package/src/generators/init/lib/gitignore-entries.d.ts.map +0 -1
  132. package/src/generators/library/lib/normalize-options.d.ts.map +0 -1
  133. package/src/generators/library/library.d.ts.map +0 -1
  134. package/src/migrations/update-21-4-0/add-jest-resolver.d.ts.map +0 -1
  135. package/src/migrations/update-21-4-0/remove-deprecated-deps.d.ts.map +0 -1
  136. package/src/migrations/update-21-4-0/update-splash-screen-config.d.ts.map +0 -1
  137. package/src/migrations/update-22-2-0/add-expo-system-ui.d.ts.map +0 -1
  138. package/src/migrations/update-22-2-0/update-jest-for-expo-54.d.ts.map +0 -1
  139. package/src/utils/add-linting.d.ts.map +0 -1
  140. package/src/utils/deprecation.d.ts.map +0 -1
  141. package/src/utils/ensure-dependencies.d.ts.map +0 -1
  142. package/src/utils/ensure-node-modules-symlink.d.ts.map +0 -1
  143. package/src/utils/expo-project-detection.d.ts.map +0 -1
  144. package/src/utils/find-all-npm-dependencies.d.ts.map +0 -1
  145. package/src/utils/has-expo-plugin.d.ts.map +0 -1
  146. package/src/utils/init-root-babel-config.d.ts.map +0 -1
  147. package/src/utils/jest/add-jest.d.ts.map +0 -1
  148. package/src/utils/pod-install-task.d.ts.map +0 -1
  149. package/src/utils/resolve-eas.d.ts.map +0 -1
  150. package/src/utils/update-tsconfig-files.d.ts.map +0 -1
  151. package/src/utils/version-utils.d.ts.map +0 -1
  152. package/src/utils/version-utils.js +0 -132
  153. package/src/utils/versions.d.ts.map +0 -1
  154. package/src/utils/versions.js +0 -60
  155. /package/{LICENSE → dist/LICENSE} +0 -0
  156. /package/{docs → dist/docs}/build-list-examples.md +0 -0
  157. /package/{docs → dist/docs}/export-examples.md +0 -0
  158. /package/{docs → dist/docs}/prebuild-examples.md +0 -0
  159. /package/{docs → dist/docs}/run-examples.md +0 -0
  160. /package/{docs → dist/docs}/start-examples.md +0 -0
  161. /package/{index.js → dist/index.js} +0 -0
  162. /package/{plugin.js → dist/plugin.js} +0 -0
  163. /package/{plugins → dist/plugins}/metro-resolver.js +0 -0
  164. /package/{plugins → dist/plugins}/plugin.js +0 -0
  165. /package/{plugins → dist/plugins}/with-nx-metro.js +0 -0
  166. /package/{src → dist/src}/executors/build/build.impl.js +0 -0
  167. /package/{src → dist/src}/executors/build/schema.d.ts +0 -0
  168. /package/{src → dist/src}/executors/build/schema.json +0 -0
  169. /package/{src → dist/src}/executors/build-list/build-fragment.d.ts +0 -0
  170. /package/{src → dist/src}/executors/build-list/build-list.impl.js +0 -0
  171. /package/{src → dist/src}/executors/build-list/schema.d.ts +0 -0
  172. /package/{src → dist/src}/executors/build-list/schema.json +0 -0
  173. /package/{src → dist/src}/executors/ensure-symlink/ensure-symlink.impl.js +0 -0
  174. /package/{src → dist/src}/executors/ensure-symlink/schema.json +0 -0
  175. /package/{src → dist/src}/executors/export/export.impl.js +0 -0
  176. /package/{src → dist/src}/executors/export/schema.d.ts +0 -0
  177. /package/{src → dist/src}/executors/export/schema.json +0 -0
  178. /package/{src → dist/src}/executors/install/install.impl.js +0 -0
  179. /package/{src → dist/src}/executors/install/schema.d.ts +0 -0
  180. /package/{src → dist/src}/executors/install/schema.json +0 -0
  181. /package/{src → dist/src}/executors/prebuild/prebuild.impl.js +0 -0
  182. /package/{src → dist/src}/executors/prebuild/schema.d.ts +0 -0
  183. /package/{src → dist/src}/executors/prebuild/schema.json +0 -0
  184. /package/{src → dist/src}/executors/run/run.impl.js +0 -0
  185. /package/{src → dist/src}/executors/run/schema.d.ts +0 -0
  186. /package/{src → dist/src}/executors/run/schema.json +0 -0
  187. /package/{src → dist/src}/executors/serve/lib/is-packager-running.js +0 -0
  188. /package/{src → dist/src}/executors/serve/schema.d.ts +0 -0
  189. /package/{src → dist/src}/executors/serve/schema.json +0 -0
  190. /package/{src → dist/src}/executors/serve/serve.impl.js +0 -0
  191. /package/{src → dist/src}/executors/start/schema.d.ts +0 -0
  192. /package/{src → dist/src}/executors/start/schema.json +0 -0
  193. /package/{src → dist/src}/executors/start/start.impl.js +0 -0
  194. /package/{src → dist/src}/executors/submit/schema.d.ts +0 -0
  195. /package/{src → dist/src}/executors/submit/schema.json +0 -0
  196. /package/{src → dist/src}/executors/submit/submit.impl.js +0 -0
  197. /package/{src → dist/src}/executors/sync-deps/schema.d.ts +0 -0
  198. /package/{src → dist/src}/executors/sync-deps/schema.json +0 -0
  199. /package/{src → dist/src}/executors/sync-deps/sync-deps.impl.js +0 -0
  200. /package/{src → dist/src}/executors/update/schema.d.ts +0 -0
  201. /package/{src → dist/src}/executors/update/schema.json +0 -0
  202. /package/{src → dist/src}/executors/update/update.impl.js +0 -0
  203. /package/{src → dist/src}/generators/application/files/base/.babelrc.js.template +0 -0
  204. /package/{src → dist/src}/generators/application/files/base/app.json.template +0 -0
  205. /package/{src → dist/src}/generators/application/files/base/assets/fonts/.gitkeep +0 -0
  206. /package/{src → dist/src}/generators/application/files/base/assets/images/adaptive-icon.png +0 -0
  207. /package/{src → dist/src}/generators/application/files/base/assets/images/favicon.png +0 -0
  208. /package/{src → dist/src}/generators/application/files/base/assets/images/icon.png +0 -0
  209. /package/{src → dist/src}/generators/application/files/base/assets/images/splash-icon.png +0 -0
  210. /package/{src → dist/src}/generators/application/files/base/eas.json.template +0 -0
  211. /package/{src → dist/src}/generators/application/files/base/index.js.template +0 -0
  212. /package/{src → dist/src}/generators/application/files/base/metro.config.js.template +0 -0
  213. /package/{src → dist/src}/generators/application/files/base/package.json.template +0 -0
  214. /package/{src → dist/src}/generators/application/files/base/src/app/App.spec.tsx.template +0 -0
  215. /package/{src → dist/src}/generators/application/files/base/tsconfig.app.json.template +0 -0
  216. /package/{src → dist/src}/generators/application/files/base/tsconfig.json.template +0 -0
  217. /package/{src → dist/src}/generators/application/files/nx-welcome/claimed/src/app/App.tsx.template +0 -0
  218. /package/{src → dist/src}/generators/application/files/nx-welcome/not-configured/src/app/App.tsx.template +0 -0
  219. /package/{src → dist/src}/generators/application/files/nx-welcome/unclaimed/src/app/App.tsx.template +0 -0
  220. /package/{src → dist/src}/generators/application/lib/add-e2e.js +0 -0
  221. /package/{src → dist/src}/generators/application/lib/add-eas-scripts.js +0 -0
  222. /package/{src → dist/src}/generators/application/lib/create-application-files.js +0 -0
  223. /package/{src → dist/src}/generators/application/lib/normalize-options.js +0 -0
  224. /package/{src → dist/src}/generators/component/files/js/__fileName__.__ext__ +0 -0
  225. /package/{src → dist/src}/generators/component/files/js/__fileName__.spec.__ext__ +0 -0
  226. /package/{src → dist/src}/generators/component/files/ts/__fileName__.__ext__ +0 -0
  227. /package/{src → dist/src}/generators/component/files/ts/__fileName__.spec.__ext__ +0 -0
  228. /package/{src → dist/src}/generators/component/lib/add-import.js +0 -0
  229. /package/{src → dist/src}/generators/component/lib/normalize-options.js +0 -0
  230. /package/{src → dist/src}/generators/component/schema.d.ts +0 -0
  231. /package/{src → dist/src}/generators/component/schema.json +0 -0
  232. /package/{src → dist/src}/generators/convert-to-inferred/lib/post-target-transformer.js +0 -0
  233. /package/{src → dist/src}/generators/convert-to-inferred/lib/process-build-options.js +0 -0
  234. /package/{src → dist/src}/generators/convert-to-inferred/lib/process-export-options.js +0 -0
  235. /package/{src → dist/src}/generators/convert-to-inferred/lib/process-generic-options.js +0 -0
  236. /package/{src → dist/src}/generators/convert-to-inferred/lib/process-install-options.js +0 -0
  237. /package/{src → dist/src}/generators/convert-to-inferred/lib/process-prebuild-options.js +0 -0
  238. /package/{src → dist/src}/generators/convert-to-inferred/lib/process-run-options.js +0 -0
  239. /package/{src → dist/src}/generators/convert-to-inferred/lib/process-serve-options.js +0 -0
  240. /package/{src → dist/src}/generators/convert-to-inferred/lib/process-start-options.js +0 -0
  241. /package/{src → dist/src}/generators/convert-to-inferred/lib/process-submit-options.js +0 -0
  242. /package/{src → dist/src}/generators/convert-to-inferred/schema.json +0 -0
  243. /package/{src → dist/src}/generators/init/lib/add-git-ignore-entry.js +0 -0
  244. /package/{src → dist/src}/generators/init/lib/gitignore-entries.js +0 -0
  245. /package/{src → dist/src}/generators/library/files/lib/.babelrc.js.template +0 -0
  246. /package/{src → dist/src}/generators/library/files/lib/README.md +0 -0
  247. /package/{src → dist/src}/generators/library/files/lib/src/index.ts.template +0 -0
  248. /package/{src → dist/src}/generators/library/files/lib/tsconfig.json.template +0 -0
  249. /package/{src → dist/src}/generators/library/files/lib/tsconfig.lib.json.template +0 -0
  250. /package/{src → dist/src}/generators/library/lib/normalize-options.js +0 -0
  251. /package/{src → dist/src}/generators/library/schema.d.ts +0 -0
  252. /package/{src → dist/src}/generators/library/schema.json +0 -0
  253. /package/{src → dist/src}/migrations/update-21-4-0/add-jest-resolver.js +0 -0
  254. /package/{src → dist/src}/migrations/update-21-4-0/remove-deprecated-deps.js +0 -0
  255. /package/{src → dist/src}/migrations/update-21-4-0/update-splash-screen-config.js +0 -0
  256. /package/{src → dist/src}/migrations/update-22-2-0/add-expo-system-ui.js +0 -0
  257. /package/{src → dist/src}/migrations/update-22-2-0/ai-instructions-for-expo-54.md +0 -0
  258. /package/{src → dist/src}/migrations/update-22-2-0/update-jest-for-expo-54.js +0 -0
  259. /package/{src → dist/src}/utils/deprecation.js +0 -0
  260. /package/{src → dist/src}/utils/ensure-node-modules-symlink.js +0 -0
  261. /package/{src → dist/src}/utils/expo-project-detection.js +0 -0
  262. /package/{src → dist/src}/utils/find-all-npm-dependencies.js +0 -0
  263. /package/{src → dist/src}/utils/has-expo-plugin.js +0 -0
  264. /package/{src → dist/src}/utils/init-root-babel-config.js +0 -0
  265. /package/{src → dist/src}/utils/jest/files/jest.resolver.js +0 -0
  266. /package/{src → dist/src}/utils/pod-install-task.js +0 -0
  267. /package/{src → dist/src}/utils/resolve-eas.js +0 -0
  268. /package/{src → dist/src}/utils/update-tsconfig-files.js +0 -0
@@ -3,4 +3,3 @@ export { expoApplicationGenerator } from './src/generators/application/applicati
3
3
  export { expoLibraryGenerator } from './src/generators/library/library';
4
4
  export { expoComponentGenerator } from './src/generators/component/component';
5
5
  export { withNxMetro } from './plugins/with-nx-metro';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1 @@
1
1
  export { createNodes, createNodesV2, ExpoPluginOptions, } from './plugins/plugin';
2
- //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
1
3
  // From https://github.com/kristerkari/react-native-svg-transformer#usage-with-jest
2
4
  module.exports = 'SvgMock';
3
5
  module.exports.ReactComponent = 'SvgMock';
@@ -1,2 +1 @@
1
1
  export declare function getResolveRequest(extensions: string[], exportsConditionNames?: string[], mainFields?: string[]): (_context: any, realModuleName: string, platform: string | null) => any;
2
- //# sourceMappingURL=metro-resolver.d.ts.map
@@ -14,4 +14,3 @@ export interface ExpoPluginOptions {
14
14
  }
15
15
  export declare const createNodes: CreateNodes<ExpoPluginOptions>;
16
16
  export declare const createNodesV2: CreateNodes<ExpoPluginOptions>;
17
- //# sourceMappingURL=plugin.d.ts.map
@@ -23,4 +23,3 @@ interface WithNxOptions {
23
23
  }
24
24
  export declare function withNxMetro(userConfig: MetroConfig, opts?: WithNxOptions): any;
25
25
  export {};
26
- //# sourceMappingURL=with-nx-metro.d.ts.map
@@ -0,0 +1,18 @@
1
+ <p style="text-align: center;">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
4
+ <img alt="Nx - Smart Monorepos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
5
+ </picture>
6
+ </p>
7
+
8
+ {{links}}
9
+
10
+ <hr>
11
+
12
+ # Nx: Smart Monorepos · Fast Builds
13
+
14
+ Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.
15
+
16
+ This package is a [Expo plugin for Nx](https://nx.dev/expo/overview).
17
+
18
+ {{content}}
@@ -4,4 +4,3 @@ export interface ReactNativeBuildOutput {
4
4
  success: boolean;
5
5
  }
6
6
  export default function buildExecutor(options: ExpoEasBuildOptions, context: ExecutorContext): AsyncGenerator<ReactNativeBuildOutput>;
7
- //# sourceMappingURL=build.impl.d.ts.map
@@ -5,4 +5,3 @@ export interface ReactNativeBuildListOutput {
5
5
  }
6
6
  export default function buildListExecutor(options: ExpoEasBuildListOptions, context: ExecutorContext): AsyncGenerator<ReactNativeBuildListOutput>;
7
7
  export declare function runCliBuildList(workspaceRoot: string, projectRoot: string, options: ExpoEasBuildListOptions): Promise<string>;
8
- //# sourceMappingURL=build-list.impl.d.ts.map
@@ -7,4 +7,3 @@ export interface ExpoEnsureSymlinkOutput {
7
7
  * @deprecated It is no longer needed for react native 73.
8
8
  */
9
9
  export default function ensureSymlinkExecutor(_: any, context: ExecutorContext): AsyncGenerator<ExpoEnsureSymlinkOutput>;
10
- //# sourceMappingURL=ensure-symlink.impl.d.ts.map
@@ -5,4 +5,3 @@ export interface ExpoExportOutput {
5
5
  }
6
6
  export default function exportExecutor(options: ExportExecutorSchema, context: ExecutorContext): AsyncGenerator<ExpoExportOutput>;
7
7
  export declare function createExportOptions(options: ExportExecutorSchema, projectRoot: string): any[];
8
- //# sourceMappingURL=export.impl.d.ts.map
@@ -5,4 +5,3 @@ export interface ExpoInstallOutput {
5
5
  }
6
6
  export default function installExecutor(options: ExpoInstallOptions, context: ExecutorContext): AsyncGenerator<ExpoInstallOutput>;
7
7
  export declare function installAndUpdatePackageJson(context: ExecutorContext, options: ExpoInstallOptions): Promise<void>;
8
- //# sourceMappingURL=install.impl.d.ts.map
@@ -5,4 +5,3 @@ export interface ExpoPrebuildOutput {
5
5
  }
6
6
  export default function prebuildExecutor(options: ExpoPrebuildOptions, context: ExecutorContext): AsyncGenerator<ExpoPrebuildOutput>;
7
7
  export declare function prebuildAsync(workspaceRoot: string, projectRoot: string, options: ExpoPrebuildOptions): Promise<number>;
8
- //# sourceMappingURL=prebuild.impl.d.ts.map
@@ -4,4 +4,3 @@ export interface ExpoRunOutput {
4
4
  success: boolean;
5
5
  }
6
6
  export default function runExecutor(options: ExpoRunOptions, context: ExecutorContext): AsyncGenerator<ExpoRunOutput>;
7
- //# sourceMappingURL=run.impl.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function isPackagerRunning(packagerPort: number): Promise<'running' | 'not_running' | 'unrecognized'>;
2
- //# sourceMappingURL=is-packager-running.d.ts.map
@@ -8,4 +8,3 @@ export interface ExpoServeOutput {
8
8
  }
9
9
  export default function serveExecutor(options: ExpoServeExecutorSchema, context: ExecutorContext): AsyncGenerator<ExpoServeOutput>;
10
10
  export declare function runCliServe(workspaceRoot: string, projectRoot: string, options: ExpoServeExecutorSchema): Promise<ChildProcess>;
11
- //# sourceMappingURL=serve.impl.d.ts.map
@@ -5,4 +5,3 @@ export interface ExpoStartOutput {
5
5
  success: boolean;
6
6
  }
7
7
  export default function startExecutor(options: ExpoStartOptions, context: ExecutorContext): AsyncGenerator<ExpoStartOutput>;
8
- //# sourceMappingURL=start.impl.d.ts.map
@@ -4,4 +4,3 @@ export interface ReactNativeSubmitOutput {
4
4
  success: boolean;
5
5
  }
6
6
  export default function submitExecutor(options: SubmitExecutorSchema, context: ExecutorContext): AsyncGenerator<ReactNativeSubmitOutput>;
7
- //# sourceMappingURL=submit.impl.d.ts.map
@@ -7,4 +7,3 @@ export interface ReactNativeSyncDepsOutput {
7
7
  export default function syncDepsExecutor(options: ExpoSyncDepsOptions, context: ExecutorContext): AsyncGenerator<ReactNativeSyncDepsOutput>;
8
8
  export declare function syncDeps(projectName: string, projectPackageJson: PackageJson, projectPackageJsonPath: string, workspacePackageJson: PackageJson, projectGraph?: ProjectGraph, include?: string[], exclude?: string[], all?: boolean, excludeImplicit?: boolean): Promise<string[]>;
9
9
  export declare function displayNewlyAddedDepsMessage(projectName: string, deps: string[]): void;
10
- //# sourceMappingURL=sync-deps.impl.d.ts.map
@@ -4,4 +4,3 @@ export interface ReactNativeUpdateOutput {
4
4
  success: boolean;
5
5
  }
6
6
  export default function buildExecutor(options: ExpoEasUpdateOptions, context: ExecutorContext): AsyncGenerator<ReactNativeUpdateOutput>;
7
- //# sourceMappingURL=update.impl.d.ts.map
@@ -3,4 +3,3 @@ import { Schema } from './schema';
3
3
  export declare function expoApplicationGenerator(host: Tree, schema: Schema): Promise<GeneratorCallback>;
4
4
  export declare function expoApplicationGeneratorInternal(host: Tree, schema: Schema): Promise<GeneratorCallback>;
5
5
  export default expoApplicationGenerator;
6
- //# sourceMappingURL=application.d.ts.map
@@ -17,6 +17,7 @@ const add_eas_scripts_1 = require("./lib/add-eas-scripts");
17
17
  const add_e2e_1 = require("./lib/add-e2e");
18
18
  const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
19
19
  const init_root_babel_config_1 = require("../../utils/init-root-babel-config");
20
+ const versions_1 = require("../../utils/versions");
20
21
  async function expoApplicationGenerator(host, schema) {
21
22
  return await expoApplicationGeneratorInternal(host, {
22
23
  addPlugin: false,
@@ -25,6 +26,7 @@ async function expoApplicationGenerator(host, schema) {
25
26
  });
26
27
  }
27
28
  async function expoApplicationGeneratorInternal(host, schema) {
29
+ (0, versions_1.assertSupportedExpoVersion)(host);
28
30
  const tasks = [];
29
31
  const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(host, schema.addPlugin, schema.useTsSolution);
30
32
  const jsInitTask = await (0, js_1.initGenerator)(host, {
@@ -1,4 +1,3 @@
1
1
  import { GeneratorCallback, Tree } from '@nx/devkit';
2
2
  import { NormalizedSchema } from './normalize-options';
3
3
  export declare function addE2e(tree: Tree, options: NormalizedSchema): Promise<GeneratorCallback>;
4
- //# sourceMappingURL=add-e2e.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  export declare function addEasScripts(tree: Tree): void;
3
- //# sourceMappingURL=add-eas-scripts.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import { Tree } from '@nx/devkit';
2
2
  import { NormalizedSchema } from './normalize-options';
3
3
  export declare function addProject(host: Tree, options: NormalizedSchema): void;
4
- //# sourceMappingURL=add-project.d.ts.map
@@ -39,7 +39,7 @@ function addProject(host, options) {
39
39
  }
40
40
  }
41
41
  else {
42
- (0, devkit_1.addProjectConfiguration)(host, options.projectName, projectConfiguration, options.standaloneConfig);
42
+ (0, devkit_1.addProjectConfiguration)(host, options.projectName, projectConfiguration);
43
43
  }
44
44
  if (!options.useProjectJson || options.isTsSolutionSetup) {
45
45
  (0, devkit_1.writeJson)(host, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'package.json'), packageJson);
@@ -1,4 +1,3 @@
1
1
  import { Tree } from '@nx/devkit';
2
2
  import { NormalizedSchema } from './normalize-options';
3
3
  export declare function createApplicationFiles(host: Tree, options: NormalizedSchema): Promise<void>;
4
- //# sourceMappingURL=create-application-files.d.ts.map
@@ -14,4 +14,3 @@ export interface NormalizedSchema extends Omit<Schema, 'name' | 'useTsSolution'>
14
14
  isTsSolutionSetup: boolean;
15
15
  }
16
16
  export declare function normalizeOptions(host: Tree, options: Schema): Promise<NormalizedSchema>;
17
- //# sourceMappingURL=normalize-options.d.ts.map
@@ -13,7 +13,6 @@ export interface Schema {
13
13
  linter: Linter | LinterType; // default is eslint
14
14
  setParserOptionsProject?: boolean; // default is false
15
15
  e2eTestRunner: 'cypress' | 'playwright' | 'detox' | 'none'; // default is none
16
- standaloneConfig?: boolean;
17
16
  skipPackageJson?: boolean; // default is false
18
17
  // Internal options
19
18
  addPlugin?: boolean;
@@ -78,12 +78,6 @@
78
78
  "default": "none",
79
79
  "x-priority": "important"
80
80
  },
81
- "standaloneConfig": {
82
- "description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
83
- "type": "boolean",
84
- "default": true,
85
- "x-deprecated": "Nx only supports standaloneConfig"
86
- },
87
81
  "skipPackageJson": {
88
82
  "type": "boolean",
89
83
  "description": "Do not add dependencies to `package.json`.",
@@ -2,4 +2,3 @@ import { Schema } from './schema';
2
2
  import { Tree } from '@nx/devkit';
3
3
  export declare function expoComponentGenerator(host: Tree, schema: Schema): Promise<void>;
4
4
  export default expoComponentGenerator;
5
- //# sourceMappingURL=component.d.ts.map
@@ -8,7 +8,9 @@ const normalize_options_1 = require("./lib/normalize-options");
8
8
  const add_import_1 = require("./lib/add-import");
9
9
  const path_1 = require("path");
10
10
  const internal_1 = require("@nx/js/internal");
11
+ const versions_1 = require("../../utils/versions");
11
12
  async function expoComponentGenerator(host, schema) {
13
+ (0, versions_1.assertSupportedExpoVersion)(host);
12
14
  const options = await (0, normalize_options_1.normalizeOptions)(host, schema);
13
15
  createComponentFiles(host, options);
14
16
  addExportsToBarrel(host, options);
@@ -1,4 +1,3 @@
1
1
  import * as ts from 'typescript';
2
2
  import { StringChange } from '@nx/devkit';
3
3
  export declare function addImport(source: ts.SourceFile, statement: string): StringChange[];
4
- //# sourceMappingURL=add-import.d.ts.map
@@ -13,4 +13,3 @@ export interface NormalizedSchema extends Schema {
13
13
  projectRoot: string;
14
14
  }
15
15
  export declare function normalizeOptions(host: Tree, options: Schema): Promise<NormalizedSchema>;
16
- //# sourceMappingURL=normalize-options.d.ts.map
@@ -5,4 +5,3 @@ interface Schema {
5
5
  }
6
6
  export declare function convertToInferred(tree: Tree, options: Schema): Promise<() => void>;
7
7
  export default convertToInferred;
8
- //# sourceMappingURL=convert-to-inferred.d.ts.map
@@ -13,7 +13,9 @@ const process_start_options_1 = require("./lib/process-start-options");
13
13
  const process_submit_options_1 = require("./lib/process-submit-options");
14
14
  const process_prebuild_options_1 = require("./lib/process-prebuild-options");
15
15
  const process_install_options_1 = require("./lib/process-install-options");
16
+ const versions_1 = require("../../utils/versions");
16
17
  async function convertToInferred(tree, options) {
18
+ (0, versions_1.assertSupportedExpoVersion)(tree);
17
19
  const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
18
20
  const migrationLogs = new internal_1.AggregatedLog();
19
21
  const projects = (0, devkit_1.getProjects)(tree);
@@ -4,4 +4,3 @@ export declare function postTargetTransformer(migrationLogs: AggregatedLog, proc
4
4
  projectName: string;
5
5
  root: string;
6
6
  }, inferredTargetConfiguration: TargetConfiguration) => TargetConfiguration<any>;
7
- //# sourceMappingURL=post-target-transformer.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  import type { AggregatedLog } from '@nx/devkit/internal';
3
3
  export declare function processBuildOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
4
- //# sourceMappingURL=process-build-options.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  import type { AggregatedLog } from '@nx/devkit/internal';
3
3
  export declare function processExportOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
4
- //# sourceMappingURL=process-export-options.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  import type { AggregatedLog } from '@nx/devkit/internal';
3
3
  export declare function processGenericOptions(_tree: Tree, options: any, _projectName: string, _projectRoot: string, _migrationLogs: AggregatedLog): void;
4
- //# sourceMappingURL=process-generic-options.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  import type { AggregatedLog } from '@nx/devkit/internal';
3
3
  export declare function processInstallOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
4
- //# sourceMappingURL=process-install-options.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  import type { AggregatedLog } from '@nx/devkit/internal';
3
3
  export declare function processPrebuildOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
4
- //# sourceMappingURL=process-prebuild-options.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  import type { AggregatedLog } from '@nx/devkit/internal';
3
3
  export declare function processRunOptions(_tree: Tree, options: any, projectName: string, _projectRoot: string, migrationLogs: AggregatedLog): void;
4
- //# sourceMappingURL=process-run-options.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  import type { AggregatedLog } from '@nx/devkit/internal';
3
3
  export declare function processServeOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
4
- //# sourceMappingURL=process-serve-options.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  import type { AggregatedLog } from '@nx/devkit/internal';
3
3
  export declare function processStartOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
4
- //# sourceMappingURL=process-start-options.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  import type { AggregatedLog } from '@nx/devkit/internal';
3
3
  export declare function processSubmitOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
4
- //# sourceMappingURL=process-submit-options.d.ts.map
@@ -4,4 +4,3 @@ export declare function expoInitGenerator(tree: Tree, schema: Schema): Promise<G
4
4
  export declare function expoInitGeneratorInternal(host: Tree, schema: Schema): Promise<GeneratorCallback>;
5
5
  export declare function updateDependencies(host: Tree, schema: Schema): Promise<GeneratorCallback>;
6
6
  export default expoInitGenerator;
7
- //# sourceMappingURL=init.d.ts.map
@@ -13,6 +13,7 @@ function expoInitGenerator(tree, schema) {
13
13
  return expoInitGeneratorInternal(tree, { addPlugin: false, ...schema });
14
14
  }
15
15
  async function expoInitGeneratorInternal(host, schema) {
16
+ (0, versions_1.assertSupportedExpoVersion)(host);
16
17
  const nxJson = (0, devkit_1.readNxJson)(host);
17
18
  const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
18
19
  nxJson.useInferencePlugins !== false;
@@ -67,7 +68,7 @@ async function updateDependencies(host, schema) {
67
68
  '@expo/cli': versions.expoCli,
68
69
  'metro-config': versions.metro,
69
70
  'metro-resolver': versions.metro,
70
- }, undefined, schema.keepExistingVersions);
71
+ }, undefined, schema.keepExistingVersions ?? true);
71
72
  }
72
73
  function moveDependency(host) {
73
74
  return (0, devkit_1.removeDependenciesFromPackageJson)(host, ['@nx/react-native'], []);
@@ -1,3 +1,2 @@
1
1
  import { Tree } from '@nx/devkit';
2
2
  export declare function addGitIgnoreEntry(host: Tree): void;
3
- //# sourceMappingURL=add-git-ignore-entry.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare const gitIgnoreEntriesForExpo = "\n# Expo\nnode_modules/\n.expo/\n.yarn/\ndist/\nnpm-debug.*\n*.jks\n*.p8\n*.p12\n*.key\n*.mobileprovision\n*.orig.*\nweb-build/\ncache/\n";
2
- //# sourceMappingURL=gitignore-entries.d.ts.map
@@ -1,7 +1,7 @@
1
1
  export interface Schema {
2
2
  skipFormat?: boolean;
3
3
  skipPackageJson?: boolean; // default is false
4
- keepExistingVersions?: boolean; // default is false
4
+ keepExistingVersions?: boolean; // default is true
5
5
  updatePackageScripts?: boolean;
6
6
  addPlugin?: boolean;
7
7
  }
@@ -20,7 +20,7 @@
20
20
  "type": "boolean",
21
21
  "x-priority": "internal",
22
22
  "description": "Keep existing dependencies versions",
23
- "default": false
23
+ "default": true
24
24
  },
25
25
  "updatePackageScripts": {
26
26
  "type": "boolean",
@@ -10,4 +10,3 @@ export interface NormalizedSchema extends Omit<Schema, 'name'> {
10
10
  isUsingTsSolutionConfig: boolean;
11
11
  }
12
12
  export declare function normalizeOptions(host: Tree, options: Schema): Promise<NormalizedSchema>;
13
- //# sourceMappingURL=normalize-options.d.ts.map
@@ -3,4 +3,3 @@ import { Schema } from './schema';
3
3
  export declare function expoLibraryGenerator(host: Tree, schema: Schema): Promise<GeneratorCallback>;
4
4
  export declare function expoLibraryGeneratorInternal(host: Tree, schema: Schema): Promise<GeneratorCallback>;
5
5
  export default expoLibraryGenerator;
6
- //# sourceMappingURL=library.d.ts.map
@@ -13,10 +13,11 @@ const normalize_options_1 = require("./lib/normalize-options");
13
13
  const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
14
14
  const init_root_babel_config_1 = require("../../utils/init-root-babel-config");
15
15
  const internal_2 = require("@nx/js/internal");
16
- const add_rollup_build_target_1 = require("@nx/react/src/generators/library/lib/add-rollup-build-target");
16
+ const internal_3 = require("@nx/react/internal");
17
17
  const component_1 = require("../component/component");
18
18
  const path_1 = require("path");
19
19
  const version_utils_1 = require("../../utils/version-utils");
20
+ const versions_1 = require("../../utils/versions");
20
21
  async function expoLibraryGenerator(host, schema) {
21
22
  return await expoLibraryGeneratorInternal(host, {
22
23
  addPlugin: false,
@@ -25,6 +26,7 @@ async function expoLibraryGenerator(host, schema) {
25
26
  });
26
27
  }
27
28
  async function expoLibraryGeneratorInternal(host, schema) {
29
+ (0, versions_1.assertSupportedExpoVersion)(host);
28
30
  const tasks = [];
29
31
  const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(host, schema.addPlugin);
30
32
  const jsInitTask = await (0, js_1.initGenerator)(host, {
@@ -147,7 +149,7 @@ async function addProject(host, options) {
147
149
  'react',
148
150
  'react-dom',
149
151
  ]);
150
- const rollupTask = await (0, add_rollup_build_target_1.addRollupBuildTarget)(host, {
152
+ const rollupTask = await (0, internal_3.addRollupBuildTarget)(host, {
151
153
  ...options,
152
154
  name: options.projectName,
153
155
  format: ['cjs', 'esm'],
@@ -1,3 +1,2 @@
1
1
  import { Tree } from '@nx/devkit';
2
2
  export default function addJestResolver(tree: Tree): Promise<void>;
3
- //# sourceMappingURL=add-jest-resolver.d.ts.map
@@ -3,4 +3,3 @@ import { Tree } from '@nx/devkit';
3
3
  * Remove deprecated dependencies from the root and app package.json.
4
4
  */
5
5
  export default function update(tree: Tree): void;
6
- //# sourceMappingURL=remove-deprecated-deps.d.ts.map
@@ -5,4 +5,3 @@ import { Tree } from '@nx/devkit';
5
5
  * to the new plugin-based format introduced in Expo SDK 53+.
6
6
  */
7
7
  export default function update(tree: Tree): void;
8
- //# sourceMappingURL=update-splash-screen-config.d.ts.map
@@ -5,4 +5,3 @@ import { Tree } from '@nx/devkit';
5
5
  * and user interface style configuration.
6
6
  */
7
7
  export default function update(tree: Tree): void;
8
- //# sourceMappingURL=add-expo-system-ui.d.ts.map
@@ -9,4 +9,3 @@ import { Tree } from '@nx/devkit';
9
9
  * - Update tsconfig files to remove jest.resolver.js references
10
10
  */
11
11
  export default function update(tree: Tree): Promise<void>;
12
- //# sourceMappingURL=update-jest-for-expo-54.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ export default function migrateCreateNodesV2ToCreateNodes(tree: Tree): Promise<void>;
3
+ /**
4
+ * Rewrites named imports and re-exports of `createNodesV2` to `createNodes`
5
+ * when they come from one of the given module specifiers. Only the named
6
+ * bindings are touched — the module specifier, the `import`/`export` keyword,
7
+ * any `type` modifier, and any default import are left untouched.
8
+ */
9
+ export declare function rewriteCreateNodesV2Imports(source: string, specifiers: ReadonlySet<string>): string;
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = migrateCreateNodesV2ToCreateNodes;
4
+ exports.rewriteCreateNodesV2Imports = rewriteCreateNodesV2Imports;
5
+ const devkit_1 = require("@nx/devkit");
6
+ const TS_EXTENSIONS = ['.ts', '.tsx', '.cts', '.mts'];
7
+ const DEPRECATED_NAME = 'createNodesV2';
8
+ const CANONICAL_NAME = 'createNodes';
9
+ // Module specifiers from which `@nx/expo` publicly exposes `createNodesV2`.
10
+ // A named import or re-export of `createNodesV2` from one of these is rewritten
11
+ // to the canonical `createNodes` export.
12
+ const TARGET_SPECIFIERS = new Set(['@nx/expo/plugin']);
13
+ let ts;
14
+ async function migrateCreateNodesV2ToCreateNodes(tree) {
15
+ let touchedCount = 0;
16
+ (0, devkit_1.visitNotIgnoredFiles)(tree, '.', (filePath) => {
17
+ if (!TS_EXTENSIONS.some((ext) => filePath.endsWith(ext))) {
18
+ return;
19
+ }
20
+ const original = tree.read(filePath, 'utf-8');
21
+ if (!original || !original.includes(DEPRECATED_NAME)) {
22
+ return;
23
+ }
24
+ const updated = rewriteCreateNodesV2Imports(original, TARGET_SPECIFIERS);
25
+ if (updated !== original) {
26
+ tree.write(filePath, updated);
27
+ touchedCount += 1;
28
+ }
29
+ });
30
+ if (touchedCount > 0) {
31
+ devkit_1.logger.info(`Renamed \`${DEPRECATED_NAME}\` imports to \`${CANONICAL_NAME}\` in ${touchedCount} file(s).`);
32
+ }
33
+ await (0, devkit_1.formatFiles)(tree);
34
+ }
35
+ /**
36
+ * Rewrites named imports and re-exports of `createNodesV2` to `createNodes`
37
+ * when they come from one of the given module specifiers. Only the named
38
+ * bindings are touched — the module specifier, the `import`/`export` keyword,
39
+ * any `type` modifier, and any default import are left untouched.
40
+ */
41
+ function rewriteCreateNodesV2Imports(source, specifiers) {
42
+ ts ??= (0, devkit_1.ensurePackage)('typescript', '*');
43
+ const sourceFile = ts.createSourceFile('tmp.ts', source, ts.ScriptTarget.Latest,
44
+ /* setParentNodes */ true, ts.ScriptKind.TSX);
45
+ const changes = [];
46
+ for (const stmt of sourceFile.statements) {
47
+ if (ts.isImportDeclaration(stmt)) {
48
+ collectImportRewrite(sourceFile, stmt, specifiers, changes);
49
+ }
50
+ else if (ts.isExportDeclaration(stmt)) {
51
+ collectExportRewrite(sourceFile, stmt, specifiers, changes);
52
+ }
53
+ }
54
+ return changes.length > 0 ? (0, devkit_1.applyChangesToString)(source, changes) : source;
55
+ }
56
+ function isTargetSpecifier(node, specifiers) {
57
+ return ts.isStringLiteral(node) && specifiers.has(node.text);
58
+ }
59
+ function collectImportRewrite(sourceFile, stmt, specifiers, changes) {
60
+ if (!isTargetSpecifier(stmt.moduleSpecifier, specifiers)) {
61
+ return;
62
+ }
63
+ const namedBindings = stmt.importClause?.namedBindings;
64
+ // Only `import { ... }` carries renameable named bindings. `import x`,
65
+ // `import * as ns`, and side-effect imports reference the module wholesale
66
+ // and keep working through the `createNodesV2` runtime alias, so we leave
67
+ // them be. A mixed `import def, { createNodesV2 }` still has its named
68
+ // bindings rewritten below — the default binding is untouched.
69
+ if (!namedBindings || !ts.isNamedImports(namedBindings)) {
70
+ return;
71
+ }
72
+ rewriteNamedBindings(sourceFile, namedBindings, changes);
73
+ }
74
+ function collectExportRewrite(sourceFile, stmt, specifiers, changes) {
75
+ if (!stmt.moduleSpecifier ||
76
+ !isTargetSpecifier(stmt.moduleSpecifier, specifiers)) {
77
+ return;
78
+ }
79
+ // `export { ... } from '...'` can be rewritten; `export * from '...'` has no
80
+ // named bindings to rename.
81
+ if (!stmt.exportClause || !ts.isNamedExports(stmt.exportClause)) {
82
+ return;
83
+ }
84
+ rewriteNamedBindings(sourceFile, stmt.exportClause, changes);
85
+ }
86
+ /**
87
+ * Re-renders the `{ ... }` of a named import/export, renaming any
88
+ * `createNodesV2` specifier to `createNodes`. If renaming would collide with a
89
+ * `createNodes` that is already present (e.g. `{ createNodes, createNodesV2 }`),
90
+ * the duplicate is dropped. Returns without recording a change when the binding
91
+ * list contains no `createNodesV2`.
92
+ */
93
+ function rewriteNamedBindings(sourceFile, namedBindings, changes) {
94
+ const elements = namedBindings.elements;
95
+ const hasDeprecated = elements.some((el) => (el.propertyName ?? el.name).text === DEPRECATED_NAME);
96
+ if (!hasDeprecated) {
97
+ return;
98
+ }
99
+ const seen = new Set();
100
+ const rendered = [];
101
+ for (const el of elements) {
102
+ const text = renderSpecifier(el);
103
+ if (!seen.has(text)) {
104
+ seen.add(text);
105
+ rendered.push(text);
106
+ }
107
+ }
108
+ const start = namedBindings.getStart(sourceFile);
109
+ changes.push({
110
+ type: devkit_1.ChangeType.Delete,
111
+ start,
112
+ length: namedBindings.getEnd() - start,
113
+ }, {
114
+ type: devkit_1.ChangeType.Insert,
115
+ index: start,
116
+ text: `{ ${rendered.join(', ')} }`,
117
+ });
118
+ }
119
+ function renderSpecifier(el) {
120
+ const typePrefix = el.isTypeOnly ? 'type ' : '';
121
+ const rename = (name) => name === DEPRECATED_NAME ? CANONICAL_NAME : name;
122
+ // `{ name }` — no alias, so the local binding follows the rename.
123
+ if (!el.propertyName) {
124
+ return `${typePrefix}${rename(el.name.text)}`;
125
+ }
126
+ // `{ propertyName as name }` — only the imported (left) side is renamed; the
127
+ // local alias is preserved. A now-redundant alias such as
128
+ // `createNodesV2 as createNodes` collapses to `createNodes`.
129
+ const canonicalImported = rename(el.propertyName.text);
130
+ const localName = el.name.text;
131
+ return canonicalImported === localName
132
+ ? `${typePrefix}${localName}`
133
+ : `${typePrefix}${canonicalImported} as ${localName}`;
134
+ }