@nx/remix 18.1.0-beta.2 → 18.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/remix",
3
- "version": "18.1.0-beta.2",
3
+ "version": "18.1.0-beta.3",
4
4
  "description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,12 +28,12 @@
28
28
  "migrations": "./migrations.json"
29
29
  },
30
30
  "dependencies": {
31
- "@nx/devkit": "18.1.0-beta.2",
32
- "@nx/js": "18.1.0-beta.2",
33
- "@nx/react": "18.1.0-beta.2",
31
+ "@nx/devkit": "18.1.0-beta.3",
32
+ "@nx/js": "18.1.0-beta.3",
33
+ "@nx/react": "18.1.0-beta.3",
34
34
  "tslib": "^2.3.1",
35
35
  "@phenomnomnominal/tsquery": "~5.0.1",
36
- "@nrwl/remix": "18.1.0-beta.2"
36
+ "@nrwl/remix": "18.1.0-beta.3"
37
37
  },
38
38
  "peerDependencies": {},
39
39
  "publishConfig": {
@@ -42,6 +42,7 @@
42
42
  "exports": {
43
43
  ".": "./index.js",
44
44
  "./plugin": "./plugin.js",
45
+ "./plugins/component-testing": "./plugins/component-testing/index.js",
45
46
  "./package.json": "./package.json",
46
47
  "./executors.json": "./executors.json",
47
48
  "./generators.json": "./generators.json",
@@ -151,7 +151,11 @@ import { defineConfig } from 'cypress';
151
151
 
152
152
  export default defineConfig({
153
153
  e2e: {
154
- ...nxE2EPreset(__filename, { cypressDir: 'src' }),
154
+ ...nxE2EPreset(__filename, {
155
+ cypressDir: 'src',
156
+ webServerCommands: { default: 'nx run test:serve:development' },
157
+ ciWebServerCommand: 'nx run test:serve-static',
158
+ }),
155
159
  baseUrl: 'http://localhost:4200',
156
160
  },
157
161
  });
@@ -661,7 +665,11 @@ import { defineConfig } from 'cypress';
661
665
 
662
666
  export default defineConfig({
663
667
  e2e: {
664
- ...nxE2EPreset(__filename, { cypressDir: 'src' }),
668
+ ...nxE2EPreset(__filename, {
669
+ cypressDir: 'src',
670
+ webServerCommands: { default: 'nx run test:serve:development' },
671
+ ciWebServerCommand: 'nx run test:serve-static',
672
+ }),
665
673
  baseUrl: 'http://localhost:4200',
666
674
  },
667
675
  });
@@ -1027,7 +1035,11 @@ import { defineConfig } from 'cypress';
1027
1035
 
1028
1036
  export default defineConfig({
1029
1037
  e2e: {
1030
- ...nxE2EPreset(__filename, { cypressDir: 'src' }),
1038
+ ...nxE2EPreset(__filename, {
1039
+ cypressDir: 'src',
1040
+ webServerCommands: { default: 'nx run test:serve:development' },
1041
+ ciWebServerCommand: 'nx run test:serve-static',
1042
+ }),
1031
1043
  baseUrl: 'http://localhost:4200',
1032
1044
  },
1033
1045
  });
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = void 0;
4
+ const devkit_1 = require("@nx/devkit");
4
5
  const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
5
6
  const eslint_1 = require("@nx/eslint");
6
7
  async function normalizeOptions(tree, options) {
@@ -14,7 +15,10 @@ async function normalizeOptions(tree, options) {
14
15
  });
15
16
  options.rootProject = projectRoot === '.';
16
17
  options.projectNameAndRootFormat = projectNameAndRootFormat;
17
- options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
18
+ const nxJson = (0, devkit_1.readNxJson)(tree);
19
+ const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
20
+ nxJson.useInferencePlugins !== false;
21
+ options.addPlugin ??= addPluginDefault;
18
22
  const e2eProjectName = options.rootProject ? 'e2e' : `${projectName}-e2e`;
19
23
  const e2eProjectRoot = options.rootProject ? 'e2e' : `${projectRoot}-e2e`;
20
24
  const parsedTags = options.tags
@@ -12,7 +12,10 @@ function cypressComponentConfigurationGenerator(tree, options) {
12
12
  }
13
13
  exports.cypressComponentConfigurationGenerator = cypressComponentConfigurationGenerator;
14
14
  async function cypressComponentConfigurationGeneratorInternal(tree, options) {
15
- options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
15
+ const nxJson = (0, devkit_1.readNxJson)(tree);
16
+ const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
17
+ nxJson.useInferencePlugins !== false;
18
+ options.addPlugin ??= addPluginDefault;
16
19
  await (0, react_1.cypressComponentConfigGenerator)(tree, {
17
20
  project: options.project,
18
21
  generateTests: options.generateTests,
@@ -41,7 +41,10 @@ async function remixInitGeneratorInternal(tree, options) {
41
41
  }, undefined, options.keepExistingVersions);
42
42
  tasks.push(installTask);
43
43
  }
44
- options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
44
+ const nxJson = (0, devkit_1.readNxJson)(tree);
45
+ const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
46
+ nxJson.useInferencePlugins !== false;
47
+ options.addPlugin ??= addPluginDefault;
45
48
  if (options.addPlugin) {
46
49
  addPlugin(tree);
47
50
  }
@@ -1,4 +1,4 @@
1
- import type { Tree } from '@nx/devkit';
1
+ import { type Tree } from '@nx/devkit';
2
2
  import type { NxRemixGeneratorSchema } from '../schema';
3
3
  export interface RemixLibraryOptions extends NxRemixGeneratorSchema {
4
4
  projectName: string;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = void 0;
4
+ const devkit_1 = require("@nx/devkit");
4
5
  const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
5
6
  const get_import_path_1 = require("@nx/js/src/utils/get-import-path");
6
7
  async function normalizeOptions(tree, options) {
@@ -11,7 +12,10 @@ async function normalizeOptions(tree, options) {
11
12
  projectNameAndRootFormat: options.projectNameAndRootFormat,
12
13
  callingGenerator: '@nx/remix:library',
13
14
  });
14
- options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
15
+ const nxJson = (0, devkit_1.readNxJson)(tree);
16
+ const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
17
+ nxJson.useInferencePlugins !== false;
18
+ options.addPlugin ??= addPluginDefault;
15
19
  const importPath = options.importPath ?? (0, get_import_path_1.getImportPath)(tree, projectRoot);
16
20
  return {
17
21
  ...options,
@@ -19,6 +23,7 @@ async function normalizeOptions(tree, options) {
19
23
  importPath,
20
24
  projectName,
21
25
  projectRoot,
26
+ projectNameAndRootFormat,
22
27
  };
23
28
  }
24
29
  exports.normalizeOptions = normalizeOptions;
@@ -10,6 +10,9 @@ async function default_1(tree, _options) {
10
10
  const tasks = [];
11
11
  const setupGenTask = await (0, setup_impl_1.default)(tree);
12
12
  tasks.push(setupGenTask);
13
+ const nxJson = (0, devkit_1.readNxJson)(tree);
14
+ const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
15
+ nxJson.useInferencePlugins !== false;
13
16
  const appGenTask = await (0, application_impl_1.default)(tree, {
14
17
  name: options.appName,
15
18
  tags: options.tags,
@@ -18,7 +21,7 @@ async function default_1(tree, _options) {
18
21
  unitTestRunner: options.unitTestRunner ?? 'vitest',
19
22
  e2eTestRunner: options.e2eTestRunner ?? 'cypress',
20
23
  js: options.js ?? false,
21
- addPlugin: process.env.NX_ADD_PLUGINS !== 'false',
24
+ addPlugin: addPluginDefault,
22
25
  });
23
26
  tasks.push(appGenTask);
24
27
  tree.delete('apps');
@@ -12,7 +12,10 @@ function remixStorybookConfiguration(tree, schema) {
12
12
  }
13
13
  exports.remixStorybookConfiguration = remixStorybookConfiguration;
14
14
  async function remixStorybookConfigurationInternal(tree, schema) {
15
- schema.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
15
+ const nxJson = (0, devkit_1.readNxJson)(tree);
16
+ const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
17
+ nxJson.useInferencePlugins !== false;
18
+ schema.addPlugin ??= addPluginDefault;
16
19
  const { root } = (0, devkit_1.readProjectConfiguration)(tree, schema.project);
17
20
  if (!tree.exists((0, devkit_1.joinPathFragments)(root, 'vite.config.ts'))) {
18
21
  (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files'), root, { tpl: '' });