@nx/web 21.0.0-beta.3 → 21.0.0-beta.5

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/web",
3
- "version": "21.0.0-beta.3",
3
+ "version": "21.0.0-beta.5",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Playwright, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "http-server": "^14.1.0",
36
36
  "picocolors": "^1.1.0",
37
37
  "tslib": "^2.3.0",
38
- "@nx/devkit": "21.0.0-beta.3",
39
- "@nx/js": "21.0.0-beta.3"
38
+ "@nx/devkit": "21.0.0-beta.5",
39
+ "@nx/js": "21.0.0-beta.5"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
@@ -14,7 +14,6 @@ const has_webpack_plugin_1 = require("../../utils/has-webpack-plugin");
14
14
  const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
15
15
  const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
16
16
  const static_serve_configuration_1 = require("../static-serve/static-serve-configuration");
17
- const find_plugin_for_config_file_1 = require("@nx/devkit/src/utils/find-plugin-for-config-file");
18
17
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
19
18
  function createApplicationFiles(tree, options) {
20
19
  const rootTsConfigPath = (0, js_1.getRelativePathToRootTsConfig)(tree, options.appProjectRoot);
@@ -342,30 +341,13 @@ async function applicationGeneratorInternal(host, schema) {
342
341
  baseUrl: e2eWebServerInfo.e2eWebServerAddress,
343
342
  directory: 'src',
344
343
  skipFormat: true,
345
- webServerCommands: hasPlugin
346
- ? {
347
- default: e2eWebServerInfo.e2eWebServerCommand,
348
- production: e2eWebServerInfo.e2eCiWebServerCommand,
349
- }
350
- : undefined,
351
- ciWebServerCommand: hasPlugin
352
- ? e2eWebServerInfo.e2eCiWebServerCommand
353
- : undefined,
344
+ webServerCommands: {
345
+ default: e2eWebServerInfo.e2eWebServerCommand,
346
+ production: e2eWebServerInfo.e2eCiWebServerCommand,
347
+ },
348
+ ciWebServerCommand: e2eWebServerInfo.e2eCiWebServerCommand,
354
349
  ciBaseUrl: e2eWebServerInfo.e2eCiBaseUrl,
355
350
  });
356
- if (options.addPlugin ||
357
- (0, devkit_1.readNxJson)(host).plugins?.find((p) => typeof p === 'string'
358
- ? p === '@nx/cypress/plugin'
359
- : p.plugin === '@nx/cypress/plugin')) {
360
- let buildTarget = '^build';
361
- if (hasPlugin) {
362
- const matchingPlugin = await (0, find_plugin_for_config_file_1.findPluginForConfigFile)(host, buildPlugin, (0, devkit_1.joinPathFragments)(options.appProjectRoot, buildConfigFile));
363
- if (matchingPlugin && typeof matchingPlugin !== 'string') {
364
- buildTarget = `^${matchingPlugin.options?.buildTargetName ?? 'build'}`;
365
- }
366
- }
367
- await (0, target_defaults_utils_1.addE2eCiTargetDefaults)(host, '@nx/cypress/plugin', buildTarget, (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, `cypress.config.ts`));
368
- }
369
351
  tasks.push(cypressTask);
370
352
  }
371
353
  else if (options.e2eTestRunner === 'playwright') {
@@ -405,19 +387,6 @@ async function applicationGeneratorInternal(host, schema) {
405
387
  webServerAddress: e2eWebServerInfo.e2eCiBaseUrl,
406
388
  addPlugin: options.addPlugin,
407
389
  });
408
- if (options.addPlugin ||
409
- (0, devkit_1.readNxJson)(host).plugins?.find((p) => typeof p === 'string'
410
- ? p === '@nx/playwright/plugin'
411
- : p.plugin === '@nx/playwright/plugin')) {
412
- let buildTarget = '^build';
413
- if (hasPlugin) {
414
- const matchingPlugin = await (0, find_plugin_for_config_file_1.findPluginForConfigFile)(host, buildPlugin, (0, devkit_1.joinPathFragments)(options.appProjectRoot, buildConfigFile));
415
- if (matchingPlugin && typeof matchingPlugin !== 'string') {
416
- buildTarget = `^${matchingPlugin.options?.buildTargetName ?? 'build'}`;
417
- }
418
- }
419
- await (0, target_defaults_utils_1.addE2eCiTargetDefaults)(host, '@nx/playwright/plugin', buildTarget, (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, `playwright.config.ts`));
420
- }
421
390
  tasks.push(playwrightTask);
422
391
  }
423
392
  if (options.unitTestRunner === 'jest') {