create-module-federation 0.0.0-perf-devtools-20260107043700 → 0.0.0-perf-website-code-usage-20260914033703

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/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
3
- import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
4
- import * as __WEBPACK_EXTERNAL_MODULE_child_process__ from "child_process";
5
- import * as __WEBPACK_EXTERNAL_MODULE_url__ from "url";
6
- import * as __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__ from "@clack/prompts";
7
- import * as __WEBPACK_EXTERNAL_MODULE_minimist__ from "minimist";
8
- import * as __WEBPACK_EXTERNAL_MODULE_rslog__ from "rslog";
9
- import * as __WEBPACK_EXTERNAL_MODULE_glob__ from "glob";
10
- import * as __WEBPACK_EXTERNAL_MODULE_fs_extra_ce68a66b__ from "fs-extra";
11
- import * as __WEBPACK_EXTERNAL_MODULE_handlebars__ from "handlebars";
2
+ import path_0 from "path";
3
+ import fs from "fs";
4
+ import { spawnSync } from "child_process";
5
+ import { fileURLToPath } from "url";
6
+ import { cancel, isCancel, multiselect, note, outro, select as prompts_select, text as prompts_text } from "@clack/prompts";
7
+ import minimist from "minimist";
8
+ import { logger } from "rslog";
9
+ import glob from "glob";
10
+ import { mkdir, readFile, writeFile } from "fs/promises";
11
+ import handlebars from "handlebars";
12
12
  const IMAGE_EXT_LIST = [
13
13
  '.jpg',
14
14
  '.jpeg',
@@ -29,49 +29,51 @@ class FsResource {
29
29
  this.resourceKey = resourceKey;
30
30
  }
31
31
  async value() {
32
- const resourceFileExt = __WEBPACK_EXTERNAL_MODULE_path__["default"].extname(this.filePath);
32
+ const resourceFileExt = path_0.extname(this.filePath);
33
33
  if (IMAGE_EXT_LIST.includes(resourceFileExt)) {
34
- const buffer = await __WEBPACK_EXTERNAL_MODULE_fs_extra_ce68a66b__["default"].readFile(__WEBPACK_EXTERNAL_MODULE_path__["default"].resolve(this.filePath));
34
+ const buffer = await readFile(path_0.resolve(this.filePath));
35
35
  return {
36
36
  content: buffer
37
37
  };
38
38
  }
39
- const text = await __WEBPACK_EXTERNAL_MODULE_fs_extra_ce68a66b__["default"].readFile(__WEBPACK_EXTERNAL_MODULE_path__["default"].resolve(this.filePath), 'utf8');
39
+ const text = await readFile(path_0.resolve(this.filePath), 'utf8');
40
40
  return {
41
41
  content: text
42
42
  };
43
43
  }
44
44
  }
45
45
  const promisifyGlob = (pattern, options)=>new Promise((resolve, reject)=>{
46
- (0, __WEBPACK_EXTERNAL_MODULE_glob__["default"])(pattern, options, (err, files)=>null === err ? resolve(files) : reject(err));
46
+ glob(pattern, options, (err, files)=>null === err ? resolve(files) : reject(err));
47
47
  });
48
48
  class FsMaterial {
49
49
  constructor(basePath){
50
50
  this.basePath = basePath;
51
51
  }
52
52
  get(resourceKey) {
53
- return new FsResource(__WEBPACK_EXTERNAL_MODULE_path__["default"].resolve(this.basePath, resourceKey), resourceKey);
53
+ return new FsResource(path_0.resolve(this.basePath, resourceKey), resourceKey);
54
54
  }
55
55
  async find(globStr, options) {
56
56
  const matches = await promisifyGlob(globStr, {
57
- cwd: __WEBPACK_EXTERNAL_MODULE_path__["default"].resolve(this.basePath),
57
+ cwd: path_0.resolve(this.basePath),
58
58
  nodir: options?.nodir,
59
59
  dot: options?.dot,
60
60
  ignore: options?.ignore
61
61
  });
62
62
  return matches.reduce((pre, cur)=>{
63
- pre[cur] = new FsResource(__WEBPACK_EXTERNAL_MODULE_path__["default"].resolve(this.basePath, cur), cur);
63
+ pre[cur] = new FsResource(path_0.resolve(this.basePath, cur), cur);
64
64
  return pre;
65
65
  }, {});
66
66
  }
67
67
  }
68
68
  function renderString(template, fullData) {
69
- return __WEBPACK_EXTERNAL_MODULE_handlebars__["default"].compile(template)(fullData) || '';
69
+ return handlebars.compile(template)(fullData) || '';
70
70
  }
71
71
  async function outputFs(file, content, outputPath, options) {
72
- const filePath = __WEBPACK_EXTERNAL_MODULE_path__["default"].resolve(outputPath, file.toString());
73
- await __WEBPACK_EXTERNAL_MODULE_fs_extra_ce68a66b__["default"].mkdirp(__WEBPACK_EXTERNAL_MODULE_path__["default"].dirname(filePath));
74
- await __WEBPACK_EXTERNAL_MODULE_fs_extra_ce68a66b__["default"].writeFile(filePath, content, options);
72
+ const filePath = path_0.resolve(outputPath, file.toString());
73
+ await mkdir(path_0.dirname(filePath), {
74
+ recursive: true
75
+ });
76
+ await writeFile(filePath, content, options);
75
77
  }
76
78
  class HandlebarsAPI {
77
79
  async renderTemplate(templateResource, target, outputFilePath, parameters = {}) {
@@ -92,9 +94,9 @@ class HandlebarsAPI {
92
94
  }));
93
95
  }
94
96
  }
95
- const create_filename = (0, __WEBPACK_EXTERNAL_MODULE_url__.fileURLToPath)(import.meta.url);
96
- const create_dirname = __WEBPACK_EXTERNAL_MODULE_path__["default"].dirname(create_filename);
97
- const packageDir = __WEBPACK_EXTERNAL_MODULE_path__["default"].resolve(create_dirname, '..');
97
+ const create_filename = fileURLToPath(import.meta.url);
98
+ const create_dirname = path_0.dirname(create_filename);
99
+ const packageDir = path_0.resolve(create_dirname, '..');
98
100
  const OTHER_TYPE = {
99
101
  zephyr: {
100
102
  label: 'zephyr',
@@ -106,7 +108,7 @@ function upperFirst(str) {
106
108
  return str.charAt(0).toUpperCase() + str.slice(1);
107
109
  }
108
110
  function logHelpMessage(name, templates) {
109
- __WEBPACK_EXTERNAL_MODULE_rslog__.logger.log(`
111
+ logger.log(`
110
112
  Usage: create-${name} [options]
111
113
 
112
114
  Options:
@@ -132,11 +134,11 @@ function pkgFromUserAgent(userAgent) {
132
134
  };
133
135
  }
134
136
  function cancelAndExit() {
135
- (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.cancel)('Operation cancelled.');
137
+ cancel('Operation cancelled.');
136
138
  process.exit(0);
137
139
  }
138
140
  function checkCancel(value) {
139
- if ((0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.isCancel)(value)) cancelAndExit();
141
+ if (isCancel(value)) cancelAndExit();
140
142
  return value;
141
143
  }
142
144
  function formatProjectName(input) {
@@ -147,7 +149,7 @@ function formatProjectName(input) {
147
149
  };
148
150
  }
149
151
  function isEmptyDir(path) {
150
- const files = __WEBPACK_EXTERNAL_MODULE_fs__["default"].readdirSync(path);
152
+ const files = fs.readdirSync(path);
151
153
  return 0 === files.length || 1 === files.length && '.git' === files[0];
152
154
  }
153
155
  async function getAppTemplateName({ roleType, framework }, { template }) {
@@ -156,7 +158,7 @@ async function getAppTemplateName({ roleType, framework }, { template }) {
156
158
  }
157
159
  async function getLibTemplateName({ template, role }) {
158
160
  if (template) return `${template}-ts`;
159
- const templateName = checkCancel(await (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.select)({
161
+ const templateName = checkCancel(await prompts_select({
160
162
  message: 'Select template',
161
163
  options: [
162
164
  {
@@ -165,7 +167,7 @@ async function getLibTemplateName({ template, role }) {
165
167
  }
166
168
  ]
167
169
  }));
168
- const tools = checkCancel(await (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.multiselect)({
170
+ const tools = checkCancel(await multiselect({
169
171
  message: 'Select development tools (Use <space> to select, <enter> to continue)',
170
172
  required: false,
171
173
  options: [
@@ -190,7 +192,7 @@ function getTemplateDir(templateName) {
190
192
  return `templates/${templateName}/`;
191
193
  }
192
194
  async function getProjectType(template) {
193
- if (!template) return checkCancel(await (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.select)({
195
+ if (!template) return checkCancel(await prompts_select({
194
196
  message: 'Please select the type of project you want to create:',
195
197
  options: [
196
198
  {
@@ -214,7 +216,7 @@ async function forgeTemplate({ projectType, argv, templateParameters, distFolder
214
216
  let framework = 'modern';
215
217
  let roleType = "provider";
216
218
  if (!argv?.template && 'app' === projectType) {
217
- framework = checkCancel(await (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.select)({
219
+ framework = checkCancel(await prompts_select({
218
220
  message: 'Select template',
219
221
  options: [
220
222
  {
@@ -227,7 +229,7 @@ async function forgeTemplate({ projectType, argv, templateParameters, distFolder
227
229
  }
228
230
  ]
229
231
  }));
230
- roleType = argv.role || checkCancel(await (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.select)({
232
+ roleType = argv.role || checkCancel(await prompts_select({
231
233
  message: 'Please select the role of project you want to create:',
232
234
  initialValue: 'provider',
233
235
  options: [
@@ -273,7 +275,7 @@ async function forgeTemplate({ projectType, argv, templateParameters, distFolder
273
275
  await renderTemplate(templateDir);
274
276
  }
275
277
  async function create({ name, templates }) {
276
- const argv = (0, __WEBPACK_EXTERNAL_MODULE_minimist__["default"])(process.argv.slice(2), {
278
+ const argv = minimist(process.argv.slice(2), {
277
279
  alias: {
278
280
  h: 'help',
279
281
  d: 'dir',
@@ -283,29 +285,29 @@ async function create({ name, templates }) {
283
285
  }
284
286
  });
285
287
  console.log('');
286
- __WEBPACK_EXTERNAL_MODULE_rslog__.logger.greet(`\u{25C6} Create ${upperFirst(name)} Project`);
288
+ logger.greet(`◆ Create ${upperFirst(name)} Project`);
287
289
  if (argv.help) return void logHelpMessage(name, templates);
288
290
  const cwd = process.cwd();
289
291
  const pkgInfo = pkgFromUserAgent(process.env['npm_config_user_agent']);
290
292
  const pkgManager = pkgInfo ? pkgInfo.name : 'npm';
291
- const mfVersion = "0.0.0-perf-devtools-20260107043700";
293
+ const mfVersion = "0.0.0-perf-website-code-usage-20260914033703";
292
294
  argv.template = templates.includes(argv.template || '') ? argv.template : void 0;
293
295
  const projectType = await getProjectType(argv.template);
294
296
  if ("zephyr" === projectType) {
295
297
  const zephyrPackage = OTHER_TYPE['zephyr'].packageName;
296
298
  const zephyrCommand = `${pkgManager} create ${zephyrPackage}`;
297
- (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.note)(`Running: ${zephyrCommand}`, 'Launching Zephyr setup');
298
- (0, __WEBPACK_EXTERNAL_MODULE_child_process__.spawnSync)(pkgManager, [
299
+ note(`Running: ${zephyrCommand}`, 'Launching Zephyr setup');
300
+ spawnSync(pkgManager, [
299
301
  'create',
300
302
  zephyrPackage
301
303
  ], {
302
304
  stdio: 'inherit',
303
305
  shell: true
304
306
  });
305
- (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.outro)('Done.');
307
+ outro('Done.');
306
308
  return;
307
309
  }
308
- const mfName = argv.name || checkCancel(await (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.text)({
310
+ const mfName = argv.name || checkCancel(await prompts_text({
309
311
  message: 'Please input Module Federation name:',
310
312
  placeholder: 'mf_project_name',
311
313
  defaultValue: 'mf_project_name',
@@ -313,10 +315,10 @@ async function create({ name, templates }) {
313
315
  if (0 === value.length) return 'Name is required';
314
316
  }
315
317
  }));
316
- const { targetDir } = formatProjectName(__WEBPACK_EXTERNAL_MODULE_path__["default"].join(argv.dir || mfName));
317
- const distFolder = __WEBPACK_EXTERNAL_MODULE_path__["default"].isAbsolute(targetDir) ? targetDir : __WEBPACK_EXTERNAL_MODULE_path__["default"].join(cwd, targetDir);
318
- if (!argv.override && __WEBPACK_EXTERNAL_MODULE_fs__["default"].existsSync(distFolder) && !isEmptyDir(distFolder)) {
319
- const option = checkCancel(await (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.select)({
318
+ const { targetDir } = formatProjectName(path_0.join(argv.dir || mfName));
319
+ const distFolder = path_0.isAbsolute(targetDir) ? targetDir : path_0.join(cwd, targetDir);
320
+ if (!argv.override && fs.existsSync(distFolder) && !isEmptyDir(distFolder)) {
321
+ const option = checkCancel(await prompts_select({
320
322
  message: `"${targetDir}" is not empty, please choose:`,
321
323
  options: [
322
324
  {
@@ -345,8 +347,8 @@ async function create({ name, templates }) {
345
347
  `${pkgManager} install`,
346
348
  `${pkgManager} run ${"lib" === projectType ? 'mf-dev' : 'dev'}`
347
349
  ];
348
- (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.note)(nextSteps.join('\n'), 'Next steps');
349
- (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.outro)('Done.');
350
+ note(nextSteps.join('\n'), 'Next steps');
351
+ outro('Done.');
350
352
  }
351
353
  const TEMPLATES = [
352
354
  'provider-modern',
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Create a new Module Federation project",
4
4
  "public": true,
5
5
  "sideEffects": false,
6
- "version": "0.0.0-perf-devtools-20260107043700",
6
+ "version": "0.0.0-perf-website-code-usage-20260914033703",
7
7
  "license": "MIT",
8
8
  "repository": {
9
9
  "type": "git",
@@ -14,7 +14,9 @@
14
14
  "access": "public"
15
15
  },
16
16
  "type": "module",
17
- "main": "./dist/index.js",
17
+ "exports": {
18
+ ".": "./dist/index.js"
19
+ },
18
20
  "engines": {
19
21
  "node": ">=16.7.0"
20
22
  },
@@ -26,22 +28,23 @@
26
28
  "dist"
27
29
  ],
28
30
  "dependencies": {
29
- "@clack/prompts": "^0.8.2",
31
+ "@clack/prompts": "0.8.2",
30
32
  "execa": "5.1.1",
31
- "fs-extra": "9.1.0",
32
- "minimist": "^1.2.8",
33
- "rslog": "^1.2.3",
33
+ "minimist": "1.2.8",
34
+ "rslog": "1.2.3",
34
35
  "glob": "7.2.0",
35
- "handlebars": "4.7.7"
36
+ "handlebars": "4.7.9"
36
37
  },
37
38
  "devDependencies": {
38
39
  "@types/glob": "7.2.0",
39
40
  "@types/minimist": "^1.2.5",
40
- "@types/fs-extra": "9.0.6",
41
- "@rslib/core": "^0.9.0",
41
+ "@rslib/core": "^0.23.2",
42
42
  "rsbuild-plugin-publint": "^0.2.1"
43
43
  },
44
44
  "scripts": {
45
- "build": "rslib build"
45
+ "build": "rslib build",
46
+ "lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.ts\" \"package.json\"",
47
+ "test": "node scripts/verify-rslib-templates.mjs",
48
+ "pre-release": "pnpm run test && pnpm run build"
46
49
  }
47
50
  }
@@ -1,15 +1,7 @@
1
1
  import { appTools, defineConfig } from '@modern-js/app-tools';
2
- import { moduleFederationPlugin } from '@module-federation/modern-js';
2
+ import { moduleFederationPlugin } from '@module-federation/modern-js-v3';
3
3
 
4
4
  // https://modernjs.dev/en/configure/app/usage
5
5
  export default defineConfig({
6
- runtime: {
7
- router: true,
8
- },
9
- plugins: [
10
- appTools({
11
- bundler: 'rspack', // Set to 'webpack' to enable webpack
12
- }),
13
- moduleFederationPlugin(),
14
- ],
6
+ plugins: [appTools(), moduleFederationPlugin()],
15
7
  });
@@ -1,4 +1,4 @@
1
- import { createModuleFederationConfig } from '@module-federation/modern-js';
1
+ import { createModuleFederationConfig } from '@module-federation/modern-js-v3';
2
2
 
3
3
  export default createModuleFederationConfig({
4
4
  name: '{{mfName}}',
@@ -1,6 +1,7 @@
1
1
  import { pluginReact } from '@rsbuild/plugin-react';
2
2
  import { defineConfig } from '@rslib/core';
3
3
  import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
4
+ import { pluginPublint } from 'rsbuild-plugin-publint';
4
5
  import moduleFederationConfig from './module-federation.config';
5
6
  import pkg from './package.json';
6
7
 
@@ -48,5 +49,9 @@ export default defineConfig({
48
49
  server: {
49
50
  port: 3001,
50
51
  },
51
- plugins: [pluginReact(), pluginModuleFederation(moduleFederationConfig)],
52
+ plugins: [
53
+ pluginReact(),
54
+ pluginModuleFederation(moduleFederationConfig),
55
+ pluginPublint(),
56
+ ],
52
57
  });
@@ -24,22 +24,21 @@
24
24
  "pre-commit": "npx lint-staged"
25
25
  },
26
26
  "dependencies": {
27
- "@modern-js/runtime": "^2.68.0",
27
+ "@modern-js/runtime": "0.0.0-canary-20260129131527",
28
28
  "react": "^18.3.1",
29
29
  "react-dom": "^18.3.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@modern-js/app-tools": "^2.68.0",
33
- "@modern-js/tsconfig": "^2.68.0",
32
+ "@modern-js/app-tools": "0.0.0-canary-20260129131527",
33
+ "@modern-js/tsconfig": "0.0.0-canary-20260129131527",
34
34
  "@biomejs/biome": "1.8.3",
35
35
  "typescript": "~5.0.4",
36
- "@types/jest": "~29.2.4",
37
36
  "@types/node": "~18.11.9",
38
37
  "@types/react": "^18.3.11",
39
38
  "@types/react-dom": "~18.3.1",
40
39
  "lint-staged": "~13.1.0",
41
40
  "simple-git-hooks": "^2.11.1",
42
41
  "rimraf": "^6.0.1",
43
- "@module-federation/modern-js":"^{{mfVersion}}"
42
+ "@module-federation/modern-js-v3":"^{{mfVersion}}"
44
43
  }
45
44
  }
@@ -3,11 +3,10 @@
3
3
  "compilerOptions": {
4
4
  "declaration": false,
5
5
  "jsx": "preserve",
6
- "baseUrl": "./",
7
6
  "paths": {
8
7
  "@/*": ["./src/*"],
9
8
  "@shared/*": ["./shared/*"],
10
- "*": ["./@mf-types/*"]
9
+ "*": ["./@mf-types/*", "./*"]
11
10
  }
12
11
  },
13
12
  "include": ["src", "shared", "config", "modern.config.ts"],
@@ -1,17 +1,9 @@
1
1
  import { appTools, defineConfig } from '@modern-js/app-tools';
2
- import { moduleFederationPlugin } from '@module-federation/modern-js';
2
+ import { moduleFederationPlugin } from '@module-federation/modern-js-v3';
3
3
 
4
4
  // https://modernjs.dev/en/configure/app/usage
5
5
  export default defineConfig({
6
- runtime: {
7
- router: true,
8
- },
9
- plugins: [
10
- appTools({
11
- bundler: 'rspack', // Set to 'webpack' to enable webpack
12
- }),
13
- moduleFederationPlugin(),
14
- ],
6
+ plugins: [appTools(), moduleFederationPlugin()],
15
7
  server: {
16
8
  port: 3001,
17
9
  },
@@ -1,4 +1,4 @@
1
- import { createModuleFederationConfig } from '@module-federation/modern-js';
1
+ import { createModuleFederationConfig } from '@module-federation/modern-js-v3';
2
2
 
3
3
  export default createModuleFederationConfig({
4
4
  name: '{{mfName}}',
@@ -12,7 +12,7 @@ pnpm build
12
12
 
13
13
  Dev package
14
14
 
15
- 1.
15
+ 1.
16
16
 
17
17
  ```
18
18
  pnpm mf-dev
@@ -4,12 +4,13 @@
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
- "types": "./dist/index.d.ts",
8
- "import": "./dist/index.js"
7
+ "types": "./dist/esm/index.d.ts",
8
+ "import": "./dist/esm/index.js",
9
+ "require": "./dist/cjs/index.cjs"
9
10
  }
10
11
  },
11
- "module": "./dist/index.js",
12
- "types": "./dist/index.d.ts",
12
+ "module": "./dist/esm/index.js",
13
+ "types": "./dist/esm/index.d.ts",
13
14
  "files": [
14
15
  "dist"
15
16
  ],
@@ -21,9 +22,9 @@
21
22
  "mf-dev": "rslib mf-dev"
22
23
  },
23
24
  "devDependencies": {
24
- "@rsbuild/core": "^1.3.22",
25
- "@rsbuild/plugin-react": "^1.3.1",
26
- "@rslib/core": ">=0.9.0",
25
+ "@rsbuild/core": "2.1.4",
26
+ "@rsbuild/plugin-react": "^2.1.0",
27
+ "@rslib/core": ">=0.23.2",
27
28
  "@storybook/addon-essentials": "^8.4.7",
28
29
  "@storybook/addon-interactions": "^8.4.7",
29
30
  "@storybook/addon-links": "^8.4.7",
@@ -41,7 +42,8 @@
41
42
  "typescript": "^5.7.3",
42
43
  "@types/node": "^22.13.9",
43
44
  "@module-federation/rsbuild-plugin":"^{{mfVersion}}",
44
- "@module-federation/storybook-addon":"^4.0.1"
45
+ "@module-federation/storybook-addon":"^4.0.1",
46
+ "rsbuild-plugin-publint": "^0.2.1"
45
47
  },
46
48
  "peerDependencies": {
47
49
  "react": ">=16.9.0",
@@ -12,8 +12,6 @@ pnpm build
12
12
 
13
13
  Dev package
14
14
 
15
-
16
15
  ```
17
16
  pnpm mf-dev
18
17
  ```
19
-
@@ -4,12 +4,13 @@
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
- "types": "./dist/index.d.ts",
8
- "import": "./dist/index.js"
7
+ "types": "./dist/esm/index.d.ts",
8
+ "import": "./dist/esm/index.js",
9
+ "require": "./dist/cjs/index.cjs"
9
10
  }
10
11
  },
11
- "module": "./dist/index.js",
12
- "types": "./dist/index.d.ts",
12
+ "module": "./dist/esm/index.js",
13
+ "types": "./dist/esm/index.d.ts",
13
14
  "files": [
14
15
  "dist"
15
16
  ],
@@ -19,14 +20,15 @@
19
20
  "mf-dev": "rslib mf-dev"
20
21
  },
21
22
  "devDependencies": {
22
- "@rsbuild/core": "^1.3.21",
23
- "@rsbuild/plugin-react": "^1.1.1",
24
- "@rslib/core": ">=0.9.0",
23
+ "@rsbuild/core": "2.1.4",
24
+ "@rsbuild/plugin-react": "^2.1.0",
25
+ "@rslib/core": ">=0.23.2",
25
26
  "@types/react": "^18.3.11",
26
27
  "react": "^18.3.1",
27
28
  "typescript": "^5.7.3",
28
29
  "@types/node": "^22.13.9",
29
- "@module-federation/rsbuild-plugin":"^{{mfVersion}}"
30
+ "@module-federation/rsbuild-plugin":"^{{mfVersion}}",
31
+ "rsbuild-plugin-publint": "^0.2.1"
30
32
  },
31
33
  "peerDependencies": {
32
34
  "react": ">=16.9.0",
@@ -8,14 +8,14 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "react": "^18.3.1",
12
- "react-dom": "^18.3.1"
11
+ "react": "^19.2.3",
12
+ "react-dom": "^19.2.3"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.15",
16
- "@rsbuild/plugin-react": "^1.1.1",
17
- "@types/react": "^18.3.11",
18
- "@types/react-dom": "~18.3.1",
15
+ "@rsbuild/core": "2.1.4",
16
+ "@rsbuild/plugin-react": "^2.1.0",
17
+ "@types/react": "^19.2.7",
18
+ "@types/react-dom": "^19.2.3",
19
19
  "typescript": "^5.7.2",
20
20
  "@module-federation/rsbuild-plugin":"^{{mfVersion}}"
21
21
  }
package/dist/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024-present hanric(2heal1)
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.
@@ -1 +0,0 @@
1
- lts/hydrogen