Skip to content

Commit e022435

Browse files
committed
chore(nx): Upgrade to Nx 18 - align angular package libs
1 parent 7ef8cf7 commit e022435

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* This script starts a local registry for e2e testing purposes.
3+
* It is meant to be called in jest's globalSetup.
4+
*/
5+
import { startLocalRegistry } from '@nx/js/plugins/jest/local-registry';
6+
import { execFileSync } from 'child_process';
7+
8+
export default async () => {
9+
// local registry target to run
10+
const localRegistryTarget =
11+
'@module-federation-plugin-duplicate/source:local-registry';
12+
// storage folder for the local registry
13+
const storage = './tmp/local-registry/storage';
14+
15+
global.stopLocalRegistry = await startLocalRegistry({
16+
localRegistryTarget,
17+
storage,
18+
verbose: false,
19+
});
20+
const nx = require.resolve('nx');
21+
execFileSync(
22+
nx,
23+
['run-many', '--targets', 'publish', '--ver', '0.0.0-e2e', '--tag', 'e2e'],
24+
{ env: process.env, stdio: 'inherit' }
25+
);
26+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* This script stops the local registry for e2e testing purposes.
3+
* It is meant to be called in jest's globalTeardown.
4+
*/
5+
6+
export default () => {
7+
if (global.stopLocalRegistry) {
8+
global.stopLocalRegistry();
9+
}
10+
};

0 commit comments

Comments
 (0)