@module-federation/nextjs-mf 5.7.8 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/package.json +2 -2
- package/utils/index.d.ts +8 -5
- package/utils/index.js +14 -21
- package/utils/index.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
# [5.8.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.7.0...nextjs-mf-5.8.0) (2022-10-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* improve handling of offline remotes ([3ae596e](https://github.com/module-federation/nextjs-mf/commit/3ae596ee82d2ccf0d828d7928cbdc4fbec509d55))
|
|
11
|
+
* patch share scope on client server ([fc7f82f](https://github.com/module-federation/nextjs-mf/commit/fc7f82fd1f299a078552ce811d074b816e796109))
|
|
12
|
+
* patch share scope on client server ([b4461fd](https://github.com/module-federation/nextjs-mf/commit/b4461fdbe6999390cbf4b57c18c537563cf04cc9))
|
|
13
|
+
* patch share scope on client server ([31b4c24](https://github.com/module-federation/nextjs-mf/commit/31b4c24112e27630b588410d9d78e89acc579d26))
|
|
14
|
+
* patch share scope on client server ([272c110](https://github.com/module-federation/nextjs-mf/commit/272c110a9cd3a194d2fdeaf1d620b14b29330b30))
|
|
15
|
+
* **update versions:** bumping versions ([f72209a](https://github.com/module-federation/nextjs-mf/commit/f72209ae070fb50c9d317e764caf872facd4b887))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## [5.7.1](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.7.0...nextjs-mf-5.7.1) (2022-10-05)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* improve handling of offline remotes ([3ae596e](https://github.com/module-federation/nextjs-mf/commit/3ae596ee82d2ccf0d828d7928cbdc4fbec509d55))
|
|
25
|
+
* patch share scope on client server ([fc7f82f](https://github.com/module-federation/nextjs-mf/commit/fc7f82fd1f299a078552ce811d074b816e796109))
|
|
26
|
+
* patch share scope on client server ([b4461fd](https://github.com/module-federation/nextjs-mf/commit/b4461fdbe6999390cbf4b57c18c537563cf04cc9))
|
|
27
|
+
* patch share scope on client server ([31b4c24](https://github.com/module-federation/nextjs-mf/commit/31b4c24112e27630b588410d9d78e89acc579d26))
|
|
28
|
+
* patch share scope on client server ([272c110](https://github.com/module-federation/nextjs-mf/commit/272c110a9cd3a194d2fdeaf1d620b14b29330b30))
|
|
29
|
+
* **update versions:** bumping versions ([f72209a](https://github.com/module-federation/nextjs-mf/commit/f72209ae070fb50c9d317e764caf872facd4b887))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
5
33
|
## [5.7.1](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.7.0...nextjs-mf-5.7.1) (2022-10-04)
|
|
6
34
|
|
|
7
35
|
### Dependency Updates
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/nextjs-mf",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"fast-glob": "^3.2.11",
|
|
17
17
|
"webpack-sources": "^3.2.3",
|
|
18
18
|
"eventemitter3": "^4.0.7",
|
|
19
|
-
"@module-federation/node": "0.
|
|
19
|
+
"@module-federation/node": "0.5.0",
|
|
20
20
|
"@module-federation/utilities": "0.0.4",
|
|
21
21
|
"@swc/core": "^1.3.3",
|
|
22
22
|
"tslib": "^2.3.0"
|
package/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export { extractUrlAndGlobal, injectScript } from '@module-federation/utilities';
|
|
2
2
|
export { flushChunks } from '@module-federation/node/utils';
|
|
3
3
|
export declare const revalidate: () => Promise<any>;
|
|
4
|
-
export declare const
|
|
5
|
-
chunks:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
export declare const FlushedChunks: {
|
|
5
|
+
({ chunks }: {
|
|
6
|
+
chunks: any;
|
|
7
|
+
}): any;
|
|
8
|
+
defaultProps: {
|
|
9
|
+
chunks: never[];
|
|
10
|
+
};
|
|
11
|
+
};
|
package/utils/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FlushedChunks = exports.revalidate = exports.flushChunks = exports.injectScript = exports.extractUrlAndGlobal = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const head_1 = tslib_1.__importDefault(require("next/head"));
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
7
6
|
var utilities_1 = require("@module-federation/utilities");
|
|
8
7
|
Object.defineProperty(exports, "extractUrlAndGlobal", { enumerable: true, get: function () { return utilities_1.extractUrlAndGlobal; } });
|
|
9
8
|
Object.defineProperty(exports, "injectScript", { enumerable: true, get: function () { return utilities_1.injectScript; } });
|
|
@@ -21,23 +20,17 @@ const revalidate = () => {
|
|
|
21
20
|
});
|
|
22
21
|
};
|
|
23
22
|
exports.revalidate = revalidate;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
href: chunk,
|
|
37
|
-
rel: "stylesheet"
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
return /*#__PURE__*/ (0, react_1.createElement)(head_1.default, null, scripts, css);
|
|
23
|
+
//@ts-ignore
|
|
24
|
+
const FlushedChunks = ({ chunks }) => {
|
|
25
|
+
//@ts-ignore
|
|
26
|
+
const scripts = chunks.filter((c) => c.endsWith(".js")).map((chunk) => /*#__PURE__*/ React.createElement("script", {
|
|
27
|
+
src: chunk,
|
|
28
|
+
async: true
|
|
29
|
+
}, null));
|
|
30
|
+
return scripts;
|
|
31
|
+
};
|
|
32
|
+
exports.FlushedChunks = FlushedChunks;
|
|
33
|
+
exports.FlushedChunks.defaultProps = {
|
|
34
|
+
chunks: []
|
|
41
35
|
};
|
|
42
|
-
exports.FlushedChunksHead = FlushedChunksHead;
|
|
43
36
|
//# sourceMappingURL=index.js.map
|
package/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/utils/index.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/utils/index.ts"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,0DAAiF;AAAxE,gHAAA,mBAAmB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC1C,aAAa;AACb,uDAA0D;AAAlD,oGAAA,WAAW,OAAA;AAEZ,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,IAAG,OAAO,MAAM,KAAK,WAAW,EAAE;QAChC,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAC9D,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAC/B;IACD,aAAa;IACb,OAAO,0DAAO,+BAA+B,IAAE,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5D,OAAO,KAAK,CAAC,UAAU,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AATY,QAAA,UAAU,cAStB;AAED,YAAY;AACL,MAAM,aAAa,GAAG,CAAC,EAAE,MAAM,EAAE,EAAC,EAAE;IACzC,YAAY;IACZ,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAC,EAAE,CAAA,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAC,EAAE,CAAA,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE;QAC7G,GAAG,EAAE,KAAK;QACV,KAAK,EAAE,IAAI;KACZ,EAAE,IAAI,CAAC,CAAC,CAAC;IACV,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAPW,QAAA,aAAa,iBAOxB;AACF,qBAAa,CAAC,YAAY,GAAG;IAC3B,MAAM,EAAE,EAAE;CACX,CAAC"}
|