@modern-js/utils 2.36.0 → 2.37.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,6 @@ __export(constants_exports, {
22
22
  API_DIR: () => API_DIR,
23
23
  CONFIG_CACHE_DIR: () => CONFIG_CACHE_DIR,
24
24
  CONFIG_FILE_EXTENSIONS: () => CONFIG_FILE_EXTENSIONS,
25
- DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: () => DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS,
26
25
  DEFAULT_DEV_HOST: () => DEFAULT_DEV_HOST,
27
26
  DEFAULT_SERVER_CONFIG: () => DEFAULT_SERVER_CONFIG,
28
27
  ENTRY_NAME_PATTERN: () => ENTRY_NAME_PATTERN,
@@ -145,21 +144,11 @@ const INTERNAL_SERVER_PLUGINS = {
145
144
  [SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
146
145
  [SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
147
146
  };
148
- const DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
149
- allowNamespaces: true,
150
- allExtensions: true,
151
- allowDeclareFields: true,
152
- // aligns Babel's behavior with TypeScript's default behavior.
153
- // https://babeljs.io/docs/en/babel-preset-typescript#optimizeconstenums
154
- optimizeConstEnums: true,
155
- isTSX: true
156
- };
157
147
  // Annotate the CommonJS export names for ESM import in node:
158
148
  0 && (module.exports = {
159
149
  API_DIR,
160
150
  CONFIG_CACHE_DIR,
161
151
  CONFIG_FILE_EXTENSIONS,
162
- DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS,
163
152
  DEFAULT_DEV_HOST,
164
153
  DEFAULT_SERVER_CONFIG,
165
154
  ENTRY_NAME_PATTERN,
@@ -21,10 +21,12 @@ __export(constants_exports, {
21
21
  HMR_SOCK_PATH: () => HMR_SOCK_PATH,
22
22
  HTML_CHUNKSMAP_SEPARATOR: () => HTML_CHUNKSMAP_SEPARATOR,
23
23
  LOADER_REPORTER_NAME: () => LOADER_REPORTER_NAME,
24
- ROUTE_MANIFEST: () => ROUTE_MANIFEST
24
+ ROUTE_MANIFEST: () => ROUTE_MANIFEST,
25
+ ROUTE_MODULES: () => ROUTE_MODULES
25
26
  });
26
27
  module.exports = __toCommonJS(constants_exports);
27
28
  const ROUTE_MANIFEST = `_MODERNJS_ROUTE_MANIFEST`;
29
+ const ROUTE_MODULES = `_routeModules`;
28
30
  const HMR_SOCK_PATH = "/webpack-hmr";
29
31
  const HTML_CHUNKSMAP_SEPARATOR = "<!--<?- chunksMap.js ?>-->";
30
32
  const LOADER_REPORTER_NAME = `server-loader`;
@@ -33,5 +35,6 @@ const LOADER_REPORTER_NAME = `server-loader`;
33
35
  HMR_SOCK_PATH,
34
36
  HTML_CHUNKSMAP_SEPARATOR,
35
37
  LOADER_REPORTER_NAME,
36
- ROUTE_MANIFEST
38
+ ROUTE_MANIFEST,
39
+ ROUTE_MODULES
37
40
  });
@@ -86,21 +86,11 @@ var SERVER_PLUGIN_SERVER = "@modern-js/plugin-server";
86
86
  var SERVER_PLUGIN_POLYFILL = "@modern-js/plugin-polyfill";
87
87
  var _obj;
88
88
  var INTERNAL_SERVER_PLUGINS = (_obj = {}, _define_property(_obj, SERVER_PLUGIN_BFF, "@modern-js/plugin-bff/server"), _define_property(_obj, SERVER_PLUGIN_EXPRESS, "@modern-js/plugin-express/server"), _define_property(_obj, SERVER_PLUGIN_KOA, "@modern-js/plugin-koa/server"), _define_property(_obj, SERVER_PLUGIN_SERVER, "@modern-js/plugin-server/server"), _define_property(_obj, SERVER_PLUGIN_POLYFILL, "@modern-js/plugin-polyfill/server"), _obj);
89
- var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
90
- allowNamespaces: true,
91
- allExtensions: true,
92
- allowDeclareFields: true,
93
- // aligns Babel's behavior with TypeScript's default behavior.
94
- // https://babeljs.io/docs/en/babel-preset-typescript#optimizeconstenums
95
- optimizeConstEnums: true,
96
- isTSX: true
97
- };
98
89
  export * from "./chainId";
99
90
  export {
100
91
  API_DIR,
101
92
  CONFIG_CACHE_DIR,
102
93
  CONFIG_FILE_EXTENSIONS,
103
- DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS,
104
94
  DEFAULT_DEV_HOST,
105
95
  DEFAULT_SERVER_CONFIG,
106
96
  ENTRY_NAME_PATTERN,
@@ -1,4 +1,5 @@
1
1
  var ROUTE_MANIFEST = "_MODERNJS_ROUTE_MANIFEST";
2
+ var ROUTE_MODULES = "_routeModules";
2
3
  var HMR_SOCK_PATH = "/webpack-hmr";
3
4
  var HTML_CHUNKSMAP_SEPARATOR = "<!--<?- chunksMap.js ?>-->";
4
5
  var LOADER_REPORTER_NAME = "server-loader";
@@ -6,5 +7,6 @@ export {
6
7
  HMR_SOCK_PATH,
7
8
  HTML_CHUNKSMAP_SEPARATOR,
8
9
  LOADER_REPORTER_NAME,
9
- ROUTE_MANIFEST
10
+ ROUTE_MANIFEST,
11
+ ROUTE_MODULES
10
12
  };
@@ -90,21 +90,11 @@ const INTERNAL_SERVER_PLUGINS = {
90
90
  [SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
91
91
  [SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
92
92
  };
93
- const DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
94
- allowNamespaces: true,
95
- allExtensions: true,
96
- allowDeclareFields: true,
97
- // aligns Babel's behavior with TypeScript's default behavior.
98
- // https://babeljs.io/docs/en/babel-preset-typescript#optimizeconstenums
99
- optimizeConstEnums: true,
100
- isTSX: true
101
- };
102
93
  export * from "./chainId";
103
94
  export {
104
95
  API_DIR,
105
96
  CONFIG_CACHE_DIR,
106
97
  CONFIG_FILE_EXTENSIONS,
107
- DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS,
108
98
  DEFAULT_DEV_HOST,
109
99
  DEFAULT_SERVER_CONFIG,
110
100
  ENTRY_NAME_PATTERN,
@@ -1,4 +1,5 @@
1
1
  const ROUTE_MANIFEST = `_MODERNJS_ROUTE_MANIFEST`;
2
+ const ROUTE_MODULES = `_routeModules`;
2
3
  const HMR_SOCK_PATH = "/webpack-hmr";
3
4
  const HTML_CHUNKSMAP_SEPARATOR = "<!--<?- chunksMap.js ?>-->";
4
5
  const LOADER_REPORTER_NAME = `server-loader`;
@@ -6,5 +7,6 @@ export {
6
7
  HMR_SOCK_PATH,
7
8
  HTML_CHUNKSMAP_SEPARATOR,
8
9
  LOADER_REPORTER_NAME,
9
- ROUTE_MANIFEST
10
+ ROUTE_MANIFEST,
11
+ ROUTE_MODULES
10
12
  };
@@ -89,18 +89,4 @@ export declare const SERVER_PLUGIN_KOA = "@modern-js/plugin-koa";
89
89
  export declare const SERVER_PLUGIN_SERVER = "@modern-js/plugin-server";
90
90
  export declare const SERVER_PLUGIN_POLYFILL = "@modern-js/plugin-polyfill";
91
91
  export declare const INTERNAL_SERVER_PLUGINS: InternalPlugins;
92
- /**
93
- * The `@babel/preset-typescript` default options.
94
- *
95
- * for:
96
- * - `@modern-js/builder-rspack-provider`
97
- * - `@modern-js/babel-preset-base`
98
- */
99
- export declare const DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: {
100
- allowNamespaces: boolean;
101
- allExtensions: boolean;
102
- allowDeclareFields: boolean;
103
- optimizeConstEnums: boolean;
104
- isTSX: boolean;
105
- };
106
92
  export * from './chainId';
@@ -2,6 +2,10 @@
2
2
  * Property mounted on window that describes route manifest
3
3
  */
4
4
  export declare const ROUTE_MANIFEST = "_MODERNJS_ROUTE_MANIFEST";
5
+ /**
6
+ * Property mounted on window that record all route modules
7
+ */
8
+ export declare const ROUTE_MODULES = "_routeModules";
5
9
  /**
6
10
  * hmr socket connect path
7
11
  */
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.36.0",
18
+ "version": "2.37.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -160,7 +160,7 @@
160
160
  "dependencies": {
161
161
  "caniuse-lite": "^1.0.30001520",
162
162
  "lodash": "^4.17.21",
163
- "rslog": "^1.0.0",
163
+ "rslog": "^1.1.0",
164
164
  "@swc/helpers": "0.5.1"
165
165
  },
166
166
  "devDependencies": {
@@ -169,9 +169,9 @@
169
169
  "jest": "^29",
170
170
  "typescript": "^5",
171
171
  "webpack": "^5.88.1",
172
- "@modern-js/types": "2.36.0",
173
- "@scripts/build": "2.36.0",
174
- "@scripts/jest-config": "2.36.0"
172
+ "@modern-js/types": "2.37.0",
173
+ "@scripts/build": "2.37.0",
174
+ "@scripts/jest-config": "2.37.0"
175
175
  },
176
176
  "sideEffects": false,
177
177
  "scripts": {