@module-federation/nextjs-mf 8.8.70 → 8.8.71

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.
Files changed (63) hide show
  1. package/dist/client/UrlNode.d.mts +17 -0
  2. package/dist/client/UrlNode.d.ts +17 -0
  3. package/dist/node.d.mts +1 -0
  4. package/dist/node.d.ts +1 -0
  5. package/dist/src/federation-noop.d.mts +0 -1
  6. package/dist/src/federation-noop.d.ts +0 -1
  7. package/dist/src/index.d.mts +3 -2
  8. package/dist/src/index.d.ts +3 -2
  9. package/dist/src/internal.d.mts +50 -0
  10. package/dist/src/internal.d.ts +50 -0
  11. package/dist/src/loaders/fixImageLoader.d.mts +3 -8
  12. package/dist/src/loaders/fixImageLoader.d.ts +3 -8
  13. package/dist/src/loaders/fixUrlLoader.d.mts +2 -5
  14. package/dist/src/loaders/fixUrlLoader.d.ts +2 -5
  15. package/dist/src/loaders/helpers.d.mts +17 -0
  16. package/dist/src/loaders/helpers.d.ts +17 -0
  17. package/dist/src/loaders/nextPageMapLoader.d.mts +5 -10
  18. package/dist/src/loaders/nextPageMapLoader.d.ts +5 -10
  19. package/dist/src/logger.d.mts +2 -0
  20. package/dist/src/logger.d.ts +2 -0
  21. package/dist/src/plugins/AddRuntimeRequirementToPromiseExternalPlugin.d.mts +5 -0
  22. package/dist/src/plugins/AddRuntimeRequirementToPromiseExternalPlugin.d.ts +5 -0
  23. package/dist/src/plugins/CopyFederationPlugin.d.mts +20 -0
  24. package/dist/src/plugins/CopyFederationPlugin.d.ts +20 -0
  25. package/dist/src/plugins/NextFederationPlugin/apply-client-plugins.d.mts +23 -0
  26. package/dist/src/plugins/NextFederationPlugin/apply-client-plugins.d.ts +23 -0
  27. package/dist/src/plugins/NextFederationPlugin/apply-server-plugins.d.mts +36 -0
  28. package/dist/src/plugins/NextFederationPlugin/apply-server-plugins.d.ts +36 -0
  29. package/dist/src/plugins/NextFederationPlugin/index.d.mts +23 -27
  30. package/dist/src/plugins/NextFederationPlugin/index.d.ts +23 -27
  31. package/dist/src/plugins/NextFederationPlugin/index.js +2 -1
  32. package/dist/src/plugins/NextFederationPlugin/index.js.map +1 -1
  33. package/dist/src/plugins/NextFederationPlugin/index.mjs +2 -1
  34. package/dist/src/plugins/NextFederationPlugin/index.mjs.map +1 -1
  35. package/dist/src/plugins/NextFederationPlugin/next-fragments.d.mts +18 -16
  36. package/dist/src/plugins/NextFederationPlugin/next-fragments.d.ts +18 -16
  37. package/dist/src/plugins/NextFederationPlugin/regex-equal.d.mts +14 -0
  38. package/dist/src/plugins/NextFederationPlugin/regex-equal.d.ts +14 -0
  39. package/dist/src/plugins/NextFederationPlugin/remove-unnecessary-shared-keys.d.mts +8 -0
  40. package/dist/src/plugins/NextFederationPlugin/remove-unnecessary-shared-keys.d.ts +8 -0
  41. package/dist/src/plugins/NextFederationPlugin/set-options.d.mts +16 -0
  42. package/dist/src/plugins/NextFederationPlugin/set-options.d.ts +16 -0
  43. package/dist/src/plugins/NextFederationPlugin/validate-options.d.mts +25 -0
  44. package/dist/src/plugins/NextFederationPlugin/validate-options.d.ts +25 -0
  45. package/dist/src/plugins/container/InvertedContainerPlugin.d.mts +5 -0
  46. package/dist/src/plugins/container/InvertedContainerPlugin.d.ts +5 -0
  47. package/dist/src/plugins/container/InvertedContainerRuntimeModule.d.mts +11 -0
  48. package/dist/src/plugins/container/InvertedContainerRuntimeModule.d.ts +11 -0
  49. package/dist/src/plugins/container/InvertedContainerRuntimeModule.js.map +1 -1
  50. package/dist/src/plugins/container/InvertedContainerRuntimeModule.mjs.map +1 -1
  51. package/dist/src/plugins/container/RemoveEagerModulesFromRuntimePlugin.d.mts +39 -0
  52. package/dist/src/plugins/container/RemoveEagerModulesFromRuntimePlugin.d.ts +39 -0
  53. package/dist/src/plugins/container/runtimePlugin.d.mts +2 -7
  54. package/dist/src/plugins/container/runtimePlugin.d.ts +2 -6
  55. package/dist/src/plugins/container/types.d.mts +2 -0
  56. package/dist/src/plugins/container/types.d.ts +2 -0
  57. package/dist/src/types.d.mts +28 -0
  58. package/dist/src/types.d.ts +28 -0
  59. package/dist/utils/flushedChunks.d.mts +5 -12
  60. package/dist/utils/flushedChunks.d.ts +5 -12
  61. package/dist/utils/index.d.mts +14 -8
  62. package/dist/utils/index.d.ts +14 -8
  63. package/package.json +9 -9
@@ -0,0 +1,28 @@
1
+ export declare interface WatchOptions {
2
+ /**
3
+ * Delay the rebuilt after the first change. Value is a time in ms.
4
+ */
5
+ aggregateTimeout?: number;
6
+ /**
7
+ * Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').
8
+ */
9
+ followSymlinks?: boolean;
10
+ /**
11
+ * Ignore some files from watching (glob pattern or regexp).
12
+ */
13
+ ignored?: string | RegExp | string[];
14
+ /**
15
+ * Enable polling mode for watching.
16
+ */
17
+ poll?: number | boolean;
18
+ /**
19
+ * Stop watching when stdin stream has ended.
20
+ */
21
+ stdin?: boolean;
22
+ }
23
+ export declare interface CallbackFunction<T> {
24
+ (err?: null | Error, result?: T): any;
25
+ }
26
+ declare global {
27
+ var usedChunks: Set<string>;
28
+ }
@@ -1,6 +1,4 @@
1
- import * as React from "react";
2
-
3
- //#region utils/flushedChunks.d.ts
1
+ import * as React from 'react';
4
2
  /**
5
3
  * FlushedChunks component.
6
4
  * This component creates script and link elements for each chunk.
@@ -9,10 +7,8 @@ import * as React from "react";
9
7
  * @param {string[]} props.chunks - The chunks to be flushed.
10
8
  * @returns {React.ReactElement} The created script and link elements.
11
9
  */
12
- declare const FlushedChunks: ({
13
- chunks
14
- }: FlushedChunksProps) => React.FunctionComponentElement<{
15
- children?: React.ReactNode | undefined;
10
+ export declare const FlushedChunks: ({ chunks }: FlushedChunksProps) => React.FunctionComponentElement<{
11
+ children?: React.ReactNode | undefined;
16
12
  }>;
17
13
  /**
18
14
  * FlushedChunksProps interface.
@@ -21,9 +17,6 @@ declare const FlushedChunks: ({
21
17
  * @interface
22
18
  * @property {string[]} chunks - The chunks to be flushed.
23
19
  */
24
- interface FlushedChunksProps {
25
- chunks: string[];
20
+ export interface FlushedChunksProps {
21
+ chunks: string[];
26
22
  }
27
- //#endregion
28
- export { FlushedChunks, FlushedChunksProps };
29
- //# sourceMappingURL=flushedChunks.d.mts.map
@@ -1,6 +1,4 @@
1
- import * as React from "react";
2
-
3
- //#region utils/flushedChunks.d.ts
1
+ import * as React from 'react';
4
2
  /**
5
3
  * FlushedChunks component.
6
4
  * This component creates script and link elements for each chunk.
@@ -9,10 +7,8 @@ import * as React from "react";
9
7
  * @param {string[]} props.chunks - The chunks to be flushed.
10
8
  * @returns {React.ReactElement} The created script and link elements.
11
9
  */
12
- declare const FlushedChunks: ({
13
- chunks
14
- }: FlushedChunksProps) => React.FunctionComponentElement<{
15
- children?: React.ReactNode | undefined;
10
+ export declare const FlushedChunks: ({ chunks }: FlushedChunksProps) => React.FunctionComponentElement<{
11
+ children?: React.ReactNode | undefined;
16
12
  }>;
17
13
  /**
18
14
  * FlushedChunksProps interface.
@@ -21,9 +17,6 @@ declare const FlushedChunks: ({
21
17
  * @interface
22
18
  * @property {string[]} chunks - The chunks to be flushed.
23
19
  */
24
- interface FlushedChunksProps {
25
- chunks: string[];
20
+ export interface FlushedChunksProps {
21
+ chunks: string[];
26
22
  }
27
- //#endregion
28
- export { FlushedChunks, FlushedChunksProps };
29
- //# sourceMappingURL=flushedChunks.d.ts.map
@@ -1,14 +1,20 @@
1
- import { FlushedChunks, FlushedChunksProps } from "./flushedChunks.mjs";
2
- import { flushChunks } from "@module-federation/node/utils";
3
-
4
- //#region utils/index.d.ts
1
+ /**
2
+ * Flushes chunks from the module federation node utilities.
3
+ * @module @module-federation/node/utils
4
+ */
5
+ export { flushChunks } from '@module-federation/node/utils';
6
+ /**
7
+ * Exports the FlushedChunks component from the current directory.
8
+ */
9
+ export { FlushedChunks } from './flushedChunks';
10
+ /**
11
+ * Exports the FlushedChunksProps type from the current directory.
12
+ */
13
+ export type { FlushedChunksProps } from './flushedChunks';
5
14
  /**
6
15
  * Revalidates the current state.
7
16
  * If the function is called on the client side, it logs an error and returns a resolved promise with false.
8
17
  * If the function is called on the server side, it imports the revalidate function from the module federation node utilities and returns the result of calling that function.
9
18
  * @returns {Promise<boolean>} A promise that resolves with a boolean.
10
19
  */
11
- declare const revalidate: (fetchModule?: any, force?: boolean) => Promise<boolean>;
12
- //#endregion
13
- export { FlushedChunks, type FlushedChunksProps, flushChunks, revalidate };
14
- //# sourceMappingURL=index.d.mts.map
20
+ export declare const revalidate: (fetchModule?: any, force?: boolean) => Promise<boolean>;
@@ -1,14 +1,20 @@
1
- import { FlushedChunks, FlushedChunksProps } from "./flushedChunks.js";
2
- import { flushChunks } from "@module-federation/node/utils";
3
-
4
- //#region utils/index.d.ts
1
+ /**
2
+ * Flushes chunks from the module federation node utilities.
3
+ * @module @module-federation/node/utils
4
+ */
5
+ export { flushChunks } from '@module-federation/node/utils';
6
+ /**
7
+ * Exports the FlushedChunks component from the current directory.
8
+ */
9
+ export { FlushedChunks } from './flushedChunks';
10
+ /**
11
+ * Exports the FlushedChunksProps type from the current directory.
12
+ */
13
+ export type { FlushedChunksProps } from './flushedChunks';
5
14
  /**
6
15
  * Revalidates the current state.
7
16
  * If the function is called on the client side, it logs an error and returns a resolved promise with false.
8
17
  * If the function is called on the server side, it imports the revalidate function from the module federation node utilities and returns the result of calling that function.
9
18
  * @returns {Promise<boolean>} A promise that resolves with a boolean.
10
19
  */
11
- declare const revalidate: (fetchModule?: any, force?: boolean) => Promise<boolean>;
12
- //#endregion
13
- export { FlushedChunks, type FlushedChunksProps, flushChunks, revalidate };
14
- //# sourceMappingURL=index.d.ts.map
20
+ export declare const revalidate: (fetchModule?: any, force?: boolean) => Promise<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/nextjs-mf",
3
- "version": "8.8.70",
3
+ "version": "8.8.71",
4
4
  "license": "MIT",
5
5
  "main": "dist/src/index.js",
6
6
  "module": "dist/src/index.mjs",
@@ -58,19 +58,19 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "fast-glob": "^3.2.11",
61
- "@module-federation/runtime": "2.7.0",
62
- "@module-federation/runtime-core": "2.7.0",
63
- "@module-federation/sdk": "2.7.0",
64
- "@module-federation/enhanced": "2.7.0",
65
- "@module-federation/node": "2.7.46",
66
- "@module-federation/webpack-bundler-runtime": "2.7.0"
61
+ "@module-federation/runtime": "2.8.0",
62
+ "@module-federation/sdk": "2.8.0",
63
+ "@module-federation/runtime-core": "2.8.0",
64
+ "@module-federation/enhanced": "2.8.0",
65
+ "@module-federation/webpack-bundler-runtime": "2.8.0",
66
+ "@module-federation/node": "2.7.47"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/btoa": "^1.2.5",
70
70
  "@types/react": "^18.3.1",
71
71
  "@types/react-dom": "^18.3.1",
72
72
  "tsdown": "0.20.3",
73
- "typescript": "6.0.3"
73
+ "typescript": "7.0.2"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "webpack": "^5.40.0",
@@ -98,7 +98,7 @@
98
98
  },
99
99
  "scripts": {
100
100
  "postinstall": "echo \"Deprecation Notice: We intend to deprecate 'nextjs-mf'. Please see https://github.com/module-federation/core/issues/3153 for more details.\"",
101
- "build": "tsdown --config tsdown.config.mts",
101
+ "build": "tsdown --config tsdown.config.mts && tsc -p tsconfig.lib.json && node ../../tools/scripts/copy-dts-to-dmts.mjs dist",
102
102
  "lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.js\" \"**/*.ts\"",
103
103
  "test": "pnpm exec jest --config jest.config.js --passWithNoTests",
104
104
  "pre-release": "pnpm run test && pnpm run build && rm -f ./dist/package.json"