@nx/react-native 21.2.0-beta.1 → 21.2.0-beta.3

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/README.md CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # Nx: Smart Repos · Fast Builds
24
24
 
25
- Nx is a build system, optimized for monorepos, with plugins for popular frameworks and tools and advanced CI capabilities including caching and distribution.
25
+ An AI-first build platform that connects everything from your editor to CI. Helping you deliver fast, without breaking things.
26
26
 
27
27
  This package is a [React Native plugin for Nx](https://nx.dev/nx-api/react-native).
28
28
 
package/generators.json CHANGED
@@ -29,21 +29,6 @@
29
29
  "description": "Create a React Native component.",
30
30
  "aliases": ["c"]
31
31
  },
32
- "storybook-configuration": {
33
- "factory": "./src/generators/storybook-configuration/configuration#storybookConfigurationGeneratorInternal",
34
- "schema": "./src/generators/storybook-configuration/schema.json",
35
- "description": "Set up Storybook for a React Native application or library."
36
- },
37
- "component-story": {
38
- "factory": "./src/generators/component-story/component-story#componentStoryGenerator",
39
- "schema": "./src/generators/component-story/schema.json",
40
- "description": "Generate Storybook story for a React Native component."
41
- },
42
- "stories": {
43
- "factory": "./src/generators/stories/stories#storiesGenerator",
44
- "schema": "./src/generators/stories/schema.json",
45
- "description": "Create stories for all components declared in an application or library."
46
- },
47
32
  "upgrade-native": {
48
33
  "factory": "./src/generators/upgrade-native/upgrade-native#reactNativeUpgradeNativeGenerator",
49
34
  "schema": "./src/generators/upgrade-native/schema.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react-native",
3
- "version": "21.2.0-beta.1",
3
+ "version": "21.2.0-beta.3",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
6
6
  "keywords": [
@@ -35,12 +35,12 @@
35
35
  "picocolors": "^1.1.0",
36
36
  "tsconfig-paths": "^4.1.2",
37
37
  "tslib": "^2.3.0",
38
- "@nx/devkit": "21.2.0-beta.1",
39
- "@nx/jest": "21.2.0-beta.1",
40
- "@nx/js": "21.2.0-beta.1",
41
- "@nx/eslint": "21.2.0-beta.1",
42
- "@nx/react": "21.2.0-beta.1",
43
- "@nx/workspace": "21.2.0-beta.1"
38
+ "@nx/devkit": "21.2.0-beta.3",
39
+ "@nx/jest": "21.2.0-beta.3",
40
+ "@nx/js": "21.2.0-beta.3",
41
+ "@nx/eslint": "21.2.0-beta.3",
42
+ "@nx/react": "21.2.0-beta.3",
43
+ "@nx/workspace": "21.2.0-beta.3"
44
44
  },
45
45
  "executors": "./executors.json",
46
46
  "ng-update": {
@@ -1,8 +0,0 @@
1
- import { Tree } from '@nx/devkit';
2
- import { CreateComponentStoriesFileSchema } from './schema';
3
- /**
4
- * @deprecated This would be a direct pass through to @nx/react:component-story generator.
5
- * TODO (@xiongemi): remove this generator for v19
6
- */
7
- export declare function componentStoryGenerator(host: Tree, schema: CreateComponentStoriesFileSchema): Promise<void>;
8
- export default componentStoryGenerator;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.componentStoryGenerator = componentStoryGenerator;
4
- const devkit_1 = require("@nx/devkit");
5
- const react_1 = require("@nx/react");
6
- /**
7
- * @deprecated This would be a direct pass through to @nx/react:component-story generator.
8
- * TODO (@xiongemi): remove this generator for v19
9
- */
10
- async function componentStoryGenerator(host, schema) {
11
- devkit_1.logger.warn(`Please run 'nx run @nx/react:component-story ${schema.project}' instead.`);
12
- return (0, react_1.componentStoryGenerator)(host, schema);
13
- }
14
- exports.default = componentStoryGenerator;
@@ -1,6 +0,0 @@
1
- export interface CreateComponentStoriesFileSchema {
2
- project: string;
3
- componentPath: string;
4
- interactionTests?: boolean;
5
- skipFormat?: boolean;
6
- }
@@ -1,42 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxReactNativeComponentStory",
5
- "title": "React native component story",
6
- "description": "Generate storybook story for a react-native component.",
7
- "type": "object",
8
- "properties": {
9
- "project": {
10
- "type": "string",
11
- "aliases": ["name", "projectName"],
12
- "description": "The project where to add the components.",
13
- "examples": ["shared-ui-component"],
14
- "$default": {
15
- "$source": "projectName",
16
- "index": 0
17
- },
18
- "x-prompt": "What's name of the project where the component lives?",
19
- "x-priority": "important"
20
- },
21
- "componentPath": {
22
- "type": "string",
23
- "description": "Relative path to the component file from the library root.",
24
- "examples": ["lib/components"],
25
- "x-prompt": "What's path of the component relative to the project's lib root?",
26
- "x-priority": "important"
27
- },
28
- "skipFormat": {
29
- "description": "Skip formatting files.",
30
- "type": "boolean",
31
- "default": false,
32
- "x-priority": "internal"
33
- },
34
- "interactionTests": {
35
- "type": "boolean",
36
- "description": "Set up Storybook interaction tests.",
37
- "default": true,
38
- "x-priority": "important"
39
- }
40
- },
41
- "required": ["project", "componentPath"]
42
- }
@@ -1,7 +0,0 @@
1
- export interface StorybookStoriesSchema {
2
- project: string;
3
- interactionTests?: boolean;
4
- js?: boolean;
5
- ignorePaths?: string[];
6
- skipFormat?: boolean;
7
- }
@@ -1,58 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxReactNativeStorybookStories",
5
- "title": "Generate React Native Storybook stories",
6
- "description": "Generate stories/specs for all components declared in a React Native project.",
7
- "type": "object",
8
- "properties": {
9
- "project": {
10
- "type": "string",
11
- "aliases": ["name", "projectName"],
12
- "description": "Project for which to generate stories.",
13
- "$default": {
14
- "$source": "projectName",
15
- "index": 0
16
- },
17
- "x-prompt": "For which project do you want to generate stories?",
18
- "x-priority": "important"
19
- },
20
- "interactionTests": {
21
- "type": "boolean",
22
- "description": "Set up Storybook interaction tests.",
23
- "x-prompt": "Do you want to set up Storybook interaction tests?",
24
- "x-priority": "important",
25
- "default": true
26
- },
27
- "js": {
28
- "type": "boolean",
29
- "description": "Generate JavaScript files rather than TypeScript files.",
30
- "default": false
31
- },
32
- "ignorePaths": {
33
- "type": "array",
34
- "description": "Paths to ignore when looking for components.",
35
- "items": {
36
- "type": "string",
37
- "description": "Path to ignore."
38
- },
39
- "default": [
40
- "*.stories.ts,*.stories.tsx,*.stories.js,*.stories.jsx,*.stories.mdx"
41
- ],
42
- "examples": [
43
- "apps/my-app/src/not-stories/**",
44
- "**/**/src/**/not-stories/**",
45
- "libs/my-lib/**/*.something.ts",
46
- "**/**/src/**/*.other.*",
47
- "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts"
48
- ]
49
- },
50
- "skipFormat": {
51
- "description": "Skip formatting files.",
52
- "type": "boolean",
53
- "default": false,
54
- "x-priority": "internal"
55
- }
56
- },
57
- "required": ["project"]
58
- }
@@ -1,8 +0,0 @@
1
- import { Tree } from '@nx/devkit';
2
- import { StorybookStoriesSchema } from './schema';
3
- /**
4
- * @deprecated This would be a direct pass through to @nx/react:stories generator.
5
- * TODO (@xiongemi): remove this generator for v19
6
- */
7
- export declare function storiesGenerator(host: Tree, schema: StorybookStoriesSchema): Promise<import("@nx/devkit").GeneratorCallback>;
8
- export default storiesGenerator;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.storiesGenerator = storiesGenerator;
4
- const react_1 = require("@nx/react");
5
- /**
6
- * @deprecated This would be a direct pass through to @nx/react:stories generator.
7
- * TODO (@xiongemi): remove this generator for v19
8
- */
9
- async function storiesGenerator(host, schema) {
10
- return (0, react_1.storiesGenerator)(host, schema);
11
- }
12
- exports.default = storiesGenerator;
@@ -1,9 +0,0 @@
1
- import { Tree } from '@nx/devkit';
2
- import { StorybookConfigureSchema } from './schema';
3
- export declare function storybookConfigurationGenerator(tree: Tree, schema: StorybookConfigureSchema): Promise<import("@nx/devkit").GeneratorCallback>;
4
- /**
5
- * This would be a direct pass through to @nx/react:storybook-configuration generator.
6
- * @TODO (@xiongemi): remove this generator for v19
7
- */
8
- export declare function storybookConfigurationGeneratorInternal(host: Tree, schema: StorybookConfigureSchema): Promise<import("@nx/devkit").GeneratorCallback>;
9
- export default storybookConfigurationGenerator;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.storybookConfigurationGenerator = storybookConfigurationGenerator;
4
- exports.storybookConfigurationGeneratorInternal = storybookConfigurationGeneratorInternal;
5
- const devkit_1 = require("@nx/devkit");
6
- const react_1 = require("@nx/react");
7
- function storybookConfigurationGenerator(tree, schema) {
8
- return storybookConfigurationGeneratorInternal(tree, {
9
- addPlugin: false,
10
- ...schema,
11
- });
12
- }
13
- /**
14
- * This would be a direct pass through to @nx/react:storybook-configuration generator.
15
- * @TODO (@xiongemi): remove this generator for v19
16
- */
17
- async function storybookConfigurationGeneratorInternal(host, schema) {
18
- devkit_1.logger.warn(`Please run 'nx run @nx/react:storybook-configuration ${schema.project}' instead.`);
19
- const nxJson = (0, devkit_1.readNxJson)(host);
20
- const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
21
- nxJson.useInferencePlugins !== false;
22
- schema.addPlugin ??= addPluginDefault;
23
- return (0, react_1.storybookConfigurationGenerator)(host, schema);
24
- }
25
- exports.default = storybookConfigurationGenerator;
@@ -1,13 +0,0 @@
1
- import { Linter, LinterType } from '@nx/eslint';
2
-
3
- export interface StorybookConfigureSchema {
4
- project: string;
5
- interactionTests?: boolean;
6
- generateStories?: boolean;
7
- js?: boolean;
8
- tsConfiguration?: boolean;
9
- linter?: Linter | LinterType;
10
- ignorePaths?: string[];
11
- configureStaticServe?: boolean;
12
- addPlugin?: boolean;
13
- }
@@ -1,80 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxReactNativeStorybookConfigure",
5
- "title": "React native Storybook configuration",
6
- "description": "Set up Storybook for a React-Native app or library.",
7
- "type": "object",
8
- "properties": {
9
- "project": {
10
- "type": "string",
11
- "aliases": ["name", "projectName"],
12
- "description": "Project for which to generate Storybook configuration.",
13
- "$default": {
14
- "$source": "argv",
15
- "index": 0
16
- },
17
- "x-prompt": "For which project do you want to generate Storybook configuration?",
18
- "x-dropdown": "projects",
19
- "x-priority": "important"
20
- },
21
- "interactionTests": {
22
- "type": "boolean",
23
- "description": "Set up Storybook interaction tests.",
24
- "x-prompt": "Do you want to set up Storybook interaction tests?",
25
- "x-priority": "important",
26
- "alias": ["configureTestRunner"],
27
- "default": true
28
- },
29
- "generateStories": {
30
- "type": "boolean",
31
- "description": "Automatically generate `*.stories.ts` files for components declared in this project?",
32
- "x-prompt": "Automatically generate *.stories.ts files for components declared in this project?",
33
- "default": true,
34
- "x-priority": "important"
35
- },
36
- "configureStaticServe": {
37
- "type": "boolean",
38
- "description": "Specifies whether to configure a static file server target for serving storybook. Helpful for speeding up CI build/test times.",
39
- "x-prompt": "Configure a static file server for the storybook instance?",
40
- "default": true,
41
- "x-priority": "important"
42
- },
43
- "js": {
44
- "type": "boolean",
45
- "description": "Generate JavaScript story files rather than TypeScript story files.",
46
- "default": false
47
- },
48
- "tsConfiguration": {
49
- "type": "boolean",
50
- "description": "Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.",
51
- "default": true
52
- },
53
- "linter": {
54
- "description": "The tool to use for running lint checks.",
55
- "type": "string",
56
- "enum": ["eslint"],
57
- "default": "eslint"
58
- },
59
- "ignorePaths": {
60
- "type": "array",
61
- "description": "Paths to ignore when looking for components.",
62
- "items": {
63
- "type": "string",
64
- "description": "Path to ignore."
65
- },
66
- "default": [
67
- "*.stories.ts,*.stories.tsx,*.stories.js,*.stories.jsx,*.stories.mdx"
68
- ],
69
- "examples": [
70
- "apps/my-app/src/not-stories/**",
71
- "**/**/src/**/not-stories/**",
72
- "libs/my-lib/**/*.something.ts",
73
- "**/**/src/**/*.other.*",
74
- "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts"
75
- ]
76
- }
77
- },
78
- "required": ["project"],
79
- "examplesFile": "../../../docs/storybook-configuration-examples.md"
80
- }