@nx/react 23.0.0-beta.0 → 23.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/generators.json +0 -7
  2. package/index.d.ts +0 -2
  3. package/index.d.ts.map +1 -1
  4. package/index.js +1 -5
  5. package/package.json +19 -24
  6. package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +2 -2
  7. package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +3 -3
  8. package/src/executors/module-federation-static-server/module-federation-static-server.impl.js +2 -2
  9. package/src/generators/application/application.d.ts.map +1 -1
  10. package/src/generators/application/application.js +3 -19
  11. package/src/generators/application/files/base-rsbuild/tsconfig.app.json__tmpl__ +0 -2
  12. package/src/generators/application/files/base-rspack/tsconfig.app.json__tmpl__ +0 -2
  13. package/src/generators/application/files/base-vite/index.html__tmpl__ +1 -1
  14. package/src/generators/application/files/base-vite/tsconfig.app.json__tmpl__ +0 -2
  15. package/src/generators/application/files/base-webpack/tsconfig.app.json__tmpl__ +0 -2
  16. package/src/generators/application/lib/add-e2e.d.ts.map +1 -1
  17. package/src/generators/application/lib/add-project.d.ts.map +1 -1
  18. package/src/generators/application/lib/add-project.js +14 -4
  19. package/src/generators/application/lib/bundlers/add-rsbuild.d.ts.map +1 -1
  20. package/src/generators/application/lib/bundlers/add-rsbuild.js +2 -21
  21. package/src/generators/application/lib/bundlers/add-rspack.d.ts +0 -1
  22. package/src/generators/application/lib/bundlers/add-rspack.d.ts.map +1 -1
  23. package/src/generators/application/lib/bundlers/add-rspack.js +0 -25
  24. package/src/generators/application/lib/create-application-files.d.ts +1 -2
  25. package/src/generators/application/lib/create-application-files.d.ts.map +1 -1
  26. package/src/generators/application/lib/create-application-files.js +8 -60
  27. package/src/generators/application/lib/install-common-dependencies.d.ts.map +1 -1
  28. package/src/generators/application/lib/install-common-dependencies.js +2 -7
  29. package/src/generators/application/lib/normalize-options.d.ts.map +1 -1
  30. package/src/generators/application/lib/normalize-options.js +3 -7
  31. package/src/generators/application/lib/update-jest-config.d.ts.map +1 -1
  32. package/src/generators/application/lib/update-jest-config.js +0 -3
  33. package/src/generators/application/schema.d.ts +0 -1
  34. package/src/generators/application/schema.json +2 -21
  35. package/src/generators/component/component.d.ts.map +1 -1
  36. package/src/generators/component/component.js +2 -5
  37. package/src/generators/component/files/__fileName__.__ext__ +3 -18
  38. package/src/generators/component/lib/normalize-options.d.ts.map +1 -1
  39. package/src/generators/component/lib/normalize-options.js +3 -8
  40. package/src/generators/component/schema.d.ts +2 -8
  41. package/src/generators/component/schema.json +2 -26
  42. package/src/generators/federate-module/federate-module.d.ts.map +1 -1
  43. package/src/generators/federate-module/federate-module.js +2 -2
  44. package/src/generators/hook/hook.d.ts.map +1 -1
  45. package/src/generators/hook/hook.js +2 -2
  46. package/src/generators/host/host.d.ts.map +1 -1
  47. package/src/generators/host/host.js +2 -2
  48. package/src/generators/host/lib/normalize-host-name.js +2 -2
  49. package/src/generators/host/schema.json +2 -21
  50. package/src/generators/init/init.d.ts.map +1 -1
  51. package/src/generators/init/init.js +2 -2
  52. package/src/generators/library/files/common/tsconfig.lib.json__tmpl__ +0 -1
  53. package/src/generators/library/files/vite/tsconfig.lib.json__tmpl__ +0 -1
  54. package/src/generators/library/lib/add-rollup-build-target.d.ts.map +1 -1
  55. package/src/generators/library/lib/add-rollup-build-target.js +7 -6
  56. package/src/generators/library/lib/create-files.d.ts.map +1 -1
  57. package/src/generators/library/lib/create-files.js +1 -12
  58. package/src/generators/library/lib/install-common-dependencies.d.ts.map +1 -1
  59. package/src/generators/library/lib/install-common-dependencies.js +2 -7
  60. package/src/generators/library/lib/normalize-options.d.ts.map +1 -1
  61. package/src/generators/library/lib/normalize-options.js +3 -3
  62. package/src/generators/library/library.d.ts.map +1 -1
  63. package/src/generators/library/library.js +4 -6
  64. package/src/generators/library/schema.json +2 -21
  65. package/src/generators/redux/redux.d.ts.map +1 -1
  66. package/src/generators/redux/redux.js +2 -2
  67. package/src/generators/redux/schema.d.ts +1 -1
  68. package/src/generators/remote/remote.d.ts.map +1 -1
  69. package/src/generators/remote/remote.js +2 -2
  70. package/src/generators/remote/schema.json +2 -21
  71. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts.map +1 -1
  72. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +2 -2
  73. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts.map +1 -1
  74. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +2 -2
  75. package/src/migrations/update-22-0-0/add-svgr-to-webpack-config.d.ts.map +1 -1
  76. package/src/migrations/update-22-0-0/add-svgr-to-webpack-config.js +34 -7
  77. package/src/plugins/router-plugin.d.ts.map +1 -1
  78. package/src/plugins/router-plugin.js +11 -19
  79. package/src/utils/assertion.d.ts.map +1 -1
  80. package/src/utils/assertion.js +1 -10
  81. package/src/utils/create-ts-config.js +0 -7
  82. package/src/utils/normalize-remote.js +2 -2
  83. package/src/utils/versions.d.ts +2 -15
  84. package/src/utils/versions.d.ts.map +1 -1
  85. package/src/utils/versions.js +3 -18
  86. package/tailwind.d.ts +2 -3
  87. package/tailwind.d.ts.map +1 -1
  88. package/tailwind.js +11 -5
  89. package/typings/style.d.ts +1 -9
  90. package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +0 -46
  91. package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +0 -49
  92. package/src/generators/application/files/style-tailwind/src/app/__fileName__.tsx__tmpl__ +0 -45
  93. package/src/generators/application/files/style-tailwind/src/styles.css +0 -1
  94. package/src/generators/application/lib/show-possible-warnings.d.ts +0 -4
  95. package/src/generators/application/lib/show-possible-warnings.d.ts.map +0 -1
  96. package/src/generators/application/lib/show-possible-warnings.js +0 -11
  97. package/src/generators/setup-tailwind/files/postcss.config.js__tmpl__ +0 -15
  98. package/src/generators/setup-tailwind/files/tailwind.config.js__tmpl__ +0 -17
  99. package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts +0 -4
  100. package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts.map +0 -1
  101. package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +0 -27
  102. package/src/generators/setup-tailwind/lib/update-project.d.ts +0 -4
  103. package/src/generators/setup-tailwind/lib/update-project.d.ts.map +0 -1
  104. package/src/generators/setup-tailwind/lib/update-project.js +0 -11
  105. package/src/generators/setup-tailwind/schema.d.ts +0 -7
  106. package/src/generators/setup-tailwind/schema.d.ts.map +0 -1
  107. package/src/generators/setup-tailwind/schema.js +0 -2
  108. package/src/generators/setup-tailwind/schema.json +0 -47
  109. package/src/generators/setup-tailwind/setup-tailwind.d.ts +0 -5
  110. package/src/generators/setup-tailwind/setup-tailwind.d.ts.map +0 -1
  111. package/src/generators/setup-tailwind/setup-tailwind.js +0 -35
  112. package/src/rules/add-styled-dependencies.d.ts +0 -6
  113. package/src/rules/add-styled-dependencies.d.ts.map +0 -1
  114. package/src/rules/add-styled-dependencies.js +0 -16
  115. package/src/utils/styled.d.ts +0 -4
  116. package/src/utils/styled.d.ts.map +0 -1
  117. package/src/utils/styled.js +0 -62
@@ -1 +1 @@
1
- {"version":3,"file":"add-rollup-build-target.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/add-rollup-build-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAGL,iBAAiB,EAOlB,MAAM,YAAY,CAAC;AAQpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GAAG;IAAE,MAAM,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAA;CAAE,EAC7D,QAAQ,GAAE,GAAG,CAAC,MAAM,CAAmC,8BAqHxD"}
1
+ {"version":3,"file":"add-rollup-build-target.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/add-rollup-build-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAGL,iBAAiB,EAQlB,MAAM,YAAY,CAAC;AAQpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GAAG;IAAE,MAAM,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAA;CAAE,EAC7D,QAAQ,GAAE,GAAG,CAAC,MAAM,CAAmC,8BAyHxD"}
@@ -19,12 +19,7 @@ async function addRollupBuildTarget(host, options, external = new Set(['react',
19
19
  '@svgr/rollup': versions_1.svgrRollupVersion,
20
20
  }));
21
21
  }
22
- if (options.style === '@emotion/styled') {
23
- external.add('@emotion/react/jsx-runtime');
24
- }
25
- else {
26
- external.add('react/jsx-runtime');
27
- }
22
+ external.add('react/jsx-runtime');
28
23
  const nxJson = (0, devkit_1.readNxJson)(host);
29
24
  const hasRollupPlugin = !!nxJson.plugins?.some((p) => typeof p === 'string'
30
25
  ? p === '@nx/rollup/plugin'
@@ -64,6 +59,12 @@ module.exports = withNx(
64
59
  }
65
60
  else {
66
61
  // Legacy behavior, there is a target in project.json using rollup executor.
62
+ // Mirrors warnRollupExecutorGenerating from @nx/rollup/src/utils/deprecation.
63
+ // Inlined to avoid a cross-package deep import; @nx/rollup's package
64
+ // exports field doesn't expose internal `src/...` paths, so the import
65
+ // works at compile time (via tsconfig project refs) but fails at runtime
66
+ // in published packages.
67
+ devkit_1.logger.warn('The `@nx/rollup:rollup` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rollup:convert-to-inferred` to migrate to the `@nx/rollup/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.');
67
68
  const { targets } = (0, devkit_1.readProjectConfiguration)(host, options.name);
68
69
  targets.build = {
69
70
  executor: '@nx/rollup:rollup',
@@ -1 +1 @@
1
- {"version":3,"file":"create-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/create-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EAEL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAI7C,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QA6FhE"}
1
+ {"version":3,"file":"create-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/create-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EAEL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAI7C,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAiFhE"}
@@ -26,21 +26,10 @@ function createFiles(host, options) {
26
26
  {
27
27
  runtime: 'automatic',
28
28
  useBuiltIns: 'usage',
29
- importSource: options.style === '@emotion/styled'
30
- ? '@emotion/react'
31
- : undefined,
32
29
  },
33
30
  ],
34
31
  ],
35
- plugins: [
36
- options.style === 'styled-components'
37
- ? ['styled-components', { pure: true, ssr: true }]
38
- : undefined,
39
- options.style === 'styled-jsx' ? 'styled-jsx/babel' : undefined,
40
- options.style === '@emotion/styled'
41
- ? '@emotion/babel-plugin'
42
- : undefined,
43
- ].filter(Boolean),
32
+ plugins: [],
44
33
  });
45
34
  }
46
35
  if ((options.publishable || options.buildable) &&
@@ -1 +1 @@
1
- {"version":3,"file":"install-common-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/install-common-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,IAAI,EACL,MAAM,YAAY,CAAC;AAapB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,8BA2D1B"}
1
+ {"version":3,"file":"install-common-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/install-common-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,IAAI,EACL,MAAM,YAAY,CAAC;AAYpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,8BAsD1B"}
@@ -21,13 +21,8 @@ async function installCommonDependencies(host, options) {
21
21
  // `@nx/webpack` installs them automatically for now.
22
22
  // TODO(jack): Once we clean up webpack we can remove this check
23
23
  if (options.bundler === 'vite' || options.unitTestRunner === 'vitest') {
24
- switch (options.style) {
25
- case 'scss':
26
- devDependencies['sass'] = versions_1.sassVersion;
27
- break;
28
- case 'less':
29
- devDependencies['less'] = versions_1.lessVersion;
30
- break;
24
+ if (options.style === 'scss') {
25
+ devDependencies['sass'] = versions_1.sassVersion;
31
26
  }
32
27
  }
33
28
  if (options.unitTestRunner && options.unitTestRunner !== 'none') {
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOrD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAmG3B"}
1
+ {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/normalize-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOrD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAmG3B"}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
6
6
  const assertion_1 = require("../../../utils/assertion");
7
7
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
8
  async function normalizeOptions(host, options) {
9
9
  const isUsingTsSolutionConfig = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host);
10
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'library');
11
- const { projectName, names: projectNames, projectRoot, importPath, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
10
+ await (0, internal_1.ensureRootProjectName)(options, 'library');
11
+ const { projectName, names: projectNames, projectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
12
12
  name: options.name,
13
13
  projectType: 'library',
14
14
  directory: options.directory,
@@ -1 +1 @@
1
- {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAgCpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMhE;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BA0RxE;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/library/library.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AA8BpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMhE;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAyRxE;AAED,eAAe,gBAAgB,CAAC"}
@@ -3,9 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.libraryGenerator = libraryGenerator;
4
4
  exports.libraryGeneratorInternal = libraryGeneratorInternal;
5
5
  const tslib_1 = require("tslib");
6
+ const internal_1 = require("@nx/devkit/internal");
6
7
  const devkit_1 = require("@nx/devkit");
7
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
8
- const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
9
8
  const js_1 = require("@nx/js");
10
9
  const path_1 = require("path");
11
10
  const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
@@ -184,8 +183,8 @@ async function libraryGeneratorInternal(host, schema) {
184
183
  }, true);
185
184
  }
186
185
  if (options.component) {
187
- const relativeCwd = (0, artifact_name_and_directory_utils_1.getRelativeCwd)();
188
- const path = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.fileName);
186
+ const relativeCwd = (0, internal_1.getRelativeCwd)();
187
+ const path = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.js ? `${options.fileName}.js` : options.fileName);
189
188
  const componentTask = await (0, component_1.default)(host, {
190
189
  path: relativeCwd ? (0, path_1.relative)(relativeCwd, path) : path,
191
190
  style: options.style,
@@ -193,7 +192,6 @@ async function libraryGeneratorInternal(host, schema) {
193
192
  (options.unitTestRunner === 'vitest' && options.inSourceTests == true),
194
193
  export: true,
195
194
  routing: options.routing,
196
- js: options.js,
197
195
  name: options.name,
198
196
  inSourceTests: options.inSourceTests,
199
197
  skipFormat: true,
@@ -242,7 +240,7 @@ async function libraryGeneratorInternal(host, schema) {
242
240
  tasks.push(() => (0, devkit_1.installPackagesTask)(host, true));
243
241
  }
244
242
  tasks.push(() => {
245
- (0, log_show_project_command_1.logShowProjectCommand)(options.name);
243
+ (0, internal_1.logShowProjectCommand)(options.name);
246
244
  });
247
245
  return (0, devkit_1.runTasksInSerial)(...tasks);
248
246
  }
@@ -36,6 +36,7 @@
36
36
  "type": "string",
37
37
  "default": "css",
38
38
  "alias": "s",
39
+ "enum": ["css", "scss", "none"],
39
40
  "x-prompt": {
40
41
  "message": "Which stylesheet format would you like to use?",
41
42
  "type": "list",
@@ -46,27 +47,7 @@
46
47
  },
47
48
  {
48
49
  "value": "scss",
49
- "label": "SASS(.scss) [ https://sass-lang.com ]"
50
- },
51
- {
52
- "value": "less",
53
- "label": "LESS [ https://lesscss.org ]"
54
- },
55
- {
56
- "value": "tailwind",
57
- "label": "tailwind [ https://tailwindcss.com/ ]"
58
- },
59
- {
60
- "value": "styled-components",
61
- "label": "styled-components [ https://styled-components.com ]"
62
- },
63
- {
64
- "value": "@emotion/styled",
65
- "label": "emotion [ https://emotion.sh ]"
66
- },
67
- {
68
- "value": "styled-jsx",
69
- "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]"
50
+ "label": "SASS(.scss) [ https://sass-lang.com ]"
70
51
  },
71
52
  {
72
53
  "value": "none",
@@ -1 +1 @@
1
- {"version":3,"file":"redux.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/redux/redux.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,IAAI,EACL,MAAM,YAAY,CAAC;AAepB,OAAO,EAAoB,MAAM,EAAE,MAAM,UAAU,CAAC;AAIpD,wBAAsB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,mDAW9D;AA0LD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"redux.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/redux/redux.ts"],"names":[],"mappings":"AACA,OAAO,EASL,IAAI,EACL,MAAM,YAAY,CAAC;AAcpB,OAAO,EAAoB,MAAM,EAAE,MAAM,UAAU,CAAC;AAIpD,wBAAsB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,mDAW9D;AA0LD,eAAe,cAAc,CAAC"}
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.reduxGenerator = reduxGenerator;
4
4
  const tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
7
7
  const js_1 = require("@nx/js");
8
8
  const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
9
9
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
@@ -77,7 +77,7 @@ function updateReducerConfiguration(host, options) {
77
77
  host.write(options.appMainFilePath, changes);
78
78
  }
79
79
  async function normalizeOptions(host, options) {
80
- const { artifactName: name, directory, fileName, fileExtension, fileExtensionType, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(host, {
80
+ const { artifactName: name, directory, fileName, fileExtension, fileExtensionType, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(host, {
81
81
  path: options.path,
82
82
  name: options.name,
83
83
  suffix: 'slice',
@@ -1,4 +1,4 @@
1
- import type { FileExtensionType } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
1
+ import type { FileExtensionType } from '@nx/devkit/internal';
2
2
 
3
3
  export interface Schema {
4
4
  path: string;
@@ -1 +1 @@
1
- {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/remote/remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAuBpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAOzD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,QAmFlC;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAqK/D;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/remote/remote.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAsBpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAOzD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,QAmFlC;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAqK/D;AAED,eAAe,eAAe,CAAC"}
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addModuleFederationFiles = addModuleFederationFiles;
4
4
  exports.remoteGenerator = remoteGenerator;
5
5
  const tslib_1 = require("tslib");
6
+ const internal_1 = require("@nx/devkit/internal");
6
7
  const devkit_1 = require("@nx/devkit");
7
8
  const path_1 = require("path");
8
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
9
9
  const js_1 = require("@nx/js");
10
10
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
11
11
  const update_module_federation_project_1 = require("../../rules/update-module-federation-project");
@@ -93,7 +93,7 @@ async function remoteGenerator(host, schema) {
93
93
  throw new Error(`Invalid remote name provided: ${options.projectName}. ${isValidRemote.message}`);
94
94
  }
95
95
  }
96
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
96
+ await (0, internal_1.ensureRootProjectName)(options, 'application');
97
97
  const isValidRemote = (0, js_1.isValidVariable)(options.projectName);
98
98
  if (!isValidRemote.isValid) {
99
99
  throw new Error(`Invalid remote name provided: ${options.projectName}. ${isValidRemote.message}`);
@@ -33,6 +33,7 @@
33
33
  "type": "string",
34
34
  "default": "css",
35
35
  "alias": "s",
36
+ "enum": ["css", "scss", "none"],
36
37
  "x-prompt": {
37
38
  "message": "Which stylesheet format would you like to use?",
38
39
  "type": "list",
@@ -43,27 +44,7 @@
43
44
  },
44
45
  {
45
46
  "value": "scss",
46
- "label": "SASS(.scss) [ https://sass-lang.com ]"
47
- },
48
- {
49
- "value": "less",
50
- "label": "LESS [ https://lesscss.org ]"
51
- },
52
- {
53
- "value": "tailwind",
54
- "label": "tailwind [ https://tailwindcss.com/ ]"
55
- },
56
- {
57
- "value": "styled-components",
58
- "label": "styled-components [ https://styled-components.com ]"
59
- },
60
- {
61
- "value": "@emotion/styled",
62
- "label": "emotion [ https://emotion.sh ]"
63
- },
64
- {
65
- "value": "styled-jsx",
66
- "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]"
47
+ "label": "SASS(.scss) [ https://sass-lang.com ]"
67
48
  },
68
49
  {
69
50
  "value": "none",
@@ -1 +1 @@
1
- {"version":3,"file":"migrate-with-mf-import-to-new-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AASpB,wBAA8B,mBAAmB,CAAC,IAAI,EAAE,IAAI,iBAqD3D"}
1
+ {"version":3,"file":"migrate-with-mf-import-to-new-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AAQpB,wBAA8B,mBAAmB,CAAC,IAAI,EAAE,IAAI,iBAqD3D"}
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = migrateWithMfImport;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
6
  const tsquery_1 = require("@phenomnomnominal/tsquery");
7
7
  const versions_1 = require("../../utils/versions");
8
8
  const NX_RSPACK_MODULE_FEDERATION_IMPORT_SELECTOR = 'ImportDeclaration > StringLiteral[value=@nx/react/module-federation], VariableStatement CallExpression:has(Identifier[name=require]) > StringLiteral[value=@nx/react/module-federation]';
9
9
  const NEW_IMPORT_PATH = `'@nx/module-federation/webpack'`;
10
10
  async function migrateWithMfImport(tree) {
11
11
  const projects = new Set();
12
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/react:module-federation-dev-server', (options, project, target) => {
12
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/react:module-federation-dev-server', (options, project, target) => {
13
13
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project);
14
14
  projects.add(projectConfig.root);
15
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ensure-nx-module-federation-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-20-3-0/ensure-nx-module-federation-package.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;AAIpB,wBAA8B,eAAe,CAAC,IAAI,EAAE,IAAI,iBAqBvD"}
1
+ {"version":3,"file":"ensure-nx-module-federation-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-20-3-0/ensure-nx-module-federation-package.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;AAGpB,wBAA8B,eAAe,CAAC,IAAI,EAAE,IAAI,iBAqBvD"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = ensureMfPackage;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
6
  const versions_1 = require("../../utils/versions");
7
7
  async function ensureMfPackage(tree) {
8
8
  const projects = new Set();
9
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/react:module-federation-dev-server', (options, project, target) => {
9
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/react:module-federation-dev-server', (options, project, target) => {
10
10
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project);
11
11
  projects.add(projectConfig.root);
12
12
  });
@@ -1 +1 @@
1
- {"version":3,"file":"add-svgr-to-webpack-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-22-0-0/add-svgr-to-webpack-config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AAiHpB,wBAA8B,sBAAsB,CAAC,IAAI,EAAE,IAAI,iBAsX9D"}
1
+ {"version":3,"file":"add-svgr-to-webpack-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-22-0-0/add-svgr-to-webpack-config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AAgHpB,wBAA8B,sBAAsB,CAAC,IAAI,EAAE,IAAI,iBAsZ9D"}
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = addSvgrToWebpackConfig;
4
4
  const tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
7
7
  const tsquery_1 = require("@phenomnomnominal/tsquery");
8
8
  const ts = tslib_1.__importStar(require("typescript"));
9
9
  const withSvgrFunctionForWithReact = `
@@ -115,7 +115,7 @@ function withSvgr(svgrOptions = {}) {
115
115
  async function addSvgrToWebpackConfig(tree) {
116
116
  const projects = new Map();
117
117
  // Find all React webpack projects using either withReact OR NxReactWebpackPlugin
118
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', (options, project, target) => {
118
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', (options, project, target) => {
119
119
  if (!options.webpackConfig)
120
120
  return;
121
121
  const webpackConfigPath = options.webpackConfig;
@@ -271,11 +271,38 @@ async function addSvgrToWebpackConfig(tree) {
271
271
  ts.isIdentifier(prop.name) &&
272
272
  prop.name.text === 'svgr');
273
273
  if (svgrProp) {
274
- changes.push({
275
- type: devkit_1.ChangeType.Delete,
276
- start: arg.getStart(),
277
- length: arg.getEnd() - arg.getStart(),
278
- });
274
+ const hasOnlySvgrProperty = arg.properties.length === 1;
275
+ if (hasOnlySvgrProperty) {
276
+ changes.push({
277
+ type: devkit_1.ChangeType.Delete,
278
+ start: arg.getStart(),
279
+ length: arg.getEnd() - arg.getStart(),
280
+ });
281
+ }
282
+ else {
283
+ const propIndex = arg.properties.indexOf(svgrProp);
284
+ const isLastProp = propIndex === arg.properties.length - 1;
285
+ const isFirstProp = propIndex === 0;
286
+ let removeStart = svgrProp.getFullStart();
287
+ let removeEnd = svgrProp.getEnd();
288
+ if (!isLastProp) {
289
+ const nextProp = arg.properties[propIndex + 1];
290
+ removeEnd = nextProp.getFullStart();
291
+ }
292
+ else if (!isFirstProp) {
293
+ const prevProp = arg.properties[propIndex - 1];
294
+ const textBetween = content.substring(prevProp.getEnd(), svgrProp.getFullStart());
295
+ const commaIndex = textBetween.indexOf(',');
296
+ if (commaIndex !== -1) {
297
+ removeStart = prevProp.getEnd() + commaIndex;
298
+ }
299
+ }
300
+ changes.push({
301
+ type: devkit_1.ChangeType.Delete,
302
+ start: removeStart,
303
+ length: removeEnd - removeStart,
304
+ });
305
+ }
279
306
  if (config.svgrOptions) {
280
307
  const composePluginsCalls = (0, tsquery_1.query)(sourceFile, 'CallExpression[expression.name=composePlugins]');
281
308
  if (composePluginsCalls.length > 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"router-plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/plugins/router-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAUnB,MAAM,YAAY,CAAC;AAgBpB,MAAM,WAAW,wBAAwB;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAyBD,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,wBAAwB,CAsFjE,CAAC"}
1
+ {"version":3,"file":"router-plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/plugins/router-plugin.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,aAAa,EAQnB,MAAM,YAAY,CAAC;AAUpB,MAAM,WAAW,wBAAwB;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAUD,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,wBAAwB,CA2FjE,CAAC"}
@@ -1,34 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createNodesV2 = void 0;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
6
  const path_1 = require("path");
6
7
  const fs_1 = require("fs");
7
- const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
8
8
  const cache_directory_1 = require("nx/src/utils/cache-directory");
9
- const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
10
9
  const js_1 = require("@nx/js");
11
10
  const devkit_internals_1 = require("nx/src/devkit-internals");
12
11
  const util_1 = require("@nx/js/src/plugins/typescript/util");
13
12
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
14
- const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
15
13
  const pmCommand = (0, devkit_1.getPackageManagerCommand)();
16
14
  const reactRouterConfigBlob = '**/react-router.config.{ts,js,cjs,cts,mjs,mts}';
17
- function readTargetsCache(cachePath) {
18
- return process.env.NX_CACHE_PROJECT_GRAPH !== 'false' && (0, fs_1.existsSync)(cachePath)
19
- ? (0, devkit_1.readJsonFile)(cachePath)
20
- : {};
21
- }
22
- function writeTargetsToCache(cachePath, results) {
23
- (0, devkit_1.writeJsonFile)(cachePath, results);
24
- }
25
15
  exports.createNodesV2 = [
26
16
  reactRouterConfigBlob,
27
17
  async (configFiles, options, context) => {
28
18
  const optionsHash = (0, devkit_internals_1.hashObject)(options);
29
19
  const normalizedOptions = normalizeOptions(options);
30
20
  const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `react-router-${optionsHash}.hash`);
31
- const targetsCache = readTargetsCache(cachePath);
21
+ const targetsCache = new internal_1.PluginCache(cachePath);
32
22
  const isUsingTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)();
33
23
  const { roots: projectRoots, configFiles: validConfigFiles } = configFiles.reduce((acc, configFile) => {
34
24
  const potentialRoot = (0, path_1.dirname)(configFile);
@@ -42,14 +32,16 @@ exports.createNodesV2 = [
42
32
  configFiles: [],
43
33
  });
44
34
  const lockfile = (0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
45
- const hashes = await (0, calculate_hash_for_create_nodes_1.calculateHashesForCreateNodes)(projectRoots, { ...normalizedOptions, isUsingTsSolutionSetup }, context, projectRoots.map((_) => [lockfile]));
35
+ const hashes = await (0, internal_1.calculateHashesForCreateNodes)(projectRoots, { ...normalizedOptions, isUsingTsSolutionSetup }, context, projectRoots.map((_) => [lockfile]));
46
36
  try {
47
37
  return await (0, devkit_1.createNodesFromFiles)(async (configFile, _, context, idx) => {
48
38
  const projectRoot = (0, path_1.dirname)(configFile);
49
39
  const siblingFiles = (0, fs_1.readdirSync)((0, devkit_1.joinPathFragments)(context.workspaceRoot, projectRoot));
50
40
  const hash = hashes[idx] + configFile;
51
- const { projectType, metadata, targets } = (targetsCache[hash] ??=
52
- await buildReactRouterTargets(configFile, projectRoot, normalizedOptions, context, siblingFiles, isUsingTsSolutionSetup));
41
+ if (!targetsCache.has(hash)) {
42
+ targetsCache.set(hash, await buildReactRouterTargets(configFile, projectRoot, normalizedOptions, context, siblingFiles, isUsingTsSolutionSetup));
43
+ }
44
+ const { projectType, metadata, targets } = targetsCache.get(hash);
53
45
  const project = {
54
46
  root: projectRoot,
55
47
  targets,
@@ -66,16 +58,16 @@ exports.createNodesV2 = [
66
58
  }, validConfigFiles, options, context);
67
59
  }
68
60
  finally {
69
- writeTargetsToCache(cachePath, targetsCache);
61
+ targetsCache.writeToDisk();
70
62
  }
71
63
  },
72
64
  ];
73
65
  async function buildReactRouterTargets(configFilePath, projectRoot, options, context, siblingFiles, isUsingTsSolutionSetup) {
74
- const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
66
+ const namedInputs = (0, internal_1.getNamedInputs)(projectRoot, context);
75
67
  const configPath = (0, path_1.join)(context.workspaceRoot, configFilePath);
76
68
  if (require.cache[configPath])
77
- (0, config_utils_1.clearRequireCache)();
78
- const reactRouterConfig = await (0, config_utils_1.loadConfigFile)(configPath);
69
+ (0, internal_1.clearRequireCache)();
70
+ const reactRouterConfig = await (0, internal_1.loadConfigFile)(configPath);
79
71
  const isLibMode = reactRouterConfig?.ssr !== undefined && reactRouterConfig.ssr === false;
80
72
  const { buildDirectory, serverBuildPath } = await getBuildPaths(reactRouterConfig, isLibMode);
81
73
  const targets = {};
@@ -1 +1 @@
1
- {"version":3,"file":"assertion.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/utils/assertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAa/D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAQpD;AAED,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,GACzB,IAAI,CAMN"}
1
+ {"version":3,"file":"assertion.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/utils/assertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAI/D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAQpD;AAED,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,GACzB,IAAI,CAMN"}
@@ -2,16 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.assertValidStyle = assertValidStyle;
4
4
  exports.assertValidReactRouter = assertValidReactRouter;
5
- const VALID_STYLES = [
6
- 'css',
7
- 'scss',
8
- 'less',
9
- 'tailwind',
10
- 'styled-components',
11
- '@emotion/styled',
12
- 'styled-jsx',
13
- 'none',
14
- ];
5
+ const VALID_STYLES = ['css', 'scss', 'none'];
15
6
  function assertValidStyle(style) {
16
7
  if (VALID_STYLES.indexOf(style) === -1) {
17
8
  throw new Error(`Unsupported style option found: ${style}. Valid values are: "${VALID_STYLES.join('", "')}"`);
@@ -54,10 +54,6 @@ function createTsConfigForTsSolution(host, projectRoot, type, options, relativeP
54
54
  types.add('vite/client');
55
55
  json.compilerOptions.types = Array.from(types);
56
56
  }
57
- if (options.style === '@emotion/styled') {
58
- json.compilerOptions ??= {};
59
- json.compilerOptions.jsxImportSource = '@emotion/react';
60
- }
61
57
  return json;
62
58
  });
63
59
  }
@@ -79,9 +75,6 @@ function createTsConfigForNonTsSolution(host, projectRoot, type, options, relati
79
75
  },
80
76
  ],
81
77
  };
82
- if (options.style === '@emotion/styled') {
83
- json.compilerOptions.jsxImportSource = '@emotion/react';
84
- }
85
78
  if (options.bundler === 'vite') {
86
79
  json.compilerOptions.types =
87
80
  options.unitTestRunner === 'vitest'
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeRemoteName = normalizeRemoteName;
4
4
  exports.normalizeRemoteDirectory = normalizeRemoteDirectory;
5
5
  const devkit_1 = require("@nx/devkit");
6
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
6
+ const internal_1 = require("@nx/devkit/internal");
7
7
  async function normalizeRemoteName(tree, remote, options) {
8
- const { projectName: remoteName } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(tree, {
8
+ const { projectName: remoteName } = await (0, internal_1.determineProjectNameAndRootOptions)(tree, {
9
9
  name: remote,
10
10
  projectType: 'application',
11
11
  directory: options.directory,
@@ -6,7 +6,6 @@ export declare const reactDomV18Version = "18.3.1";
6
6
  export declare const reactIsVersion = "^19.0.0";
7
7
  export declare const reactIsV18Version = "18.3.1";
8
8
  export declare const swcLoaderVersion = "0.1.15";
9
- export declare const babelLoaderVersion = "^9.1.2";
10
9
  export declare const typesReactV18Version = "18.3.1";
11
10
  export declare const typesReactVersion = "^19.0.0";
12
11
  export declare const typesReactDomV18Version = "18.3.0";
@@ -14,15 +13,9 @@ export declare const typesReactDomVersion = "^19.0.0";
14
13
  export declare const typesReactIsV18Version = "18.3.0";
15
14
  export declare const typesReactIsVersion = "^19.0.0";
16
15
  export declare const reactViteVersion = "^4.2.0";
17
- export declare const typesNodeVersion = "^20.0.0";
16
+ export declare const typesNodeVersion = "^22.0.0";
18
17
  export declare const babelPresetReactVersion = "^7.14.5";
19
18
  export declare const babelCoreVersion = "^7.14.5";
20
- export declare const styledComponentsVersion = "5.3.6";
21
- export declare const typesStyledComponentsVersion = "5.1.26";
22
- export declare const emotionStyledVersion = "11.14.1";
23
- export declare const emotionReactVersion = "11.14.0";
24
- export declare const emotionBabelPlugin = "11.13.5";
25
- export declare const styledJsxVersion = "5.1.2";
26
19
  export declare const reactRouterDomVersion = "6.30.3";
27
20
  export declare const reactRouterVersion = "^7.14.2";
28
21
  export declare const reactRouterIsBotVersion = "^4.4.0";
@@ -34,10 +27,8 @@ export declare const eslintPluginImportVersion = "2.31.0";
34
27
  export declare const eslintPluginJsxA11yVersion = "6.10.1";
35
28
  export declare const eslintPluginReactVersion = "7.35.0";
36
29
  export declare const eslintPluginReactHooksVersion = "5.0.0";
37
- export declare const babelPluginStyledComponentsVersion = "1.10.7";
38
30
  export declare const tsLibVersion = "^2.3.0";
39
31
  export declare const postcssVersion = "8.4.38";
40
- export declare const tailwindcssVersion = "3.4.3";
41
32
  export declare const autoprefixerVersion = "10.4.13";
42
33
  export declare const expressVersion = "^4.21.2";
43
34
  export declare const typesExpressVersion = "^4.17.21";
@@ -46,11 +37,7 @@ export declare const corsVersion = "~2.8.5";
46
37
  export declare const typesCorsVersion = "~2.8.12";
47
38
  export declare const moduleFederationNodeVersion = "^2.7.21";
48
39
  export declare const moduleFederationEnhancedVersion = "^2.1.0";
49
- export declare const lessVersion = "3.12.2";
50
- export declare const sassVersion = "^1.55.0";
40
+ export declare const sassVersion = "^1.97.2";
51
41
  export declare const rollupPluginUrlVersion = "^8.0.2";
52
42
  export declare const svgrRollupVersion = "^8.1.0";
53
- export declare const swcPluginStyledJsxVersion = "^1.5.67";
54
- export declare const swcPluginEmotionVersion = "^2.5.67";
55
- export declare const swcPluginStyledComponentsVersion = "^1.5.67";
56
43
  //# sourceMappingURL=versions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/utils/versions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,KAAwC,CAAC;AAE/D,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAC7C,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAChD,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,gBAAgB,WAAW,CAAC;AAGzC,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,eAAO,MAAM,uBAAuB,UAAU,CAAC;AAC/C,eAAO,MAAM,4BAA4B,WAAW,CAAC;AAErD,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAG5C,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAEhD,eAAO,MAAM,0BAA0B,WAAW,CAAC;AACnD,eAAO,MAAM,wBAAwB,WAAW,CAAC;AAEjD,eAAO,MAAM,qBAAqB,UAAU,CAAC;AAC7C,eAAO,MAAM,iBAAiB,UAAU,CAAC;AAEzC,eAAO,MAAM,yBAAyB,WAAW,CAAC;AAClD,eAAO,MAAM,0BAA0B,WAAW,CAAC;AACnD,eAAO,MAAM,wBAAwB,WAAW,CAAC;AACjD,eAAO,MAAM,6BAA6B,UAAU,CAAC;AAErD,eAAO,MAAM,kCAAkC,WAAW,CAAC;AAE3D,eAAO,MAAM,YAAY,WAAW,CAAC;AAErC,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAC1C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAG7C,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,YAAY,WAAW,CAAC;AACrC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,+BAA+B,WAAW,CAAC;AAGxD,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,WAAW,YAAY,CAAC;AAGrC,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAE1C,eAAO,MAAM,yBAAyB,YAAY,CAAC;AACnD,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,gCAAgC,YAAY,CAAC"}
1
+ {"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/utils/versions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,KAAwC,CAAC;AAE/D,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAC7C,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAChD,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,gBAAgB,WAAW,CAAC;AAGzC,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAEhD,eAAO,MAAM,0BAA0B,WAAW,CAAC;AACnD,eAAO,MAAM,wBAAwB,WAAW,CAAC;AAEjD,eAAO,MAAM,qBAAqB,UAAU,CAAC;AAC7C,eAAO,MAAM,iBAAiB,UAAU,CAAC;AAEzC,eAAO,MAAM,yBAAyB,WAAW,CAAC;AAClD,eAAO,MAAM,0BAA0B,WAAW,CAAC;AACnD,eAAO,MAAM,wBAAwB,WAAW,CAAC;AACjD,eAAO,MAAM,6BAA6B,UAAU,CAAC;AAErD,eAAO,MAAM,YAAY,WAAW,CAAC;AAErC,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAG7C,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,YAAY,WAAW,CAAC;AACrC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,+BAA+B,WAAW,CAAC;AAGxD,eAAO,MAAM,WAAW,YAAY,CAAC;AAGrC,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,iBAAiB,WAAW,CAAC"}