@module-federation/utilities 1.6.0 → 1.7.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,16 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ # [1.7.0](https://github.com/module-federation/nextjs-mf/compare/utils-1.6.0...utils-1.7.0) (2023-04-27)
6
+
7
+
8
+ ### Features
9
+
10
+ * add storybook addon that supports Module Federation remote containers ([#598](https://github.com/module-federation/nextjs-mf/issues/598)) ([7547b02](https://github.com/module-federation/nextjs-mf/commit/7547b02937fdef2831060d6a7bfd337d2cc3355c))
11
+ * release to npm with next tag to not ruine latest one ([#763](https://github.com/module-federation/nextjs-mf/issues/763)) ([f2d199b](https://github.com/module-federation/nextjs-mf/commit/f2d199b3b3fbbd428514b1ce1f139efc82f7fff0))
12
+
13
+
14
+
5
15
  # [1.6.0](https://github.com/module-federation/nextjs-mf/compare/utils-1.5.0...utils-1.6.0) (2023-04-19)
6
16
 
7
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/utilities",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "type": "commonjs",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export * from './types';
2
2
  export * from './utils/common';
3
3
  export * from './utils/isEmpty';
4
4
  export * from './utils/importRemote';
5
+ export * from './utils/correctImportPath';
5
6
  export * from './Logger';
package/src/index.js CHANGED
@@ -5,5 +5,6 @@ tslib_1.__exportStar(require("./types"), exports);
5
5
  tslib_1.__exportStar(require("./utils/common"), exports);
6
6
  tslib_1.__exportStar(require("./utils/isEmpty"), exports);
7
7
  tslib_1.__exportStar(require("./utils/importRemote"), exports);
8
+ tslib_1.__exportStar(require("./utils/correctImportPath"), exports);
8
9
  tslib_1.__exportStar(require("./Logger"), exports);
9
10
  //# 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;AAC/B,0DAAgC;AAChC,+DAAqC;AACrC,mDAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/utilities/src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,yDAA+B;AAC/B,0DAAgC;AAChC,+DAAqC;AACrC,oEAA0C;AAC1C,mDAAyB"}
@@ -0,0 +1 @@
1
+ export declare const correctImportPath: (context: string, entryFile: string) => string;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.correctImportPath = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var os_1 = tslib_1.__importDefault(require("os"));
6
+ var path_1 = tslib_1.__importDefault(require("path"));
7
+ var correctImportPath = function (context, entryFile) {
8
+ if (os_1.default.platform() !== 'win32') {
9
+ return entryFile;
10
+ }
11
+ if (entryFile.match(/^\.?\.\\/) || !entryFile.match(/^[A-Z]:\\\\/i)) {
12
+ return entryFile.replace(/\\/g, '/');
13
+ }
14
+ var joint = path_1.default.win32.relative(context, entryFile);
15
+ var relative = joint.replace(/\\/g, '/');
16
+ if (relative.includes('node_modules/')) {
17
+ return relative.split('node_modules/')[1];
18
+ }
19
+ return "./".concat(relative);
20
+ };
21
+ exports.correctImportPath = correctImportPath;
22
+ //# sourceMappingURL=correctImportPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"correctImportPath.js","sourceRoot":"","sources":["../../../../../packages/utilities/src/utils/correctImportPath.ts"],"names":[],"mappings":";;;;AAAA,kDAAoB;AACpB,sDAAwB;AAEjB,IAAM,iBAAiB,GAAG,UAAC,OAAe,EAAE,SAAiB;IAClE,IAAI,YAAE,CAAC,QAAQ,EAAE,KAAK,OAAO,EAAE;QAC7B,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE;QACnE,OAAO,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;KACtC;IAED,IAAM,KAAK,GAAG,cAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACtD,IAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAE3C,IAAI,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3C;IAED,OAAO,YAAK,QAAQ,CAAE,CAAC;AACzB,CAAC,CAAC;AAjBW,QAAA,iBAAiB,qBAiB5B"}