Skip to content

Commit 544607f

Browse files
committed
done
1 parent 6ea8f8e commit 544607f

File tree

14 files changed

+118
-174
lines changed

14 files changed

+118
-174
lines changed

libs/mf-tools/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@
33
"version": "17.0.0",
44
"license": "MIT",
55
"peerDependencies": {
6-
"@angular/common": ">=17.0.0",
7-
"@angular/core": ">=17.0.0",
8-
"@angular/router": ">=17.0.0",
9-
"@angular-architects/module-federation": "^17.0.0",
10-
"@angular/platform-browser": ">=17.0.0",
11-
"rxjs": ">= 6.0.0"
126
},
137
"dependencies": {
148
"tslib": "^2.0.0"
159
}
1610
}
11+

libs/native-federation-core/src/build.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export {
1414
} from './lib/core/build-adapter';
1515
export { withNativeFederation } from './lib/config/with-native-federation';
1616
export { buildForFederation } from './lib/core/build-for-federation';
17+
export { bundleExposedAndMappings } from './lib/core/bundle-exposed-and-mappings';
18+
1719
export {
1820
share,
1921
shareAll,
Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
11
import { MappedPath } from '../utils/mapped-paths';
2-
export type BuildKind =
3-
| 'shared-package'
4-
| 'shared-mapping'
5-
| 'exposed'
6-
| 'mapping-or-exposed';
2+
export type BuildKind = 'shared-package' | 'shared-mapping' | 'exposed' | 'mapping-or-exposed';
73
export interface EntryPoint {
8-
fileName: string;
9-
outName: string;
4+
fileName: string;
5+
outName: string;
106
}
117
export interface BuildAdapterOptions {
12-
entryPoints: EntryPoint[];
13-
tsConfigPath?: string;
14-
external: Array<string>;
15-
outdir: string;
16-
mappedPaths: MappedPath[];
17-
packageName?: string;
18-
esm?: boolean;
19-
dev?: boolean;
20-
watch?: boolean;
21-
kind: BuildKind;
22-
hash: boolean;
8+
entryPoints: EntryPoint[];
9+
tsConfigPath?: string;
10+
external: Array<string>;
11+
outdir: string;
12+
mappedPaths: MappedPath[];
13+
packageName?: string;
14+
esm?: boolean;
15+
dev?: boolean;
16+
watch?: boolean;
17+
kind: BuildKind;
18+
hash: boolean;
2319
}
2420
export interface BuildResult {
25-
fileName: string;
21+
fileName: string;
2622
}
27-
export type BuildAdapter = (
28-
options: BuildAdapterOptions
29-
) => Promise<BuildResult[]>;
23+
export type BuildAdapter = (options: BuildAdapterOptions) => Promise<BuildResult[]>;
3024
export declare function setBuildAdapter(buildAdapter: BuildAdapter): void;
3125
export declare function getBuildAdapter(): BuildAdapter;

libs/native-federation-core/src/lib/core/build-adapter.js

Lines changed: 9 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { LogLevels } from 'npmlog';
22
export declare const logger: {
3-
error: (msg: any) => void;
4-
warn: (msg: any) => void;
5-
notice: (msg: any) => void;
6-
info: (msg: any) => void;
7-
verbose: (msg: any) => void;
8-
debug: (msg: any) => void;
3+
error: (msg: any) => void;
4+
warn: (msg: any) => void;
5+
notice: (msg: any) => void;
6+
info: (msg: any) => void;
7+
verbose: (msg: any) => void;
8+
debug: (msg: any) => void;
99
};
1010
export declare const setLogLevel: (level: LogLevels | 'debug') => void;

libs/native-federation-core/src/lib/utils/logger.js

Lines changed: 18 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
export interface MappedPath {
2-
key: string;
3-
path: string;
2+
key: string;
3+
path: string;
44
}
55
export interface GetMappedPathsOptions {
6-
rootTsConfigPath: string;
7-
sharedMappings?: string[];
8-
rootPath?: string;
6+
rootTsConfigPath: string;
7+
sharedMappings?: string[];
8+
rootPath?: string;
99
}
10-
export declare function getMappedPaths({
11-
rootTsConfigPath,
12-
sharedMappings,
13-
rootPath,
14-
}: GetMappedPathsOptions): Array<MappedPath>;
10+
export declare function getMappedPaths({ rootTsConfigPath, sharedMappings, rootPath, }: GetMappedPathsOptions): Array<MappedPath>;

libs/native-federation-core/src/lib/utils/mapped-paths.js

Lines changed: 34 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/native-federation/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,18 @@ We will at least provide a new version of this package per Angular major. If nec
2222

2323
- Use version 16.1.x for Angular 16.1.x
2424
- Use version 16.2.x for Angular 16.2.x
25-
26-
We expect the APIs to stabilize so that we only need one major per Angular major in the future.
27-
25+
- Use version 17.x for Angular 17.x
26+
2827
## Credits
2928

3029
Big thanks to:
3130

32-
- [Zack [Jackson](https://twitter.com/ScriptedAlchemy) for initially coming up with the great idea of Module Federation and its successful mental model
31+
- [Zack Jackson](https://twitter.com/ScriptedAlchemy) for initially coming up with the great idea of Module Federation and its successful mental model
3332
- [Tobias Koppers](https://twitter.com/wSokra) for helping to make Module Federation a first class citizen of webpack
34-
- [Florian [Rappl](https://twitter.com/FlorianRappl) for a good discussion about these topics during a speakers dinner in Nuremberg
33+
- [Florian Rappl](https://twitter.com/FlorianRappl) for a good discussion about these topics during a speakers dinner in Nuremberg
3534
- [The Nx Team](https://twitter.com/NxDevTools), esp. [Colum Ferry](https://twitter.com/FerryColum), who seamlessly integrated webpack Module Federation into Nx and hence helped to spread the word about it (Nx + Module Federation === ❤️)
3635
- [Michael Egger-Zikes](https://twitter.com/MikeZks) for contributing to our Module Federation efforts and brining in valuable feedback
37-
- The Angular CLI-Team, esp. [Alan Agius](https://twitter.com/AlanAgius4) and [Charles Lyding](https://twitter.com/charleslyding), for their fantastic work on the esbuild builder for Angular
36+
- The Angular CLI-Team, esp. [Alan Agius](https://twitter.com/AlanAgius4) and Charles Lyding, for their fantastic work on the esbuild builder for Angular
3837

3938
## Example 🛠️
4039

libs/native-federation/package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-architects/native-federation",
3-
"version": "16.3.4",
3+
"version": "17.0.0",
44
"main": "src/index.js",
55
"generators": "./collection.json",
66
"builders": "./builders.json",
@@ -20,17 +20,11 @@
2020
"@softarc/native-federation-runtime": "2.0.4",
2121
"@types/browser-sync": "^2.26.3",
2222
"browser-sync": "^2.29.3",
23-
"esbuild": "^0.18.12",
23+
"esbuild": "^0.19.5",
2424
"mrmime": "^1.0.1",
2525
"npmlog": "^6.0.2",
2626
"process": "0.11.10"
2727
},
2828
"peerDependencies": {
29-
"rxjs": ">=7.0.0",
30-
"@angular-devkit/architect": ">=0.1601.7",
31-
"@angular-devkit/core": ">=16.0.0",
32-
"@angular-devkit/schematics": ">=16.0.0",
33-
"@angular-devkit/build-angular": ">=16.0.0",
34-
"@angular/compiler-cli": ">=16.0.0"
3529
}
3630
}

0 commit comments

Comments
 (0)