@module-federation/utilities 0.4.0 → 0.5.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,24 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ # [0.5.0](https://github.com/module-federation/nextjs-mf/compare/utils-0.4.1...utils-0.5.0) (2022-10-31)
6
+
7
+
8
+ ### Features
9
+
10
+ * **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)
11
+
12
+
13
+
14
+ ## [0.4.1](https://github.com/module-federation/nextjs-mf/compare/utils-0.4.0...utils-0.4.1) (2022-10-26)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * set peer dependencies ([#341](https://github.com/module-federation/nextjs-mf/issues/341)) ([fec9608](https://github.com/module-federation/nextjs-mf/commit/fec960813a4e3859a5fb24863bb55e463a2fdfa3))
20
+
21
+
22
+
5
23
  # [0.4.0](https://github.com/module-federation/nextjs-mf/compare/utils-0.3.4...utils-0.4.0) (2022-10-26)
6
24
 
7
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/utilities",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "type": "commonjs",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -8,16 +8,18 @@
8
8
  "registry": "https://registry.npmjs.org/"
9
9
  },
10
10
  "repository": "https://github.com/module-federation/nextjs-mf/tree/main/packages/utilities",
11
- "peerDependencies": {
12
- "react": "^12 || ^18",
13
- "next": "^11 || ^12 || ^13",
14
- "webpack": "^5.74.0",
15
- "tslib": "^2.3.0"
11
+ "optionalDependencies": {
12
+ "react": "^17 || ^18",
13
+ "next": "^12 || ^13"
16
14
  },
17
15
  "devDependencies": {
18
16
  "react": "18.2.0",
19
17
  "next": "13.0.0"
20
18
  },
21
19
  "typings": "./src/index.d.ts",
22
- "dependencies": {}
20
+ "dependencies": {},
21
+ "peerDependencies": {
22
+ "webpack": "^5.74.0",
23
+ "tslib": "^2.3.0"
24
+ }
23
25
  }
@@ -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,3 @@
1
1
  export * from './types';
2
2
  export * from './utils/common';
3
+ export * from './Logger';
package/src/index.js CHANGED
@@ -3,4 +3,5 @@ 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("./Logger"), exports);
6
7
  //# 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,mDAAyB"}