@module-federation/bridge-shared 0.0.0-feat-support-bridge-react-router-v7-20251015102312

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 ADDED
@@ -0,0 +1,213 @@
1
+ # @module-federation/bridge-shared
2
+
3
+ ## 0.0.0-feat-support-bridge-react-router-v7-20251015102312
4
+
5
+ ## 0.20.0
6
+
7
+ ## 0.19.1
8
+
9
+ ## 0.19.0
10
+
11
+ ## 0.18.4
12
+
13
+ ## 0.18.3
14
+
15
+ ## 0.18.2
16
+
17
+ ## 0.18.1
18
+
19
+ ## 0.18.0
20
+
21
+ ## 0.17.1
22
+
23
+ ### Patch Changes
24
+
25
+ - a7cf276: chore: upgrade NX to 21.2.3, Storybook to 9.0.9, and TypeScript to 5.8.3
26
+
27
+ - Upgraded NX from 21.0.3 to 21.2.3 with workspace configuration updates
28
+ - Migrated Storybook from 8.3.5 to 9.0.9 with updated configurations and automigrations
29
+ - Upgraded TypeScript from 5.7.3 to 5.8.3 with compatibility fixes
30
+ - Fixed package exports and type declaration paths across all packages
31
+ - Resolved module resolution issues and TypeScript compatibility problems
32
+ - Updated build configurations and dependencies to support latest versions
33
+
34
+ - d31a326: refactor: sink React packages from root to individual packages
35
+
36
+ - Removed React dependencies from root package.json and moved them to packages that actually need them
37
+ - Fixed rsbuild-plugin configuration to match workspace patterns
38
+ - Updated tests to handle platform-specific files
39
+ - This change improves dependency management by ensuring packages only have the dependencies they actually use
40
+
41
+ ## 0.17.0
42
+
43
+ ## 0.16.0
44
+
45
+ ## 0.15.0
46
+
47
+ ## 0.14.3
48
+
49
+ ## 0.14.2
50
+
51
+ ## 0.14.1
52
+
53
+ ## 0.14.0
54
+
55
+ ### Patch Changes
56
+
57
+ - 677aac9: vue.js has router option added to the vue3-bridge
58
+
59
+ ## 0.13.1
60
+
61
+ ## 0.13.0
62
+
63
+ ### Patch Changes
64
+
65
+ - 38f324f: Disable live bindings on cjs builds of the runtime packages
66
+
67
+ ## 0.12.0
68
+
69
+ ## 0.11.4
70
+
71
+ ## 0.11.3
72
+
73
+ ## 0.11.2
74
+
75
+ ## 0.11.1
76
+
77
+ ## 0.11.0
78
+
79
+ ## 0.10.0
80
+
81
+ ## 0.9.1
82
+
83
+ ## 0.9.0
84
+
85
+ ## 0.8.12
86
+
87
+ ## 0.8.11
88
+
89
+ ## 0.8.10
90
+
91
+ ## 0.8.9
92
+
93
+ ## 0.8.8
94
+
95
+ ## 0.8.7
96
+
97
+ ## 0.8.6
98
+
99
+ ## 0.8.5
100
+
101
+ ## 0.8.4
102
+
103
+ ## 0.8.3
104
+
105
+ ## 0.8.2
106
+
107
+ ## 0.8.1
108
+
109
+ ## 0.8.0
110
+
111
+ ## 0.7.7
112
+
113
+ ## 0.7.6
114
+
115
+ ## 0.7.5
116
+
117
+ ## 0.7.4
118
+
119
+ ## 0.7.3
120
+
121
+ ## 0.7.2
122
+
123
+ ## 0.7.1
124
+
125
+ ## 0.7.0
126
+
127
+ ### Minor Changes
128
+
129
+ - 3942740: add license information
130
+
131
+ ## 0.6.16
132
+
133
+ ## 0.6.15
134
+
135
+ ## 0.6.14
136
+
137
+ ### Patch Changes
138
+
139
+ - ad605d2: chore: unified logger
140
+
141
+ ## 0.6.13
142
+
143
+ ## 0.6.12
144
+
145
+ ## 0.6.11
146
+
147
+ ## 0.6.10
148
+
149
+ ## 0.6.9
150
+
151
+ ## 0.6.8
152
+
153
+ ## 0.6.7
154
+
155
+ ## 0.6.6
156
+
157
+ ## 0.6.5
158
+
159
+ ## 0.6.4
160
+
161
+ ## 0.6.3
162
+
163
+ ## 0.6.2
164
+
165
+ ## 0.6.1
166
+
167
+ ## 0.6.0
168
+
169
+ ## 0.5.2
170
+
171
+ ## 0.5.1
172
+
173
+ ## 0.5.0
174
+
175
+ ### Patch Changes
176
+
177
+ - 49d6135: feat(@module-federation/bridge): enhance Bridge capabilities and fix some issues
178
+
179
+ ## 0.4.0
180
+
181
+ ## 0.3.5
182
+
183
+ ## 0.3.4
184
+
185
+ ## 0.3.3
186
+
187
+ ## 0.3.2
188
+
189
+ ## 0.3.1
190
+
191
+ ## 0.3.0
192
+
193
+ ## 0.2.8
194
+
195
+ ## 0.2.7
196
+
197
+ ## 0.2.6
198
+
199
+ ## 0.2.5
200
+
201
+ ## 0.2.4
202
+
203
+ ## 0.2.3
204
+
205
+ ## 0.2.2
206
+
207
+ ## 0.2.1
208
+
209
+ ## 0.2.0
210
+
211
+ ### Minor Changes
212
+
213
+ - d2ab821: feat(bridge): Supports exporting and loading of application-level modules (with routing), currently supports react and vue3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 ScriptedAlchemy LLC (Zack Jackson) Zhou Shaw (zhouxiao)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # debug mode
2
+
3
+ > open debug mode
4
+
5
+ ```js
6
+ // browser
7
+ localStorage.setItem('debug', 'true');
8
+ localStorage.setItem('debug:stack', 'true');
9
+
10
+ // node
11
+ process.env.DEBUG = 'true';
12
+ ```
File without changes
package/dist/env.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function dispatchPopstateEnv(): void;
@@ -0,0 +1,2 @@
1
+ export type { RenderFnParams, ProviderParams } from './type';
2
+ export { dispatchPopstateEnv } from './env';
@@ -0,0 +1,7 @@
1
+ function e() {
2
+ const t = new PopStateEvent("popstate", { state: window.history.state });
3
+ window.dispatchEvent(t);
4
+ }
5
+ export {
6
+ e as dispatchPopstateEnv
7
+ };
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["bridge-shared"]={}))})(this,function(e){"use strict";function t(){const n=new PopStateEvent("popstate",{state:window.history.state});window.dispatchEvent(n)}e.dispatchPopstateEnv=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
package/dist/type.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ export interface ProviderParams {
2
+ moduleName?: string;
3
+ basename?: string;
4
+ memoryRoute?: {
5
+ entryPath: string;
6
+ };
7
+ hashRoute?: boolean;
8
+ style?: React.CSSProperties;
9
+ className?: string;
10
+ }
11
+ export interface RenderFnParams extends ProviderParams {
12
+ dom: HTMLElement;
13
+ }
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@module-federation/bridge-shared",
3
+ "version": "0.0.0-feat-support-bridge-react-router-v7-20251015102312",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "author": "zhouxiao <codingzx@gmail.com>",
8
+ "license": "MIT",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/module-federation/core.git",
12
+ "directory": "packages/bridge/bridge-shared"
13
+ },
14
+ "type": "module",
15
+ "main": "./dist/index.umd.js",
16
+ "module": "./dist/index.es.js",
17
+ "types": "./dist/index.d.ts",
18
+ "devDependencies": {
19
+ "@types/node": "~16.11.7",
20
+ "@types/react": "^18.3.11",
21
+ "@vitejs/plugin-vue": "^5.0.4",
22
+ "@vitejs/plugin-vue-jsx": "^4.0.0",
23
+ "typescript": "^5.2.2",
24
+ "vite": "^5.4.20",
25
+ "vite-plugin-dts": "^4.3.0",
26
+ "vue-tsc": "^2.0.6"
27
+ },
28
+ "scripts": {
29
+ "dev": "vite",
30
+ "build": "vite build",
31
+ "preview": "vite preview"
32
+ }
33
+ }
package/project.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "bridge-shared",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "packages/bridge/bridge-shared/src",
5
+ "projectType": "library",
6
+ "tags": ["type:pkg"],
7
+ "targets": {
8
+ "build": {
9
+ "executor": "nx:run-commands",
10
+ "options": {
11
+ "commands": ["npm run build --prefix packages/bridge/bridge-shared"]
12
+ }
13
+ }
14
+ }
15
+ }
package/src/bridge.ts ADDED
File without changes
package/src/env.ts ADDED
@@ -0,0 +1,4 @@
1
+ export function dispatchPopstateEnv() {
2
+ const evt = new PopStateEvent('popstate', { state: window.history.state });
3
+ window.dispatchEvent(evt);
4
+ }
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export type { RenderFnParams, ProviderParams } from './type';
2
+ export { dispatchPopstateEnv } from './env';
package/src/type.ts ADDED
@@ -0,0 +1,12 @@
1
+ export interface ProviderParams {
2
+ moduleName?: string;
3
+ basename?: string;
4
+ memoryRoute?: { entryPath: string };
5
+ hashRoute?: boolean;
6
+ style?: React.CSSProperties;
7
+ className?: string;
8
+ }
9
+
10
+ export interface RenderFnParams extends ProviderParams {
11
+ dom: HTMLElement;
12
+ }
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
package/tsconfig.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "compilerOptions": {
3
+ "useDefineForClassFields": true,
4
+
5
+ /* Bundler mode */
6
+ "allowImportingTsExtensions": true,
7
+ "resolveJsonModule": true,
8
+ "isolatedModules": true,
9
+ "jsxImportSource": "vue",
10
+
11
+ /* Linting */
12
+ "noUnusedLocals": true,
13
+ "noUnusedParameters": true,
14
+ "noFallthroughCasesInSwitch": true,
15
+ "declaration": true,
16
+ "emitDeclarationOnly": true,
17
+ "outDir": "dist",
18
+ "skipLibCheck": true,
19
+ "strict": true,
20
+ "moduleResolution": "node",
21
+ "target": "esnext",
22
+ "module": "esnext",
23
+ "lib": ["esnext", "dom"],
24
+ "jsx": "preserve",
25
+ "esModuleInterop": true,
26
+ "allowSyntheticDefaultImports": true,
27
+ "sourceMap": true,
28
+ "baseUrl": ".",
29
+ "paths": {
30
+ "@/*": ["src/*"]
31
+ }
32
+ },
33
+ "include": [
34
+ "src/**/*.ts",
35
+ "src/**/*.tsx",
36
+ "src/**/*.vue",
37
+ "src/remoteApp.tsx",
38
+ "src/create.ts"
39
+ ],
40
+ "references": [{ "path": "./tsconfig.node.json" }]
41
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true,
8
+ "strict": true
9
+ },
10
+ "include": ["vite.config.ts"]
11
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,16 @@
1
+ import { defineConfig } from 'vite';
2
+ import vue from '@vitejs/plugin-vue';
3
+ import path from 'path';
4
+ import dts from 'vite-plugin-dts';
5
+ import vueJsx from '@vitejs/plugin-vue-jsx';
6
+
7
+ export default defineConfig({
8
+ plugins: [vue(), dts(), vueJsx()],
9
+ build: {
10
+ lib: {
11
+ entry: path.resolve(__dirname, 'src/index.ts'),
12
+ name: 'bridge-shared',
13
+ fileName: (format) => `index.${format}.js`,
14
+ },
15
+ },
16
+ });