From 49af691b24762ba91d72d24105593553f751e9b7 Mon Sep 17 00:00:00 2001 From: Nicholas Cunningham Date: Fri, 26 Apr 2024 02:31:11 -0600 Subject: [PATCH] fix(core): nxComponentTestingPreset should not expose bundler option (#23009) --- packages/angular/plugins/component-testing.ts | 4 ++-- packages/cypress/plugins/cypress-preset.ts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/angular/plugins/component-testing.ts b/packages/angular/plugins/component-testing.ts index 25c385d2b6a67..16e72c2780177 100644 --- a/packages/angular/plugins/component-testing.ts +++ b/packages/angular/plugins/component-testing.ts @@ -1,6 +1,6 @@ import { nxBaseCypressPreset, - NxComponentTestingOptions, + NxComponentTestingPresetOptions, } from '@nx/cypress/plugins/cypress-preset'; import { createExecutorContext, @@ -45,7 +45,7 @@ import { gte } from 'semver'; */ export function nxComponentTestingPreset( pathToConfig: string, - options?: NxComponentTestingOptions + options?: NxComponentTestingPresetOptions ) { if (global.NX_GRAPH_CREATION) { // this is only used by plugins, so we don't need the component testing diff --git a/packages/cypress/plugins/cypress-preset.ts b/packages/cypress/plugins/cypress-preset.ts index 640a7100c71b8..09ce7e5f8f87e 100644 --- a/packages/cypress/plugins/cypress-preset.ts +++ b/packages/cypress/plugins/cypress-preset.ts @@ -34,6 +34,11 @@ export interface NxComponentTestingOptions { compiler?: 'swc' | 'babel'; } +// The bundler is only used while generating the component testing configuration +// It cannot be changed after the configuration is generated +export interface NxComponentTestingPresetOptions + extends Omit {} + export function nxBaseCypressPreset( pathToConfig: string, options?: { testingType: 'component' | 'e2e' }