@modern-js/utils 2.66.0 → 2.67.0

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.
@@ -115,6 +115,7 @@ const INTERNAL_CLI_PLUGINS = {
115
115
  "@modern-js/module-tools": "@modern-js/module-tools",
116
116
  "@modern-js/doc-tools": "@modern-js/doc-tools",
117
117
  "@modern-js/runtime": "@modern-js/runtime/cli",
118
+ "@modern-js/plugin-state": "@modern-js/plugin-state/cli",
118
119
  "@modern-js/plugin-proxy": "@modern-js/plugin-proxy/cli",
119
120
  "@modern-js/plugin-ssg": "@modern-js/plugin-ssg/cli",
120
121
  "@modern-js/plugin-bff": "@modern-js/plugin-bff/cli",
@@ -18,7 +18,6 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var config_exports = {};
20
20
  __export(config_exports, {
21
- isRouterV5: () => isRouterV5,
22
21
  isSSGEntry: () => isSSGEntry,
23
22
  isSSR: () => isSSR,
24
23
  isServiceWorker: () => isServiceWorker,
@@ -62,10 +61,6 @@ const isServiceWorker = (config) => {
62
61
  }
63
62
  return false;
64
63
  };
65
- const isRouterV5 = (config) => {
66
- var _config_runtime, _config_runtime_router, _config_runtime1;
67
- return typeof ((_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : _config_runtime.router) !== "boolean" && (config === null || config === void 0 ? void 0 : (_config_runtime1 = config.runtime) === null || _config_runtime1 === void 0 ? void 0 : (_config_runtime_router = _config_runtime1.router) === null || _config_runtime_router === void 0 ? void 0 : _config_runtime_router.mode) === "react-router-5";
68
- };
69
64
  const isSSGEntry = (config, entryName, entrypoints) => {
70
65
  var _config_source;
71
66
  const ssgConfig = config.output.ssg;
@@ -75,7 +70,6 @@ const isSSGEntry = (config, entryName, entrypoints) => {
75
70
  const isSingleEntry = (entrypoints, mainEntryName = import_constants.MAIN_ENTRY_NAME) => entrypoints.length === 1 && entrypoints[0].entryName === mainEntryName;
76
71
  // Annotate the CommonJS export names for ESM import in node:
77
72
  0 && (module.exports = {
78
- isRouterV5,
79
73
  isSSGEntry,
80
74
  isSSR,
81
75
  isServiceWorker,
@@ -62,6 +62,7 @@ var INTERNAL_CLI_PLUGINS = {
62
62
  "@modern-js/module-tools": "@modern-js/module-tools",
63
63
  "@modern-js/doc-tools": "@modern-js/doc-tools",
64
64
  "@modern-js/runtime": "@modern-js/runtime/cli",
65
+ "@modern-js/plugin-state": "@modern-js/plugin-state/cli",
65
66
  "@modern-js/plugin-proxy": "@modern-js/plugin-proxy/cli",
66
67
  "@modern-js/plugin-ssg": "@modern-js/plugin-ssg/cli",
67
68
  "@modern-js/plugin-bff": "@modern-js/plugin-bff/cli",
@@ -50,10 +50,6 @@ var isServiceWorker = function(config) {
50
50
  }
51
51
  return false;
52
52
  };
53
- var isRouterV5 = function(config) {
54
- var _config_runtime, _config_runtime_router, _config_runtime1;
55
- return typeof ((_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : _config_runtime.router) !== "boolean" && (config === null || config === void 0 ? void 0 : (_config_runtime1 = config.runtime) === null || _config_runtime1 === void 0 ? void 0 : (_config_runtime_router = _config_runtime1.router) === null || _config_runtime_router === void 0 ? void 0 : _config_runtime_router.mode) === "react-router-5";
56
- };
57
53
  var isSSGEntry = function(config, entryName, entrypoints) {
58
54
  var _config_source;
59
55
  var ssgConfig = config.output.ssg;
@@ -65,7 +61,6 @@ var isSingleEntry = function(entrypoints) {
65
61
  return entrypoints.length === 1 && entrypoints[0].entryName === mainEntryName;
66
62
  };
67
63
  export {
68
- isRouterV5,
69
64
  isSSGEntry,
70
65
  isSSR,
71
66
  isServiceWorker,
@@ -62,6 +62,7 @@ const INTERNAL_CLI_PLUGINS = {
62
62
  "@modern-js/module-tools": "@modern-js/module-tools",
63
63
  "@modern-js/doc-tools": "@modern-js/doc-tools",
64
64
  "@modern-js/runtime": "@modern-js/runtime/cli",
65
+ "@modern-js/plugin-state": "@modern-js/plugin-state/cli",
65
66
  "@modern-js/plugin-proxy": "@modern-js/plugin-proxy/cli",
66
67
  "@modern-js/plugin-ssg": "@modern-js/plugin-ssg/cli",
67
68
  "@modern-js/plugin-bff": "@modern-js/plugin-bff/cli",
@@ -33,10 +33,6 @@ const isServiceWorker = (config) => {
33
33
  }
34
34
  return false;
35
35
  };
36
- const isRouterV5 = (config) => {
37
- var _config_runtime, _config_runtime_router, _config_runtime1;
38
- return typeof ((_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : _config_runtime.router) !== "boolean" && (config === null || config === void 0 ? void 0 : (_config_runtime1 = config.runtime) === null || _config_runtime1 === void 0 ? void 0 : (_config_runtime_router = _config_runtime1.router) === null || _config_runtime_router === void 0 ? void 0 : _config_runtime_router.mode) === "react-router-5";
39
- };
40
36
  const isSSGEntry = (config, entryName, entrypoints) => {
41
37
  var _config_source;
42
38
  const ssgConfig = config.output.ssg;
@@ -45,7 +41,6 @@ const isSSGEntry = (config, entryName, entrypoints) => {
45
41
  };
46
42
  const isSingleEntry = (entrypoints, mainEntryName = MAIN_ENTRY_NAME) => entrypoints.length === 1 && entrypoints[0].entryName === mainEntryName;
47
43
  export {
48
- isRouterV5,
49
44
  isSSGEntry,
50
45
  isSSR,
51
46
  isServiceWorker,
@@ -17,13 +17,6 @@ export declare const isUseRsc: (config: any) => boolean;
17
17
  * @returns Whether to use worker deploy.
18
18
  */
19
19
  export declare const isServiceWorker: (config: any) => boolean;
20
- export declare const isRouterV5: (config: {
21
- runtime?: {
22
- router?: {
23
- mode?: string;
24
- } | boolean;
25
- };
26
- }) => boolean;
27
20
  export declare const isSSGEntry: (config: any, entryName: string, entrypoints: EntryPoint[]) => boolean;
28
21
  export declare const isSingleEntry: (entrypoints: EntryPoint[], mainEntryName?: string) => boolean;
29
22
  export {};
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.66.0",
18
+ "version": "2.67.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -190,7 +190,7 @@
190
190
  "jest": "^29",
191
191
  "typescript": "^5",
192
192
  "webpack": "^5.98.0",
193
- "@modern-js/types": "2.66.0",
193
+ "@modern-js/types": "2.67.0",
194
194
  "@scripts/build": "2.66.0",
195
195
  "@scripts/jest-config": "2.66.0"
196
196
  },