@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.
- package/{index.d.ts → dist/index.d.ts} +0 -1
- package/{plugin.d.ts → dist/plugin.d.ts} +0 -1
- package/dist/plugins/jest/svg-mock.d.ts +1 -0
- package/{plugins → dist/plugins}/jest/svg-mock.js +2 -0
- package/{plugins → dist/plugins}/metro-resolver.d.ts +0 -1
- package/{plugins → dist/plugins}/plugin.d.ts +0 -1
- package/{plugins → dist/plugins}/with-nx-metro.d.ts +0 -1
- package/dist/readme-template.md +18 -0
- package/{src → dist/src}/executors/build/build.impl.d.ts +0 -1
- package/{src → dist/src}/executors/build-list/build-list.impl.d.ts +0 -1
- package/{src → dist/src}/executors/ensure-symlink/ensure-symlink.impl.d.ts +0 -1
- package/{src → dist/src}/executors/export/export.impl.d.ts +0 -1
- package/{src → dist/src}/executors/install/install.impl.d.ts +0 -1
- package/{src → dist/src}/executors/prebuild/prebuild.impl.d.ts +0 -1
- package/{src → dist/src}/executors/run/run.impl.d.ts +0 -1
- package/{src → dist/src}/executors/serve/lib/is-packager-running.d.ts +0 -1
- package/{src → dist/src}/executors/serve/serve.impl.d.ts +0 -1
- package/{src → dist/src}/executors/start/start.impl.d.ts +0 -1
- package/{src → dist/src}/executors/submit/submit.impl.d.ts +0 -1
- package/{src → dist/src}/executors/sync-deps/sync-deps.impl.d.ts +0 -1
- package/{src → dist/src}/executors/update/update.impl.d.ts +0 -1
- package/{src → dist/src}/generators/application/application.d.ts +0 -1
- package/{src → dist/src}/generators/application/application.js +2 -0
- package/{src → dist/src}/generators/application/lib/add-e2e.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-eas-scripts.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-project.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-project.js +1 -1
- package/{src → dist/src}/generators/application/lib/create-application-files.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/application/schema.d.ts +0 -1
- package/{src → dist/src}/generators/application/schema.json +0 -6
- package/{src → dist/src}/generators/component/component.d.ts +0 -1
- package/{src → dist/src}/generators/component/component.js +2 -0
- package/{src → dist/src}/generators/component/lib/add-import.d.ts +0 -1
- package/{src → dist/src}/generators/component/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.js +2 -0
- package/{src → dist/src}/generators/convert-to-inferred/lib/post-target-transformer.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/process-build-options.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/process-export-options.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/process-generic-options.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/process-install-options.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/process-prebuild-options.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/process-run-options.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/process-serve-options.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/process-start-options.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/process-submit-options.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.js +2 -1
- package/{src → dist/src}/generators/init/lib/add-git-ignore-entry.d.ts +0 -1
- package/{src → dist/src}/generators/init/lib/gitignore-entries.d.ts +0 -1
- package/{src → dist/src}/generators/init/schema.d.ts +1 -1
- package/{src → dist/src}/generators/init/schema.json +1 -1
- package/{src → dist/src}/generators/library/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/library/library.d.ts +0 -1
- package/{src → dist/src}/generators/library/library.js +4 -2
- package/{src → dist/src}/migrations/update-21-4-0/add-jest-resolver.d.ts +0 -1
- package/{src → dist/src}/migrations/update-21-4-0/remove-deprecated-deps.d.ts +0 -1
- package/{src → dist/src}/migrations/update-21-4-0/update-splash-screen-config.d.ts +0 -1
- package/{src → dist/src}/migrations/update-22-2-0/add-expo-system-ui.d.ts +0 -1
- package/{src → dist/src}/migrations/update-22-2-0/update-jest-for-expo-54.d.ts +0 -1
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts +9 -0
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +134 -0
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +25 -0
- package/{src → dist/src}/utils/add-linting.d.ts +0 -1
- package/{src → dist/src}/utils/add-linting.js +2 -2
- package/{src → dist/src}/utils/deprecation.d.ts +0 -1
- package/{src → dist/src}/utils/ensure-dependencies.d.ts +0 -1
- package/{src → dist/src}/utils/ensure-dependencies.js +1 -1
- package/{src → dist/src}/utils/ensure-node-modules-symlink.d.ts +0 -1
- package/{src → dist/src}/utils/expo-project-detection.d.ts +0 -1
- package/{src → dist/src}/utils/find-all-npm-dependencies.d.ts +0 -1
- package/{src → dist/src}/utils/has-expo-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/init-root-babel-config.d.ts +0 -1
- package/{src → dist/src}/utils/jest/add-jest.d.ts +0 -1
- package/{src → dist/src}/utils/jest/add-jest.js +7 -6
- package/{src → dist/src}/utils/pod-install-task.d.ts +0 -1
- package/{src → dist/src}/utils/resolve-eas.d.ts +0 -1
- package/{src → dist/src}/utils/update-tsconfig-files.d.ts +0 -1
- package/{src → dist/src}/utils/version-utils.d.ts +3 -11
- package/dist/src/utils/version-utils.js +133 -0
- package/{src → dist/src}/utils/versions.d.ts +32 -14
- package/dist/src/utils/versions.js +87 -0
- package/dist/typings/svg.d.ts +6 -0
- package/executors.json +24 -24
- package/generators.json +10 -10
- package/migrations.json +93 -61
- package/package.json +82 -12
- package/index.d.ts.map +0 -1
- package/plugin.d.ts.map +0 -1
- package/plugins/jest/svg-mock.d.ts +0 -1
- package/plugins/jest/svg-mock.d.ts.map +0 -1
- package/plugins/metro-resolver.d.ts.map +0 -1
- package/plugins/plugin.d.ts.map +0 -1
- package/plugins/with-nx-metro.d.ts.map +0 -1
- package/src/executors/build/build.impl.d.ts.map +0 -1
- package/src/executors/build-list/build-list.impl.d.ts.map +0 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts.map +0 -1
- package/src/executors/export/export.impl.d.ts.map +0 -1
- package/src/executors/install/install.impl.d.ts.map +0 -1
- package/src/executors/prebuild/prebuild.impl.d.ts.map +0 -1
- package/src/executors/run/run.impl.d.ts.map +0 -1
- package/src/executors/serve/lib/is-packager-running.d.ts.map +0 -1
- package/src/executors/serve/serve.impl.d.ts.map +0 -1
- package/src/executors/start/start.impl.d.ts.map +0 -1
- package/src/executors/submit/submit.impl.d.ts.map +0 -1
- package/src/executors/sync-deps/sync-deps.impl.d.ts.map +0 -1
- package/src/executors/update/update.impl.d.ts.map +0 -1
- package/src/generators/application/application.d.ts.map +0 -1
- package/src/generators/application/lib/add-e2e.d.ts.map +0 -1
- package/src/generators/application/lib/add-eas-scripts.d.ts.map +0 -1
- package/src/generators/application/lib/add-project.d.ts.map +0 -1
- package/src/generators/application/lib/create-application-files.d.ts.map +0 -1
- package/src/generators/application/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/component/component.d.ts.map +0 -1
- package/src/generators/component/lib/add-import.d.ts.map +0 -1
- package/src/generators/component/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/post-target-transformer.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/process-build-options.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/process-export-options.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/process-generic-options.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/process-install-options.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/process-prebuild-options.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/process-run-options.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/process-serve-options.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/process-start-options.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/process-submit-options.d.ts.map +0 -1
- package/src/generators/init/init.d.ts.map +0 -1
- package/src/generators/init/lib/add-git-ignore-entry.d.ts.map +0 -1
- package/src/generators/init/lib/gitignore-entries.d.ts.map +0 -1
- package/src/generators/library/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/library/library.d.ts.map +0 -1
- package/src/migrations/update-21-4-0/add-jest-resolver.d.ts.map +0 -1
- package/src/migrations/update-21-4-0/remove-deprecated-deps.d.ts.map +0 -1
- package/src/migrations/update-21-4-0/update-splash-screen-config.d.ts.map +0 -1
- package/src/migrations/update-22-2-0/add-expo-system-ui.d.ts.map +0 -1
- package/src/migrations/update-22-2-0/update-jest-for-expo-54.d.ts.map +0 -1
- package/src/utils/add-linting.d.ts.map +0 -1
- package/src/utils/deprecation.d.ts.map +0 -1
- package/src/utils/ensure-dependencies.d.ts.map +0 -1
- package/src/utils/ensure-node-modules-symlink.d.ts.map +0 -1
- package/src/utils/expo-project-detection.d.ts.map +0 -1
- package/src/utils/find-all-npm-dependencies.d.ts.map +0 -1
- package/src/utils/has-expo-plugin.d.ts.map +0 -1
- package/src/utils/init-root-babel-config.d.ts.map +0 -1
- package/src/utils/jest/add-jest.d.ts.map +0 -1
- package/src/utils/pod-install-task.d.ts.map +0 -1
- package/src/utils/resolve-eas.d.ts.map +0 -1
- package/src/utils/update-tsconfig-files.d.ts.map +0 -1
- package/src/utils/version-utils.d.ts.map +0 -1
- package/src/utils/version-utils.js +0 -132
- package/src/utils/versions.d.ts.map +0 -1
- package/src/utils/versions.js +0 -60
- /package/{LICENSE → dist/LICENSE} +0 -0
- /package/{docs → dist/docs}/build-list-examples.md +0 -0
- /package/{docs → dist/docs}/export-examples.md +0 -0
- /package/{docs → dist/docs}/prebuild-examples.md +0 -0
- /package/{docs → dist/docs}/run-examples.md +0 -0
- /package/{docs → dist/docs}/start-examples.md +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{plugin.js → dist/plugin.js} +0 -0
- /package/{plugins → dist/plugins}/metro-resolver.js +0 -0
- /package/{plugins → dist/plugins}/plugin.js +0 -0
- /package/{plugins → dist/plugins}/with-nx-metro.js +0 -0
- /package/{src → dist/src}/executors/build/build.impl.js +0 -0
- /package/{src → dist/src}/executors/build/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/build/schema.json +0 -0
- /package/{src → dist/src}/executors/build-list/build-fragment.d.ts +0 -0
- /package/{src → dist/src}/executors/build-list/build-list.impl.js +0 -0
- /package/{src → dist/src}/executors/build-list/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/build-list/schema.json +0 -0
- /package/{src → dist/src}/executors/ensure-symlink/ensure-symlink.impl.js +0 -0
- /package/{src → dist/src}/executors/ensure-symlink/schema.json +0 -0
- /package/{src → dist/src}/executors/export/export.impl.js +0 -0
- /package/{src → dist/src}/executors/export/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/export/schema.json +0 -0
- /package/{src → dist/src}/executors/install/install.impl.js +0 -0
- /package/{src → dist/src}/executors/install/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/install/schema.json +0 -0
- /package/{src → dist/src}/executors/prebuild/prebuild.impl.js +0 -0
- /package/{src → dist/src}/executors/prebuild/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/prebuild/schema.json +0 -0
- /package/{src → dist/src}/executors/run/run.impl.js +0 -0
- /package/{src → dist/src}/executors/run/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/run/schema.json +0 -0
- /package/{src → dist/src}/executors/serve/lib/is-packager-running.js +0 -0
- /package/{src → dist/src}/executors/serve/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/serve/schema.json +0 -0
- /package/{src → dist/src}/executors/serve/serve.impl.js +0 -0
- /package/{src → dist/src}/executors/start/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/start/schema.json +0 -0
- /package/{src → dist/src}/executors/start/start.impl.js +0 -0
- /package/{src → dist/src}/executors/submit/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/submit/schema.json +0 -0
- /package/{src → dist/src}/executors/submit/submit.impl.js +0 -0
- /package/{src → dist/src}/executors/sync-deps/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/sync-deps/schema.json +0 -0
- /package/{src → dist/src}/executors/sync-deps/sync-deps.impl.js +0 -0
- /package/{src → dist/src}/executors/update/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/update/schema.json +0 -0
- /package/{src → dist/src}/executors/update/update.impl.js +0 -0
- /package/{src → dist/src}/generators/application/files/base/.babelrc.js.template +0 -0
- /package/{src → dist/src}/generators/application/files/base/app.json.template +0 -0
- /package/{src → dist/src}/generators/application/files/base/assets/fonts/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base/assets/images/adaptive-icon.png +0 -0
- /package/{src → dist/src}/generators/application/files/base/assets/images/favicon.png +0 -0
- /package/{src → dist/src}/generators/application/files/base/assets/images/icon.png +0 -0
- /package/{src → dist/src}/generators/application/files/base/assets/images/splash-icon.png +0 -0
- /package/{src → dist/src}/generators/application/files/base/eas.json.template +0 -0
- /package/{src → dist/src}/generators/application/files/base/index.js.template +0 -0
- /package/{src → dist/src}/generators/application/files/base/metro.config.js.template +0 -0
- /package/{src → dist/src}/generators/application/files/base/package.json.template +0 -0
- /package/{src → dist/src}/generators/application/files/base/src/app/App.spec.tsx.template +0 -0
- /package/{src → dist/src}/generators/application/files/base/tsconfig.app.json.template +0 -0
- /package/{src → dist/src}/generators/application/files/base/tsconfig.json.template +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/claimed/src/app/App.tsx.template +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/not-configured/src/app/App.tsx.template +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/unclaimed/src/app/App.tsx.template +0 -0
- /package/{src → dist/src}/generators/application/lib/add-e2e.js +0 -0
- /package/{src → dist/src}/generators/application/lib/add-eas-scripts.js +0 -0
- /package/{src → dist/src}/generators/application/lib/create-application-files.js +0 -0
- /package/{src → dist/src}/generators/application/lib/normalize-options.js +0 -0
- /package/{src → dist/src}/generators/component/files/js/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/component/files/js/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/component/files/ts/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/component/files/ts/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/component/lib/add-import.js +0 -0
- /package/{src → dist/src}/generators/component/lib/normalize-options.js +0 -0
- /package/{src → dist/src}/generators/component/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/component/schema.json +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/post-target-transformer.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/process-build-options.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/process-export-options.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/process-generic-options.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/process-install-options.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/process-prebuild-options.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/process-run-options.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/process-serve-options.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/process-start-options.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/process-submit-options.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/schema.json +0 -0
- /package/{src → dist/src}/generators/init/lib/add-git-ignore-entry.js +0 -0
- /package/{src → dist/src}/generators/init/lib/gitignore-entries.js +0 -0
- /package/{src → dist/src}/generators/library/files/lib/.babelrc.js.template +0 -0
- /package/{src → dist/src}/generators/library/files/lib/README.md +0 -0
- /package/{src → dist/src}/generators/library/files/lib/src/index.ts.template +0 -0
- /package/{src → dist/src}/generators/library/files/lib/tsconfig.json.template +0 -0
- /package/{src → dist/src}/generators/library/files/lib/tsconfig.lib.json.template +0 -0
- /package/{src → dist/src}/generators/library/lib/normalize-options.js +0 -0
- /package/{src → dist/src}/generators/library/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/library/schema.json +0 -0
- /package/{src → dist/src}/migrations/update-21-4-0/add-jest-resolver.js +0 -0
- /package/{src → dist/src}/migrations/update-21-4-0/remove-deprecated-deps.js +0 -0
- /package/{src → dist/src}/migrations/update-21-4-0/update-splash-screen-config.js +0 -0
- /package/{src → dist/src}/migrations/update-22-2-0/add-expo-system-ui.js +0 -0
- /package/{src → dist/src}/migrations/update-22-2-0/ai-instructions-for-expo-54.md +0 -0
- /package/{src → dist/src}/migrations/update-22-2-0/update-jest-for-expo-54.js +0 -0
- /package/{src → dist/src}/utils/deprecation.js +0 -0
- /package/{src → dist/src}/utils/ensure-node-modules-symlink.js +0 -0
- /package/{src → dist/src}/utils/expo-project-detection.js +0 -0
- /package/{src → dist/src}/utils/find-all-npm-dependencies.js +0 -0
- /package/{src → dist/src}/utils/has-expo-plugin.js +0 -0
- /package/{src → dist/src}/utils/init-root-babel-config.js +0 -0
- /package/{src → dist/src}/utils/jest/files/jest.resolver.js +0 -0
- /package/{src → dist/src}/utils/pod-install-task.js +0 -0
- /package/{src → dist/src}/utils/resolve-eas.js +0 -0
- /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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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}}
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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, {
|
|
@@ -39,7 +39,7 @@ function addProject(host, options) {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
|
-
(0, devkit_1.addProjectConfiguration)(host, options.projectName, projectConfiguration
|
|
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);
|
|
@@ -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`.",
|
|
@@ -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);
|
|
@@ -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);
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
export interface Schema {
|
|
2
2
|
skipFormat?: boolean;
|
|
3
3
|
skipPackageJson?: boolean; // default is false
|
|
4
|
-
keepExistingVersions?: boolean; // default is
|
|
4
|
+
keepExistingVersions?: boolean; // default is true
|
|
5
5
|
updatePackageScripts?: boolean;
|
|
6
6
|
addPlugin?: boolean;
|
|
7
7
|
}
|
|
@@ -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
|
|
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,
|
|
152
|
+
const rollupTask = await (0, internal_3.addRollupBuildTarget)(host, {
|
|
151
153
|
...options,
|
|
152
154
|
name: options.projectName,
|
|
153
155
|
format: ['cjs', 'esm'],
|
|
@@ -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
|
+
}
|