@module-federation/dts-plugin 0.16.0 → 0.17.1

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/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @module-federation/dts-plugin
2
2
 
3
+ ## 0.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - a7cf276: chore: upgrade NX to 21.2.3, Storybook to 9.0.9, and TypeScript to 5.8.3
8
+
9
+ - Upgraded NX from 21.0.3 to 21.2.3 with workspace configuration updates
10
+ - Migrated Storybook from 8.3.5 to 9.0.9 with updated configurations and automigrations
11
+ - Upgraded TypeScript from 5.7.3 to 5.8.3 with compatibility fixes
12
+ - Fixed package exports and type declaration paths across all packages
13
+ - Resolved module resolution issues and TypeScript compatibility problems
14
+ - Updated build configurations and dependencies to support latest versions
15
+
16
+ - Updated dependencies [7000c1f]
17
+ - Updated dependencies [2428be0]
18
+ - Updated dependencies [a7cf276]
19
+ - Updated dependencies [d31a326]
20
+ - @module-federation/managers@0.17.1
21
+ - @module-federation/error-codes@0.17.1
22
+ - @module-federation/sdk@0.17.1
23
+ - @module-federation/third-party-dts-extractor@0.17.1
24
+
25
+ ## 0.17.0
26
+
27
+ ### Patch Changes
28
+
29
+ - 1d691ef: fix(dts-plugin): add expose file imported files to tsconfig files
30
+ - @module-federation/sdk@0.17.0
31
+ - @module-federation/managers@0.17.0
32
+ - @module-federation/third-party-dts-extractor@0.17.0
33
+ - @module-federation/error-codes@0.17.0
34
+
3
35
  ## 0.16.0
4
36
 
5
37
  ### Minor Changes
package/dist/core.js CHANGED
@@ -1900,6 +1900,12 @@ function getEffectiveRootDir(parsedCommandLine) {
1900
1900
  throw new Error("Can not get effective rootDir, please set compilerOptions.rootDir !");
1901
1901
  }
1902
1902
  __name(getEffectiveRootDir, "getEffectiveRootDir");
1903
+ var getDependentFiles = /* @__PURE__ */ __name((rootFiles, configContent, rootDir) => {
1904
+ const program = import_typescript.default.createProgram(rootFiles, configContent.options);
1905
+ const sourceFiles = program.getSourceFiles();
1906
+ const dependentFiles = sourceFiles.map((file) => file.fileName).filter((file) => !file.endsWith(".d.ts") && file.startsWith(rootDir));
1907
+ return dependentFiles.length ? dependentFiles : rootFiles;
1908
+ }, "getDependentFiles");
1903
1909
  var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiledTypesFolder, context, additionalFilesToCompile, outputDir }, mapComponentsToExpose) => {
1904
1910
  const resolvedTsConfigPath = (0, import_path5.resolve)(context, tsConfigPath);
1905
1911
  const readResult = import_typescript.default.readConfigFile(resolvedTsConfigPath, import_typescript.default.sys.readFile);
@@ -1929,13 +1935,18 @@ var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiled
1929
1935
  ".mdx",
1930
1936
  ".md"
1931
1937
  ];
1932
- const filesToCompile = [
1938
+ const rootFiles = [
1933
1939
  ...Object.values(mapComponentsToExpose),
1934
- ...configContent.fileNames.filter((filename) => filename.endsWith(".d.ts") && !filename.startsWith(outDirWithoutTypesFolder)),
1935
1940
  ...additionalFilesToCompile
1936
1941
  ].filter((filename) => !excludeExtensions.some((ext) => filename.endsWith(ext)));
1942
+ const filesToCompile = [
1943
+ ...getDependentFiles(rootFiles, configContent, rootDir),
1944
+ ...configContent.fileNames.filter((filename) => filename.endsWith(".d.ts") && !filename.startsWith(outDirWithoutTypesFolder))
1945
+ ];
1937
1946
  rawTsConfigJson.include = [];
1938
- rawTsConfigJson.files = filesToCompile;
1947
+ rawTsConfigJson.files = [
1948
+ ...new Set(filesToCompile)
1949
+ ];
1939
1950
  rawTsConfigJson.exclude = [];
1940
1951
  "references" in rawTsConfigJson && delete rawTsConfigJson.references;
1941
1952
  rawTsConfigJson.extends = resolvedTsConfigPath;
@@ -1,5 +1,5 @@
1
- import { FederationRuntimePlugin } from '@module-federation/runtime/types';
1
+ import { ModuleFederationRuntimePlugin } from '@module-federation/runtime/types';
2
2
 
3
- declare function dynamicRemoteTypeHintsPlugin(): FederationRuntimePlugin;
3
+ declare function dynamicRemoteTypeHintsPlugin(): ModuleFederationRuntimePlugin;
4
4
 
5
5
  export { dynamicRemoteTypeHintsPlugin as default };
@@ -1,5 +1,5 @@
1
- import { FederationRuntimePlugin } from '@module-federation/runtime/types';
1
+ import { ModuleFederationRuntimePlugin } from '@module-federation/runtime/types';
2
2
 
3
- declare function dynamicRemoteTypeHintsPlugin(): FederationRuntimePlugin;
3
+ declare function dynamicRemoteTypeHintsPlugin(): ModuleFederationRuntimePlugin;
4
4
 
5
5
  export { dynamicRemoteTypeHintsPlugin as default };
@@ -4,7 +4,7 @@ import {
4
4
  exposeRpc,
5
5
  getDTSManagerConstructor,
6
6
  isDebugMode
7
- } from "./chunk-NLANHIXS.js";
7
+ } from "./chunk-YD3XN4HU.js";
8
8
  import {
9
9
  __async,
10
10
  __export,
@@ -629,6 +629,12 @@ function getEffectiveRootDir(parsedCommandLine) {
629
629
  throw new Error("Can not get effective rootDir, please set compilerOptions.rootDir !");
630
630
  }
631
631
  __name(getEffectiveRootDir, "getEffectiveRootDir");
632
+ var getDependentFiles = /* @__PURE__ */ __name((rootFiles, configContent, rootDir) => {
633
+ const program = typescript.createProgram(rootFiles, configContent.options);
634
+ const sourceFiles = program.getSourceFiles();
635
+ const dependentFiles = sourceFiles.map((file) => file.fileName).filter((file) => !file.endsWith(".d.ts") && file.startsWith(rootDir));
636
+ return dependentFiles.length ? dependentFiles : rootFiles;
637
+ }, "getDependentFiles");
632
638
  var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiledTypesFolder, context, additionalFilesToCompile, outputDir }, mapComponentsToExpose) => {
633
639
  const resolvedTsConfigPath = resolve2(context, tsConfigPath);
634
640
  const readResult = typescript.readConfigFile(resolvedTsConfigPath, typescript.sys.readFile);
@@ -658,13 +664,18 @@ var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiled
658
664
  ".mdx",
659
665
  ".md"
660
666
  ];
661
- const filesToCompile = [
667
+ const rootFiles = [
662
668
  ...Object.values(mapComponentsToExpose),
663
- ...configContent.fileNames.filter((filename) => filename.endsWith(".d.ts") && !filename.startsWith(outDirWithoutTypesFolder)),
664
669
  ...additionalFilesToCompile
665
670
  ].filter((filename) => !excludeExtensions.some((ext) => filename.endsWith(ext)));
671
+ const filesToCompile = [
672
+ ...getDependentFiles(rootFiles, configContent, rootDir),
673
+ ...configContent.fileNames.filter((filename) => filename.endsWith(".d.ts") && !filename.startsWith(outDirWithoutTypesFolder))
674
+ ];
666
675
  rawTsConfigJson.include = [];
667
- rawTsConfigJson.files = filesToCompile;
676
+ rawTsConfigJson.files = [
677
+ ...new Set(filesToCompile)
678
+ ];
668
679
  rawTsConfigJson.exclude = [];
669
680
  "references" in rawTsConfigJson && delete rawTsConfigJson.references;
670
681
  rawTsConfigJson.extends = resolvedTsConfigPath;
package/dist/esm/core.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  consumeTypes,
4
4
  generateTypesInChildProcess,
5
5
  rpc_exports
6
- } from "./chunk-4XXQY6FQ.js";
6
+ } from "./chunk-7TWMRWVP.js";
7
7
  import {
8
8
  DTSManager,
9
9
  HOST_API_TYPES_FILE_NAME,
@@ -19,7 +19,7 @@ import {
19
19
  retrieveTypesAssetsInfo,
20
20
  retrieveTypesZipPath,
21
21
  validateOptions
22
- } from "./chunk-NLANHIXS.js";
22
+ } from "./chunk-YD3XN4HU.js";
23
23
  import "./chunk-WWV5RWOP.js";
24
24
  import "./chunk-647HGGGS.js";
25
25
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rpc_exports
3
- } from "./chunk-4XXQY6FQ.js";
3
+ } from "./chunk-7TWMRWVP.js";
4
4
  import {
5
5
  ModuleFederationDevServer,
6
6
  createKoaServer,
@@ -9,7 +9,7 @@ import {
9
9
  retrieveMfTypesPath,
10
10
  retrieveRemoteConfig,
11
11
  retrieveTypesZipPath
12
- } from "./chunk-NLANHIXS.js";
12
+ } from "./chunk-YD3XN4HU.js";
13
13
  import {
14
14
  fileLog,
15
15
  getIPV4
@@ -2,7 +2,7 @@ import {
2
2
  RpcGMCallTypes,
3
3
  exposeRpc,
4
4
  generateTypes
5
- } from "./chunk-NLANHIXS.js";
5
+ } from "./chunk-YD3XN4HU.js";
6
6
  import "./chunk-WWV5RWOP.js";
7
7
  import {
8
8
  __async,
package/dist/esm/index.js CHANGED
@@ -2,14 +2,14 @@ import {
2
2
  consumeTypes,
3
3
  generateTypesInChildProcess,
4
4
  rpc_exports
5
- } from "./chunk-4XXQY6FQ.js";
5
+ } from "./chunk-7TWMRWVP.js";
6
6
  import {
7
7
  cloneDeepOptions,
8
8
  generateTypes,
9
9
  isTSProject,
10
10
  retrieveTypesAssetsInfo,
11
11
  validateOptions
12
- } from "./chunk-NLANHIXS.js";
12
+ } from "./chunk-YD3XN4HU.js";
13
13
  import {
14
14
  getIPV4,
15
15
  logger
@@ -2354,6 +2354,12 @@ function getEffectiveRootDir(parsedCommandLine) {
2354
2354
  throw new Error("Can not get effective rootDir, please set compilerOptions.rootDir !");
2355
2355
  }
2356
2356
  __name(getEffectiveRootDir, "getEffectiveRootDir");
2357
+ var getDependentFiles = /* @__PURE__ */ __name((rootFiles, configContent, rootDir) => {
2358
+ const program = import_typescript.default.createProgram(rootFiles, configContent.options);
2359
+ const sourceFiles = program.getSourceFiles();
2360
+ const dependentFiles = sourceFiles.map((file) => file.fileName).filter((file) => !file.endsWith(".d.ts") && file.startsWith(rootDir));
2361
+ return dependentFiles.length ? dependentFiles : rootFiles;
2362
+ }, "getDependentFiles");
2357
2363
  var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiledTypesFolder, context, additionalFilesToCompile, outputDir }, mapComponentsToExpose) => {
2358
2364
  const resolvedTsConfigPath = (0, import_path5.resolve)(context, tsConfigPath);
2359
2365
  const readResult = import_typescript.default.readConfigFile(resolvedTsConfigPath, import_typescript.default.sys.readFile);
@@ -2383,13 +2389,18 @@ var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiled
2383
2389
  ".mdx",
2384
2390
  ".md"
2385
2391
  ];
2386
- const filesToCompile = [
2392
+ const rootFiles = [
2387
2393
  ...Object.values(mapComponentsToExpose),
2388
- ...configContent.fileNames.filter((filename) => filename.endsWith(".d.ts") && !filename.startsWith(outDirWithoutTypesFolder)),
2389
2394
  ...additionalFilesToCompile
2390
2395
  ].filter((filename) => !excludeExtensions.some((ext) => filename.endsWith(ext)));
2396
+ const filesToCompile = [
2397
+ ...getDependentFiles(rootFiles, configContent, rootDir),
2398
+ ...configContent.fileNames.filter((filename) => filename.endsWith(".d.ts") && !filename.startsWith(outDirWithoutTypesFolder))
2399
+ ];
2391
2400
  rawTsConfigJson.include = [];
2392
- rawTsConfigJson.files = filesToCompile;
2401
+ rawTsConfigJson.files = [
2402
+ ...new Set(filesToCompile)
2403
+ ];
2393
2404
  rawTsConfigJson.exclude = [];
2394
2405
  "references" in rawTsConfigJson && delete rawTsConfigJson.references;
2395
2406
  rawTsConfigJson.extends = resolvedTsConfigPath;
@@ -202,6 +202,12 @@ function getEffectiveRootDir(parsedCommandLine) {
202
202
  throw new Error("Can not get effective rootDir, please set compilerOptions.rootDir !");
203
203
  }
204
204
  __name(getEffectiveRootDir, "getEffectiveRootDir");
205
+ var getDependentFiles = /* @__PURE__ */ __name((rootFiles, configContent, rootDir) => {
206
+ const program = import_typescript.default.createProgram(rootFiles, configContent.options);
207
+ const sourceFiles = program.getSourceFiles();
208
+ const dependentFiles = sourceFiles.map((file) => file.fileName).filter((file) => !file.endsWith(".d.ts") && file.startsWith(rootDir));
209
+ return dependentFiles.length ? dependentFiles : rootFiles;
210
+ }, "getDependentFiles");
205
211
  var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiledTypesFolder, context, additionalFilesToCompile, outputDir }, mapComponentsToExpose) => {
206
212
  const resolvedTsConfigPath = (0, import_path.resolve)(context, tsConfigPath);
207
213
  const readResult = import_typescript.default.readConfigFile(resolvedTsConfigPath, import_typescript.default.sys.readFile);
@@ -231,13 +237,18 @@ var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiled
231
237
  ".mdx",
232
238
  ".md"
233
239
  ];
234
- const filesToCompile = [
240
+ const rootFiles = [
235
241
  ...Object.values(mapComponentsToExpose),
236
- ...configContent.fileNames.filter((filename) => filename.endsWith(".d.ts") && !filename.startsWith(outDirWithoutTypesFolder)),
237
242
  ...additionalFilesToCompile
238
243
  ].filter((filename) => !excludeExtensions.some((ext) => filename.endsWith(ext)));
244
+ const filesToCompile = [
245
+ ...getDependentFiles(rootFiles, configContent, rootDir),
246
+ ...configContent.fileNames.filter((filename) => filename.endsWith(".d.ts") && !filename.startsWith(outDirWithoutTypesFolder))
247
+ ];
239
248
  rawTsConfigJson.include = [];
240
- rawTsConfigJson.files = filesToCompile;
249
+ rawTsConfigJson.files = [
250
+ ...new Set(filesToCompile)
251
+ ];
241
252
  rawTsConfigJson.exclude = [];
242
253
  "references" in rawTsConfigJson && delete rawTsConfigJson.references;
243
254
  rawTsConfigJson.extends = resolvedTsConfigPath;
package/dist/index.js CHANGED
@@ -1929,6 +1929,12 @@ function getEffectiveRootDir(parsedCommandLine) {
1929
1929
  throw new Error("Can not get effective rootDir, please set compilerOptions.rootDir !");
1930
1930
  }
1931
1931
  __name(getEffectiveRootDir, "getEffectiveRootDir");
1932
+ var getDependentFiles = /* @__PURE__ */ __name((rootFiles, configContent, rootDir) => {
1933
+ const program = import_typescript.default.createProgram(rootFiles, configContent.options);
1934
+ const sourceFiles = program.getSourceFiles();
1935
+ const dependentFiles = sourceFiles.map((file) => file.fileName).filter((file) => !file.endsWith(".d.ts") && file.startsWith(rootDir));
1936
+ return dependentFiles.length ? dependentFiles : rootFiles;
1937
+ }, "getDependentFiles");
1932
1938
  var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiledTypesFolder, context, additionalFilesToCompile, outputDir }, mapComponentsToExpose) => {
1933
1939
  const resolvedTsConfigPath = (0, import_path5.resolve)(context, tsConfigPath);
1934
1940
  const readResult = import_typescript.default.readConfigFile(resolvedTsConfigPath, import_typescript.default.sys.readFile);
@@ -1958,13 +1964,18 @@ var readTsConfig = /* @__PURE__ */ __name(({ tsConfigPath, typesFolder, compiled
1958
1964
  ".mdx",
1959
1965
  ".md"
1960
1966
  ];
1961
- const filesToCompile = [
1967
+ const rootFiles = [
1962
1968
  ...Object.values(mapComponentsToExpose),
1963
- ...configContent.fileNames.filter((filename) => filename.endsWith(".d.ts") && !filename.startsWith(outDirWithoutTypesFolder)),
1964
1969
  ...additionalFilesToCompile
1965
1970
  ].filter((filename) => !excludeExtensions.some((ext) => filename.endsWith(ext)));
1971
+ const filesToCompile = [
1972
+ ...getDependentFiles(rootFiles, configContent, rootDir),
1973
+ ...configContent.fileNames.filter((filename) => filename.endsWith(".d.ts") && !filename.startsWith(outDirWithoutTypesFolder))
1974
+ ];
1966
1975
  rawTsConfigJson.include = [];
1967
- rawTsConfigJson.files = filesToCompile;
1976
+ rawTsConfigJson.files = [
1977
+ ...new Set(filesToCompile)
1978
+ ];
1968
1979
  rawTsConfigJson.exclude = [];
1969
1980
  "references" in rawTsConfigJson && delete rawTsConfigJson.references;
1970
1981
  rawTsConfigJson.extends = resolvedTsConfigPath;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/dts-plugin",
3
- "version": "0.16.0",
3
+ "version": "0.17.1",
4
4
  "author": "hanric <hanric.zhang@gmail.com>",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/dts-plugin",
3
- "version": "0.16.0",
3
+ "version": "0.17.1",
4
4
  "author": "hanric <hanric.zhang@gmail.com>",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -60,10 +60,10 @@
60
60
  "log4js": "6.9.1",
61
61
  "node-schedule": "2.1.1",
62
62
  "ws": "8.18.0",
63
- "@module-federation/sdk": "0.16.0",
64
- "@module-federation/managers": "0.16.0",
65
- "@module-federation/third-party-dts-extractor": "0.16.0",
66
- "@module-federation/error-codes": "0.16.0"
63
+ "@module-federation/sdk": "0.17.1",
64
+ "@module-federation/managers": "0.17.1",
65
+ "@module-federation/third-party-dts-extractor": "0.17.1",
66
+ "@module-federation/error-codes": "0.17.1"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/ws": "8.5.12",
@@ -73,7 +73,7 @@
73
73
  "@vue/tsconfig": "^0.7.0",
74
74
  "vue-tsc": "^2.2.10",
75
75
  "rimraf": "~6.0.1",
76
- "@module-federation/runtime": "0.16.0"
76
+ "@module-federation/runtime": "0.17.1"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "typescript": "^4.9.0 || ^5.0.0",