@module-federation/utilities 0.4.1 → 1.0.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 CHANGED
@@ -2,6 +2,37 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ # [1.0.0](https://github.com/module-federation/nextjs-mf/compare/utils-0.5.0...utils-1.0.0) (2022-11-20)
6
+
7
+
8
+ ### Features
9
+
10
+ * **typescript:** excessive recompilation prevention ([#306](https://github.com/module-federation/nextjs-mf/issues/306)) ([6e1967f](https://github.com/module-federation/nextjs-mf/commit/6e1967f019afb25dfbcfe83627b08ae8b1fe97b2))
11
+
12
+
13
+ ### BREAKING CHANGES
14
+
15
+ * **typescript:** Reimplemented the whole plugin from round-up to enhance performance, prevent excessive recompilation and other issues.
16
+
17
+ Some key changes to the plugin includes:
18
+
19
+ - Downloading remote types before compilation starts.
20
+ - Caching remote types for better performance.
21
+ - Ability to provide Plugin options.
22
+
23
+ Please go through plugin `readme.md` file to understand what's changed and how to use the plugin.
24
+
25
+
26
+
27
+ # [0.5.0](https://github.com/module-federation/nextjs-mf/compare/utils-0.4.1...utils-0.5.0) (2022-10-31)
28
+
29
+
30
+ ### Features
31
+
32
+ * **utils:** configurable logger using webpack infrastructure logger ([#355](https://github.com/module-federation/nextjs-mf/issues/355)) ([d6ffcd0](https://github.com/module-federation/nextjs-mf/commit/d6ffcd0de1662c410f33a7742db1fd02aba24aef)), closes [#243](https://github.com/module-federation/nextjs-mf/issues/243)
33
+
34
+
35
+
5
36
  ## [0.4.1](https://github.com/module-federation/nextjs-mf/compare/utils-0.4.0...utils-0.4.1) (2022-10-26)
6
37
 
7
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/utilities",
3
- "version": "0.4.1",
3
+ "version": "1.0.0",
4
4
  "type": "commonjs",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -0,0 +1,7 @@
1
+ import { Compilation } from 'webpack';
2
+ export declare type LoggerInstance = Compilation['logger'] | Console;
3
+ export declare class Logger {
4
+ private static loggerInstance;
5
+ static getLogger(): LoggerInstance;
6
+ static setLogger(logger: Compilation['logger']): LoggerInstance;
7
+ }
package/src/Logger.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Logger = void 0;
4
+ var Logger = /** @class */ (function () {
5
+ function Logger() {
6
+ }
7
+ Logger.getLogger = function () {
8
+ return this.loggerInstance;
9
+ };
10
+ Logger.setLogger = function (logger) {
11
+ this.loggerInstance = logger || console;
12
+ return logger;
13
+ };
14
+ Logger.loggerInstance = console;
15
+ return Logger;
16
+ }());
17
+ exports.Logger = Logger;
18
+ //# sourceMappingURL=Logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../../../packages/utilities/src/Logger.ts"],"names":[],"mappings":";;;AAIA;IAAA;IAWA,CAAC;IARQ,gBAAS,GAAhB;QACE,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,gBAAS,GAAhB,UAAiB,MAA6B;QAC5C,IAAI,CAAC,cAAc,GAAG,MAAM,IAAI,OAAO,CAAC;QACxC,OAAO,MAAM,CAAC;IAChB,CAAC;IATc,qBAAc,GAAmB,OAAO,CAAC;IAU1D,aAAC;CAAA,AAXD,IAWC;AAXY,wBAAM"}
package/src/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export * from './types';
2
2
  export * from './utils/common';
3
+ export * from './utils/isEmpty';
4
+ export * from './Logger';
package/src/index.js CHANGED
@@ -3,4 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./types"), exports);
5
5
  tslib_1.__exportStar(require("./utils/common"), exports);
6
+ tslib_1.__exportStar(require("./utils/isEmpty"), exports);
7
+ tslib_1.__exportStar(require("./Logger"), exports);
6
8
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/utilities/src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,yDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/utilities/src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,yDAA+B;AAC/B,0DAAgC;AAChC,mDAAyB"}
@@ -0,0 +1 @@
1
+ export declare const isObjectEmpty: <T extends object>(obj: T) => boolean;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isObjectEmpty = void 0;
4
+ var isObjectEmpty = function (obj) {
5
+ for (var x in obj) {
6
+ return false;
7
+ }
8
+ return true;
9
+ };
10
+ exports.isObjectEmpty = isObjectEmpty;
11
+ //# sourceMappingURL=isEmpty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isEmpty.js","sourceRoot":"","sources":["../../../../../packages/utilities/src/utils/isEmpty.ts"],"names":[],"mappings":";;;AAAO,IAAM,aAAa,GAAG,UAAmB,GAAM;IACpD,KAAK,IAAM,CAAC,IAAI,GAAG,EAAE;QACnB,OAAO,KAAK,CAAC;KACd;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AALW,QAAA,aAAa,iBAKxB"}