Skip to content

Commit 519b062

Browse files
committed
docs(nf): remove infos about transient flag from readme and share-faq
1 parent 3cd0263 commit 519b062

File tree

7 files changed

+11
-71
lines changed

7 files changed

+11
-71
lines changed

libs/native-federation-core/src/lib/config/share-utils.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,8 @@ function findTransientDeps(
385385
logger.warn(
386386
'is deprecated. Please remove it. Meanwhile, Native Federation'
387387
);
388-
logger.warn(
389-
'uses the underlying bundler for splitting transient'
390-
);
391-
logger.warn(
392-
'dependencies into separate chunks, _when_ necessary.'
393-
)
388+
logger.warn('uses the underlying bundler for splitting transient');
389+
logger.warn('dependencies into separate chunks, _when_ necessary.');
394390
const packagePath = path.join(
395391
projectRoot,
396392
'node_modules',

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

Lines changed: 0 additions & 19 deletions
This file was deleted.

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

Lines changed: 0 additions & 1 deletion
This file was deleted.

libs/native-federation-core/src/lib/core/bundle-shared.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,14 @@ function addChunksToResult(
249249
result.push({
250250
singleton: false,
251251
strictVersion: false,
252+
// Here, the version does not matter because
253+
// a) a chunk split off by the bundler does
254+
// not have a version and b) it gets a hash
255+
// code as part of the file name to be unique
256+
// when requested via a _versioned_ package.
257+
//
258+
// For the same reason, we don't need to
259+
// take care of singleton and strictVersion.
252260
requiredVersion: '0.0.0',
253261
version: '0.0.0',
254262
packageName: fileName,

libs/native-federation/README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -391,28 +391,6 @@ For this, there are several reasons:
391391

392392
The good message is, that the official Angular Package Format defines the usage of ECMA Script Modules (ESM) for years. This is the future-proof standard, Native Federation is built upon and all npm packages created with the Angular CLI follow. If you use older CommonJS-based packages, Native Federation automatically converts them to ESM. Depending on the package, this might change some details. Here, you find some [information for dealing with CommonJS packages](https://shorturl.at/jmzH0).
393393

394-
### How to Deal with Transitive Dependencies?
395-
396-
Since version >=18.2.7, transitive dependencies can also be shared. For instance, `primeng` uses a lib `@primeuix/styled` for theming. The latter one is now shared too if `primeng` is. This prevents possible challenges but also results in more bundles.
397-
398-
To activate sharing transient dependencies, set the new `transient` flag provided by `share` and `shareAll` to `true`:
399-
400-
```js
401-
module.exports = withNativeFederation({
402-
shared: {
403-
...shareAll({
404-
singleton: true,
405-
strictVersion: true,
406-
requiredVersion: 'auto',
407-
transient: true
408-
}),
409-
},
410-
[...]
411-
});
412-
```
413-
414-
The `skip` list will also be used for filtering transient dependencies. Hence, you can combine it with `shareAll` and `transient: true`.
415-
416394
### How to Manually Define a Package's Entry Point?
417395

418396
Usually, Native Federation automatically detects entry points in shared packages. If the packages neither align with the official standard nor with typical conventions beyond these standards, you can also directly provide the entry point:

libs/native-federation/docs/share-faq.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -68,28 +68,6 @@ skip: [
6868

6969
Please note, that a provided string is fully compared (not with startsWith semantic). Hence, in this example shown, `this-package` is excluded but not secondary entry points like `this-package/interop`.
7070

71-
## Transitive Dependencies
72-
73-
Since version 18@latest, also transitive dependencies can be shared. For instance, `primeng` uses a lib `@primeuix/styled` for theming. The latter one is now shared too if `primeng` is. This prevents possible challanges but also results in more bundles.
74-
75-
To activate sharing transient dependencies, set the new `transient` flag provided by `share` and `shareAll` to `true`:
76-
77-
```js
78-
module.exports = withNativeFederation({
79-
shared: {
80-
...shareAll({
81-
singleton: true,
82-
strictVersion: true,
83-
requiredVersion: 'auto',
84-
transient: true
85-
}),
86-
},
87-
[...]
88-
});
89-
```
90-
91-
The `skip` list will also be used for filtering transient dependencies. Hence, you can combine it with `shareAll` and `transient: true`.
92-
9371
## Manually Providing a Package's Entry Point
9472

9573
Usually, Native Federation automatically detects entry points into shared packages. If the packages neither align with the official standard nor with typical conventions beyond these standards, you can also directly provide the entry point:

libs/native-federation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-architects/native-federation",
3-
"version": "19.0.19",
3+
"version": "19.0.20",
44
"main": "src/index.js",
55
"generators": "./collection.json",
66
"builders": "./builders.json",

0 commit comments

Comments
 (0)