Skip to content

Commit

Permalink
feat(react): remove exposed utils (#13079)
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 authored Nov 9, 2022
1 parent 40a2d65 commit efc1005
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 132 deletions.
26 changes: 13 additions & 13 deletions e2e/react/src/react.module-federation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import { stripIndents } from '@nrwl/devkit';
import {
checkFilesExist,
cleanupProject,
getSelectedPackageManager,
killPort,
newProject,
readProjectConfig,
runCLI,
runCLIAsync,
runCommand,
runCypressTests,
uniq,
updateFile,
} from '@nrwl/e2e/utils';
Expand Down Expand Up @@ -93,17 +92,18 @@ describe('React Module Federation', () => {
});
`
);

const e2eResults = runCLI(`e2e ${shell}-e2e --no-watch --verbose`);
expect(e2eResults).toContain('All specs passed!');
expect(
await killPorts([
readPort(shell),
readPort(remote1),
readPort(remote2),
readPort(remote3),
])
).toBeTruthy();
if (runCypressTests()) {
const e2eResults = runCLI(`e2e ${shell}-e2e --no-watch --verbose`);
expect(e2eResults).toContain('All specs passed!');
expect(
await killPorts([
readPort(shell),
readPort(remote1),
readPort(remote2),
readPort(remote3),
])
).toBeTruthy();
}
}, 500_000);

function readPort(appName: string): number {
Expand Down
3 changes: 1 addition & 2 deletions packages/react/module-federation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { withModuleFederation } from './src/module-federation/with-module-federation';
export * from './src/module-federation/models';
export * from './src/module-federation/webpack-utils';

export { withModuleFederation };

// Support for older generated code: `const withModuleFederation = require('@nrwl/react/module-federation')`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

/**
* @type {import('@nrwl/react/module-federation').ModuleFederationConfig}
* @type {import('@nrwl/devkit').ModuleFederationConfig}
**/
const moduleFederationConfig = {
name: '<%= projectName %>',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { withModuleFederation } = require('@nrwl/react/module-federation');
const baseConfig = require('./module-federation.config');

/**
* @type {import('@nrwl/react/module-federation').ModuleFederationConfig}
* @type {import('@nrwl/devkit').ModuleFederationConfig}
**/
const defaultConfig = {
...baseConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { withModuleFederation } = require('@nrwl/react/module-federation');
const baseConfig = require('./module-federation.config');

/**
* @type {import('@nrwl/react/module-federation').ModuleFederationConfig}
* @type {import('@nrwl/devkit').ModuleFederationConfig}
**/
const prodConfig = {
...baseConfig,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

/**
* @type {import('@nrwl/react/module-federation').ModuleFederationConfig}
* @type {import('@nrwl/devkit').ModuleFederationConfig}
**/
const moduleFederationConfig = {
name: '<%= projectName %>',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { withModuleFederation } = require('@nrwl/react/module-federation');
const baseConfig = require('./module-federation.config');

/**
* @type {import('@nrwl/react/module-federation').ModuleFederationConfig}
* @type {import('@nrwl/devkit').ModuleFederationConfig}
**/
const defaultConfig = {
...baseConfig,
Expand Down
112 changes: 0 additions & 112 deletions packages/react/src/module-federation/webpack-utils.ts

This file was deleted.

0 comments on commit efc1005

Please sign in to comment.