@nx/react 23.0.0-beta.12 → 23.0.0-beta.14
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/package.json +16 -16
- package/plugins/component-testing/index.js +3 -3
- package/plugins/component-testing/webpack-fallback.js +2 -2
- package/plugins/storybook/index.js +3 -3
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +2 -2
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +2 -2
- package/src/executors/module-federation-static-server/module-federation-static-server.impl.js +2 -2
- package/src/generators/application/application.d.ts.map +1 -1
- package/src/generators/application/application.js +29 -14
- package/src/generators/application/lib/add-linting.js +2 -2
- package/src/generators/application/lib/add-routing.js +2 -2
- package/src/generators/application/lib/create-application-files.js +2 -2
- package/src/generators/application/lib/normalize-options.js +2 -2
- package/src/generators/component/component.js +2 -2
- package/src/generators/component/lib/normalize-options.js +2 -2
- package/src/generators/component-story/component-story.d.ts.map +1 -1
- package/src/generators/component-story/component-story.js +3 -4
- package/src/generators/component-test/component-test.d.ts.map +1 -1
- package/src/generators/component-test/component-test.js +3 -4
- package/src/generators/cypress-component-configuration/lib/add-files.js +2 -2
- package/src/generators/federate-module/lib/utils.js +2 -2
- package/src/generators/hook/hook.d.ts.map +1 -1
- package/src/generators/hook/hook.js +3 -4
- package/src/generators/host/host.js +3 -3
- package/src/generators/host/lib/add-module-federation-files.d.ts.map +1 -1
- package/src/generators/host/lib/add-module-federation-files.js +3 -3
- package/src/generators/host/lib/update-module-federation-tsconfig.js +2 -2
- package/src/generators/library/lib/install-common-dependencies.js +2 -2
- package/src/generators/library/lib/normalize-options.js +4 -4
- package/src/generators/library/lib/update-app-routes.js +2 -2
- package/src/generators/library/library.d.ts.map +1 -1
- package/src/generators/library/library.js +8 -10
- package/src/generators/redux/redux.js +5 -6
- package/src/generators/remote/lib/setup-package-json-exports-for-remote.js +2 -2
- package/src/generators/remote/lib/update-host-with-remote.js +4 -5
- package/src/generators/remote/remote.d.ts.map +1 -1
- package/src/generators/remote/remote.js +5 -5
- package/src/generators/setup-ssr/setup-ssr.d.ts.map +1 -1
- package/src/generators/setup-ssr/setup-ssr.js +5 -7
- package/src/generators/stories/stories.js +5 -6
- package/src/module-federation/ast-utils.js +2 -2
- package/src/plugins/router-plugin.d.ts.map +1 -1
- package/src/plugins/router-plugin.js +3 -4
- package/src/rules/update-module-federation-project.js +3 -3
- package/src/utils/add-mf-env-to-inputs.d.ts.map +1 -1
- package/src/utils/add-mf-env-to-inputs.js +15 -8
- package/src/utils/ast-utils.js +15 -15
- package/src/utils/component-props.js +3 -3
- package/src/utils/create-ts-config.js +3 -3
- package/src/utils/ct-utils.js +2 -2
- package/tailwind.js +2 -2
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getArgsDefaultValue = getArgsDefaultValue;
|
|
4
4
|
exports.getComponentPropDefaults = getComponentPropDefaults;
|
|
5
5
|
exports.getImportForType = getImportForType;
|
|
6
|
-
const
|
|
6
|
+
const internal_1 = require("@nx/js/internal");
|
|
7
7
|
const ast_utils_1 = require("./ast-utils");
|
|
8
8
|
let tsModule;
|
|
9
9
|
// TODO: candidate to refactor with the angular component story
|
|
10
10
|
function getArgsDefaultValue(property) {
|
|
11
11
|
if (!tsModule) {
|
|
12
|
-
tsModule = (0,
|
|
12
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
13
13
|
}
|
|
14
14
|
const typeNameToDefault = {
|
|
15
15
|
[tsModule.SyntaxKind.StringKeyword]: "''",
|
|
@@ -26,7 +26,7 @@ function getArgsDefaultValue(property) {
|
|
|
26
26
|
}
|
|
27
27
|
function getComponentPropDefaults(sourceFile, cmpDeclaration) {
|
|
28
28
|
if (!tsModule) {
|
|
29
|
-
tsModule = (0,
|
|
29
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
30
30
|
}
|
|
31
31
|
const info = (0, ast_utils_1.parseComponentPropsInfo)(sourceFile, cmpDeclaration);
|
|
32
32
|
let propsTypeName = null;
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createTsConfig = createTsConfig;
|
|
4
4
|
exports.extractTsConfigBase = extractTsConfigBase;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const shared = tslib_1.__importStar(require("@nx/js
|
|
6
|
+
const shared = tslib_1.__importStar(require("@nx/js"));
|
|
7
7
|
const json_1 = require("nx/src/generators/utils/json");
|
|
8
|
-
const
|
|
8
|
+
const internal_1 = require("@nx/js/internal");
|
|
9
9
|
function createTsConfig(host, projectRoot, type, options, relativePathToRootTsConfig) {
|
|
10
|
-
if ((0,
|
|
10
|
+
if ((0, internal_1.isUsingTsSolutionSetup)(host)) {
|
|
11
11
|
createTsConfigForTsSolution(host, projectRoot, type, options, relativePathToRootTsConfig);
|
|
12
12
|
}
|
|
13
13
|
else {
|
package/src/utils/ct-utils.js
CHANGED
|
@@ -38,7 +38,7 @@ exports.getBundlerFromTarget = getBundlerFromTarget;
|
|
|
38
38
|
exports.getActualBundler = getActualBundler;
|
|
39
39
|
exports.isComponent = isComponent;
|
|
40
40
|
const devkit_1 = require("@nx/devkit");
|
|
41
|
-
const
|
|
41
|
+
const internal_1 = require("@nx/js/internal");
|
|
42
42
|
const ast_utils_1 = require("./ast-utils");
|
|
43
43
|
let tsModule;
|
|
44
44
|
const allowedFileExt = new RegExp(/\.[jt]sx?/);
|
|
@@ -109,7 +109,7 @@ async function getActualBundler(tree, options, found) {
|
|
|
109
109
|
}
|
|
110
110
|
function isComponent(tree, filePath) {
|
|
111
111
|
if (!tsModule) {
|
|
112
|
-
tsModule = (0,
|
|
112
|
+
tsModule = (0, internal_1.ensureTypescript)();
|
|
113
113
|
}
|
|
114
114
|
if (isSpecFile.test(filePath) || !allowedFileExt.test(filePath)) {
|
|
115
115
|
return false;
|
package/tailwind.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createGlobPatternsForDependencies = createGlobPatternsForDependencies;
|
|
4
|
-
const
|
|
4
|
+
const internal_1 = require("@nx/js/internal");
|
|
5
5
|
let hasWarned = false;
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated `@nx/react/tailwind` will be removed in Nx 24. Migrate to Tailwind CSS v4 which no longer needs glob patterns.
|
|
@@ -15,7 +15,7 @@ function createGlobPatternsForDependencies(dirPath, fileGlobPattern = '/**/!(*.s
|
|
|
15
15
|
`See: https://nx.dev/docs/technologies/react/guides/using-tailwind-css-in-react\n`);
|
|
16
16
|
}
|
|
17
17
|
try {
|
|
18
|
-
return (0,
|
|
18
|
+
return (0, internal_1.createGlobPatternsForDependencies)(dirPath, fileGlobPattern);
|
|
19
19
|
}
|
|
20
20
|
catch (e) {
|
|
21
21
|
/**
|