@nrwl/react 14.8.7 → 14.9.0-beta.1
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/CHANGELOG.md +1 -1
- package/LICENSE +22 -22
- package/README.md +5 -26
- package/babel.d.ts +16 -1
- package/babel.js +4 -3
- package/babel.js.map +1 -1
- package/executors.json +10 -0
- package/generators.json +14 -0
- package/index.d.ts +4 -1
- package/index.js +8 -1
- package/index.js.map +1 -1
- package/migrations.json +160 -0
- package/module-federation.d.ts +2 -2
- package/module-federation.js +4 -4
- package/module-federation.js.map +1 -1
- package/package.json +9 -26
- package/plugins/bundle-rollup.js +20 -0
- package/plugins/bundle-rollup.js.map +1 -1
- package/plugins/component-testing/index.d.ts +13 -5
- package/plugins/component-testing/index.js +31 -44
- package/plugins/component-testing/index.js.map +1 -1
- package/plugins/component-testing/webpack-fallback.js +2 -2
- package/plugins/component-testing/webpack-fallback.js.map +1 -1
- package/plugins/jest.js +10 -6
- package/plugins/jest.js.map +1 -1
- package/plugins/storybook/index.d.ts +0 -4
- package/plugins/storybook/index.js +24 -74
- package/plugins/storybook/index.js.map +1 -1
- package/plugins/storybook/merge-plugins.d.ts +2 -2
- package/plugins/storybook/merge-plugins.js.map +1 -1
- package/plugins/webpack.d.ts +3 -2
- package/plugins/webpack.js +10 -72
- package/plugins/webpack.js.map +1 -1
- package/plugins/with-react.d.ts +12 -0
- package/plugins/with-react.js +82 -0
- package/plugins/with-react.js.map +1 -0
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +6 -2
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +11 -7
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js.map +1 -1
- package/src/executors/module-federation-dev-server/schema.json +18 -4
- package/src/executors/module-federation-ssr-dev-server/compat.d.ts +2 -0
- package/src/executors/module-federation-ssr-dev-server/compat.js +6 -0
- package/src/executors/module-federation-ssr-dev-server/compat.js.map +1 -0
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +9 -0
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +71 -0
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js.map +1 -0
- package/src/executors/module-federation-ssr-dev-server/schema.json +48 -0
- package/src/generators/application/application.js +85 -25
- package/src/generators/application/application.js.map +1 -1
- package/src/generators/application/files/base-vite/index.html__tmpl__ +16 -0
- package/src/generators/application/files/base-vite/src/app/__fileName__.spec.tsx__tmpl__ +10 -0
- package/src/generators/application/files/{common → base-vite}/tsconfig.app.json__tmpl__ +2 -2
- package/src/generators/application/files/base-webpack/src/app/__fileName__.spec.tsx__tmpl__ +10 -0
- package/src/generators/application/files/base-webpack/src/environments/environment.prod.ts__tmpl__ +3 -0
- package/src/generators/application/files/base-webpack/src/environments/environment.ts__tmpl__ +6 -0
- package/src/generators/application/files/base-webpack/src/favicon.ico +0 -0
- package/src/generators/application/files/base-webpack/src/main.tsx__tmpl__ +10 -0
- package/src/generators/application/files/base-webpack/tsconfig.app.json__tmpl__ +14 -0
- package/src/generators/application/files/base-webpack/webpack.config.js__tmpl__ +9 -0
- package/src/generators/application/files/{common → nx-welcome}/src/app/nx-welcome.tsx +30 -8
- package/src/generators/application/files/{css-module → style-css-module}/src/app/__fileName__.tsx__tmpl__ +11 -0
- package/src/generators/application/files/{global-css → style-global-css}/src/app/__fileName__.tsx__tmpl__ +11 -0
- package/src/generators/application/files/{none → style-none}/src/app/__fileName__.tsx__tmpl__ +11 -0
- package/src/generators/application/files/{styled-jsx → style-styled-jsx}/src/app/__fileName__.tsx__tmpl__ +4 -1
- package/src/generators/application/files/{styled-module → style-styled-module}/src/app/__fileName__.tsx__tmpl__ +11 -0
- package/src/generators/application/lib/add-cypress.d.ts +1 -1
- package/src/generators/application/lib/add-cypress.js +4 -2
- package/src/generators/application/lib/add-cypress.js.map +1 -1
- package/src/generators/application/lib/add-jest.d.ts +2 -2
- package/src/generators/application/lib/add-jest.js +4 -2
- package/src/generators/application/lib/add-jest.js.map +1 -1
- package/src/generators/application/lib/add-project.js +13 -8
- package/src/generators/application/lib/add-project.js.map +1 -1
- package/src/generators/application/lib/add-routing.js +10 -3
- package/src/generators/application/lib/add-routing.js.map +1 -1
- package/src/generators/application/lib/create-application-files.d.ts +1 -1
- package/src/generators/application/lib/create-application-files.js +21 -18
- package/src/generators/application/lib/create-application-files.js.map +1 -1
- package/src/generators/application/lib/get-app-tests.d.ts +2 -0
- package/src/generators/application/lib/get-app-tests.js +22 -0
- package/src/generators/application/lib/get-app-tests.js.map +1 -0
- package/src/generators/application/lib/install-common-dependencies.d.ts +3 -0
- package/src/generators/application/lib/install-common-dependencies.js +29 -0
- package/src/generators/application/lib/install-common-dependencies.js.map +1 -0
- package/src/generators/application/lib/normalize-options.d.ts +1 -1
- package/src/generators/application/lib/normalize-options.js +28 -14
- package/src/generators/application/lib/normalize-options.js.map +1 -1
- package/src/generators/application/lib/set-defaults.js +11 -9
- package/src/generators/application/lib/set-defaults.js.map +1 -1
- package/src/generators/application/lib/update-jest-config.d.ts +1 -1
- package/src/generators/application/lib/update-jest-config.js +7 -4
- package/src/generators/application/lib/update-jest-config.js.map +1 -1
- package/src/generators/application/schema.d.ts +9 -4
- package/src/generators/application/schema.json +42 -10
- package/src/generators/component/component.js +15 -7
- package/src/generators/component/component.js.map +1 -1
- package/src/generators/component/files/__fileName__.spec.tsx__tmpl__ +1 -4
- package/src/generators/component/files/__fileName__.tsx__tmpl__ +4 -2
- package/src/generators/component/get-component-tests.d.ts +2 -0
- package/src/generators/component/get-component-tests.js +13 -0
- package/src/generators/component/get-component-tests.js.map +1 -0
- package/src/generators/component/noramlized-schema.d.ts +8 -0
- package/src/generators/component/noramlized-schema.js +3 -0
- package/src/generators/component/noramlized-schema.js.map +1 -0
- package/src/generators/component/schema.d.ts +1 -0
- package/src/generators/component/schema.json +13 -4
- package/src/generators/component-cypress-spec/component-cypress-spec.d.ts +1 -1
- package/src/generators/component-cypress-spec/component-cypress-spec.js +12 -5
- package/src/generators/component-cypress-spec/component-cypress-spec.js.map +1 -1
- package/src/generators/component-cypress-spec/schema.json +4 -2
- package/src/generators/component-story/component-story.d.ts +1 -1
- package/src/generators/component-story/component-story.js +6 -2
- package/src/generators/component-story/component-story.js.map +1 -1
- package/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ +6 -7
- package/src/generators/component-story/schema.json +4 -2
- package/src/generators/component-test/component-test.d.ts +1 -1
- package/src/generators/component-test/component-test.js +21 -12
- package/src/generators/component-test/component-test.js.map +1 -1
- package/src/generators/component-test/files/__fileName__.cy__ext__ +2 -3
- package/src/generators/component-test/schema.json +6 -3
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +5 -4
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js.map +1 -1
- package/src/generators/cypress-component-configuration/files/cypress/support/commands.ts__tpl__ +42 -0
- package/src/generators/cypress-component-configuration/files/cypress.config.ts__tpl__ +3 -1
- package/src/generators/cypress-component-configuration/lib/add-files.d.ts +2 -1
- package/src/generators/cypress-component-configuration/lib/add-files.js +52 -16
- package/src/generators/cypress-component-configuration/lib/add-files.js.map +1 -1
- package/src/generators/cypress-component-configuration/lib/update-configs.d.ts +6 -2
- package/src/generators/cypress-component-configuration/lib/update-configs.js +8 -4
- package/src/generators/cypress-component-configuration/lib/update-configs.js.map +1 -1
- package/src/generators/cypress-component-configuration/schema.d.ts +1 -0
- package/src/generators/cypress-component-configuration/schema.json +15 -4
- package/src/generators/hook/hook.js +6 -2
- package/src/generators/hook/hook.js.map +1 -1
- package/src/generators/hook/schema.json +7 -4
- package/src/generators/host/files/common/src/app/__fileName__.tsx__tmpl__ +4 -0
- package/src/generators/host/files/module-federation/module-federation.config.js__tmpl__ +5 -12
- package/src/generators/host/files/module-federation/webpack.config.js__tmpl__ +7 -8
- package/src/generators/host/files/module-federation/webpack.config.prod.js__tmpl__ +11 -12
- package/src/generators/host/files/module-federation-ssr/module-federation.server.config.js__tmpl__ +13 -0
- package/src/generators/host/files/module-federation-ssr/server.ts__tmpl__ +28 -0
- package/src/generators/host/files/module-federation-ssr/tsconfig.server.json__tmpl__ +15 -0
- package/src/generators/host/files/module-federation-ssr/webpack.server.config.js__tmpl__ +12 -0
- package/src/generators/host/host.d.ts +2 -2
- package/src/generators/host/host.js +21 -2
- package/src/generators/host/host.js.map +1 -1
- package/src/generators/host/lib/add-module-federation-files.js +1 -1
- package/src/generators/host/lib/add-module-federation-files.js.map +1 -1
- package/src/generators/host/lib/setup-ssr-for-host.d.ts +6 -0
- package/src/generators/host/lib/setup-ssr-for-host.js +27 -0
- package/src/generators/host/lib/setup-ssr-for-host.js.map +1 -0
- package/src/generators/host/schema.d.ts +16 -14
- package/src/generators/host/schema.json +27 -8
- package/src/generators/init/init.js +45 -22
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/init/schema.d.ts +6 -1
- package/src/generators/init/schema.json +16 -0
- package/src/generators/library/files/common/src/index.ts__tmpl__ +0 -0
- package/src/generators/library/files/common/tsconfig.lib.json__tmpl__ +14 -0
- package/src/generators/library/files/vite/README.md +7 -0
- package/src/generators/library/files/vite/package.json__tmpl__ +12 -0
- package/src/generators/library/files/{lib → vite}/tsconfig.lib.json__tmpl__ +1 -1
- package/src/generators/library/lib/add-linting.d.ts +3 -0
- package/src/generators/library/lib/add-linting.js +37 -0
- package/src/generators/library/lib/add-linting.js.map +1 -0
- package/src/generators/library/lib/add-rollup-build-target.d.ts +3 -0
- package/src/generators/library/lib/add-rollup-build-target.js +59 -0
- package/src/generators/library/lib/add-rollup-build-target.js.map +1 -0
- package/src/generators/library/lib/create-files.d.ts +3 -0
- package/src/generators/library/lib/create-files.js +26 -0
- package/src/generators/library/lib/create-files.js.map +1 -0
- package/src/generators/library/lib/install-common-dependencies.d.ts +3 -0
- package/src/generators/library/lib/install-common-dependencies.js +30 -0
- package/src/generators/library/lib/install-common-dependencies.js.map +1 -0
- package/src/generators/library/lib/maybe-js.d.ts +2 -0
- package/src/generators/library/lib/maybe-js.js +10 -0
- package/src/generators/library/lib/maybe-js.js.map +1 -0
- package/src/generators/library/lib/normalize-options.d.ts +3 -0
- package/src/generators/library/lib/normalize-options.js +57 -0
- package/src/generators/library/lib/normalize-options.js.map +1 -0
- package/src/generators/library/lib/set-defaults.d.ts +3 -0
- package/src/generators/library/lib/set-defaults.js +16 -0
- package/src/generators/library/lib/set-defaults.js.map +1 -0
- package/src/generators/library/lib/update-app-routes.d.ts +3 -0
- package/src/generators/library/lib/update-app-routes.js +63 -0
- package/src/generators/library/lib/update-app-routes.js.map +1 -0
- package/src/generators/library/library.d.ts +0 -10
- package/src/generators/library/library.js +76 -214
- package/src/generators/library/library.js.map +1 -1
- package/src/generators/library/schema.d.ts +34 -16
- package/src/generators/library/schema.json +41 -10
- package/src/generators/redux/redux.js +13 -6
- package/src/generators/redux/redux.js.map +1 -1
- package/src/generators/redux/schema.json +6 -3
- package/src/generators/remote/files/module-federation/module-federation.config.js__tmpl__ +1 -8
- package/src/generators/remote/files/module-federation/webpack.config.js__tmpl__ +7 -8
- package/src/generators/remote/files/module-federation-ssr/module-federation.server.config.js__tmpl__ +6 -0
- package/src/generators/remote/files/module-federation-ssr/server.ts__tmpl__ +45 -0
- package/src/generators/remote/files/module-federation-ssr/webpack.server.config.js__tmpl__ +12 -0
- package/src/generators/remote/lib/setup-ssr-for-remote.d.ts +4 -0
- package/src/generators/remote/lib/setup-ssr-for-remote.js +32 -0
- package/src/generators/remote/lib/setup-ssr-for-remote.js.map +1 -0
- package/src/generators/remote/lib/update-host-with-remote.js +8 -4
- package/src/generators/remote/lib/update-host-with-remote.js.map +1 -1
- package/src/generators/remote/remote.d.ts +2 -2
- package/src/generators/remote/remote.js +20 -3
- package/src/generators/remote/remote.js.map +1 -1
- package/src/generators/remote/schema.d.ts +14 -13
- package/src/generators/remote/schema.json +22 -8
- package/src/generators/setup-ssr/files/server.ts__tmpl__ +28 -0
- package/src/generators/setup-ssr/files/src/main.server.tsx__tmpl__ +47 -0
- package/src/generators/setup-ssr/files/tsconfig.server.json__tmpl__ +15 -0
- package/src/generators/setup-ssr/schema.d.ts +7 -0
- package/src/generators/setup-ssr/schema.json +48 -0
- package/src/generators/setup-ssr/setup-ssr.d.ts +5 -0
- package/src/generators/setup-ssr/setup-ssr.js +162 -0
- package/src/generators/setup-ssr/setup-ssr.js.map +1 -0
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +2 -2
- package/src/generators/setup-tailwind/schema.json +8 -4
- package/src/generators/setup-tailwind/setup-tailwind.js +1 -2
- package/src/generators/setup-tailwind/setup-tailwind.js.map +1 -1
- package/src/generators/stories/schema.json +4 -2
- package/src/generators/stories/stories.d.ts +1 -1
- package/src/generators/stories/stories.js +29 -21
- package/src/generators/stories/stories.js.map +1 -1
- package/src/generators/storybook-configuration/configuration.d.ts +1 -1
- package/src/generators/storybook-configuration/configuration.js +24 -6
- package/src/generators/storybook-configuration/configuration.js.map +1 -1
- package/src/generators/storybook-configuration/schema.d.ts +2 -0
- package/src/generators/storybook-configuration/schema.json +25 -8
- package/src/migrations/update-13-0-0/webpack5-changes-utils.js +3 -3
- package/src/migrations/update-13-0-0/webpack5-changes-utils.js.map +1 -1
- package/src/migrations/update-14-0-0/update-react-dom-render-for-v18.js +3 -3
- package/src/migrations/update-14-0-0/update-react-dom-render-for-v18.js.map +1 -1
- package/src/migrations/update-14-1-0/update-external-emotion-jsx-runtime.js +1 -1
- package/src/migrations/update-14-1-0/update-external-emotion-jsx-runtime.js.map +1 -1
- package/src/migrations/update-14-6-0/add-preset-jest-config.js +1 -1
- package/src/migrations/update-14-6-0/add-preset-jest-config.js.map +1 -1
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.d.ts +3 -0
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.js +39 -0
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.js.map +1 -0
- package/src/migrations/update-15-3-0/update-rollup-executor.d.ts +3 -0
- package/src/migrations/update-15-3-0/update-rollup-executor.js +17 -0
- package/src/migrations/update-15-3-0/update-rollup-executor.js.map +1 -0
- package/src/migrations/update-15-6-3/webpack-config-setup.d.ts +2 -0
- package/src/migrations/update-15-6-3/webpack-config-setup.js +108 -0
- package/src/migrations/update-15-6-3/webpack-config-setup.js.map +1 -0
- package/src/module-federation/ast-utils.d.ts +1 -1
- package/src/module-federation/ast-utils.js +10 -6
- package/src/module-federation/ast-utils.js.map +1 -1
- package/src/module-federation/load-config.js +1 -1
- package/src/module-federation/load-config.js.map +1 -1
- package/src/module-federation/models.d.ts +4 -4
- package/src/module-federation/utils.d.ts +10 -0
- package/src/module-federation/utils.js +38 -0
- package/src/module-federation/utils.js.map +1 -0
- package/src/module-federation/with-module-federation-ssr.d.ts +2 -0
- package/src/module-federation/with-module-federation-ssr.js +48 -0
- package/src/module-federation/with-module-federation-ssr.js.map +1 -0
- package/src/module-federation/with-module-federation.d.ts +7 -2
- package/src/module-federation/with-module-federation.js +15 -158
- package/src/module-federation/with-module-federation.js.map +1 -1
- package/src/rules/update-module-federation-project.d.ts +2 -2
- package/src/rules/update-module-federation-project.js +2 -0
- package/src/rules/update-module-federation-project.js.map +1 -1
- package/src/utils/ast-utils.d.ts +2 -1
- package/src/utils/ast-utils.js +132 -65
- package/src/utils/ast-utils.js.map +1 -1
- package/src/utils/component-props.d.ts +1 -1
- package/src/utils/component-props.js +13 -6
- package/src/utils/component-props.js.map +1 -1
- package/src/utils/create-ts-config.d.ts +9 -0
- package/src/utils/create-ts-config.js +64 -0
- package/src/utils/create-ts-config.js.map +1 -0
- package/src/utils/get-in-source-vitest-tests-template.d.ts +1 -0
- package/src/utils/get-in-source-vitest-tests-template.js +22 -0
- package/src/utils/get-in-source-vitest-tests-template.js.map +1 -0
- package/src/utils/lint.d.ts +26 -0
- package/src/utils/lint.js +10 -1
- package/src/utils/lint.js.map +1 -1
- package/src/utils/versions.d.ts +32 -18
- package/src/utils/versions.js +36 -19
- package/src/utils/versions.js.map +1 -1
- package/tailwind.js +1 -1
- package/tailwind.js.map +1 -1
- package/src/generators/application/files/common/.browserslistrc__tmpl__ +0 -16
- package/src/generators/application/files/common/src/app/__fileName__.spec.tsx__tmpl__ +0 -26
- package/src/generators/application/files/common/src/polyfills.ts__tmpl__ +0 -7
- package/src/generators/application/files/common/tsconfig.json__tmpl__ +0 -17
- package/src/generators/library/files/lib/tsconfig.json__tmpl__ +0 -17
- package/src/migrations/utils/rules.d.ts +0 -2
- package/src/migrations/utils/rules.js +0 -15
- package/src/migrations/utils/rules.js.map +0 -1
- package/src/migrations/utils/testing.d.ts +0 -6
- package/src/migrations/utils/testing.js +0 -76
- package/src/migrations/utils/testing.js.map +0 -1
- package/src/module-federation/webpack-utils.d.ts +0 -9
- package/src/module-federation/webpack-utils.js +0 -76
- package/src/module-federation/webpack-utils.js.map +0 -1
- package/src/utils/async-iterator.d.ts +0 -5
- package/src/utils/async-iterator.js +0 -76
- package/src/utils/async-iterator.js.map +0 -1
- /package/src/generators/application/files/{common/src → base-vite/public}/favicon.ico +0 -0
- /package/src/generators/application/files/{common → base-vite}/src/assets/.gitkeep +0 -0
- /package/src/generators/application/files/{common → base-vite}/src/environments/environment.prod.ts__tmpl__ +0 -0
- /package/src/generators/application/files/{common → base-vite}/src/environments/environment.ts__tmpl__ +0 -0
- /package/src/generators/application/files/{common → base-vite}/src/main.tsx__tmpl__ +0 -0
- /package/src/generators/application/files/{common → base-webpack}/.babelrc__tmpl__ +0 -0
- /package/src/generators/{library/files/lib/src/index.ts__tmpl__ → application/files/base-webpack/src/assets/.gitkeep} +0 -0
- /package/src/generators/application/files/{common → base-webpack}/src/index.html +0 -0
- /package/src/generators/application/files/{css-module → style-css-module}/src/app/__fileName__.module.__style__ +0 -0
- /package/src/generators/application/files/{css-module → style-css-module}/src/styles.__style__ +0 -0
- /package/src/generators/application/files/{global-css → style-global-css}/src/app/__fileName__.__style__ +0 -0
- /package/src/generators/application/files/{global-css → style-global-css}/src/styles.__style__ +0 -0
- /package/src/generators/library/files/{lib → common}/.babelrc__tmpl__ +0 -0
- /package/src/generators/library/files/{lib → common}/README.md +0 -0
- /package/src/generators/library/files/{lib → common}/package.json__tmpl__ +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @nrwl/react
|
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017-
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
'Software'), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017-2023 Narwhal Technologies Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -43,40 +43,19 @@ npm init nx-workspace
|
|
|
43
43
|
yarn create nx-workspace
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
? What to create in the new workspace (Use arrow keys)
|
|
50
|
-
❯ apps [an empty workspace with no plugins with a layout that works best for building apps]
|
|
51
|
-
core [an empty workspace with no plugins set up to publish npm packages (similar to yarn workspaces)]
|
|
52
|
-
ts [an empty workspace with the JS/TS plugin preinstalled]
|
|
53
|
-
react [a workspace with a single React application]
|
|
54
|
-
angular [a workspace with a single Angular application]
|
|
55
|
-
next.js [a workspace with a single Next.js application]
|
|
56
|
-
nest [a workspace with a single Nest application]
|
|
57
|
-
express [a workspace with a single Express application]
|
|
58
|
-
web components [a workspace with a single app built using web components]
|
|
59
|
-
react-native [a workspace with a single React Native application]
|
|
60
|
-
react-express [a workspace with a full stack application (React + Express)]
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Select the preset that works best for you
|
|
64
|
-
|
|
65
|
-
### Adding Nx to an Existing Monorepo
|
|
46
|
+
### Adding Nx to an Existing Repository
|
|
66
47
|
|
|
67
48
|
Run:
|
|
68
49
|
|
|
69
50
|
```bash
|
|
70
|
-
npx
|
|
51
|
+
npx nx@latest init
|
|
71
52
|
```
|
|
72
53
|
|
|
73
54
|
## Documentation & Resources
|
|
74
55
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- [Nx
|
|
78
|
-
- [Tutorial: Adding Nx to an Existing Monorepo](/recipe/adding-to-monorepo)
|
|
79
|
-
- [Official Nx YouTube Channel](https://www.youtube.com/c/Nrwl_io)
|
|
56
|
+
- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
|
|
57
|
+
- [Intro to Nx](https://nx.dev/getting-started/intro)
|
|
58
|
+
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
|
|
80
59
|
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
81
60
|
|
|
82
61
|
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
package/babel.d.ts
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
interface NxReactBabelOptions {
|
|
2
|
+
runtime?: string;
|
|
3
|
+
importSource?: string;
|
|
4
|
+
useBuiltIns?: boolean | string;
|
|
5
|
+
decorators?: {
|
|
6
|
+
decoratorsBeforeExport?: boolean;
|
|
7
|
+
legacy?: boolean;
|
|
8
|
+
};
|
|
9
|
+
classProperties?: {
|
|
10
|
+
loose?: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare function getReactPresetOptions({ presetOptions, env }: {
|
|
14
|
+
presetOptions: any;
|
|
15
|
+
env: any;
|
|
16
|
+
}): Record<string, string | boolean>;
|
package/babel.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Babel preset to provide React support for Nx.
|
|
3
|
+
*/
|
|
3
4
|
module.exports = function (api, options) {
|
|
4
5
|
api.assertVersion(7);
|
|
5
6
|
const env = api.env();
|
|
@@ -7,7 +8,7 @@ module.exports = function (api, options) {
|
|
|
7
8
|
* pagesDir is set when being transpiled by Next.js
|
|
8
9
|
*/
|
|
9
10
|
const isNextJs = api.caller((caller) => caller === null || caller === void 0 ? void 0 : caller.pagesDir);
|
|
10
|
-
const presets = [['@nrwl/
|
|
11
|
+
const presets = [['@nrwl/js/babel', options]];
|
|
11
12
|
/**
|
|
12
13
|
* Next.js already includes the preset-react, and including it
|
|
13
14
|
* the second time here results in having two instances of this preset.
|
package/babel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"babel.js","sourceRoot":"","sources":["../../../packages/react/babel.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"babel.js","sourceRoot":"","sources":["../../../packages/react/babel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAeH,MAAM,CAAC,OAAO,GAAG,UAAU,GAAQ,EAAE,OAA4B;IAC/D,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACrB,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC;IACtB;;OAEG;IACH,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAC,CAAC;IAE1D,MAAM,OAAO,GAAU,CAAC,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,CAAC;IAErD;;;;;;;;;;OAUG;IACH,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,CAAC,IAAI,CAAC;YACX,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC;YACtC,qBAAqB,CAAC;gBACpB,aAAa,EAAE,OAAO;gBACtB,GAAG;aACJ,CAAC;SACH,CAAC,CAAC;KACJ;IAED,OAAO;QACL,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,qBAAqB,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE;;IACnD,MAAM,kBAAkB,GAAqC;QAC3D,OAAO,EAAE,MAAA,aAAa,CAAC,OAAO,mCAAI,WAAW;QAC7C,WAAW,EAAE,GAAG,KAAK,YAAY;KAClC,CAAC;IAEF,sFAAsF;IACtF,4CAA4C;IAC5C,IAAI,kBAAkB,CAAC,OAAO,KAAK,WAAW,EAAE;QAC9C,kBAAkB,CAAC,WAAW,GAAG,IAAI,CAAC;KACvC;IAED,IAAI,aAAa,CAAC,YAAY,EAAE;QAC9B,kBAAkB,CAAC,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC;KAC9D;IAED,OAAO,kBAAkB,CAAC;AAC5B,CAAC"}
|
package/executors.json
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
"implementation": "./src/executors/module-federation-dev-server/compat",
|
|
5
5
|
"schema": "./src/executors/module-federation-dev-server/schema.json",
|
|
6
6
|
"description": "Serve a host or remote application."
|
|
7
|
+
},
|
|
8
|
+
"module-federation-ssr-dev-server": {
|
|
9
|
+
"implementation": "./src/executors/module-federation-ssr-dev-server/compat",
|
|
10
|
+
"schema": "./src/executors/module-federation-ssr-dev-server/schema.json",
|
|
11
|
+
"description": "Serve a host application along with it's known remotes."
|
|
7
12
|
}
|
|
8
13
|
},
|
|
9
14
|
"executors": {
|
|
@@ -11,6 +16,11 @@
|
|
|
11
16
|
"implementation": "./src/executors/module-federation-dev-server/module-federation-dev-server.impl",
|
|
12
17
|
"schema": "./src/executors/module-federation-dev-server/schema.json",
|
|
13
18
|
"description": "Serve a host or remote application."
|
|
19
|
+
},
|
|
20
|
+
"module-federation-ssr-dev-server": {
|
|
21
|
+
"implementation": "./src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl",
|
|
22
|
+
"schema": "./src/executors/module-federation-ssr-dev-server/schema.json",
|
|
23
|
+
"description": "Serve a host application along with it's known remotes."
|
|
14
24
|
}
|
|
15
25
|
}
|
|
16
26
|
}
|
package/generators.json
CHANGED
|
@@ -95,6 +95,13 @@
|
|
|
95
95
|
"schema": "./src/generators/setup-tailwind/schema.json",
|
|
96
96
|
"description": "Set up Tailwind configuration for a project.",
|
|
97
97
|
"hidden": false
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
"setup-ssr": {
|
|
101
|
+
"factory": "./src/generators/setup-ssr/setup-ssr#setupSsrSchematic",
|
|
102
|
+
"schema": "./src/generators/setup-ssr/schema.json",
|
|
103
|
+
"description": "Set up SSR configuration for a project.",
|
|
104
|
+
"hidden": false
|
|
98
105
|
}
|
|
99
106
|
},
|
|
100
107
|
"generators": {
|
|
@@ -204,6 +211,13 @@
|
|
|
204
211
|
"schema": "./src/generators/setup-tailwind/schema.json",
|
|
205
212
|
"description": "Set up Tailwind configuration for a project.",
|
|
206
213
|
"hidden": false
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
"setup-ssr": {
|
|
217
|
+
"factory": "./src/generators/setup-ssr/setup-ssr#setupSsrGenerator",
|
|
218
|
+
"schema": "./src/generators/setup-ssr/schema.json",
|
|
219
|
+
"description": "Set up SSR configuration for a project.",
|
|
220
|
+
"hidden": false
|
|
207
221
|
}
|
|
208
222
|
}
|
|
209
223
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { extraEslintDependencies, createReactEslintJson, } from './src/utils/lint';
|
|
1
|
+
export { extraEslintDependencies, createReactEslintJson, extendReactEslintJson, } from './src/utils/lint';
|
|
2
2
|
export { CSS_IN_JS_DEPENDENCIES } from './src/utils/styled';
|
|
3
3
|
export { assertValidStyle } from './src/utils/assertion';
|
|
4
4
|
export { reactDomVersion, reactVersion } from './src/utils/versions';
|
|
@@ -13,6 +13,9 @@ export { reduxGenerator } from './src/generators/redux/redux';
|
|
|
13
13
|
export { storiesGenerator } from './src/generators/stories/stories';
|
|
14
14
|
export { storybookConfigurationGenerator } from './src/generators/storybook-configuration/configuration';
|
|
15
15
|
export { hostGenerator } from './src/generators/host/host';
|
|
16
|
+
export { remoteGenerator } from './src/generators/remote/remote';
|
|
16
17
|
export { cypressComponentConfigGenerator } from './src/generators/cypress-component-configuration/cypress-component-configuration';
|
|
17
18
|
export { componentTestGenerator } from './src/generators/component-test/component-test';
|
|
19
|
+
export { setupTailwindGenerator } from './src/generators/setup-tailwind/setup-tailwind';
|
|
18
20
|
export type { SupportedStyles } from './typings/style';
|
|
21
|
+
export * from './plugins/with-react';
|
package/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.componentTestGenerator = exports.cypressComponentConfigGenerator = 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.CSS_IN_JS_DEPENDENCIES = exports.createReactEslintJson = exports.extraEslintDependencies = 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.CSS_IN_JS_DEPENDENCIES = exports.extendReactEslintJson = exports.createReactEslintJson = exports.extraEslintDependencies = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
var lint_1 = require("./src/utils/lint");
|
|
5
6
|
Object.defineProperty(exports, "extraEslintDependencies", { enumerable: true, get: function () { return lint_1.extraEslintDependencies; } });
|
|
6
7
|
Object.defineProperty(exports, "createReactEslintJson", { enumerable: true, get: function () { return lint_1.createReactEslintJson; } });
|
|
8
|
+
Object.defineProperty(exports, "extendReactEslintJson", { enumerable: true, get: function () { return lint_1.extendReactEslintJson; } });
|
|
7
9
|
var styled_1 = require("./src/utils/styled");
|
|
8
10
|
Object.defineProperty(exports, "CSS_IN_JS_DEPENDENCIES", { enumerable: true, get: function () { return styled_1.CSS_IN_JS_DEPENDENCIES; } });
|
|
9
11
|
var assertion_1 = require("./src/utils/assertion");
|
|
@@ -33,8 +35,13 @@ var configuration_1 = require("./src/generators/storybook-configuration/configur
|
|
|
33
35
|
Object.defineProperty(exports, "storybookConfigurationGenerator", { enumerable: true, get: function () { return configuration_1.storybookConfigurationGenerator; } });
|
|
34
36
|
var host_1 = require("./src/generators/host/host");
|
|
35
37
|
Object.defineProperty(exports, "hostGenerator", { enumerable: true, get: function () { return host_1.hostGenerator; } });
|
|
38
|
+
var remote_1 = require("./src/generators/remote/remote");
|
|
39
|
+
Object.defineProperty(exports, "remoteGenerator", { enumerable: true, get: function () { return remote_1.remoteGenerator; } });
|
|
36
40
|
var cypress_component_configuration_1 = require("./src/generators/cypress-component-configuration/cypress-component-configuration");
|
|
37
41
|
Object.defineProperty(exports, "cypressComponentConfigGenerator", { enumerable: true, get: function () { return cypress_component_configuration_1.cypressComponentConfigGenerator; } });
|
|
38
42
|
var component_test_1 = require("./src/generators/component-test/component-test");
|
|
39
43
|
Object.defineProperty(exports, "componentTestGenerator", { enumerable: true, get: function () { return component_test_1.componentTestGenerator; } });
|
|
44
|
+
var setup_tailwind_1 = require("./src/generators/setup-tailwind/setup-tailwind");
|
|
45
|
+
Object.defineProperty(exports, "setupTailwindGenerator", { enumerable: true, get: function () { return setup_tailwind_1.setupTailwindGenerator; } });
|
|
46
|
+
tslib_1.__exportStar(require("./plugins/with-react"), exports);
|
|
40
47
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/react/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/react/index.ts"],"names":[],"mappings":";;;;AAAA,yCAI0B;AAHxB,+GAAA,uBAAuB,OAAA;AACvB,6GAAA,qBAAqB,OAAA;AACrB,6GAAA,qBAAqB,OAAA;AAEvB,6CAA4D;AAAnD,gHAAA,sBAAsB,OAAA;AAC/B,mDAAyD;AAAhD,6GAAA,gBAAgB,OAAA;AACzB,iDAAqE;AAA5D,2GAAA,eAAe,OAAA;AAAE,wGAAA,YAAY,OAAA;AACtC,wEAAgF;AAAvE,mHAAA,oBAAoB,OAAA;AAC7B,kEAA0E;AAAjE,+GAAA,kBAAkB,OAAA;AAC3B,mDAA2D;AAAlD,qGAAA,aAAa,OAAA;AACtB,yGAA2G;AAAlG,mIAAA,yBAAyB,OAAA;AAClC,oFAA2F;AAAlF,0HAAA,uBAAuB,OAAA;AAChC,4DAAoE;AAA3D,2GAAA,gBAAgB,OAAA;AACzB,mDAAgE;AAAvD,0GAAA,kBAAkB,OAAA;AAC3B,sDAA8D;AAArD,uGAAA,cAAc,OAAA;AACvB,4DAAoE;AAA3D,2GAAA,gBAAgB,OAAA;AACzB,wFAAyG;AAAhG,gIAAA,+BAA+B,OAAA;AACxC,mDAA2D;AAAlD,qGAAA,aAAa,OAAA;AACtB,yDAAiE;AAAxD,yGAAA,eAAe,OAAA;AACxB,oIAAmI;AAA1H,kJAAA,+BAA+B,OAAA;AACxC,iFAAwF;AAA/E,wHAAA,sBAAsB,OAAA;AAC/B,iFAAwF;AAA/E,wHAAA,sBAAsB,OAAA;AAE/B,+DAAqC"}
|
package/migrations.json
CHANGED
|
@@ -65,6 +65,24 @@
|
|
|
65
65
|
"version": "14.6.0-beta.0",
|
|
66
66
|
"description": "Update babel-jest to include the @nrwl/react/babel preset in project jest config",
|
|
67
67
|
"factory": "./src/migrations/update-14-6-0/add-preset-jest-config"
|
|
68
|
+
},
|
|
69
|
+
"update-rollup-executor": {
|
|
70
|
+
"cli": "nx",
|
|
71
|
+
"version": "15.3.0-beta.0",
|
|
72
|
+
"description": "Update projects using @nrwl/web:rollup to @nrwl/rollup:rollup for build.",
|
|
73
|
+
"factory": "./src/migrations/update-15-3-0/update-rollup-executor"
|
|
74
|
+
},
|
|
75
|
+
"install-webpack-rollup-dependencies": {
|
|
76
|
+
"cli": "nx",
|
|
77
|
+
"version": "15.3.0-beta.0",
|
|
78
|
+
"description": "Install new dependencies for React projects using Webpack or Rollup.",
|
|
79
|
+
"factory": "./src/migrations/update-15-3-0/install-webpack-rollup-dependencies"
|
|
80
|
+
},
|
|
81
|
+
"react-webpack-config-setup": {
|
|
82
|
+
"cli": "nx",
|
|
83
|
+
"version": "15.6.3-beta.0",
|
|
84
|
+
"description": "Creates or updates webpack.config.js file with the new options for webpack.",
|
|
85
|
+
"factory": "./src/migrations/update-15-6-3/webpack-config-setup"
|
|
68
86
|
}
|
|
69
87
|
},
|
|
70
88
|
"packageJsonUpdates": {
|
|
@@ -699,6 +717,148 @@
|
|
|
699
717
|
"alwaysAddToPackageJson": false
|
|
700
718
|
}
|
|
701
719
|
}
|
|
720
|
+
},
|
|
721
|
+
"15.2.2-beta.0": {
|
|
722
|
+
"version": "15.2.2-beta.0",
|
|
723
|
+
"packages": {
|
|
724
|
+
"@types/react": {
|
|
725
|
+
"version": "18.0.25",
|
|
726
|
+
"alwaysAddToPackageJson": false
|
|
727
|
+
},
|
|
728
|
+
"@types/react-dom": {
|
|
729
|
+
"version": "18.0.9",
|
|
730
|
+
"alwaysAddToPackageJson": false
|
|
731
|
+
},
|
|
732
|
+
"@types/node": {
|
|
733
|
+
"version": "18.11.9",
|
|
734
|
+
"alwaysAddToPackageJson": false
|
|
735
|
+
},
|
|
736
|
+
"styled-components": {
|
|
737
|
+
"version": "5.3.6",
|
|
738
|
+
"alwaysAddToPackageJson": false
|
|
739
|
+
},
|
|
740
|
+
"@emotion/styled": {
|
|
741
|
+
"version": "11.10.5",
|
|
742
|
+
"alwaysAddToPackageJson": false
|
|
743
|
+
},
|
|
744
|
+
"@emotion/react": {
|
|
745
|
+
"version": "11.10.5",
|
|
746
|
+
"alwaysAddToPackageJson": false
|
|
747
|
+
},
|
|
748
|
+
"@emotion/babel-plugin": {
|
|
749
|
+
"version": "11.10.5",
|
|
750
|
+
"alwaysAddToPackageJson": false
|
|
751
|
+
},
|
|
752
|
+
"styled-jsx": {
|
|
753
|
+
"version": "5.1.0",
|
|
754
|
+
"alwaysAddToPackageJson": false
|
|
755
|
+
},
|
|
756
|
+
"react-router-dom": {
|
|
757
|
+
"version": "6.4.3",
|
|
758
|
+
"alwaysAddToPackageJson": false
|
|
759
|
+
},
|
|
760
|
+
"@reduxjs/toolkit": {
|
|
761
|
+
"version": "1.9.0",
|
|
762
|
+
"alwaysAddToPackageJson": false
|
|
763
|
+
},
|
|
764
|
+
"react-redux": {
|
|
765
|
+
"version": "8.0.5",
|
|
766
|
+
"alwaysAddToPackageJson": false
|
|
767
|
+
},
|
|
768
|
+
"eslint-plugin-react": {
|
|
769
|
+
"version": "7.31.11",
|
|
770
|
+
"alwaysAddToPackageJson": false
|
|
771
|
+
},
|
|
772
|
+
"postcss": {
|
|
773
|
+
"version": "8.4.19",
|
|
774
|
+
"alwaysAddToPackageJson": false
|
|
775
|
+
},
|
|
776
|
+
"tailwindcss": {
|
|
777
|
+
"version": "3.2.4",
|
|
778
|
+
"alwaysAddToPackageJson": false
|
|
779
|
+
},
|
|
780
|
+
"autoprefixer": {
|
|
781
|
+
"version": "10.4.13",
|
|
782
|
+
"alwaysAddToPackageJson": false
|
|
783
|
+
},
|
|
784
|
+
"@types/express": {
|
|
785
|
+
"version": "4.17.14",
|
|
786
|
+
"alwaysAddToPackageJson": false
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
"5.8.0": {
|
|
791
|
+
"version": "5.8.0-beta.0",
|
|
792
|
+
"packages": {
|
|
793
|
+
"@types/react": {
|
|
794
|
+
"version": "18.0.28",
|
|
795
|
+
"alwaysAddToPackageJson": false
|
|
796
|
+
},
|
|
797
|
+
"@types/react-dom": {
|
|
798
|
+
"version": "18.0.11",
|
|
799
|
+
"alwaysAddToPackageJson": false
|
|
800
|
+
},
|
|
801
|
+
"@types/node": {
|
|
802
|
+
"version": "18.14.2",
|
|
803
|
+
"alwaysAddToPackageJson": false
|
|
804
|
+
},
|
|
805
|
+
"@emotion/styled": {
|
|
806
|
+
"version": "11.10.6",
|
|
807
|
+
"alwaysAddToPackageJson": false
|
|
808
|
+
},
|
|
809
|
+
"@emotion/react": {
|
|
810
|
+
"version": "11.10.6",
|
|
811
|
+
"alwaysAddToPackageJson": false
|
|
812
|
+
},
|
|
813
|
+
"@emotion/babel-plugin": {
|
|
814
|
+
"version": "11.10.6",
|
|
815
|
+
"alwaysAddToPackageJson": false
|
|
816
|
+
},
|
|
817
|
+
"styled-jsx": {
|
|
818
|
+
"version": "5.1.2",
|
|
819
|
+
"alwaysAddToPackageJson": false
|
|
820
|
+
},
|
|
821
|
+
"react-router-dom": {
|
|
822
|
+
"version": "6.8.1",
|
|
823
|
+
"alwaysAddToPackageJson": false
|
|
824
|
+
},
|
|
825
|
+
"@testing-library/react": {
|
|
826
|
+
"version": "14.0.0",
|
|
827
|
+
"alwaysAddToPackageJson": false
|
|
828
|
+
},
|
|
829
|
+
"@reduxjs/toolkit": {
|
|
830
|
+
"version": "1.9.3",
|
|
831
|
+
"alwaysAddToPackageJson": false
|
|
832
|
+
},
|
|
833
|
+
"eslint-plugin-import": {
|
|
834
|
+
"version": "2.27.5",
|
|
835
|
+
"alwaysAddToPackageJson": false
|
|
836
|
+
},
|
|
837
|
+
"eslint-plugin-jsx-a11y": {
|
|
838
|
+
"version": "6.7.1",
|
|
839
|
+
"alwaysAddToPackageJson": false
|
|
840
|
+
},
|
|
841
|
+
"eslint-plugin-react": {
|
|
842
|
+
"version": "7.32.2",
|
|
843
|
+
"alwaysAddToPackageJson": false
|
|
844
|
+
},
|
|
845
|
+
"postcss": {
|
|
846
|
+
"version": "8.4.21",
|
|
847
|
+
"alwaysAddToPackageJson": false
|
|
848
|
+
},
|
|
849
|
+
"tailwindcss": {
|
|
850
|
+
"version": "3.2.7",
|
|
851
|
+
"alwaysAddToPackageJson": false
|
|
852
|
+
},
|
|
853
|
+
"@types/express": {
|
|
854
|
+
"version": "4.17.17",
|
|
855
|
+
"alwaysAddToPackageJson": false
|
|
856
|
+
},
|
|
857
|
+
"less": {
|
|
858
|
+
"version": "4.1.3",
|
|
859
|
+
"alwaysAddToPackageJson": false
|
|
860
|
+
}
|
|
861
|
+
}
|
|
702
862
|
}
|
|
703
863
|
}
|
|
704
864
|
}
|
package/module-federation.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { withModuleFederation } from './src/module-federation/with-module-federation';
|
|
2
|
-
|
|
3
|
-
export * from './src/module-federation/webpack-utils';
|
|
2
|
+
import { withModuleFederationForSSR } from './src/module-federation/with-module-federation-ssr';
|
|
4
3
|
export { withModuleFederation };
|
|
4
|
+
export { withModuleFederationForSSR };
|
package/module-federation.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withModuleFederation = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
3
|
+
exports.withModuleFederationForSSR = exports.withModuleFederation = void 0;
|
|
5
4
|
const with_module_federation_1 = require("./src/module-federation/with-module-federation");
|
|
6
5
|
Object.defineProperty(exports, "withModuleFederation", { enumerable: true, get: function () { return with_module_federation_1.withModuleFederation; } });
|
|
7
|
-
|
|
8
|
-
|
|
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; } });
|
|
9
8
|
// Support for older generated code: `const withModuleFederation = require('@nrwl/react/module-federation')`
|
|
10
9
|
module.exports = with_module_federation_1.withModuleFederation;
|
|
11
10
|
// Allow newer generated code to work: `const { withModuleFederation } = require(...)`;
|
|
12
11
|
module.exports.withModuleFederation = with_module_federation_1.withModuleFederation;
|
|
12
|
+
module.exports.withModuleFederationForSSR = with_module_federation_ssr_1.withModuleFederationForSSR;
|
|
13
13
|
//# sourceMappingURL=module-federation.js.map
|
package/module-federation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-federation.js","sourceRoot":"","sources":["../../../packages/react/module-federation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module-federation.js","sourceRoot":"","sources":["../../../packages/react/module-federation.ts"],"names":[],"mappings":";;;AAAA,2FAAsF;AAG7E,qGAHA,6CAAoB,OAGA;AAF7B,mGAAgG;AAGvF,2GAHA,uDAA0B,OAGA;AAEnC,4GAA4G;AAC5G,MAAM,CAAC,OAAO,GAAG,6CAAoB,CAAC;AAEtC,uFAAuF;AACvF,MAAM,CAAC,OAAO,CAAC,oBAAoB,GAAG,6CAAoB,CAAC;AAC3D,MAAM,CAAC,OAAO,CAAC,0BAA0B,GAAG,uDAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/react",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.9.0-beta.1",
|
|
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, 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": {
|
|
@@ -31,34 +31,17 @@
|
|
|
31
31
|
"migrations": "./migrations.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@nrwl/
|
|
37
|
-
"@nrwl/
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"@nrwl/storybook": "14.8.7",
|
|
42
|
-
"@nrwl/web": "14.8.7",
|
|
43
|
-
"@nrwl/webpack": "14.8.7",
|
|
44
|
-
"@nrwl/workspace": "14.8.7",
|
|
45
|
-
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
|
|
46
|
-
"@svgr/webpack": "^6.1.2",
|
|
47
|
-
"chalk": "4.1.0",
|
|
48
|
-
"css-loader": "^6.4.0",
|
|
49
|
-
"minimatch": "3.0.5",
|
|
50
|
-
"react-refresh": "^0.10.0",
|
|
51
|
-
"semver": "7.3.4",
|
|
52
|
-
"style-loader": "^3.3.0",
|
|
53
|
-
"stylus": "^0.55.0",
|
|
54
|
-
"stylus-loader": "^6.2.0",
|
|
55
|
-
"url-loader": "^4.1.1",
|
|
56
|
-
"webpack": "^5.58.1",
|
|
57
|
-
"webpack-merge": "^5.8.0"
|
|
34
|
+
"@nrwl/devkit": "14.9.0-beta.1",
|
|
35
|
+
"@nrwl/js": "14.9.0-beta.1",
|
|
36
|
+
"@nrwl/linter": "14.9.0-beta.1",
|
|
37
|
+
"@nrwl/workspace": "14.9.0-beta.1",
|
|
38
|
+
"@phenomnomnominal/tsquery": "4.1.1",
|
|
39
|
+
"chalk": "^4.1.0",
|
|
40
|
+
"minimatch": "3.0.5"
|
|
58
41
|
},
|
|
59
42
|
"publishConfig": {
|
|
60
43
|
"access": "public"
|
|
61
44
|
},
|
|
62
45
|
"types": "./index.d.ts",
|
|
63
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "b2a467bcb2bdc124ed52f3755780bca429a43855"
|
|
64
47
|
}
|
package/plugins/bundle-rollup.js
CHANGED
|
@@ -16,6 +16,26 @@ function getRollupOptions(options) {
|
|
|
16
16
|
else {
|
|
17
17
|
options.output = Object.assign(Object.assign({}, options.output), { globals: Object.assign(Object.assign({}, options.output.globals), extraGlobals) });
|
|
18
18
|
}
|
|
19
|
+
// React buildable libs support SVGR, but not for React Native.
|
|
20
|
+
// If imports fail, ignore it.
|
|
21
|
+
try {
|
|
22
|
+
const url = require('@rollup/plugin-url');
|
|
23
|
+
const svg = require('@svgr/rollup');
|
|
24
|
+
options.plugins = [
|
|
25
|
+
svg({
|
|
26
|
+
svgo: false,
|
|
27
|
+
titleProp: true,
|
|
28
|
+
ref: true,
|
|
29
|
+
}),
|
|
30
|
+
url({
|
|
31
|
+
limit: 10000, // 10kB
|
|
32
|
+
}),
|
|
33
|
+
...options.plugins,
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
catch (_a) {
|
|
37
|
+
// Ignored for React Native
|
|
38
|
+
}
|
|
19
39
|
return options;
|
|
20
40
|
}
|
|
21
41
|
module.exports = getRollupOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-rollup.js","sourceRoot":"","sources":["../../../../packages/react/plugins/bundle-rollup.ts"],"names":[],"mappings":";;AAEA,SAAS,gBAAgB,CAAC,OAA6B;IACrD,MAAM,YAAY,GAAG;QACnB,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,UAAU;QACvB,mBAAmB,EAAE,QAAQ;QAC7B,gBAAgB,EAAE,cAAc;QAChC,iBAAiB,EAAE,eAAe;KACnC,CAAC;
|
|
1
|
+
{"version":3,"file":"bundle-rollup.js","sourceRoot":"","sources":["../../../../packages/react/plugins/bundle-rollup.ts"],"names":[],"mappings":";;AAEA,SAAS,gBAAgB,CAAC,OAA6B;IACrD,MAAM,YAAY,GAAG;QACnB,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,UAAU;QACvB,mBAAmB,EAAE,QAAQ;QAC7B,gBAAgB,EAAE,cAAc;QAChC,iBAAiB,EAAE,eAAe;KACnC,CAAC;IAEF,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACjC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC3B,CAAC,CAAC,OAAO,mCAAQ,CAAC,CAAC,OAAO,GAAK,YAAY,CAAE,CAAC;QAChD,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,OAAO,CAAC,MAAM,mCACT,OAAO,CAAC,MAAM,KACjB,OAAO,kCACF,OAAO,CAAC,MAAM,CAAC,OAAO,GACtB,YAAY,IAElB,CAAC;KACH;IAED,+DAA+D;IAC/D,8BAA8B;IAC9B,IAAI;QACF,MAAM,GAAG,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAC1C,MAAM,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;QAEpC,OAAO,CAAC,OAAO,GAAG;YAChB,GAAG,CAAC;gBACF,IAAI,EAAE,KAAK;gBACX,SAAS,EAAE,IAAI;gBACf,GAAG,EAAE,IAAI;aACV,CAAC;YACF,GAAG,CAAC;gBACF,KAAK,EAAE,KAAK,EAAE,OAAO;aACtB,CAAC;YACF,GAAG,OAAO,CAAC,OAAO;SACnB,CAAC;KACH;IAAC,WAAM;QACN,2BAA2B;KAC5B;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { NxComponentTestingOptions } from '@nrwl/cypress/plugins/cypress-preset';
|
|
2
|
+
type ViteDevServer = {
|
|
3
|
+
framework: 'react';
|
|
4
|
+
bundler: 'vite';
|
|
5
|
+
viteConfig?: any;
|
|
6
|
+
};
|
|
7
|
+
type WebpackDevServer = {
|
|
8
|
+
framework: 'react';
|
|
9
|
+
bundler: 'webpack';
|
|
10
|
+
webpackConfig?: any;
|
|
11
|
+
};
|
|
2
12
|
/**
|
|
3
13
|
* React nx preset for Cypress Component Testing
|
|
4
14
|
*
|
|
@@ -18,13 +28,11 @@ import { NxComponentTestingOptions } from '@nrwl/cypress/plugins/cypress-preset'
|
|
|
18
28
|
* @param options override options
|
|
19
29
|
*/
|
|
20
30
|
export declare function nxComponentTestingPreset(pathToConfig: string, options?: NxComponentTestingOptions): {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
readonly bundler: "webpack";
|
|
24
|
-
readonly webpackConfig: any;
|
|
25
|
-
};
|
|
31
|
+
specPattern: string;
|
|
32
|
+
devServer: ViteDevServer | WebpackDevServer;
|
|
26
33
|
videosFolder: string;
|
|
27
34
|
screenshotsFolder: string;
|
|
28
35
|
video: boolean;
|
|
29
36
|
chromeWebSecurity: boolean;
|
|
30
37
|
};
|
|
38
|
+
export {};
|