@nx/react 0.0.0-pr-31231-180f614 → 0.0.0-pr-31222-862e973
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/LICENSE +1 -1
- package/README.md +1 -1
- package/generators.json +13 -9
- package/index.d.ts +2 -1
- package/index.js +5 -2
- package/mf/dynamic-federation.d.ts +0 -64
- package/mf/dynamic-federation.js +0 -64
- package/migrations.json +148 -80
- package/module-federation.d.ts +4 -6
- package/module-federation.js +7 -16
- package/package.json +11 -11
- package/plugins/bundle-rollup.js +1 -4
- package/plugins/component-testing/index.js +1 -1
- package/plugins/jest.js +11 -6
- package/plugins/nx-react-webpack-plugin/lib/apply-react-config.js +22 -6
- package/plugins/storybook/index.js +2 -1
- package/plugins/with-react.d.ts +0 -4
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +1 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +110 -6
- package/src/executors/module-federation-dev-server/schema.d.ts +7 -9
- package/src/executors/module-federation-dev-server/schema.json +10 -15
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +17 -1
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +153 -5
- package/src/executors/module-federation-ssr-dev-server/schema.json +9 -14
- package/src/executors/module-federation-static-server/module-federation-static-server.impl.d.ts +2 -2
- package/src/executors/module-federation-static-server/module-federation-static-server.impl.js +12 -11
- package/src/executors/module-federation-static-server/schema.json +1 -2
- package/src/generators/application/application.d.ts +3 -3
- package/src/generators/application/application.js +186 -108
- package/src/generators/application/files/base-rspack/src/app/__fileName__.spec.tsx__tmpl__ +3 -3
- package/src/generators/application/files/base-rspack/src/main.tsx__tmpl__ +5 -27
- package/src/generators/application/files/base-rspack/tsconfig.app.json__tmpl__ +4 -21
- package/src/generators/application/files/base-vite/src/app/__fileName__.spec.tsx__tmpl__ +3 -3
- package/src/generators/application/files/base-vite/src/main.tsx__tmpl__ +6 -31
- package/src/generators/application/files/base-vite/tsconfig.app.json__tmpl__ +3 -20
- package/src/generators/application/files/base-webpack/src/app/__fileName__.spec.tsx__tmpl__ +3 -3
- package/src/generators/application/files/base-webpack/src/main.tsx__tmpl__ +2 -22
- package/src/generators/application/files/base-webpack/tsconfig.app.json__tmpl__ +4 -21
- package/src/generators/application/files/base-webpack/webpack.config.js__tmpl__ +4 -4
- package/src/generators/application/files/style-css-module/src/app/__fileName__.tsx__tmpl__ +18 -28
- package/src/generators/application/files/style-global-css/src/app/__fileName__.tsx__tmpl__ +20 -29
- package/src/generators/application/files/style-none/src/app/__fileName__.tsx__tmpl__ +16 -26
- package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +22 -31
- package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +21 -30
- package/src/generators/application/files/style-tailwind/src/app/__fileName__.tsx__tmpl__ +19 -29
- package/src/generators/application/lib/add-e2e.d.ts +1 -1
- package/src/generators/application/lib/add-e2e.js +65 -74
- package/src/generators/application/lib/add-jest.js +2 -27
- package/src/generators/application/lib/add-project.js +6 -112
- package/src/generators/application/lib/add-routing.js +1 -1
- package/src/generators/application/lib/create-application-files.d.ts +0 -61
- package/src/generators/application/lib/create-application-files.js +19 -102
- package/src/generators/application/lib/get-app-tests.js +11 -10
- package/src/generators/application/lib/install-common-dependencies.d.ts +1 -1
- package/src/generators/application/lib/install-common-dependencies.js +4 -18
- package/src/generators/application/lib/normalize-options.d.ts +3 -1
- package/src/generators/application/lib/normalize-options.js +19 -17
- package/src/generators/application/lib/update-jest-config.js +0 -5
- package/src/generators/application/schema.d.ts +6 -12
- package/src/generators/application/schema.json +42 -44
- package/src/generators/component/component.d.ts +1 -0
- package/src/generators/component/component.js +37 -19
- package/src/generators/component/files/__fileName__.tsx__tmpl__ +84 -0
- package/src/generators/component/lib/normalize-options.js +15 -13
- package/src/generators/component/schema.d.ts +25 -13
- package/src/generators/component/schema.json +49 -13
- package/src/generators/component-cypress-spec/component-cypress-spec.d.ts +13 -0
- package/src/generators/component-cypress-spec/component-cypress-spec.js +104 -0
- package/src/generators/component-cypress-spec/files/__componentName__.__fileExt__ +13 -0
- package/src/generators/component-cypress-spec/schema.json +45 -0
- package/src/generators/component-story/component-story.js +2 -1
- package/src/generators/component-story/files/jsx/__componentFileName__.stories.jsx__tmpl__ +5 -5
- package/src/generators/component-story/files/tsx/__componentFileName__.stories.tsx__tmpl__ +4 -3
- package/src/generators/component-test/component-test.js +1 -1
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +2 -0
- package/src/generators/cypress-component-configuration/lib/add-files.d.ts +1 -1
- package/src/generators/cypress-component-configuration/lib/add-files.js +4 -7
- package/src/generators/federate-module/federate-module.js +22 -12
- package/src/generators/federate-module/schema.d.ts +1 -0
- package/src/generators/federate-module/schema.json +12 -13
- package/src/generators/hook/files/{__fileName__.__ext__ → __fileName__.ts__tmpl__} +1 -3
- package/src/generators/hook/hook.d.ts +1 -0
- package/src/generators/hook/hook.js +83 -35
- package/src/generators/hook/schema.d.ts +17 -4
- package/src/generators/hook/schema.json +46 -19
- package/src/generators/host/files/common/src/app/__fileName__.js__tmpl__ +21 -28
- package/src/generators/host/files/common/src/main.js__tmpl__ +9 -12
- package/src/generators/host/files/common-ts/src/app/__fileName__.tsx__tmpl__ +28 -28
- package/src/generators/host/files/common-ts/src/main.ts__tmpl__ +9 -12
- package/src/generators/host/files/rspack-common/src/app/__fileName__.jsx__tmpl__ +13 -22
- package/src/generators/host/files/rspack-common/src/main.jsx__tmpl__ +9 -12
- package/src/generators/host/files/rspack-module-federation/module-federation.config.js__tmpl__ +5 -8
- package/src/generators/host/files/rspack-module-federation/rspack.config.js__tmpl__ +13 -37
- package/src/generators/host/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +30 -60
- package/src/generators/host/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +5 -16
- package/src/generators/host/files/rspack-module-federation-ssr/rspack.server.config.js__tmpl__ +16 -0
- package/src/generators/host/files/rspack-module-federation-ssr/server.ts__tmpl__ +1 -1
- package/src/generators/host/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +7 -16
- package/src/generators/host/files/rspack-module-federation-ssr-ts/rspack.server.config.ts__tmpl__ +16 -0
- package/src/generators/host/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +1 -1
- package/src/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +19 -22
- package/src/generators/host/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +30 -61
- package/src/generators/host/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +13 -37
- package/src/generators/host/files/webpack-module-federation/module-federation.config.js__tmpl__ +5 -8
- package/src/generators/host/files/webpack-module-federation/webpack.config.js__tmpl__ +1 -1
- package/src/generators/host/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +22 -24
- package/src/generators/host/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +7 -10
- package/src/generators/host/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +2 -2
- package/src/generators/host/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +7 -10
- package/src/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +2 -2
- package/src/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +19 -22
- package/src/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +23 -25
- package/src/generators/host/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +3 -4
- package/src/generators/host/host.d.ts +1 -0
- package/src/generators/host/host.js +27 -31
- package/src/generators/host/lib/add-module-federation-files.js +13 -29
- package/src/generators/host/lib/normalize-remote.js +6 -10
- package/src/generators/host/lib/setup-ssr-for-host.d.ts +3 -3
- package/src/generators/host/lib/setup-ssr-for-host.js +22 -46
- package/src/generators/host/schema.d.ts +5 -2
- package/src/generators/host/schema.json +27 -16
- package/src/generators/init/init.d.ts +1 -1
- package/src/generators/init/init.js +6 -31
- package/src/generators/init/schema.d.ts +0 -2
- package/src/generators/library/files/common/package.json__tmpl__ +4 -0
- package/src/generators/library/files/common/tsconfig.lib.json__tmpl__ +1 -1
- package/src/generators/library/files/vite/package.json__tmpl__ +12 -0
- package/src/generators/library/files/vite/tsconfig.lib.json__tmpl__ +1 -1
- package/src/generators/library/lib/add-linting.js +1 -1
- package/src/generators/library/lib/add-rollup-build-target.d.ts +1 -3
- package/src/generators/library/lib/add-rollup-build-target.js +32 -34
- package/src/generators/library/lib/create-files.d.ts +1 -1
- package/src/generators/library/lib/create-files.js +2 -23
- package/src/generators/library/lib/install-common-dependencies.d.ts +1 -1
- package/src/generators/library/lib/install-common-dependencies.js +3 -5
- package/src/generators/library/lib/normalize-options.js +6 -11
- package/src/generators/library/library.js +35 -80
- package/src/generators/library/schema.d.ts +5 -5
- package/src/generators/library/schema.json +36 -38
- package/src/generators/redux/files/{ts/__fileName__.spec.__ext__ → __fileName__.slice.spec.ts__tmpl__} +1 -1
- package/src/generators/redux/redux.d.ts +1 -0
- package/src/generators/redux/redux.js +36 -27
- package/src/generators/redux/schema.d.ts +8 -12
- package/src/generators/redux/schema.json +23 -21
- package/src/generators/remote/files/rspack-module-federation/module-federation.config.js__tmpl__ +7 -10
- package/src/generators/remote/files/rspack-module-federation/rspack.config.js__tmpl__ +13 -40
- package/src/generators/remote/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +4 -13
- package/src/generators/remote/files/rspack-module-federation-ssr/rspack.server.config.js__tmpl__ +16 -0
- package/src/generators/remote/files/rspack-module-federation-ssr/server.ts__tmpl__ +2 -2
- package/src/generators/remote/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +4 -13
- package/src/generators/remote/files/rspack-module-federation-ssr-ts/rspack.server.config.ts__tmpl__ +16 -0
- package/src/generators/remote/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +2 -2
- package/src/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +8 -11
- package/src/generators/remote/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +13 -40
- package/src/generators/remote/files/webpack-module-federation/module-federation.config.js__tmpl__ +7 -10
- package/src/generators/remote/files/webpack-module-federation/webpack.config.js__tmpl__ +1 -1
- package/src/generators/remote/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +4 -7
- package/src/generators/remote/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +2 -2
- package/src/generators/remote/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +5 -8
- package/src/generators/remote/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +2 -2
- package/src/generators/remote/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +8 -11
- package/src/generators/remote/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +2 -2
- package/src/generators/remote/lib/setup-ssr-for-remote.d.ts +1 -1
- package/src/generators/remote/lib/setup-ssr-for-remote.js +15 -37
- package/src/generators/remote/lib/setup-tspath-for-remote.js +3 -1
- package/src/generators/remote/lib/update-host-with-remote.js +2 -2
- package/src/generators/remote/remote.d.ts +1 -0
- package/src/generators/remote/remote.js +33 -57
- package/src/generators/remote/schema.d.ts +5 -2
- package/src/generators/remote/schema.json +27 -16
- package/src/generators/setup-tailwind/lib/update-project.js +2 -1
- package/src/generators/stories/schema.json +10 -0
- package/src/generators/stories/stories.d.ts +3 -1
- package/src/generators/stories/stories.js +20 -9
- package/src/generators/storybook-configuration/configuration.js +11 -2
- package/src/generators/storybook-configuration/schema.d.ts +3 -0
- package/src/generators/storybook-configuration/schema.json +15 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +9 -0
- package/src/migrations/update-16-2-0-remove-package/update-16-2-0-remove-package.d.ts +2 -0
- package/src/migrations/update-16-2-0-remove-package/update-16-2-0-remove-package.js +8 -0
- package/src/migrations/update-16-3-0/remove-types-react-router-dom-package.d.ts +2 -0
- package/src/migrations/update-16-3-0/remove-types-react-router-dom-package.js +8 -0
- package/src/migrations/update-16-7-0/add-babel-core.d.ts +2 -0
- package/src/migrations/update-16-7-0/add-babel-core.js +14 -0
- package/src/migrations/update-16-7-0-add-typings/update-16-7-0-add-typings.d.ts +2 -0
- package/src/migrations/update-16-7-0-add-typings/update-16-7-0-add-typings.js +57 -0
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +6 -11
- package/src/migrations/update-18-1-1/fix-target-defaults-inputs.d.ts +2 -0
- package/src/migrations/update-18-1-1/fix-target-defaults-inputs.js +53 -0
- package/src/module-federation/load-config.d.ts +3 -0
- package/src/module-federation/load-config.js +15 -0
- package/src/module-federation/models.d.ts +24 -0
- package/src/module-federation/models.js +2 -0
- package/src/module-federation/package-json.d.ts +8 -0
- package/src/module-federation/package-json.js +12 -0
- package/src/module-federation/utils.d.ts +12 -0
- package/src/module-federation/utils.js +75 -0
- package/src/module-federation/with-module-federation-ssr.d.ts +2 -0
- package/src/module-federation/with-module-federation-ssr.js +50 -0
- package/src/module-federation/with-module-federation.d.ts +7 -0
- package/src/module-federation/with-module-federation.js +63 -0
- package/src/rules/update-module-federation-project.d.ts +1 -2
- package/src/rules/update-module-federation-project.js +48 -37
- package/src/utils/add-mf-env-to-inputs.d.ts +1 -1
- package/src/utils/add-mf-env-to-inputs.js +11 -8
- package/src/utils/assertion.d.ts +0 -2
- package/src/utils/assertion.js +0 -6
- package/src/utils/ast-utils.d.ts +1 -1
- package/src/utils/ast-utils.js +2 -2
- package/src/utils/build-static.remotes.d.ts +4 -0
- package/src/utils/build-static.remotes.js +65 -0
- package/src/utils/create-ts-config.js +7 -57
- package/src/utils/ct-utils.d.ts +1 -1
- package/src/utils/ct-utils.js +7 -2
- package/src/utils/format-file.d.ts +1 -0
- package/src/utils/format-file.js +11 -0
- package/src/utils/testing-generators.js +4 -2
- package/src/utils/versions.d.ts +17 -25
- package/src/utils/versions.js +19 -28
- package/router-plugin.d.ts +0 -1
- package/router-plugin.js +0 -5
- package/src/executors/module-federation-dev-server/lib/index.d.ts +0 -2
- package/src/executors/module-federation-dev-server/lib/index.js +0 -5
- package/src/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -4
- package/src/executors/module-federation-dev-server/lib/normalize-options.js +0 -19
- package/src/executors/module-federation-dev-server/lib/start-remotes.d.ts +0 -5
- package/src/executors/module-federation-dev-server/lib/start-remotes.js +0 -33
- package/src/executors/module-federation-ssr-dev-server/lib/index.d.ts +0 -2
- package/src/executors/module-federation-ssr-dev-server/lib/index.js +0 -5
- package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +0 -4
- package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.js +0 -23
- package/src/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts +0 -5
- package/src/executors/module-federation-ssr-dev-server/lib/start-remotes.js +0 -34
- package/src/executors/module-federation-ssr-dev-server/schema.d.ts +0 -29
- package/src/generators/application/files/base-rsbuild/src/app/__fileName__.spec.tsx__tmpl__ +0 -10
- package/src/generators/application/files/base-rsbuild/src/assets/.gitkeep +0 -0
- package/src/generators/application/files/base-rsbuild/src/favicon.ico +0 -0
- package/src/generators/application/files/base-rsbuild/src/index.html +0 -14
- package/src/generators/application/files/base-rsbuild/src/main.tsx__tmpl__ +0 -32
- package/src/generators/application/files/base-rsbuild/tsconfig.app.json__tmpl__ +0 -31
- package/src/generators/application/files/base-rspack/rspack.config.js__tmpl__ +0 -53
- package/src/generators/application/files/react-router-ssr/common/app/app-nav.tsx__tmpl__ +0 -14
- package/src/generators/application/files/react-router-ssr/common/app/entry.client.tsx__tmpl__ +0 -18
- package/src/generators/application/files/react-router-ssr/common/app/entry.server.tsx__tmpl__ +0 -74
- package/src/generators/application/files/react-router-ssr/common/app/root.tsx__tmpl__ +0 -51
- package/src/generators/application/files/react-router-ssr/common/app/routes/about.tsx__tmpl__ +0 -7
- package/src/generators/application/files/react-router-ssr/common/app/routes.tsx__tmpl__ +0 -6
- package/src/generators/application/files/react-router-ssr/common/public/favicon.ico +0 -0
- package/src/generators/application/files/react-router-ssr/common/react-router.config.ts__tmpl__ +0 -5
- package/src/generators/application/files/react-router-ssr/common/tests/routes/_index.spec.tsx__tmpl__ +0 -16
- package/src/generators/application/files/react-router-ssr/common/tsconfig.app.json__tmpl__ +0 -23
- package/src/generators/application/files/react-router-ssr/common/tsconfig.json__tmpl__ +0 -27
- package/src/generators/application/files/react-router-ssr/non-root/.gitignore__tmpl__ +0 -5
- package/src/generators/application/files/react-router-ssr/non-root/package.json__tmpl__ +0 -24
- package/src/generators/application/files/react-router-ssr/nx-welcome/claimed/app/nx-welcome.tsx__tmpl__ +0 -866
- package/src/generators/application/files/react-router-ssr/nx-welcome/not-configured/app/nx-welcome.tsx__tmpl__ +0 -866
- package/src/generators/application/files/react-router-ssr/nx-welcome/unclaimed/app/nx-welcome.tsx__tmpl__ +0 -864
- package/src/generators/application/files/react-router-ssr/ts-solution/package.json__tmpl__ +0 -24
- package/src/generators/application/files/react-router-ssr/ts-solution/tsconfig.app.json__tmpl__ +0 -39
- package/src/generators/application/lib/add-linting.d.ts +0 -4
- package/src/generators/application/lib/add-linting.js +0 -86
- package/src/generators/application/lib/bundlers/add-rsbuild.d.ts +0 -4
- package/src/generators/application/lib/bundlers/add-rsbuild.js +0 -63
- package/src/generators/application/lib/bundlers/add-rspack.d.ts +0 -4
- package/src/generators/application/lib/bundlers/add-rspack.js +0 -37
- package/src/generators/application/lib/bundlers/add-vite.d.ts +0 -4
- package/src/generators/application/lib/bundlers/add-vite.js +0 -76
- package/src/generators/application/lib/bundlers/add-webpack.d.ts +0 -3
- package/src/generators/application/lib/bundlers/add-webpack.js +0 -18
- package/src/generators/component/files/__fileName__.__ext__ +0 -83
- package/src/generators/host/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -66
- package/src/generators/host/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -49
- package/src/generators/host/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +0 -66
- package/src/generators/host/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -49
- package/src/generators/host/lib/normalize-host-name.d.ts +0 -2
- package/src/generators/host/lib/normalize-host-name.js +0 -12
- package/src/generators/host/lib/update-module-federation-tsconfig.d.ts +0 -3
- package/src/generators/host/lib/update-module-federation-tsconfig.js +0 -39
- package/src/generators/library/lib/determine-entry-fields.d.ts +0 -3
- package/src/generators/library/lib/determine-entry-fields.js +0 -22
- package/src/generators/redux/files/js/__fileName__.__ext__ +0 -114
- package/src/generators/redux/files/js/__fileName__.spec.__ext__ +0 -56
- package/src/generators/remote/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -69
- package/src/generators/remote/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -45
- package/src/generators/remote/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +0 -69
- package/src/generators/remote/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -45
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts +0 -2
- 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 -2
- 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 -2
- 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 +0 -2
- package/src/migrations/update-21-0-0/update-babel-loose.js +0 -30
- package/src/plugins/router-plugin.d.ts +0 -10
- package/src/plugins/router-plugin.js +0 -221
- package/src/utils/has-rsbuild-plugin.d.ts +0 -2
- package/src/utils/has-rsbuild-plugin.js +0 -10
- package/src/utils/has-rspack-plugin.d.ts +0 -2
- package/src/utils/has-rspack-plugin.js +0 -10
- package/src/utils/version-utils.d.ts +0 -14
- package/src/utils/version-utils.js +0 -56
- /package/src/generators/component/files/{__fileName__.spec.__ext__ → __fileName__.spec.tsx__tmpl__} +0 -0
- /package/src/generators/hook/files/{__fileName__.spec.__specExt__ → __fileName__.spec.tsx__tmpl__} +0 -0
- /package/src/generators/redux/files/{ts/__fileName__.__ext__ → __fileName__.slice.ts__tmpl__} +0 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
[](https://circleci.com/gh/nrwl/nx)
|
|
11
11
|
[]()
|
|
12
|
-
[](https://www.npmjs.com/@nx/workspace)
|
|
13
13
|
[]()
|
|
14
14
|
[](http://commitizen.github.io/cz-cli/)
|
|
15
15
|
[](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
package/generators.json
CHANGED
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"description": "Create a React library."
|
|
26
26
|
},
|
|
27
27
|
"component": {
|
|
28
|
-
"factory": "./src/generators/component/component",
|
|
28
|
+
"factory": "./src/generators/component/component#componentGeneratorInternal",
|
|
29
29
|
"schema": "./src/generators/component/schema.json",
|
|
30
30
|
"description": "Create a React component.",
|
|
31
31
|
"aliases": ["c"]
|
|
32
32
|
},
|
|
33
33
|
"redux": {
|
|
34
|
-
"factory": "./src/generators/redux/redux",
|
|
34
|
+
"factory": "./src/generators/redux/redux#reduxGeneratorInternal",
|
|
35
35
|
"schema": "./src/generators/redux/schema.json",
|
|
36
36
|
"description": "Create a Redux slice for a project.",
|
|
37
37
|
"aliases": ["slice"]
|
|
@@ -54,25 +54,29 @@
|
|
|
54
54
|
"description": "Create stories/specs for all components declared in an app or library.",
|
|
55
55
|
"hidden": false
|
|
56
56
|
},
|
|
57
|
+
"component-cypress-spec": {
|
|
58
|
+
"factory": "./src/generators/component-cypress-spec/component-cypress-spec#componentCypressGenerator",
|
|
59
|
+
"schema": "./src/generators/component-cypress-spec/schema.json",
|
|
60
|
+
"description": "Create a Cypress spec for a UI component that has a story.",
|
|
61
|
+
"hidden": false
|
|
62
|
+
},
|
|
57
63
|
"hook": {
|
|
58
|
-
"factory": "./src/generators/hook/hook",
|
|
64
|
+
"factory": "./src/generators/hook/hook#hookGeneratorInternal",
|
|
59
65
|
"schema": "./src/generators/hook/schema.json",
|
|
60
66
|
"description": "Create a hook.",
|
|
61
67
|
"aliases": ["c"]
|
|
62
68
|
},
|
|
63
69
|
"host": {
|
|
64
|
-
"factory": "./src/generators/host/host",
|
|
70
|
+
"factory": "./src/generators/host/host#hostGeneratorInternal",
|
|
65
71
|
"schema": "./src/generators/host/schema.json",
|
|
66
72
|
"x-type": "application",
|
|
67
|
-
"description": "Generate a host react application"
|
|
68
|
-
"aliases": ["consumer"]
|
|
73
|
+
"description": "Generate a host react application"
|
|
69
74
|
},
|
|
70
75
|
"remote": {
|
|
71
|
-
"factory": "./src/generators/remote/remote",
|
|
76
|
+
"factory": "./src/generators/remote/remote#remoteGeneratorInternal",
|
|
72
77
|
"schema": "./src/generators/remote/schema.json",
|
|
73
78
|
"x-type": "application",
|
|
74
|
-
"description": "Generate a remote react application"
|
|
75
|
-
"aliases": ["producer"]
|
|
79
|
+
"description": "Generate a remote react application"
|
|
76
80
|
},
|
|
77
81
|
"cypress-component-configuration": {
|
|
78
82
|
"factory": "./src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfigGenerator",
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NxReactWebpackPlugin as _NxReactWebpackPlugin } from './plugins/nx-react-webpack-plugin/nx-react-webpack-plugin';
|
|
2
|
-
/** @deprecated Use '@nx/react/webpack-plugin' instead
|
|
2
|
+
/** @deprecated Use '@nx/react/webpack-plugin' instead. */
|
|
3
3
|
export declare const NxReactWebpackPlugin: typeof _NxReactWebpackPlugin;
|
|
4
4
|
export { extraEslintDependencies, extendReactEslintJson, } from './src/utils/lint';
|
|
5
5
|
export { cssInJsDependenciesBabel } from './src/utils/styled';
|
|
@@ -8,6 +8,7 @@ export { reactDomVersion, reactVersion } from './src/utils/versions';
|
|
|
8
8
|
export { applicationGenerator } from './src/generators/application/application';
|
|
9
9
|
export { componentGenerator } from './src/generators/component/component';
|
|
10
10
|
export { hookGenerator } from './src/generators/hook/hook';
|
|
11
|
+
export { componentCypressGenerator } from './src/generators/component-cypress-spec/component-cypress-spec';
|
|
11
12
|
export { componentStoryGenerator } from './src/generators/component-story/component-story';
|
|
12
13
|
export { libraryGenerator } from './src/generators/library/library';
|
|
13
14
|
export { reactInitGenerator } from './src/generators/init/init';
|
package/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setupTailwindGenerator = exports.componentTestGenerator = exports.cypressComponentConfigGenerator = exports.remoteGenerator = exports.hostGenerator = exports.storybookConfigurationGenerator = exports.storiesGenerator = exports.reduxGenerator = exports.reactInitGenerator = exports.libraryGenerator = exports.componentStoryGenerator = exports.hookGenerator = exports.componentGenerator = exports.applicationGenerator = exports.reactVersion = exports.reactDomVersion = exports.assertValidStyle = exports.cssInJsDependenciesBabel = exports.extendReactEslintJson = exports.extraEslintDependencies = exports.NxReactWebpackPlugin = void 0;
|
|
3
|
+
exports.setupTailwindGenerator = exports.componentTestGenerator = exports.cypressComponentConfigGenerator = exports.remoteGenerator = exports.hostGenerator = exports.storybookConfigurationGenerator = exports.storiesGenerator = exports.reduxGenerator = exports.reactInitGenerator = exports.libraryGenerator = exports.componentStoryGenerator = exports.componentCypressGenerator = exports.hookGenerator = exports.componentGenerator = exports.applicationGenerator = exports.reactVersion = exports.reactDomVersion = exports.assertValidStyle = exports.cssInJsDependenciesBabel = exports.extendReactEslintJson = exports.extraEslintDependencies = exports.NxReactWebpackPlugin = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const nx_react_webpack_plugin_1 = require("./plugins/nx-react-webpack-plugin/nx-react-webpack-plugin");
|
|
6
|
-
|
|
6
|
+
// TODO(v20): Remove this in favor of deep imports in order to load configs faster (150-200ms faster).
|
|
7
|
+
/** @deprecated Use '@nx/react/webpack-plugin' instead. */
|
|
7
8
|
exports.NxReactWebpackPlugin = nx_react_webpack_plugin_1.NxReactWebpackPlugin;
|
|
8
9
|
var lint_1 = require("./src/utils/lint");
|
|
9
10
|
Object.defineProperty(exports, "extraEslintDependencies", { enumerable: true, get: function () { return lint_1.extraEslintDependencies; } });
|
|
@@ -21,6 +22,8 @@ var component_1 = require("./src/generators/component/component");
|
|
|
21
22
|
Object.defineProperty(exports, "componentGenerator", { enumerable: true, get: function () { return component_1.componentGenerator; } });
|
|
22
23
|
var hook_1 = require("./src/generators/hook/hook");
|
|
23
24
|
Object.defineProperty(exports, "hookGenerator", { enumerable: true, get: function () { return hook_1.hookGenerator; } });
|
|
25
|
+
var component_cypress_spec_1 = require("./src/generators/component-cypress-spec/component-cypress-spec");
|
|
26
|
+
Object.defineProperty(exports, "componentCypressGenerator", { enumerable: true, get: function () { return component_cypress_spec_1.componentCypressGenerator; } });
|
|
24
27
|
var component_story_1 = require("./src/generators/component-story/component-story");
|
|
25
28
|
Object.defineProperty(exports, "componentStoryGenerator", { enumerable: true, get: function () { return component_story_1.componentStoryGenerator; } });
|
|
26
29
|
var library_1 = require("./src/generators/library/library");
|
|
@@ -1,69 +1,5 @@
|
|
|
1
1
|
export type ResolveRemoteUrlFunction = (remoteName: string) => string | Promise<string>;
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Use Runtime Helpers from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
4
|
-
*/
|
|
5
2
|
export declare function setRemoteUrlResolver(_resolveRemoteUrl: ResolveRemoteUrlFunction): void;
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Use init() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
8
|
-
* If you have a remote app called `my-remote-app` and you want to use the `http://localhost:4201/mf-manifest.json` as the remote url, you should change it from:
|
|
9
|
-
* ```ts
|
|
10
|
-
* import { setRemoteDefinitions } from '@nx/react/mf';
|
|
11
|
-
*
|
|
12
|
-
* setRemoteDefinitions({
|
|
13
|
-
* 'my-remote-app': 'http://localhost:4201/mf-manifest.json'
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
* to use init():
|
|
17
|
-
* ```ts
|
|
18
|
-
* import { init } from '@module-federation/enhanced/runtime';
|
|
19
|
-
*
|
|
20
|
-
* init({
|
|
21
|
-
* name: 'host',
|
|
22
|
-
* remotes: [{
|
|
23
|
-
* name: 'my-remote-app',
|
|
24
|
-
* entry: 'http://localhost:4201/mf-manifest.json'
|
|
25
|
-
* }]
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
3
|
export declare function setRemoteDefinitions(definitions: Record<string, string>): void;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Use registerRemotes() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
32
|
-
* If you set a remote app with `setRemoteDefinition` such as:
|
|
33
|
-
* ```ts
|
|
34
|
-
* import { setRemoteDefinition } from '@nx/react/mf';
|
|
35
|
-
*
|
|
36
|
-
* setRemoteDefinition(
|
|
37
|
-
* 'my-remote-app',
|
|
38
|
-
* 'http://localhost:4201/mf-manifest.json'
|
|
39
|
-
* );
|
|
40
|
-
* ```
|
|
41
|
-
* change it to use registerRemotes():
|
|
42
|
-
* ```ts
|
|
43
|
-
* import { registerRemotes } from '@module-federation/enhanced/runtime';
|
|
44
|
-
*
|
|
45
|
-
* registerRemotes([
|
|
46
|
-
* {
|
|
47
|
-
* name: 'my-remote-app',
|
|
48
|
-
* entry: 'http://localhost:4201/mf-manifest.json'
|
|
49
|
-
* }
|
|
50
|
-
* ]);
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
4
|
export declare function setRemoteDefinition(remoteName: string, remoteUrl: string): void;
|
|
54
|
-
/**
|
|
55
|
-
* @deprecated Use loadRemote() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
56
|
-
* If you set a load a remote with `loadRemoteModule` such as:
|
|
57
|
-
* ```ts
|
|
58
|
-
* import { loadRemoteModule } from '@nx/react/mf';
|
|
59
|
-
*
|
|
60
|
-
* loadRemoteModule('my-remote-app', './Module').then(m => m.RemoteEntryModule);
|
|
61
|
-
* ```
|
|
62
|
-
* change it to use loadRemote():
|
|
63
|
-
* ```ts
|
|
64
|
-
* import { loadRemote } from '@module-federation/enhanced/runtime';
|
|
65
|
-
*
|
|
66
|
-
* loadRemote<typeof import('my-remote-app/Module')>('my-remote-app/Module').then(m => m.RemoteEntryModule);
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
5
|
export declare function loadRemoteModule(remoteName: string, moduleName: string): Promise<any>;
|
package/mf/dynamic-federation.js
CHANGED
|
@@ -9,79 +9,15 @@ let resolveRemoteUrl;
|
|
|
9
9
|
const remoteModuleMap = new Map();
|
|
10
10
|
const remoteContainerMap = new Map();
|
|
11
11
|
let initialSharingScopeCreated = false;
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Use Runtime Helpers from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
14
|
-
*/
|
|
15
12
|
function setRemoteUrlResolver(_resolveRemoteUrl) {
|
|
16
13
|
resolveRemoteUrl = _resolveRemoteUrl;
|
|
17
14
|
}
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Use init() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
20
|
-
* If you have a remote app called `my-remote-app` and you want to use the `http://localhost:4201/mf-manifest.json` as the remote url, you should change it from:
|
|
21
|
-
* ```ts
|
|
22
|
-
* import { setRemoteDefinitions } from '@nx/react/mf';
|
|
23
|
-
*
|
|
24
|
-
* setRemoteDefinitions({
|
|
25
|
-
* 'my-remote-app': 'http://localhost:4201/mf-manifest.json'
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
28
|
-
* to use init():
|
|
29
|
-
* ```ts
|
|
30
|
-
* import { init } from '@module-federation/enhanced/runtime';
|
|
31
|
-
*
|
|
32
|
-
* init({
|
|
33
|
-
* name: 'host',
|
|
34
|
-
* remotes: [{
|
|
35
|
-
* name: 'my-remote-app',
|
|
36
|
-
* entry: 'http://localhost:4201/mf-manifest.json'
|
|
37
|
-
* }]
|
|
38
|
-
* });
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
15
|
function setRemoteDefinitions(definitions) {
|
|
42
16
|
remoteUrlDefinitions = definitions;
|
|
43
17
|
}
|
|
44
|
-
/**
|
|
45
|
-
* @deprecated Use registerRemotes() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
46
|
-
* If you set a remote app with `setRemoteDefinition` such as:
|
|
47
|
-
* ```ts
|
|
48
|
-
* import { setRemoteDefinition } from '@nx/react/mf';
|
|
49
|
-
*
|
|
50
|
-
* setRemoteDefinition(
|
|
51
|
-
* 'my-remote-app',
|
|
52
|
-
* 'http://localhost:4201/mf-manifest.json'
|
|
53
|
-
* );
|
|
54
|
-
* ```
|
|
55
|
-
* change it to use registerRemotes():
|
|
56
|
-
* ```ts
|
|
57
|
-
* import { registerRemotes } from '@module-federation/enhanced/runtime';
|
|
58
|
-
*
|
|
59
|
-
* registerRemotes([
|
|
60
|
-
* {
|
|
61
|
-
* name: 'my-remote-app',
|
|
62
|
-
* entry: 'http://localhost:4201/mf-manifest.json'
|
|
63
|
-
* }
|
|
64
|
-
* ]);
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
18
|
function setRemoteDefinition(remoteName, remoteUrl) {
|
|
68
19
|
remoteUrlDefinitions[remoteName] = remoteUrl;
|
|
69
20
|
}
|
|
70
|
-
/**
|
|
71
|
-
* @deprecated Use loadRemote() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
72
|
-
* If you set a load a remote with `loadRemoteModule` such as:
|
|
73
|
-
* ```ts
|
|
74
|
-
* import { loadRemoteModule } from '@nx/react/mf';
|
|
75
|
-
*
|
|
76
|
-
* loadRemoteModule('my-remote-app', './Module').then(m => m.RemoteEntryModule);
|
|
77
|
-
* ```
|
|
78
|
-
* change it to use loadRemote():
|
|
79
|
-
* ```ts
|
|
80
|
-
* import { loadRemote } from '@module-federation/enhanced/runtime';
|
|
81
|
-
*
|
|
82
|
-
* loadRemote<typeof import('my-remote-app/Module')>('my-remote-app/Module').then(m => m.RemoteEntryModule);
|
|
83
|
-
* ```
|
|
84
|
-
*/
|
|
85
21
|
async function loadRemoteModule(remoteName, moduleName) {
|
|
86
22
|
const remoteModuleKey = `${remoteName}:${moduleName}`;
|
|
87
23
|
if (remoteModuleMap.has(remoteModuleKey)) {
|
package/migrations.json
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generators": {
|
|
3
|
+
"update-16-0-0-add-nx-packages": {
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"version": "16.0.0-beta.1",
|
|
6
|
+
"description": "Replace @nrwl/react with @nx/react",
|
|
7
|
+
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
|
|
8
|
+
},
|
|
9
|
+
"update-16-2-0-remove-package": {
|
|
10
|
+
"cli": "nx",
|
|
11
|
+
"version": "16.2.0-beta.0",
|
|
12
|
+
"description": "Remove react-test-renderer from package.json",
|
|
13
|
+
"implementation": "./src/migrations/update-16-2-0-remove-package/update-16-2-0-remove-package"
|
|
14
|
+
},
|
|
15
|
+
"remove-types-react-router-dom": {
|
|
16
|
+
"cli": "nx",
|
|
17
|
+
"version": "16.3.0-beta.2",
|
|
18
|
+
"description": "Remove @types/react-router-dom from package.json",
|
|
19
|
+
"implementation": "./src/migrations/update-16-3-0/remove-types-react-router-dom-package"
|
|
20
|
+
},
|
|
21
|
+
"add-babel-core": {
|
|
22
|
+
"cli": "nx",
|
|
23
|
+
"version": "16.7.0-beta.2",
|
|
24
|
+
"description": "Add @babel/core to package.json if @babel/preset-react is present",
|
|
25
|
+
"implementation": "./src/migrations/update-16-7-0/add-babel-core"
|
|
26
|
+
},
|
|
27
|
+
"update-16-7-0-add-typings": {
|
|
28
|
+
"cli": "nx",
|
|
29
|
+
"version": "16.7.0-beta.2",
|
|
30
|
+
"description": "Add @nx/react types to tsconfig types array",
|
|
31
|
+
"implementation": "./src/migrations/update-16-7-0-add-typings/update-16-7-0-add-typings"
|
|
32
|
+
},
|
|
33
|
+
"add-module-federation-env-var-to-target-defaults": {
|
|
34
|
+
"cli": "nx",
|
|
35
|
+
"version": "18.0.0-beta.0",
|
|
36
|
+
"description": "Add NX_MF_DEV_SERVER_STATIC_REMOTES to inputs for task hashing when '@nx/webpack:webpack' is used for Module Federation.",
|
|
37
|
+
"factory": "./src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults"
|
|
38
|
+
},
|
|
39
|
+
"fix-target-defaults-for-webpack": {
|
|
40
|
+
"cli": "nx",
|
|
41
|
+
"version": "18.1.1-beta.0",
|
|
42
|
+
"description": "Ensure targetDefaults inputs for task hashing when '@nx/webpack:webpack' is used are correct for Module Federation.",
|
|
43
|
+
"factory": "./src/migrations/update-18-1-1/fix-target-defaults-inputs"
|
|
44
|
+
},
|
|
3
45
|
"update-19-6-0-turn-module-federation-dts-off": {
|
|
4
46
|
"cli": "nx",
|
|
5
47
|
"version": "19.6.0-beta.4",
|
|
@@ -17,39 +59,117 @@
|
|
|
17
59
|
"version": "19.6.1-beta.0",
|
|
18
60
|
"description": "Ensure Target Defaults are set correctly for Module Federation.",
|
|
19
61
|
"factory": "./src/migrations/update-19-6-1/ensure-depends-on-for-mf"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"packageJsonUpdates": {
|
|
65
|
+
"16.3.0": {
|
|
66
|
+
"version": "16.3.0-beta.2",
|
|
67
|
+
"packages": {
|
|
68
|
+
"react-router-dom": {
|
|
69
|
+
"version": "6.11.2",
|
|
70
|
+
"alwaysAddToPackageJson": false
|
|
71
|
+
},
|
|
72
|
+
"@svgr/rollup": {
|
|
73
|
+
"version": "^8.0.1",
|
|
74
|
+
"alwaysAddToPackageJson": false
|
|
75
|
+
}
|
|
76
|
+
}
|
|
20
77
|
},
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
78
|
+
"16.4.0-beta.4": {
|
|
79
|
+
"version": "16.4.0-beta.4",
|
|
80
|
+
"packages": {
|
|
81
|
+
"stylus": {
|
|
82
|
+
"version": "^0.59.0",
|
|
83
|
+
"alwaysAddToPackageJson": false
|
|
84
|
+
}
|
|
85
|
+
}
|
|
26
86
|
},
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
87
|
+
"16.4.0-beta.7": {
|
|
88
|
+
"version": "16.4.0-beta.7",
|
|
89
|
+
"packages": {
|
|
90
|
+
"@types/react": {
|
|
91
|
+
"version": "18.2.12",
|
|
92
|
+
"alwaysAddToPackageJson": false
|
|
93
|
+
},
|
|
94
|
+
"@types/react-dom": {
|
|
95
|
+
"version": "18.2.5",
|
|
96
|
+
"alwaysAddToPackageJson": false
|
|
97
|
+
},
|
|
98
|
+
"@types/react-is": {
|
|
99
|
+
"version": "18.2.0",
|
|
100
|
+
"alwaysAddToPackageJson": false
|
|
101
|
+
}
|
|
102
|
+
}
|
|
32
103
|
},
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
104
|
+
"16.4.0-beta.8": {
|
|
105
|
+
"version": "16.4.0-beta.8",
|
|
106
|
+
"packages": {
|
|
107
|
+
"@emotion/styled": {
|
|
108
|
+
"version": "11.11.0",
|
|
109
|
+
"alwaysAddToPackageJson": false
|
|
110
|
+
},
|
|
111
|
+
"@emotion/react": {
|
|
112
|
+
"version": "11.11.1",
|
|
113
|
+
"alwaysAddToPackageJson": false
|
|
114
|
+
},
|
|
115
|
+
"@emotion/babel-plugin": {
|
|
116
|
+
"version": "11.11.0",
|
|
117
|
+
"alwaysAddToPackageJson": false
|
|
118
|
+
}
|
|
119
|
+
}
|
|
38
120
|
},
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
121
|
+
"16.4.0-beta.11": {
|
|
122
|
+
"version": "16.4.0-beta.11",
|
|
123
|
+
"packages": {
|
|
124
|
+
"@types/react": {
|
|
125
|
+
"version": "18.2.13",
|
|
126
|
+
"alwaysAddToPackageJson": false
|
|
127
|
+
},
|
|
128
|
+
"@types/react-dom": {
|
|
129
|
+
"version": "18.2.6",
|
|
130
|
+
"alwaysAddToPackageJson": false
|
|
131
|
+
},
|
|
132
|
+
"@types/react-is": {
|
|
133
|
+
"version": "18.2.1",
|
|
134
|
+
"alwaysAddToPackageJson": false
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"16.5.0-beta.4": {
|
|
139
|
+
"version": "16.5.0-beta.4",
|
|
140
|
+
"packages": {
|
|
141
|
+
"@types/react": {
|
|
142
|
+
"version": "18.2.14",
|
|
143
|
+
"alwaysAddToPackageJson": false
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"17.0.0-beta.0": {
|
|
148
|
+
"version": "17.0.0-beta.0",
|
|
149
|
+
"packages": {
|
|
150
|
+
"@types/react": {
|
|
151
|
+
"version": "18.2.24",
|
|
152
|
+
"alwaysAddToPackageJson": false
|
|
153
|
+
},
|
|
154
|
+
"@types/react-dom": {
|
|
155
|
+
"version": "18.2.9",
|
|
156
|
+
"alwaysAddToPackageJson": false
|
|
157
|
+
},
|
|
158
|
+
"@types/react-is": {
|
|
159
|
+
"version": "18.2.2",
|
|
160
|
+
"alwaysAddToPackageJson": false
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"17.3.0": {
|
|
165
|
+
"version": "17.3.0-beta.3",
|
|
166
|
+
"packages": {
|
|
167
|
+
"@types/node": {
|
|
168
|
+
"version": "18.16.9",
|
|
169
|
+
"alwaysAddToPackageJson": false
|
|
170
|
+
}
|
|
171
|
+
}
|
|
44
172
|
},
|
|
45
|
-
"update-21-0-0-update-babel-loose": {
|
|
46
|
-
"cli": "nx",
|
|
47
|
-
"version": "21.0.0-beta.11",
|
|
48
|
-
"description": "Replaces `classProperties.loose` option with `loose`.",
|
|
49
|
-
"factory": "./src/migrations/update-21-0-0/update-babel-loose"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"packageJsonUpdates": {
|
|
53
173
|
"19.0.0": {
|
|
54
174
|
"version": "19.0.0-beta.12",
|
|
55
175
|
"packages": {
|
|
@@ -122,58 +242,6 @@
|
|
|
122
242
|
"alwaysAddToPackageJson": false
|
|
123
243
|
}
|
|
124
244
|
}
|
|
125
|
-
},
|
|
126
|
-
"20.0.0": {
|
|
127
|
-
"version": "20.0.0-beta.8",
|
|
128
|
-
"packages": {
|
|
129
|
-
"eslint-plugin-import": {
|
|
130
|
-
"version": "2.31.0",
|
|
131
|
-
"alwaysAddToPackageJson": false
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"20.1.0": {
|
|
136
|
-
"version": "20.1.0-beta.0",
|
|
137
|
-
"packages": {
|
|
138
|
-
"eslint-plugin-react-hooks": {
|
|
139
|
-
"version": "5.0.0",
|
|
140
|
-
"alwaysAddToPackageJson": false
|
|
141
|
-
},
|
|
142
|
-
"eslint-plugin-jsx-a11y": {
|
|
143
|
-
"version": "6.10.1",
|
|
144
|
-
"alwaysAddToPackageJson": false
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
"20.2.0": {
|
|
149
|
-
"version": "20.2.0-beta.3",
|
|
150
|
-
"packages": {
|
|
151
|
-
"@module-federation/enhanced": {
|
|
152
|
-
"version": "0.7.6",
|
|
153
|
-
"alwaysAddToPackageJson": false
|
|
154
|
-
},
|
|
155
|
-
"@module-federation/runtime": {
|
|
156
|
-
"version": "0.7.6",
|
|
157
|
-
"alwaysAddToPackageJson": false
|
|
158
|
-
},
|
|
159
|
-
"@module-federation/sdk": {
|
|
160
|
-
"version": "0.7.6",
|
|
161
|
-
"alwaysAddToPackageJson": false
|
|
162
|
-
},
|
|
163
|
-
"@module-federation/node": {
|
|
164
|
-
"version": "2.6.11",
|
|
165
|
-
"alwaysAddToPackageJson": false
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
"20.3.0": {
|
|
170
|
-
"version": "20.3.0-beta.0",
|
|
171
|
-
"packages": {
|
|
172
|
-
"@testing-library/react": {
|
|
173
|
-
"version": "16.1.0",
|
|
174
|
-
"alwaysAddToPackageJson": false
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
245
|
}
|
|
178
246
|
}
|
|
179
247
|
}
|
package/module-federation.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { withModuleFederation } from '
|
|
2
|
-
import { withModuleFederationForSSR } from '
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
export { withModuleFederation, withModuleFederationForSSR };
|
|
1
|
+
import { withModuleFederation } from './src/module-federation/with-module-federation';
|
|
2
|
+
import { withModuleFederationForSSR } from './src/module-federation/with-module-federation-ssr';
|
|
3
|
+
export { withModuleFederation };
|
|
4
|
+
export { withModuleFederationForSSR };
|
package/module-federation.js
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.withModuleFederationForSSR = exports.withModuleFederation = void 0;
|
|
4
|
-
const
|
|
5
|
-
Object.defineProperty(exports, "withModuleFederation", { enumerable: true, get: function () { return
|
|
6
|
-
const
|
|
7
|
-
Object.defineProperty(exports, "withModuleFederationForSSR", { enumerable: true, get: function () { return
|
|
4
|
+
const with_module_federation_1 = require("./src/module-federation/with-module-federation");
|
|
5
|
+
Object.defineProperty(exports, "withModuleFederation", { enumerable: true, get: function () { return with_module_federation_1.withModuleFederation; } });
|
|
6
|
+
const with_module_federation_ssr_1 = require("./src/module-federation/with-module-federation-ssr");
|
|
7
|
+
Object.defineProperty(exports, "withModuleFederationForSSR", { enumerable: true, get: function () { return with_module_federation_ssr_1.withModuleFederationForSSR; } });
|
|
8
8
|
// Support for older generated code: `const withModuleFederation = require('@nx/react/module-federation')`
|
|
9
|
-
|
|
10
|
-
* @deprecated Use `@nx/module-federation/webpack` instead. This will be removed in Nx v22.
|
|
11
|
-
*/
|
|
12
|
-
module.exports = webpack_1.withModuleFederation;
|
|
9
|
+
module.exports = with_module_federation_1.withModuleFederation;
|
|
13
10
|
// Allow newer generated code to work: `const { withModuleFederation } = require(...)`;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
module.exports.withModuleFederation = webpack_1.withModuleFederation;
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Use `@nx/module-federation/webpack` instead. This will be removed in Nx v22.
|
|
20
|
-
*/
|
|
21
|
-
module.exports.withModuleFederationForSSR = webpack_2.withModuleFederationForSSR;
|
|
11
|
+
module.exports.withModuleFederation = with_module_federation_1.withModuleFederation;
|
|
12
|
+
module.exports.withModuleFederationForSSR = with_module_federation_ssr_1.withModuleFederationForSSR;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-31222-862e973",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"minimatch": "9.0.3",
|
|
39
39
|
"picocolors": "^1.1.0",
|
|
40
40
|
"tslib": "^2.3.0",
|
|
41
|
-
"@
|
|
42
|
-
"@nx/
|
|
43
|
-
"@nx/
|
|
44
|
-
"@nx/
|
|
45
|
-
"@nx/
|
|
46
|
-
"express": "^4.
|
|
47
|
-
"http-proxy-middleware": "^3.0.
|
|
48
|
-
"
|
|
41
|
+
"@module-federation/enhanced": "~0.6.0",
|
|
42
|
+
"@nx/devkit": "0.0.0-pr-31222-862e973",
|
|
43
|
+
"@nx/js": "0.0.0-pr-31222-862e973",
|
|
44
|
+
"@nx/eslint": "0.0.0-pr-31222-862e973",
|
|
45
|
+
"@nx/web": "0.0.0-pr-31222-862e973",
|
|
46
|
+
"express": "^4.19.2",
|
|
47
|
+
"http-proxy-middleware": "^3.0.0",
|
|
48
|
+
"@nrwl/react": "0.0.0-pr-31222-862e973"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"
|
|
54
|
-
"
|
|
53
|
+
"type": "commonjs",
|
|
54
|
+
"types": "./index.d.ts"
|
|
55
55
|
}
|
package/plugins/bundle-rollup.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// TODO(
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Use `withNx` function from `@nx/rollup/with-nx` in your rollup.config.cjs file instead. Use `nx g @nx/rollup:convert-to-inferred` to generate the rollup.config.cjs file if it does not exist.
|
|
6
|
-
*/
|
|
3
|
+
// TODO(v20): This should be deprecated and removed in v22.
|
|
7
4
|
function getRollupOptions(options) {
|
|
8
5
|
const extraGlobals = {
|
|
9
6
|
react: 'React',
|
|
@@ -167,7 +167,7 @@ function buildTargetWebpack(ctx, buildTarget, componentTestingProjectName) {
|
|
|
167
167
|
}
|
|
168
168
|
return async () => {
|
|
169
169
|
customWebpack = await customWebpack;
|
|
170
|
-
// TODO(
|
|
170
|
+
// TODO(v20): Component testing need to be agnostic of the underlying executor. With Crystal, we're not using `@nx/webpack:webpack` by default.
|
|
171
171
|
// We need to decouple CT from the build target of the app, we just care about bundler config (e.g. webpack.config.js).
|
|
172
172
|
// The generated setup should support both Webpack and Vite as documented here: https://docs.cypress.io/guides/component-testing/react/overview
|
|
173
173
|
// Related issue: https://github.com/nrwl/nx/issues/21546
|
package/plugins/jest.js
CHANGED
|
@@ -16,12 +16,17 @@ module.exports = {
|
|
|
16
16
|
module.exports = {
|
|
17
17
|
__esModule: true,
|
|
18
18
|
default: ${assetFilename},
|
|
19
|
-
ReactComponent: function ${componentName}(props) {
|
|
20
|
-
return
|
|
21
|
-
'
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
ReactComponent: React.forwardRef(function ${componentName}(props, ref) {
|
|
20
|
+
return {
|
|
21
|
+
$$typeof: Symbol.for('react.element'),
|
|
22
|
+
type: 'svg',
|
|
23
|
+
ref: ref,
|
|
24
|
+
key: null,
|
|
25
|
+
props: Object.assign({}, props, {
|
|
26
|
+
children: ${assetFilename}
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
}),
|
|
25
30
|
};`,
|
|
26
31
|
};
|
|
27
32
|
}
|