@nx/react 23.0.0-pr.35465.2bc2643 → 23.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{ast-utils.d.ts → dist/ast-utils.d.ts} +0 -1
- package/dist/babel.d.ts +1 -0
- package/{babel.js → dist/babel.js} +2 -0
- package/{index.d.ts → dist/index.d.ts} +0 -6
- package/{index.js → dist/index.js} +1 -8
- package/dist/internal.d.ts +7 -0
- package/dist/internal.js +26 -0
- package/{mf → dist/mf}/dynamic-federation.d.ts +0 -1
- package/{mf → dist/mf}/index.d.ts +0 -1
- package/{module-federation.d.ts → dist/module-federation.d.ts} +0 -1
- package/dist/plugins/bundle-rollup.d.ts +1 -0
- package/{plugins → dist/plugins}/component-testing/index.d.ts +0 -1
- package/{plugins → dist/plugins}/component-testing/index.js +9 -12
- package/{plugins → dist/plugins}/component-testing/webpack-fallback.d.ts +0 -1
- package/{plugins → dist/plugins}/component-testing/webpack-fallback.js +2 -2
- package/dist/plugins/jest.d.ts +1 -0
- package/{plugins → dist/plugins}/nx-react-webpack-plugin/lib/apply-react-config.d.ts +0 -1
- package/{plugins → dist/plugins}/nx-react-webpack-plugin/nx-react-webpack-plugin.d.ts +0 -1
- package/{plugins → dist/plugins}/storybook/index.d.ts +0 -1
- package/{plugins → dist/plugins}/storybook/index.js +18 -12
- package/{plugins → dist/plugins}/storybook/merge-plugins.d.ts +0 -1
- package/dist/plugins/webpack.d.ts +1 -0
- package/{plugins → dist/plugins}/with-react.d.ts +4 -1
- package/{plugins → dist/plugins}/with-react.js +6 -0
- package/dist/router-plugin.d.ts +1 -0
- package/{router-plugin.js → dist/router-plugin.js} +2 -1
- package/{src → dist/src}/executors/module-federation-dev-server/lib/index.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/lib/start-remotes.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/module-federation-dev-server.impl.js +13 -13
- package/{src → dist/src}/executors/module-federation-dev-server/schema.d.ts +1 -1
- package/{src → dist/src}/executors/module-federation-dev-server/schema.json +1 -0
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/index.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +13 -12
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/schema.d.ts +2 -2
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/schema.json +1 -0
- package/{src → dist/src}/executors/module-federation-static-server/module-federation-static-server.impl.d.ts +1 -2
- package/{src → dist/src}/executors/module-federation-static-server/module-federation-static-server.impl.js +15 -16
- package/{src → dist/src}/executors/module-federation-static-server/schema.json +1 -0
- package/dist/src/generators/_utils/mf-dependencies.d.ts +7 -0
- package/dist/src/generators/_utils/mf-dependencies.js +84 -0
- package/dist/src/generators/_utils/mf-versions.d.ts +11 -0
- package/dist/src/generators/_utils/mf-versions.js +29 -0
- package/dist/src/generators/_utils/normalize.d.ts +19 -0
- package/dist/src/generators/_utils/normalize.js +48 -0
- package/{src → dist/src}/generators/application/application.d.ts +0 -1
- package/{src → dist/src}/generators/application/application.js +34 -33
- package/{src → dist/src}/generators/application/files/base-rsbuild/tsconfig.app.json__tmpl__ +0 -2
- package/{src/generators/application/files/base-webpack → dist/src/generators/application/files/base-rspack}/tsconfig.app.json__tmpl__ +0 -2
- package/{src → dist/src}/generators/application/files/base-vite/index.html__tmpl__ +1 -1
- package/{src/generators/application/files/base-rspack → dist/src/generators/application/files/base-vite}/tsconfig.app.json__tmpl__ +0 -2
- package/{src/generators/application/files/base-vite → dist/src/generators/application/files/base-webpack}/tsconfig.app.json__tmpl__ +0 -2
- package/{src → dist/src}/generators/application/lib/add-e2e.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-e2e.js +1 -34
- package/{src → dist/src}/generators/application/lib/add-jest.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-linting.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-linting.js +10 -45
- package/{src → dist/src}/generators/application/lib/add-project.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-project.js +14 -4
- package/{src → dist/src}/generators/application/lib/add-routing.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-routing.js +3 -3
- package/{src → dist/src}/generators/application/lib/bundlers/add-rsbuild.d.ts +0 -1
- package/dist/src/generators/application/lib/bundlers/add-rsbuild.js +47 -0
- package/{src → dist/src}/generators/application/lib/bundlers/add-rspack.d.ts +0 -2
- package/dist/src/generators/application/lib/bundlers/add-rspack.js +13 -0
- package/{src → dist/src}/generators/application/lib/bundlers/add-vite.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/bundlers/add-vite.js +11 -36
- package/{src → dist/src}/generators/application/lib/bundlers/add-webpack.d.ts +0 -1
- package/dist/src/generators/application/lib/bundlers/add-webpack.js +18 -0
- package/{src → dist/src}/generators/application/lib/create-application-files.d.ts +2 -4
- package/{src → dist/src}/generators/application/lib/create-application-files.js +10 -62
- package/{src → dist/src}/generators/application/lib/find-free-port.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/get-app-tests.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/install-common-dependencies.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/install-common-dependencies.js +7 -12
- package/{src → dist/src}/generators/application/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/normalize-options.js +5 -9
- package/{src/generators/library → dist/src/generators/application}/lib/set-defaults.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/update-jest-config.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/update-jest-config.js +0 -3
- package/{src → dist/src}/generators/application/schema.d.ts +0 -1
- package/{src → dist/src}/generators/application/schema.json +2 -21
- package/{src → dist/src}/generators/component/component.d.ts +0 -1
- package/{src → dist/src}/generators/component/component.js +8 -9
- package/{src → dist/src}/generators/component/files/__fileName__.__ext__ +3 -18
- package/{src → dist/src}/generators/component/lib/get-component-tests.d.ts +0 -1
- package/{src → dist/src}/generators/component/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/component/lib/normalize-options.js +5 -10
- package/{src → dist/src}/generators/component/schema.d.ts +2 -8
- package/{src → dist/src}/generators/component/schema.json +2 -26
- package/{src → dist/src}/generators/component-story/component-story.d.ts +0 -1
- package/{src → dist/src}/generators/component-story/component-story.js +5 -4
- package/{src → dist/src}/generators/component-test/component-test.d.ts +0 -1
- package/{src → dist/src}/generators/component-test/component-test.js +5 -4
- package/{src → dist/src}/generators/component-test/schema.d.ts +0 -1
- package/dist/src/generators/consumer/consumer.d.ts +4 -0
- package/dist/src/generators/consumer/consumer.js +137 -0
- package/dist/src/generators/consumer/files/_common/src/App.tsx__tmpl__ +53 -0
- package/dist/src/generators/consumer/files/_common/src/bootstrap.tsx__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/_common/src/index.ts__tmpl__ +4 -0
- package/dist/src/generators/consumer/files/_common/src/mf.ts__tmpl__ +35 -0
- package/dist/src/generators/consumer/files/_common/tsconfig.json__tmpl__ +17 -0
- package/dist/src/generators/consumer/files/rsbuild/index.html__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/rsbuild/package.json__tmpl__ +23 -0
- package/dist/src/generators/consumer/files/rsbuild/rsbuild.config.ts__tmpl__ +25 -0
- package/dist/src/generators/consumer/files/rspack/index.html__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/rspack/package.json__tmpl__ +23 -0
- package/dist/src/generators/consumer/files/rspack/rspack.config.ts__tmpl__ +59 -0
- package/dist/src/generators/consumer/files/vite/index.html__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/vite/package.json__tmpl__ +24 -0
- package/dist/src/generators/consumer/files/vite/vite.config.ts__tmpl__ +27 -0
- package/dist/src/generators/consumer/schema.d.ts +8 -0
- package/dist/src/generators/consumer/schema.json +43 -0
- package/{src → dist/src}/generators/cypress-component-configuration/cypress-component-configuration.d.ts +0 -1
- package/{src → dist/src}/generators/cypress-component-configuration/cypress-component-configuration.js +2 -0
- package/{src → dist/src}/generators/cypress-component-configuration/lib/add-files.d.ts +1 -2
- package/{src → dist/src}/generators/cypress-component-configuration/lib/add-files.js +5 -39
- package/{src → dist/src}/generators/federate-module/federate-module.d.ts +0 -1
- package/{src → dist/src}/generators/federate-module/federate-module.js +6 -2
- package/{src → dist/src}/generators/federate-module/lib/utils.d.ts +0 -1
- package/{src → dist/src}/generators/federate-module/lib/utils.js +2 -2
- package/{src → dist/src}/generators/hook/hook.d.ts +0 -1
- package/{src → dist/src}/generators/hook/hook.js +7 -6
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +2 -2
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +2 -2
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +2 -2
- package/{src → dist/src}/generators/host/host.d.ts +0 -1
- package/{src → dist/src}/generators/host/host.js +10 -6
- package/{src → dist/src}/generators/host/lib/add-module-federation-files.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/add-module-federation-files.js +3 -3
- package/{src → dist/src}/generators/host/lib/normalize-host-name.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/normalize-host-name.js +2 -2
- package/{src → dist/src}/generators/host/lib/setup-ssr-for-host.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/setup-ssr-for-host.js +1 -1
- package/{src → dist/src}/generators/host/lib/update-module-federation-e2e-project.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/update-module-federation-tsconfig.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/update-module-federation-tsconfig.js +2 -2
- package/{src → dist/src}/generators/host/schema.json +2 -21
- package/{src → dist/src}/generators/init/init.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.js +5 -3
- package/{src → dist/src}/generators/init/schema.json +1 -1
- package/{src → dist/src}/generators/library/files/common/tsconfig.lib.json__tmpl__ +0 -1
- package/{src → dist/src}/generators/library/files/vite/tsconfig.lib.json__tmpl__ +0 -1
- package/{src → dist/src}/generators/library/lib/add-linting.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/add-linting.js +8 -9
- package/{src → dist/src}/generators/library/lib/add-rollup-build-target.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/add-rollup-build-target.js +8 -7
- package/{src → dist/src}/generators/library/lib/create-files.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/create-files.js +1 -12
- package/{src → dist/src}/generators/library/lib/determine-entry-fields.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/install-common-dependencies.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/install-common-dependencies.js +6 -11
- package/{src → dist/src}/generators/library/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/normalize-options.js +7 -7
- package/{src/generators/application → dist/src/generators/library}/lib/set-defaults.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/update-app-routes.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/update-app-routes.js +3 -3
- package/{src → dist/src}/generators/library/library.d.ts +0 -1
- package/{src → dist/src}/generators/library/library.js +17 -19
- package/{src → dist/src}/generators/library/schema.json +2 -21
- package/dist/src/generators/provider/files/_common/src/__componentName__.tsx__tmpl__ +11 -0
- package/dist/src/generators/provider/files/_common/src/bootstrap.tsx__tmpl__ +12 -0
- package/dist/src/generators/provider/files/_common/src/index.ts__tmpl__ +5 -0
- package/dist/src/generators/provider/files/_common/tsconfig.json__tmpl__ +17 -0
- package/dist/src/generators/provider/files/rsbuild/index.html__tmpl__ +12 -0
- package/dist/src/generators/provider/files/rsbuild/package.json__tmpl__ +22 -0
- package/dist/src/generators/provider/files/rsbuild/rsbuild.config.ts__tmpl__ +31 -0
- package/dist/src/generators/provider/files/rspack/index.html__tmpl__ +12 -0
- package/dist/src/generators/provider/files/rspack/package.json__tmpl__ +22 -0
- package/dist/src/generators/provider/files/rspack/rspack.config.ts__tmpl__ +69 -0
- package/dist/src/generators/provider/files/vite/index.html__tmpl__ +12 -0
- package/dist/src/generators/provider/files/vite/package.json__tmpl__ +23 -0
- package/dist/src/generators/provider/files/vite/vite.config.ts__tmpl__ +37 -0
- package/dist/src/generators/provider/provider.d.ts +4 -0
- package/dist/src/generators/provider/provider.js +94 -0
- package/dist/src/generators/provider/schema.d.ts +9 -0
- package/dist/src/generators/provider/schema.json +46 -0
- package/{src → dist/src}/generators/redux/redux.d.ts +0 -1
- package/{src → dist/src}/generators/redux/redux.js +10 -9
- package/{src → dist/src}/generators/redux/schema.d.ts +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/lib/add-remote-to-dynamic-host.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/setup-package-json-exports-for-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/setup-package-json-exports-for-remote.js +2 -2
- package/{src → dist/src}/generators/remote/lib/setup-ssr-for-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/setup-ssr-for-remote.js +1 -1
- package/{src → dist/src}/generators/remote/lib/setup-tspath-for-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/update-host-with-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/update-host-with-remote.js +4 -5
- package/{src → dist/src}/generators/remote/remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/remote.js +12 -8
- package/{src → dist/src}/generators/remote/schema.json +2 -21
- package/{src → dist/src}/generators/setup-ssr/setup-ssr.d.ts +0 -1
- package/{src → dist/src}/generators/setup-ssr/setup-ssr.js +8 -8
- package/{src → dist/src}/generators/stories/stories.d.ts +0 -1
- package/{src → dist/src}/generators/stories/stories.js +9 -8
- package/{src → dist/src}/generators/storybook-configuration/configuration.d.ts +0 -1
- package/{src → dist/src}/generators/storybook-configuration/configuration.js +3 -1
- package/{src → dist/src}/migrations/update-21-0-0/update-babel-loose.d.ts +0 -1
- package/dist/src/migrations/update-21-0-0/update-babel-loose.md +43 -0
- package/{src → dist/src}/migrations/update-22-0-0/add-svgr-to-webpack-config.d.ts +0 -1
- package/{src → dist/src}/migrations/update-22-0-0/add-svgr-to-webpack-config.js +34 -7
- 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 +225 -0
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +25 -0
- package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.d.ts +2 -0
- package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.js +128 -0
- package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.md +52 -0
- package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.d.ts +3 -0
- package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.js +215 -0
- package/{src → dist/src}/module-federation/ast-utils.d.ts +0 -1
- package/{src → dist/src}/module-federation/ast-utils.js +2 -2
- package/dist/src/plugins/router-plugin.d.ts +14 -0
- package/{src → dist/src}/plugins/router-plugin.js +20 -25
- package/{src → dist/src}/rules/update-module-federation-project.d.ts +0 -1
- package/{src → dist/src}/rules/update-module-federation-project.js +3 -3
- package/{src → dist/src}/utils/add-mf-env-to-inputs.d.ts +0 -1
- package/dist/src/utils/add-mf-env-to-inputs.js +32 -0
- package/dist/src/utils/assert-supported-react-version.d.ts +2 -0
- package/dist/src/utils/assert-supported-react-version.js +8 -0
- package/{src → dist/src}/utils/assertion.d.ts +0 -1
- package/{src → dist/src}/utils/assertion.js +1 -10
- package/{src → dist/src}/utils/ast-utils.d.ts +0 -1
- package/{src → dist/src}/utils/ast-utils.js +15 -15
- package/{src → dist/src}/utils/component-props.d.ts +0 -1
- package/{src → dist/src}/utils/component-props.js +3 -3
- package/{src → dist/src}/utils/create-ts-config.d.ts +0 -1
- package/{src → dist/src}/utils/create-ts-config.js +3 -10
- package/{src → dist/src}/utils/ct-utils.d.ts +1 -2
- package/{src → dist/src}/utils/ct-utils.js +6 -39
- package/{src → dist/src}/utils/dependencies.d.ts +0 -1
- package/dist/src/utils/deprecation.d.ts +3 -0
- package/dist/src/utils/deprecation.js +33 -0
- package/{src → dist/src}/utils/framework.d.ts +0 -1
- package/{src → dist/src}/utils/get-in-source-vitest-tests-template.d.ts +0 -1
- package/{src → dist/src}/utils/has-rsbuild-plugin.d.ts +0 -1
- package/dist/src/utils/has-rsbuild-plugin.js +12 -0
- package/{src → dist/src}/utils/has-rspack-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/has-vite-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/has-webpack-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/jest-utils.d.ts +0 -1
- package/{src → dist/src}/utils/lint.d.ts +0 -1
- package/{src → dist/src}/utils/maybe-js.d.ts +0 -1
- package/dist/src/utils/module-federation-deprecation.d.ts +12 -0
- package/dist/src/utils/module-federation-deprecation.js +46 -0
- package/{src → dist/src}/utils/normalize-remote.d.ts +0 -1
- package/{src → dist/src}/utils/normalize-remote.js +2 -2
- package/{src → dist/src}/utils/testing-generators.d.ts +0 -1
- package/{src → dist/src}/utils/version-utils.d.ts +1 -1
- package/{src → dist/src}/utils/version-utils.js +3 -0
- package/{src → dist/src}/utils/versions.d.ts +5 -18
- package/dist/src/utils/versions.js +53 -0
- package/dist/tailwind.d.ts +5 -0
- package/{tailwind.js → dist/tailwind.js} +13 -7
- package/dist/typings/cssmodule.d.ts +19 -0
- package/dist/typings/image.d.ts +48 -0
- package/dist/typings/style.d.ts +1 -0
- package/dist/typings/styled-jsx.d.ts +8 -0
- package/{webpack-plugin.d.ts → dist/webpack-plugin.d.ts} +0 -1
- package/executors.json +6 -6
- package/generators.json +46 -40
- package/migrations.json +45 -79
- package/package.json +143 -144
- package/typings/style.d.ts +1 -9
- package/ast-utils.d.ts.map +0 -1
- package/babel.d.ts +0 -25
- package/babel.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/mf/dynamic-federation.d.ts.map +0 -1
- package/mf/index.d.ts.map +0 -1
- package/module-federation.d.ts.map +0 -1
- package/plugins/bundle-rollup.d.ts +0 -2
- package/plugins/bundle-rollup.d.ts.map +0 -1
- package/plugins/component-testing/index.d.ts.map +0 -1
- package/plugins/component-testing/webpack-fallback.d.ts.map +0 -1
- package/plugins/jest.d.ts +0 -2
- package/plugins/jest.d.ts.map +0 -1
- package/plugins/nx-react-webpack-plugin/lib/apply-react-config.d.ts.map +0 -1
- package/plugins/nx-react-webpack-plugin/nx-react-webpack-plugin.d.ts.map +0 -1
- package/plugins/storybook/index.d.ts.map +0 -1
- package/plugins/storybook/merge-plugins.d.ts.map +0 -1
- package/plugins/webpack.d.ts +0 -2
- package/plugins/webpack.d.ts.map +0 -1
- package/plugins/with-react.d.ts.map +0 -1
- package/router-plugin.d.ts +0 -2
- package/router-plugin.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/lib/index.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/lib/normalize-options.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/lib/start-remotes.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/lib/index.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts.map +0 -1
- package/src/executors/module-federation-static-server/module-federation-static-server.impl.d.ts.map +0 -1
- package/src/generators/application/application.d.ts.map +0 -1
- package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +0 -46
- package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +0 -49
- package/src/generators/application/files/style-tailwind/src/app/__fileName__.tsx__tmpl__ +0 -45
- package/src/generators/application/files/style-tailwind/src/styles.css +0 -1
- package/src/generators/application/lib/add-e2e.d.ts.map +0 -1
- package/src/generators/application/lib/add-jest.d.ts.map +0 -1
- package/src/generators/application/lib/add-linting.d.ts.map +0 -1
- package/src/generators/application/lib/add-project.d.ts.map +0 -1
- package/src/generators/application/lib/add-routing.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-rsbuild.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-rsbuild.js +0 -99
- package/src/generators/application/lib/bundlers/add-rspack.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-rspack.js +0 -38
- package/src/generators/application/lib/bundlers/add-vite.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-webpack.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-webpack.js +0 -51
- package/src/generators/application/lib/create-application-files.d.ts.map +0 -1
- package/src/generators/application/lib/find-free-port.d.ts.map +0 -1
- package/src/generators/application/lib/get-app-tests.d.ts.map +0 -1
- package/src/generators/application/lib/install-common-dependencies.d.ts.map +0 -1
- package/src/generators/application/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/application/lib/set-defaults.d.ts.map +0 -1
- package/src/generators/application/lib/show-possible-warnings.d.ts +0 -4
- package/src/generators/application/lib/show-possible-warnings.d.ts.map +0 -1
- package/src/generators/application/lib/show-possible-warnings.js +0 -11
- package/src/generators/application/lib/update-jest-config.d.ts.map +0 -1
- package/src/generators/component/component.d.ts.map +0 -1
- package/src/generators/component/lib/get-component-tests.d.ts.map +0 -1
- package/src/generators/component/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/component-story/component-story.d.ts.map +0 -1
- package/src/generators/component-test/component-test.d.ts.map +0 -1
- package/src/generators/component-test/schema.d.ts.map +0 -1
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts.map +0 -1
- package/src/generators/cypress-component-configuration/lib/add-files.d.ts.map +0 -1
- package/src/generators/federate-module/federate-module.d.ts.map +0 -1
- package/src/generators/federate-module/lib/utils.d.ts.map +0 -1
- package/src/generators/hook/hook.d.ts.map +0 -1
- package/src/generators/host/host.d.ts.map +0 -1
- package/src/generators/host/lib/add-module-federation-files.d.ts.map +0 -1
- package/src/generators/host/lib/normalize-host-name.d.ts.map +0 -1
- package/src/generators/host/lib/setup-ssr-for-host.d.ts.map +0 -1
- package/src/generators/host/lib/update-module-federation-e2e-project.d.ts.map +0 -1
- package/src/generators/host/lib/update-module-federation-tsconfig.d.ts.map +0 -1
- package/src/generators/init/init.d.ts.map +0 -1
- package/src/generators/library/lib/add-linting.d.ts.map +0 -1
- package/src/generators/library/lib/add-rollup-build-target.d.ts.map +0 -1
- package/src/generators/library/lib/create-files.d.ts.map +0 -1
- package/src/generators/library/lib/determine-entry-fields.d.ts.map +0 -1
- package/src/generators/library/lib/install-common-dependencies.d.ts.map +0 -1
- package/src/generators/library/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/library/lib/set-defaults.d.ts.map +0 -1
- package/src/generators/library/lib/update-app-routes.d.ts.map +0 -1
- package/src/generators/library/library.d.ts.map +0 -1
- package/src/generators/redux/redux.d.ts.map +0 -1
- package/src/generators/remote/lib/add-remote-to-dynamic-host.d.ts.map +0 -1
- package/src/generators/remote/lib/setup-package-json-exports-for-remote.d.ts.map +0 -1
- package/src/generators/remote/lib/setup-ssr-for-remote.d.ts.map +0 -1
- package/src/generators/remote/lib/setup-tspath-for-remote.d.ts.map +0 -1
- package/src/generators/remote/lib/update-host-with-remote.d.ts.map +0 -1
- package/src/generators/remote/remote.d.ts.map +0 -1
- package/src/generators/setup-ssr/setup-ssr.d.ts.map +0 -1
- package/src/generators/setup-tailwind/files/postcss.config.js__tmpl__ +0 -15
- package/src/generators/setup-tailwind/files/tailwind.config.js__tmpl__ +0 -17
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts +0 -4
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts.map +0 -1
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +0 -27
- package/src/generators/setup-tailwind/lib/update-project.d.ts +0 -4
- package/src/generators/setup-tailwind/lib/update-project.d.ts.map +0 -1
- package/src/generators/setup-tailwind/lib/update-project.js +0 -11
- package/src/generators/setup-tailwind/schema.d.ts +0 -7
- package/src/generators/setup-tailwind/schema.d.ts.map +0 -1
- package/src/generators/setup-tailwind/schema.js +0 -2
- package/src/generators/setup-tailwind/schema.json +0 -47
- package/src/generators/setup-tailwind/setup-tailwind.d.ts +0 -5
- package/src/generators/setup-tailwind/setup-tailwind.d.ts.map +0 -1
- package/src/generators/setup-tailwind/setup-tailwind.js +0 -35
- package/src/generators/stories/stories.d.ts.map +0 -1
- package/src/generators/storybook-configuration/configuration.d.ts.map +0 -1
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts +0 -3
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts.map +0 -1
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +0 -31
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts +0 -3
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts.map +0 -1
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.js +0 -66
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts +0 -3
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts.map +0 -1
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +0 -41
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts +0 -3
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts.map +0 -1
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +0 -18
- package/src/migrations/update-21-0-0/update-babel-loose.d.ts.map +0 -1
- package/src/migrations/update-22-0-0/add-svgr-to-webpack-config.d.ts.map +0 -1
- package/src/module-federation/ast-utils.d.ts.map +0 -1
- package/src/plugins/router-plugin.d.ts +0 -11
- package/src/plugins/router-plugin.d.ts.map +0 -1
- package/src/rules/add-styled-dependencies.d.ts +0 -6
- package/src/rules/add-styled-dependencies.d.ts.map +0 -1
- package/src/rules/add-styled-dependencies.js +0 -16
- package/src/rules/update-module-federation-project.d.ts.map +0 -1
- package/src/utils/add-mf-env-to-inputs.d.ts.map +0 -1
- package/src/utils/add-mf-env-to-inputs.js +0 -25
- package/src/utils/assertion.d.ts.map +0 -1
- package/src/utils/ast-utils.d.ts.map +0 -1
- package/src/utils/component-props.d.ts.map +0 -1
- package/src/utils/create-ts-config.d.ts.map +0 -1
- package/src/utils/ct-utils.d.ts.map +0 -1
- package/src/utils/dependencies.d.ts.map +0 -1
- package/src/utils/framework.d.ts.map +0 -1
- package/src/utils/get-in-source-vitest-tests-template.d.ts.map +0 -1
- package/src/utils/has-rsbuild-plugin.d.ts.map +0 -1
- package/src/utils/has-rsbuild-plugin.js +0 -43
- package/src/utils/has-rspack-plugin.d.ts.map +0 -1
- package/src/utils/has-vite-plugin.d.ts.map +0 -1
- package/src/utils/has-webpack-plugin.d.ts.map +0 -1
- package/src/utils/jest-utils.d.ts.map +0 -1
- package/src/utils/lint.d.ts.map +0 -1
- package/src/utils/maybe-js.d.ts.map +0 -1
- package/src/utils/normalize-remote.d.ts.map +0 -1
- package/src/utils/styled.d.ts +0 -4
- package/src/utils/styled.d.ts.map +0 -1
- package/src/utils/styled.js +0 -62
- package/src/utils/testing-generators.d.ts.map +0 -1
- package/src/utils/version-utils.d.ts.map +0 -1
- package/src/utils/versions.d.ts.map +0 -1
- package/src/utils/versions.js +0 -64
- package/tailwind.d.ts +0 -7
- package/tailwind.d.ts.map +0 -1
- package/webpack-plugin.d.ts.map +0 -1
- /package/{LICENSE → dist/LICENSE} +0 -0
- /package/{ast-utils.js → dist/ast-utils.js} +0 -0
- /package/{mf → dist/mf}/dynamic-federation.js +0 -0
- /package/{mf → dist/mf}/index.js +0 -0
- /package/{module-federation.js → dist/module-federation.js} +0 -0
- /package/{plugins → dist/plugins}/bundle-rollup.js +0 -0
- /package/{plugins → dist/plugins}/jest.js +0 -0
- /package/{plugins → dist/plugins}/nx-react-webpack-plugin/lib/apply-react-config.js +0 -0
- /package/{plugins → dist/plugins}/nx-react-webpack-plugin/nx-react-webpack-plugin.js +0 -0
- /package/{plugins → dist/plugins}/storybook/merge-plugins.js +0 -0
- /package/{plugins → dist/plugins}/webpack.js +0 -0
- /package/{src → dist/src}/executors/module-federation-dev-server/lib/index.js +0 -0
- /package/{src → dist/src}/executors/module-federation-dev-server/lib/normalize-options.js +0 -0
- /package/{src → dist/src}/executors/module-federation-dev-server/lib/start-remotes.js +0 -0
- /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/index.js +0 -0
- /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/normalize-options.js +0 -0
- /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/start-remotes.js +0 -0
- /package/{src → dist/src}/executors/module-federation-static-server/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/index.html +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/index.html +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/public/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/environments/environment.prod.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/environments/environment.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/index.html +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/webpack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/claimed/src/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/not-configured/src/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/unclaimed/src/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/app-nav.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/entry.client.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/entry.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/root.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/routes/about.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/routes.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/public/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/react-router.config.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tests/routes/_index.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tsconfig.app.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tsconfig.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/non-root/.gitignore__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/non-root/package.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/claimed/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/not-configured/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/unclaimed/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/ts-solution/package.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/ts-solution/tsconfig.app.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-css-module/src/app/__fileName__.module.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-css-module/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-css-module/src/styles.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-global-css/src/app/__fileName__.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-global-css/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-global-css/src/styles.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-none/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/lib/add-jest.js +0 -0
- /package/{src → dist/src}/generators/application/lib/find-free-port.js +0 -0
- /package/{src → dist/src}/generators/application/lib/get-app-tests.js +0 -0
- /package/{src → dist/src}/generators/application/lib/set-defaults.js +0 -0
- /package/{src → dist/src}/generators/component/files/__fileName__.__style__ +0 -0
- /package/{src → dist/src}/generators/component/files/__fileName__.module.__style__ +0 -0
- /package/{src → dist/src}/generators/component/files/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/component/lib/get-component-tests.js +0 -0
- /package/{src → dist/src}/generators/component-story/files/jsx/__componentFileName__.stories.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/component-story/files/tsx/__componentFileName__.stories.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/component-story/schema.json +0 -0
- /package/{src → dist/src}/generators/component-test/files/__fileName__.cy__ext__ +0 -0
- /package/{src → dist/src}/generators/component-test/schema.js +0 -0
- /package/{src → dist/src}/generators/component-test/schema.json +0 -0
- /package/{src → dist/src}/generators/cypress-component-configuration/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/cypress-component-configuration/schema.json +0 -0
- /package/{src → dist/src}/generators/federate-module/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/federate-module/schema.json +0 -0
- /package/{src → dist/src}/generators/hook/files/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/hook/files/__fileName__.spec.__specExt__ +0 -0
- /package/{src → dist/src}/generators/hook/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/hook/schema.json +0 -0
- /package/{src → dist/src}/generators/host/files/common/src/app/__fileName__.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common/src/main.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common-ts/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common-ts/src/main.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-common/src/app/__fileName__.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-common/src/main.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-common/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/lib/update-module-federation-e2e-project.js +0 -0
- /package/{src → dist/src}/generators/host/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/library/files/common/README.md +0 -0
- /package/{src → dist/src}/generators/library/files/common/src/index.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/library/files/vite/README.md +0 -0
- /package/{src → dist/src}/generators/library/lib/determine-entry-fields.js +0 -0
- /package/{src → dist/src}/generators/library/lib/set-defaults.js +0 -0
- /package/{src → dist/src}/generators/library/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/redux/files/js/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/files/js/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/files/ts/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/files/ts/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/schema.json +0 -0
- /package/{src → dist/src}/generators/remote/files/common/src/main.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/common/src/remote-entry.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/common-ts/src/main.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/common-ts/src/remote-entry.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-common/src/main.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-common/src/remote-entry.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/lib/add-remote-to-dynamic-host.js +0 -0
- /package/{src → dist/src}/generators/remote/lib/setup-tspath-for-remote.js +0 -0
- /package/{src → dist/src}/generators/remote/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/setup-ssr/files/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/setup-ssr/files/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/setup-ssr/files/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/setup-ssr/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/setup-ssr/schema.json +0 -0
- /package/{src → dist/src}/generators/stories/schema.json +0 -0
- /package/{src → dist/src}/generators/storybook-configuration/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/storybook-configuration/schema.json +0 -0
- /package/{src → dist/src}/migrations/update-21-0-0/update-babel-loose.js +0 -0
- /package/{src → dist/src}/utils/dependencies.js +0 -0
- /package/{src → dist/src}/utils/framework.js +0 -0
- /package/{src → dist/src}/utils/get-in-source-vitest-tests-template.js +0 -0
- /package/{src → dist/src}/utils/has-rspack-plugin.js +0 -0
- /package/{src → dist/src}/utils/has-vite-plugin.js +0 -0
- /package/{src → dist/src}/utils/has-webpack-plugin.js +0 -0
- /package/{src → dist/src}/utils/jest-utils.js +0 -0
- /package/{src → dist/src}/utils/lint.js +0 -0
- /package/{src → dist/src}/utils/maybe-js.js +0 -0
- /package/{src → dist/src}/utils/testing-generators.js +0 -0
- /package/{webpack-plugin.js → dist/webpack-plugin.js} +0 -0
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = addSvgrToWebpackConfig;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
|
|
7
7
|
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
8
8
|
const ts = tslib_1.__importStar(require("typescript"));
|
|
9
9
|
const withSvgrFunctionForWithReact = `
|
|
@@ -115,7 +115,7 @@ function withSvgr(svgrOptions = {}) {
|
|
|
115
115
|
async function addSvgrToWebpackConfig(tree) {
|
|
116
116
|
const projects = new Map();
|
|
117
117
|
// Find all React webpack projects using either withReact OR NxReactWebpackPlugin
|
|
118
|
-
(0,
|
|
118
|
+
(0, internal_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', (options, project, target) => {
|
|
119
119
|
if (!options.webpackConfig)
|
|
120
120
|
return;
|
|
121
121
|
const webpackConfigPath = options.webpackConfig;
|
|
@@ -271,11 +271,38 @@ async function addSvgrToWebpackConfig(tree) {
|
|
|
271
271
|
ts.isIdentifier(prop.name) &&
|
|
272
272
|
prop.name.text === 'svgr');
|
|
273
273
|
if (svgrProp) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
274
|
+
const hasOnlySvgrProperty = arg.properties.length === 1;
|
|
275
|
+
if (hasOnlySvgrProperty) {
|
|
276
|
+
changes.push({
|
|
277
|
+
type: devkit_1.ChangeType.Delete,
|
|
278
|
+
start: arg.getStart(),
|
|
279
|
+
length: arg.getEnd() - arg.getStart(),
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
const propIndex = arg.properties.indexOf(svgrProp);
|
|
284
|
+
const isLastProp = propIndex === arg.properties.length - 1;
|
|
285
|
+
const isFirstProp = propIndex === 0;
|
|
286
|
+
let removeStart = svgrProp.getFullStart();
|
|
287
|
+
let removeEnd = svgrProp.getEnd();
|
|
288
|
+
if (!isLastProp) {
|
|
289
|
+
const nextProp = arg.properties[propIndex + 1];
|
|
290
|
+
removeEnd = nextProp.getFullStart();
|
|
291
|
+
}
|
|
292
|
+
else if (!isFirstProp) {
|
|
293
|
+
const prevProp = arg.properties[propIndex - 1];
|
|
294
|
+
const textBetween = content.substring(prevProp.getEnd(), svgrProp.getFullStart());
|
|
295
|
+
const commaIndex = textBetween.indexOf(',');
|
|
296
|
+
if (commaIndex !== -1) {
|
|
297
|
+
removeStart = prevProp.getEnd() + commaIndex;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
changes.push({
|
|
301
|
+
type: devkit_1.ChangeType.Delete,
|
|
302
|
+
start: removeStart,
|
|
303
|
+
length: removeEnd - removeStart,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
279
306
|
if (config.svgrOptions) {
|
|
280
307
|
const composePluginsCalls = (0, tsquery_1.query)(sourceFile, 'CallExpression[expression.name=composePlugins]');
|
|
281
308
|
if (composePluginsCalls.length > 0) {
|
|
@@ -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,225 @@
|
|
|
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/react` 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([
|
|
13
|
+
'@nx/react/router-plugin',
|
|
14
|
+
]);
|
|
15
|
+
let ts;
|
|
16
|
+
async function migrateCreateNodesV2ToCreateNodes(tree) {
|
|
17
|
+
let touchedCount = 0;
|
|
18
|
+
(0, devkit_1.visitNotIgnoredFiles)(tree, '.', (filePath) => {
|
|
19
|
+
if (!TS_EXTENSIONS.some((ext) => filePath.endsWith(ext))) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const original = tree.read(filePath, 'utf-8');
|
|
23
|
+
if (!original || !original.includes(DEPRECATED_NAME)) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const updated = rewriteCreateNodesV2Imports(original, TARGET_SPECIFIERS);
|
|
27
|
+
if (updated !== original) {
|
|
28
|
+
tree.write(filePath, updated);
|
|
29
|
+
touchedCount += 1;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
if (touchedCount > 0) {
|
|
33
|
+
devkit_1.logger.info(`Renamed \`${DEPRECATED_NAME}\` imports to \`${CANONICAL_NAME}\` in ${touchedCount} file(s).`);
|
|
34
|
+
}
|
|
35
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Rewrites named imports and re-exports of `createNodesV2` to `createNodes`
|
|
39
|
+
* when they come from one of the given module specifiers. Only the named
|
|
40
|
+
* bindings are touched — the module specifier, the `import`/`export` keyword,
|
|
41
|
+
* any `type` modifier, and any default import are left untouched.
|
|
42
|
+
*/
|
|
43
|
+
function rewriteCreateNodesV2Imports(source, specifiers) {
|
|
44
|
+
ts ??= (0, devkit_1.ensurePackage)('typescript', '*');
|
|
45
|
+
const sourceFile = ts.createSourceFile('tmp.ts', source, ts.ScriptTarget.Latest,
|
|
46
|
+
/* setParentNodes */ true, ts.ScriptKind.TSX);
|
|
47
|
+
const changes = [];
|
|
48
|
+
let renameLocalUsages = false;
|
|
49
|
+
for (const stmt of sourceFile.statements) {
|
|
50
|
+
if (ts.isImportDeclaration(stmt)) {
|
|
51
|
+
renameLocalUsages =
|
|
52
|
+
collectImportRewrite(sourceFile, stmt, specifiers, changes) ||
|
|
53
|
+
renameLocalUsages;
|
|
54
|
+
}
|
|
55
|
+
else if (ts.isExportDeclaration(stmt)) {
|
|
56
|
+
collectExportRewrite(sourceFile, stmt, specifiers, changes);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// Renaming a local `createNodesV2` import binding to `createNodes` (a lone
|
|
60
|
+
// `{ createNodesV2 }`, or one deduped against an existing `createNodes`)
|
|
61
|
+
// changes the name in scope, so value references to `createNodesV2` in the
|
|
62
|
+
// file body must be renamed too — otherwise they dangle. Aliased imports and
|
|
63
|
+
// re-exports keep their local name, so they never trigger this.
|
|
64
|
+
if (renameLocalUsages) {
|
|
65
|
+
collectValueUsageRewrites(sourceFile, changes);
|
|
66
|
+
}
|
|
67
|
+
return changes.length > 0 ? (0, devkit_1.applyChangesToString)(source, changes) : source;
|
|
68
|
+
}
|
|
69
|
+
function isTargetSpecifier(node, specifiers) {
|
|
70
|
+
return ts.isStringLiteral(node) && specifiers.has(node.text);
|
|
71
|
+
}
|
|
72
|
+
function collectImportRewrite(sourceFile, stmt, specifiers, changes) {
|
|
73
|
+
if (!isTargetSpecifier(stmt.moduleSpecifier, specifiers)) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
const namedBindings = stmt.importClause?.namedBindings;
|
|
77
|
+
// Only `import { ... }` carries renameable named bindings. `import x`,
|
|
78
|
+
// `import * as ns`, and side-effect imports reference the module wholesale
|
|
79
|
+
// and keep working through the `createNodesV2` runtime alias, so we leave
|
|
80
|
+
// them be. A mixed `import def, { createNodesV2 }` still has its named
|
|
81
|
+
// bindings rewritten below — the default binding is untouched.
|
|
82
|
+
if (!namedBindings || !ts.isNamedImports(namedBindings)) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
// The local `createNodesV2` binding only disappears when it is imported
|
|
86
|
+
// without an alias — a lone `{ createNodesV2 }` or one deduped against an
|
|
87
|
+
// existing `createNodes`. `{ createNodesV2 as x }` keeps the local `x`, so
|
|
88
|
+
// its in-file usages are unaffected and must not be rewritten.
|
|
89
|
+
const localBindingRenamed = namedBindings.elements.some((el) => el.name.text === DEPRECATED_NAME &&
|
|
90
|
+
(el.propertyName ?? el.name).text === DEPRECATED_NAME);
|
|
91
|
+
rewriteNamedBindings(sourceFile, namedBindings, changes);
|
|
92
|
+
return localBindingRenamed;
|
|
93
|
+
}
|
|
94
|
+
function collectExportRewrite(sourceFile, stmt, specifiers, changes) {
|
|
95
|
+
if (!stmt.moduleSpecifier ||
|
|
96
|
+
!isTargetSpecifier(stmt.moduleSpecifier, specifiers)) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
// `export { ... } from '...'` can be rewritten; `export * from '...'` has no
|
|
100
|
+
// named bindings to rename.
|
|
101
|
+
if (!stmt.exportClause || !ts.isNamedExports(stmt.exportClause)) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
rewriteNamedBindings(sourceFile, stmt.exportClause, changes);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Re-renders the `{ ... }` of a named import/export, renaming any
|
|
108
|
+
* `createNodesV2` specifier to `createNodes`. If renaming would collide with a
|
|
109
|
+
* `createNodes` that is already present (e.g. `{ createNodes, createNodesV2 }`),
|
|
110
|
+
* the duplicate is dropped. Returns without recording a change when the binding
|
|
111
|
+
* list contains no `createNodesV2`.
|
|
112
|
+
*/
|
|
113
|
+
function rewriteNamedBindings(sourceFile, namedBindings, changes) {
|
|
114
|
+
const elements = namedBindings.elements;
|
|
115
|
+
const hasDeprecated = elements.some((el) => (el.propertyName ?? el.name).text === DEPRECATED_NAME);
|
|
116
|
+
if (!hasDeprecated) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const seen = new Set();
|
|
120
|
+
const rendered = [];
|
|
121
|
+
for (const el of elements) {
|
|
122
|
+
const text = renderSpecifier(el);
|
|
123
|
+
if (!seen.has(text)) {
|
|
124
|
+
seen.add(text);
|
|
125
|
+
rendered.push(text);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
const start = namedBindings.getStart(sourceFile);
|
|
129
|
+
changes.push({
|
|
130
|
+
type: devkit_1.ChangeType.Delete,
|
|
131
|
+
start,
|
|
132
|
+
length: namedBindings.getEnd() - start,
|
|
133
|
+
}, {
|
|
134
|
+
type: devkit_1.ChangeType.Insert,
|
|
135
|
+
index: start,
|
|
136
|
+
text: `{ ${rendered.join(', ')} }`,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function renderSpecifier(el) {
|
|
140
|
+
const typePrefix = el.isTypeOnly ? 'type ' : '';
|
|
141
|
+
const rename = (name) => name === DEPRECATED_NAME ? CANONICAL_NAME : name;
|
|
142
|
+
// `{ name }` — no alias, so the local binding follows the rename.
|
|
143
|
+
if (!el.propertyName) {
|
|
144
|
+
return `${typePrefix}${rename(el.name.text)}`;
|
|
145
|
+
}
|
|
146
|
+
// `{ propertyName as name }` — only the imported (left) side is renamed; the
|
|
147
|
+
// local alias is preserved. A now-redundant alias such as
|
|
148
|
+
// `createNodesV2 as createNodes` collapses to `createNodes`.
|
|
149
|
+
const canonicalImported = rename(el.propertyName.text);
|
|
150
|
+
const localName = el.name.text;
|
|
151
|
+
return canonicalImported === localName
|
|
152
|
+
? `${typePrefix}${localName}`
|
|
153
|
+
: `${typePrefix}${canonicalImported} as ${localName}`;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Renames value references of `createNodesV2` to `createNodes` in the file
|
|
157
|
+
* body. Only called once a local `createNodesV2` import binding has actually
|
|
158
|
+
* been renamed, so these references would otherwise dangle. Occurrences that
|
|
159
|
+
* are not references to that binding are skipped: the import/export
|
|
160
|
+
* declarations themselves, property accesses (`x.createNodesV2`), qualified
|
|
161
|
+
* type names, object-literal keys, and declaration names that shadow the
|
|
162
|
+
* import. A shorthand property (`{ createNodesV2 }`) is expanded to
|
|
163
|
+
* `{ createNodesV2: createNodes }` so the property key is preserved. Strings
|
|
164
|
+
* and comments are never `Identifier` nodes, so they are left alone.
|
|
165
|
+
*/
|
|
166
|
+
function collectValueUsageRewrites(sourceFile, changes) {
|
|
167
|
+
const visit = (node) => {
|
|
168
|
+
if (ts.isIdentifier(node) &&
|
|
169
|
+
node.text === DEPRECATED_NAME &&
|
|
170
|
+
isRenamableValueUsage(node)) {
|
|
171
|
+
const start = node.getStart(sourceFile);
|
|
172
|
+
changes.push({
|
|
173
|
+
type: devkit_1.ChangeType.Delete,
|
|
174
|
+
start,
|
|
175
|
+
length: node.getEnd() - start,
|
|
176
|
+
}, {
|
|
177
|
+
type: devkit_1.ChangeType.Insert,
|
|
178
|
+
index: start,
|
|
179
|
+
text: ts.isShorthandPropertyAssignment(node.parent)
|
|
180
|
+
? `${DEPRECATED_NAME}: ${CANONICAL_NAME}`
|
|
181
|
+
: CANONICAL_NAME,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
node.forEachChild(visit);
|
|
185
|
+
};
|
|
186
|
+
sourceFile.forEachChild(visit);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Whether a `createNodesV2` identifier is a value reference to the renamed
|
|
190
|
+
* import binding, as opposed to a position that must be left untouched.
|
|
191
|
+
*/
|
|
192
|
+
function isRenamableValueUsage(node) {
|
|
193
|
+
const parent = node.parent;
|
|
194
|
+
if (!parent) {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
// Import/export bindings — already handled by the declaration rewrite.
|
|
198
|
+
if (ts.isImportSpecifier(parent) ||
|
|
199
|
+
ts.isExportSpecifier(parent) ||
|
|
200
|
+
ts.isImportClause(parent) ||
|
|
201
|
+
ts.isNamespaceImport(parent)) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
// `x.createNodesV2` / `X.createNodesV2` — a member name, not the binding.
|
|
205
|
+
if (ts.isPropertyAccessExpression(parent) && parent.name === node) {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
if (ts.isQualifiedName(parent) && parent.right === node) {
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
// `{ createNodesV2: ... }` — an object-literal key, not the binding.
|
|
212
|
+
if (ts.isPropertyAssignment(parent) && parent.name === node) {
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
// A declaration whose name shadows the import (variable, param, etc.).
|
|
216
|
+
if ((ts.isVariableDeclaration(parent) ||
|
|
217
|
+
ts.isParameter(parent) ||
|
|
218
|
+
ts.isBindingElement(parent) ||
|
|
219
|
+
ts.isFunctionDeclaration(parent) ||
|
|
220
|
+
ts.isClassDeclaration(parent)) &&
|
|
221
|
+
parent.name === node) {
|
|
222
|
+
return false;
|
|
223
|
+
}
|
|
224
|
+
return true;
|
|
225
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#### Rename `createNodesV2` imports to `createNodes`
|
|
2
|
+
|
|
3
|
+
`@nx/react` renamed its primary inferred-plugin export from `createNodesV2` to `createNodes`. The `createNodesV2` name is preserved as a deprecated alias for now, but new code should use `createNodes`.
|
|
4
|
+
|
|
5
|
+
This migration scans every `.ts`, `.tsx`, `.cts`, and `.mts` file in your workspace and rewrites named imports and re-exports of `createNodesV2` from `@nx/react/router-plugin` to `createNodes`.
|
|
6
|
+
|
|
7
|
+
#### Sample Code Changes
|
|
8
|
+
|
|
9
|
+
##### Before
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { createNodesV2 } from '@nx/react/router-plugin';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
##### After
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createNodes } from '@nx/react/router-plugin';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Aliases are preserved (`createNodesV2 as cn` becomes `createNodes as cn`), and if a file already imports both names (`{ createNodes, createNodesV2 }`) the redundant binding is dropped.
|
|
22
|
+
|
|
23
|
+
#### What is not rewritten
|
|
24
|
+
|
|
25
|
+
Only static `import`/`export` named bindings from `@nx/react/router-plugin` are rewritten. Namespace imports, dynamic `import(...)`, `require(...)` destructuring, and property access such as `plugin.createNodesV2` are left untouched — they keep working through the `createNodesV2` runtime alias. Update those by hand if you want to drop the deprecated name everywhere.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = removeNxReactWebpackPluginImport;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
6
|
+
const DEPRECATED_SYMBOL = 'NxReactWebpackPlugin';
|
|
7
|
+
const DEPRECATED_PACKAGE = '@nx/react';
|
|
8
|
+
const NEW_PACKAGE = '@nx/react/webpack-plugin';
|
|
9
|
+
// ES module import: import { NxReactWebpackPlugin[, ...] } from '@nx/react'
|
|
10
|
+
const ES_IMPORT_SELECTOR = `ImportDeclaration:has(StringLiteral[value=${DEPRECATED_PACKAGE}]):has(ImportClause ImportSpecifier > Identifier[name=${DEPRECATED_SYMBOL}])`;
|
|
11
|
+
const IMPORT_SPECIFIERS_SELECTOR = `ImportClause ImportSpecifier`;
|
|
12
|
+
const TARGET_IMPORT_SPECIFIER_SELECTOR = `ImportClause ImportSpecifier > Identifier[name=${DEPRECATED_SYMBOL}]`;
|
|
13
|
+
const ES_MODULE_PATH_SELECTOR = `StringLiteral[value=${DEPRECATED_PACKAGE}]`;
|
|
14
|
+
// CJS require: const { NxReactWebpackPlugin[, ...] } = require('@nx/react')
|
|
15
|
+
const CJS_REQUIRE_STMT_SELECTOR = `VariableStatement:has(ObjectBindingPattern > BindingElement > Identifier[name=${DEPRECATED_SYMBOL}]):has(CallExpression:has(Identifier[name=require]) > StringLiteral[value=${DEPRECATED_PACKAGE}])`;
|
|
16
|
+
const CJS_BINDING_ELEMENTS_SELECTOR = `ObjectBindingPattern > BindingElement`;
|
|
17
|
+
const CJS_TARGET_BINDING_SELECTOR = `ObjectBindingPattern > BindingElement > Identifier[name=${DEPRECATED_SYMBOL}]`;
|
|
18
|
+
const CJS_REQUIRE_PATH_SELECTOR = `CallExpression:has(Identifier[name=require]) > StringLiteral[value=${DEPRECATED_PACKAGE}]`;
|
|
19
|
+
// Walk past whitespace from `fromIndex` to find a trailing comma. Returns the
|
|
20
|
+
// position AFTER the comma if found, otherwise the original index. Handles
|
|
21
|
+
// the `Foo , withReact` shape where the user wrote whitespace before the
|
|
22
|
+
// comma — `node.getEnd()` stops at the identifier and the comma sits one
|
|
23
|
+
// character past the whitespace.
|
|
24
|
+
function endAfterTrailingComma(text, fromIndex) {
|
|
25
|
+
let i = fromIndex;
|
|
26
|
+
while (i < text.length && /\s/.test(text.charAt(i)))
|
|
27
|
+
i++;
|
|
28
|
+
return text.charAt(i) === ',' ? i + 1 : fromIndex;
|
|
29
|
+
}
|
|
30
|
+
async function removeNxReactWebpackPluginImport(tree) {
|
|
31
|
+
(0, devkit_1.visitNotIgnoredFiles)(tree, '', (filePath) => {
|
|
32
|
+
if (!filePath.endsWith('.ts') &&
|
|
33
|
+
!filePath.endsWith('.tsx') &&
|
|
34
|
+
!filePath.endsWith('.js') &&
|
|
35
|
+
!filePath.endsWith('.jsx') &&
|
|
36
|
+
!filePath.endsWith('.cjs') &&
|
|
37
|
+
!filePath.endsWith('.mjs')) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
let contents = tree.read(filePath, 'utf-8');
|
|
41
|
+
if (!contents)
|
|
42
|
+
return;
|
|
43
|
+
// Quick check: must contain the deprecated symbol and the deprecated package path
|
|
44
|
+
if (!contents.includes(DEPRECATED_SYMBOL) ||
|
|
45
|
+
(!contents.includes(`'${DEPRECATED_PACKAGE}'`) &&
|
|
46
|
+
!contents.includes(`"${DEPRECATED_PACKAGE}"`))) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
let changed = false;
|
|
50
|
+
// Re-parse on every iteration so multiple matches in the same file work
|
|
51
|
+
// correctly. The multi-specifier branch prepends a new declaration which
|
|
52
|
+
// shifts every offset; collected AST positions go stale after one rewrite,
|
|
53
|
+
// so process one match at a time.
|
|
54
|
+
let didRewrite = true;
|
|
55
|
+
while (didRewrite) {
|
|
56
|
+
didRewrite = false;
|
|
57
|
+
const sourceFile = (0, tsquery_1.ast)(contents);
|
|
58
|
+
const importNode = (0, tsquery_1.query)(sourceFile, ES_IMPORT_SELECTOR)[0];
|
|
59
|
+
if (importNode) {
|
|
60
|
+
const specifiers = (0, tsquery_1.query)(importNode, IMPORT_SPECIFIERS_SELECTOR);
|
|
61
|
+
const targetIdentifier = (0, tsquery_1.query)(importNode, TARGET_IMPORT_SPECIFIER_SELECTOR)[0];
|
|
62
|
+
if (targetIdentifier) {
|
|
63
|
+
// Walk to the ImportSpecifier to cover `Foo` and `Foo as Bar`.
|
|
64
|
+
const targetSpec = targetIdentifier.parent;
|
|
65
|
+
if (specifiers.length === 1) {
|
|
66
|
+
const modulePathNode = (0, tsquery_1.query)(importNode, ES_MODULE_PATH_SELECTOR)[0];
|
|
67
|
+
if (modulePathNode) {
|
|
68
|
+
contents =
|
|
69
|
+
contents.slice(0, modulePathNode.getStart()) +
|
|
70
|
+
`'${NEW_PACKAGE}'` +
|
|
71
|
+
contents.slice(modulePathNode.getEnd());
|
|
72
|
+
changed = true;
|
|
73
|
+
didRewrite = true;
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
// Extract target spec verbatim (preserves alias)
|
|
79
|
+
const end = endAfterTrailingComma(contents, targetSpec.getEnd());
|
|
80
|
+
contents =
|
|
81
|
+
`import { ${targetSpec.getText()} } from '${NEW_PACKAGE}';\n` +
|
|
82
|
+
contents.slice(0, targetSpec.getStart()) +
|
|
83
|
+
contents.slice(end);
|
|
84
|
+
changed = true;
|
|
85
|
+
didRewrite = true;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const stmtNode = (0, tsquery_1.query)(sourceFile, CJS_REQUIRE_STMT_SELECTOR)[0];
|
|
91
|
+
if (stmtNode) {
|
|
92
|
+
const bindingElements = (0, tsquery_1.query)(stmtNode, CJS_BINDING_ELEMENTS_SELECTOR);
|
|
93
|
+
const targetIdentifier = (0, tsquery_1.query)(stmtNode, CJS_TARGET_BINDING_SELECTOR)[0];
|
|
94
|
+
if (targetIdentifier) {
|
|
95
|
+
// Walk to the BindingElement to cover `Foo` and `Foo: Bar`.
|
|
96
|
+
const targetBinding = targetIdentifier.parent;
|
|
97
|
+
if (bindingElements.length === 1) {
|
|
98
|
+
const requirePathNode = (0, tsquery_1.query)(stmtNode, CJS_REQUIRE_PATH_SELECTOR)[0];
|
|
99
|
+
if (requirePathNode) {
|
|
100
|
+
contents =
|
|
101
|
+
contents.slice(0, requirePathNode.getStart()) +
|
|
102
|
+
`'${NEW_PACKAGE}'` +
|
|
103
|
+
contents.slice(requirePathNode.getEnd());
|
|
104
|
+
changed = true;
|
|
105
|
+
didRewrite = true;
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
// Extract target binding verbatim (preserves alias)
|
|
111
|
+
const end = endAfterTrailingComma(contents, targetBinding.getEnd());
|
|
112
|
+
contents =
|
|
113
|
+
`const { ${targetBinding.getText()} } = require('${NEW_PACKAGE}');\n` +
|
|
114
|
+
contents.slice(0, targetBinding.getStart()) +
|
|
115
|
+
contents.slice(end);
|
|
116
|
+
changed = true;
|
|
117
|
+
didRewrite = true;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (changed) {
|
|
124
|
+
tree.write(filePath, contents);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
128
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#### Rewrite `NxReactWebpackPlugin` Imports to the `@nx/react/webpack-plugin` Sub-path
|
|
2
|
+
|
|
3
|
+
The deprecated re-export of `NxReactWebpackPlugin` from `@nx/react` is removed in v23. The migration rewrites both ES module imports and CJS `require()` calls to use the `@nx/react/webpack-plugin` sub-path. Imports that combine the deprecated symbol with other named imports are split into two declarations so the rest of the original import still resolves from `@nx/react`. Aliases (`as Plugin`, `: Plugin`) are preserved.
|
|
4
|
+
|
|
5
|
+
#### Sample Code Changes
|
|
6
|
+
|
|
7
|
+
ES module import.
|
|
8
|
+
|
|
9
|
+
##### Before
|
|
10
|
+
|
|
11
|
+
```ts title="apps/my-app/webpack.config.ts" {1}
|
|
12
|
+
import { NxReactWebpackPlugin } from '@nx/react';
|
|
13
|
+
|
|
14
|
+
export default { plugins: [new NxReactWebpackPlugin()] };
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
##### After
|
|
18
|
+
|
|
19
|
+
```ts title="apps/my-app/webpack.config.ts"
|
|
20
|
+
import { NxReactWebpackPlugin } from '@nx/react/webpack-plugin';
|
|
21
|
+
|
|
22
|
+
export default { plugins: [new NxReactWebpackPlugin()] };
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
ES module import combined with other named imports.
|
|
26
|
+
|
|
27
|
+
##### Before
|
|
28
|
+
|
|
29
|
+
```ts title="apps/my-app/webpack.config.ts" {1}
|
|
30
|
+
import { NxReactWebpackPlugin, withReact } from '@nx/react';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
##### After
|
|
34
|
+
|
|
35
|
+
```ts title="apps/my-app/webpack.config.ts"
|
|
36
|
+
import { NxReactWebpackPlugin } from '@nx/react/webpack-plugin';
|
|
37
|
+
import { withReact } from '@nx/react';
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
CJS `require()`.
|
|
41
|
+
|
|
42
|
+
##### Before
|
|
43
|
+
|
|
44
|
+
```js title="apps/my-app/webpack.config.js" {1}
|
|
45
|
+
const { NxReactWebpackPlugin } = require('@nx/react');
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
##### After
|
|
49
|
+
|
|
50
|
+
```js title="apps/my-app/webpack.config.js"
|
|
51
|
+
const { NxReactWebpackPlugin } = require('@nx/react/webpack-plugin');
|
|
52
|
+
```
|