@modern-js/utils 3.1.4 → 3.2.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.
@@ -33,8 +33,8 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- getUserAlias: ()=>getUserAlias,
37
36
  getAliasConfig: ()=>getAliasConfig,
37
+ getUserAlias: ()=>getUserAlias,
38
38
  mergeAlias: ()=>mergeAlias
39
39
  });
40
40
  const external_fs_namespaceObject = require("fs");
@@ -24,10 +24,10 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- getCommand: ()=>getCommand,
27
+ deprecatedCommands: ()=>deprecatedCommands,
28
28
  getArgv: ()=>getArgv,
29
+ getCommand: ()=>getCommand,
29
30
  getFullArgv: ()=>getFullArgv,
30
- deprecatedCommands: ()=>deprecatedCommands,
31
31
  isDevCommand: ()=>isDevCommand
32
32
  });
33
33
  const external_logger_js_namespaceObject = require("./logger.js");
@@ -34,8 +34,8 @@ var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
36
  clearConsole: ()=>clearConsole,
37
- wait: ()=>wait,
38
- createDebugger: ()=>createDebugger
37
+ createDebugger: ()=>createDebugger,
38
+ wait: ()=>wait
39
39
  });
40
40
  const index_js_namespaceObject = require("../../compiled/debug/index.js");
41
41
  var index_js_default = /*#__PURE__*/ __webpack_require__.n(index_js_namespaceObject);
@@ -24,30 +24,30 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- SERVER_PLUGIN_POLYFILL: ()=>constants_js_namespaceObject.SERVER_PLUGIN_POLYFILL,
27
+ API_DIR: ()=>API_DIR,
28
+ CONFIG_CACHE_DIR: ()=>CONFIG_CACHE_DIR,
29
+ CONFIG_FILE_EXTENSIONS: ()=>CONFIG_FILE_EXTENSIONS,
28
30
  DEFAULT_API_PREFIX: ()=>DEFAULT_API_PREFIX,
31
+ DEFAULT_DEV_HOST: ()=>DEFAULT_DEV_HOST,
32
+ DEFAULT_ENTRY_NAME: ()=>constants_js_namespaceObject.DEFAULT_ENTRY_NAME,
33
+ DEFAULT_RUNTIME_CONFIG: ()=>DEFAULT_RUNTIME_CONFIG,
34
+ ENTRY_NAME_PATTERN: ()=>ENTRY_NAME_PATTERN,
29
35
  INTERNAL_RUNTIME_PLUGINS: ()=>INTERNAL_RUNTIME_PLUGINS,
30
36
  JS_EXTENSIONS: ()=>JS_EXTENSIONS,
31
- SHARED_DIR: ()=>SHARED_DIR,
32
- ROUTE_SPEC_FILE: ()=>constants_js_namespaceObject.ROUTE_SPEC_FILE,
33
- SERVER_DIR: ()=>SERVER_DIR,
34
- DEFAULT_RUNTIME_CONFIG: ()=>DEFAULT_RUNTIME_CONFIG,
35
- OUTPUT_CONFIG_FILE: ()=>OUTPUT_CONFIG_FILE,
36
- NESTED_ROUTE_SPEC_FILE: ()=>constants_js_namespaceObject.NESTED_ROUTE_SPEC_FILE,
37
- API_DIR: ()=>API_DIR,
38
- CONFIG_CACHE_DIR: ()=>CONFIG_CACHE_DIR,
39
37
  LOADABLE_STATS_FILE: ()=>LOADABLE_STATS_FILE,
40
- DEFAULT_DEV_HOST: ()=>DEFAULT_DEV_HOST,
38
+ LOADER_ROUTES_DIR: ()=>LOADER_ROUTES_DIR,
41
39
  MAIN_ENTRY_NAME: ()=>constants_js_namespaceObject.MAIN_ENTRY_NAME,
40
+ NESTED_ROUTE_SPEC_FILE: ()=>constants_js_namespaceObject.NESTED_ROUTE_SPEC_FILE,
41
+ OUTPUT_CONFIG_FILE: ()=>OUTPUT_CONFIG_FILE,
42
42
  ROUTE_MANIFEST_FILE: ()=>ROUTE_MANIFEST_FILE,
43
+ ROUTE_SPEC_FILE: ()=>constants_js_namespaceObject.ROUTE_SPEC_FILE,
43
44
  SERVER_BUNDLE_DIRECTORY: ()=>constants_js_namespaceObject.SERVER_BUNDLE_DIRECTORY,
45
+ SERVER_DIR: ()=>SERVER_DIR,
44
46
  SERVER_PLUGIN_BFF: ()=>constants_js_namespaceObject.SERVER_PLUGIN_BFF,
47
+ SERVER_PLUGIN_POLYFILL: ()=>constants_js_namespaceObject.SERVER_PLUGIN_POLYFILL,
45
48
  SERVER_RENDER_FUNCTION_NAME: ()=>constants_js_namespaceObject.SERVER_RENDER_FUNCTION_NAME,
46
49
  SERVER_WORKER_BUNDLE_DIRECTORY: ()=>SERVER_WORKER_BUNDLE_DIRECTORY,
47
- CONFIG_FILE_EXTENSIONS: ()=>CONFIG_FILE_EXTENSIONS,
48
- ENTRY_NAME_PATTERN: ()=>ENTRY_NAME_PATTERN,
49
- LOADER_ROUTES_DIR: ()=>LOADER_ROUTES_DIR,
50
- DEFAULT_ENTRY_NAME: ()=>constants_js_namespaceObject.DEFAULT_ENTRY_NAME
50
+ SHARED_DIR: ()=>SHARED_DIR
51
51
  });
52
52
  const constants_js_namespaceObject = require("../universal/constants.js");
53
53
  const JS_EXTENSIONS = [
@@ -24,8 +24,8 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- findExists: ()=>findExists,
28
- emptyDir: ()=>emptyDir
27
+ emptyDir: ()=>emptyDir,
28
+ findExists: ()=>findExists
29
29
  });
30
30
  const external_compiled_js_namespaceObject = require("../compiled.js");
31
31
  const findExists = (files)=>{
@@ -33,9 +33,9 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- getPackageManager: ()=>getPackageManager,
37
36
  getCoreJsVersion: ()=>getCoreJsVersion,
38
37
  getInternalPlugins: ()=>getInternalPlugins,
38
+ getPackageManager: ()=>getPackageManager,
39
39
  readTsConfig: ()=>readTsConfig,
40
40
  readTsConfigByFile: ()=>readTsConfigByFile
41
41
  });
@@ -25,11 +25,11 @@ var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  isSSGEntry: ()=>isSSGEntry,
28
- isUseSSRBundle: ()=>isUseSSRBundle,
28
+ isSSR: ()=>isSSR,
29
+ isServiceWorker: ()=>isServiceWorker,
29
30
  isSingleEntry: ()=>isSingleEntry,
30
31
  isUseRsc: ()=>isUseRsc,
31
- isSSR: ()=>isSSR,
32
- isServiceWorker: ()=>isServiceWorker
32
+ isUseSSRBundle: ()=>isUseSSRBundle
33
33
  });
34
34
  const external_constants_js_namespaceObject = require("../constants.js");
35
35
  const external_type_js_namespaceObject = require("./type.js");
@@ -33,16 +33,16 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- isVersionBeyond17: ()=>isVersionBeyond17,
37
- isReact18: ()=>isReact18,
38
- isWebOnly: ()=>isWebOnly,
39
36
  getReactVersion: ()=>getReactVersion,
40
37
  isApiOnly: ()=>isApiOnly,
41
38
  isBeyondReact17: ()=>isBeyondReact17,
42
39
  isDepExists: ()=>isDepExists,
43
- isTypescript: ()=>isTypescript,
40
+ isPackageInstalled: ()=>isPackageInstalled,
41
+ isReact18: ()=>isReact18,
44
42
  isSupportAutomaticJsx: ()=>isSupportAutomaticJsx,
45
- isPackageInstalled: ()=>isPackageInstalled
43
+ isTypescript: ()=>isTypescript,
44
+ isVersionBeyond17: ()=>isVersionBeyond17,
45
+ isWebOnly: ()=>isWebOnly
46
46
  });
47
47
  const external_path_namespaceObject = require("path");
48
48
  var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
@@ -33,10 +33,10 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
+ JS_LIKE_EXTENSION_RE: ()=>JS_LIKE_EXTENSION_RE,
36
37
  SOURCE_EXTENSIONS: ()=>SOURCE_EXTENSIONS,
37
38
  findMatchedSourcePath: ()=>findMatchedSourcePath,
38
- findSourceEntry: ()=>findSourceEntry,
39
- JS_LIKE_EXTENSION_RE: ()=>JS_LIKE_EXTENSION_RE
39
+ findSourceEntry: ()=>findSourceEntry
40
40
  });
41
41
  const external_node_fs_namespaceObject = require("node:fs");
42
42
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
@@ -33,12 +33,12 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- isPnpmWorkspaces: ()=>isPnpmWorkspaces,
37
36
  findMonorepoRoot: ()=>findMonorepoRoot,
38
37
  getMonorepoPackages: ()=>getMonorepoPackages,
38
+ isLerna: ()=>isLerna,
39
39
  isMonorepo: ()=>isMonorepo,
40
- isYarnWorkspaces: ()=>isYarnWorkspaces,
41
- isLerna: ()=>isLerna
40
+ isPnpmWorkspaces: ()=>isPnpmWorkspaces,
41
+ isYarnWorkspaces: ()=>isYarnWorkspaces
42
42
  });
43
43
  const external_fs_namespaceObject = require("fs");
44
44
  var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
@@ -24,11 +24,11 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- canUsePnpm: ()=>canUsePnpm,
28
- removeModuleSyncFromExports: ()=>removeModuleSyncFromExports,
29
27
  canUseNpm: ()=>canUseNpm,
28
+ canUsePnpm: ()=>canUsePnpm,
29
+ canUseYarn: ()=>canUseYarn,
30
30
  getPnpmVersion: ()=>getPnpmVersion,
31
- canUseYarn: ()=>canUseYarn
31
+ removeModuleSyncFromExports: ()=>removeModuleSyncFromExports
32
32
  });
33
33
  const external_compiled_js_namespaceObject = require("../compiled.js");
34
34
  async function getPnpmVersion() {
@@ -33,17 +33,17 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
+ formatImportPath: ()=>formatImportPath,
36
37
  getRealTemporaryDirectory: ()=>getRealTemporaryDirectory,
37
- removeLeadingSlash: ()=>removeLeadingSlash,
38
- removeTailSlash: ()=>removeTailSlash,
39
- normalizeToPosixPath: ()=>normalizeToPosixPath,
40
- isRelativePath: ()=>isRelativePath,
41
38
  getTemplatePath: ()=>getTemplatePath,
42
- removeSlash: ()=>removeSlash,
43
- splitPathString: ()=>splitPathString,
44
39
  isPathString: ()=>isPathString,
40
+ isRelativePath: ()=>isRelativePath,
45
41
  normalizeOutputPath: ()=>normalizeOutputPath,
46
- formatImportPath: ()=>formatImportPath
42
+ normalizeToPosixPath: ()=>normalizeToPosixPath,
43
+ removeLeadingSlash: ()=>removeLeadingSlash,
44
+ removeSlash: ()=>removeSlash,
45
+ removeTailSlash: ()=>removeTailSlash,
46
+ splitPathString: ()=>splitPathString
47
47
  });
48
48
  const external_fs_namespaceObject = require("fs");
49
49
  var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
@@ -33,8 +33,8 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- prettyInstructions: ()=>prettyInstructions,
37
- getAddressUrls: ()=>getAddressUrls
36
+ getAddressUrls: ()=>getAddressUrls,
37
+ prettyInstructions: ()=>prettyInstructions
38
38
  });
39
39
  const external_net_namespaceObject = require("net");
40
40
  const external_os_namespaceObject = require("os");
@@ -24,12 +24,12 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
+ cleanRequireCache: ()=>cleanRequireCache,
27
28
  compatibleRequire: ()=>compatibleRequire,
28
29
  dynamicImport: ()=>dynamicImport,
30
+ loadFromProject: ()=>loadFromProject,
29
31
  requireExistModule: ()=>requireExistModule,
30
- tryResolve: ()=>tryResolve,
31
- cleanRequireCache: ()=>cleanRequireCache,
32
- loadFromProject: ()=>loadFromProject
32
+ tryResolve: ()=>tryResolve
33
33
  });
34
34
  const external_node_path_namespaceObject = require("node:path");
35
35
  const external_node_url_namespaceObject = require("node:url");
@@ -24,9 +24,9 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- markRoutes: ()=>markRoutes,
28
27
  filterRoutesForServer: ()=>filterRoutesForServer,
29
- filterRoutesLoader: ()=>filterRoutesLoader
28
+ filterRoutesLoader: ()=>filterRoutesLoader,
29
+ markRoutes: ()=>markRoutes
30
30
  });
31
31
  const external_compiled_js_namespaceObject = require("../compiled.js");
32
32
  const { cloneDeep } = external_compiled_js_namespaceObject.lodash;
@@ -33,8 +33,8 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- watch: ()=>watch,
37
- WatchChangeType: ()=>WatchChangeType
36
+ WatchChangeType: ()=>WatchChangeType,
37
+ watch: ()=>watch
38
38
  });
39
39
  const external_path_namespaceObject = require("path");
40
40
  var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
@@ -36,38 +36,38 @@ var __webpack_require__ = {};
36
36
  var __webpack_exports__ = {};
37
37
  __webpack_require__.r(__webpack_exports__);
38
38
  __webpack_require__.d(__webpack_exports__, {
39
- urlJoin: ()=>url_join_index_js_default(),
40
- stripAnsi: ()=>strip_ansi_index_js_default(),
41
- gzipSize: ()=>gzip_size_index_js_default(),
42
- inquirer: ()=>inquirer,
43
- dotenvExpand: ()=>dotenv_expand_index_js_default(),
44
- nanoid: ()=>nanoid_index_js_namespaceObject.nanoid,
45
- signale: ()=>signale_index_js_default(),
39
+ Command: ()=>commander_index_js_namespaceObject.Command,
40
+ Signale: ()=>Signale,
41
+ address: ()=>address_index_js_default(),
42
+ browserslist: ()=>browserslist_index_js_default(),
46
43
  chalk: ()=>chalk_index_js_default(),
47
- glob: ()=>glob_index_js_default(),
48
- json5: ()=>json5_index_js_default(),
49
44
  chokidar: ()=>chokidar,
50
- slash: ()=>slash_index_js_default(),
45
+ debug: ()=>debug_index_js_default(),
46
+ dotenv: ()=>dotenv_index_js_default(),
47
+ dotenvExpand: ()=>dotenv_expand_index_js_default(),
48
+ execa: ()=>execa_index_js_default(),
49
+ fastGlob: ()=>fast_glob_index_js_default(),
51
50
  filesize: ()=>filesize_index_js_default(),
51
+ fs: ()=>index_js_default(),
52
+ glob: ()=>glob_index_js_default(),
53
+ globby: ()=>globby_index_js_default(),
54
+ gzipSize: ()=>gzip_size_index_js_default(),
55
+ inquirer: ()=>inquirer,
56
+ json5: ()=>json5_index_js_default(),
52
57
  lodash: ()=>lodash_index_js_default(),
53
- Command: ()=>commander_index_js_namespaceObject.Command,
54
- address: ()=>address_index_js_default(),
55
- debug: ()=>debug_index_js_default(),
56
- yaml: ()=>js_yaml_index_js_default(),
58
+ mime: ()=>mime,
59
+ minimist: ()=>minimist_index_js_default(),
60
+ nanoid: ()=>nanoid_index_js_namespaceObject.nanoid,
57
61
  ora: ()=>ora_index_js_default(),
58
- browserslist: ()=>browserslist_index_js_default(),
59
- globby: ()=>globby_index_js_default(),
60
62
  pkgUp: ()=>pkg_up_index_js_default(),
61
- fs: ()=>index_js_default(),
62
63
  program: ()=>commander_index_js_namespaceObject.program,
63
- minimist: ()=>minimist_index_js_default(),
64
- upath: ()=>upath_index_js_default(),
65
64
  semver: ()=>semver_index_js_default(),
66
- Signale: ()=>Signale,
67
- fastGlob: ()=>fast_glob_index_js_default(),
68
- dotenv: ()=>dotenv_index_js_default(),
69
- mime: ()=>mime,
70
- execa: ()=>execa_index_js_default()
65
+ signale: ()=>signale_index_js_default(),
66
+ slash: ()=>slash_index_js_default(),
67
+ stripAnsi: ()=>strip_ansi_index_js_default(),
68
+ upath: ()=>upath_index_js_default(),
69
+ urlJoin: ()=>url_join_index_js_default(),
70
+ yaml: ()=>js_yaml_index_js_default()
71
71
  });
72
72
  const external_node_module_namespaceObject = require("node:module");
73
73
  const external_import_js_namespaceObject = require("./import.js");
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.1.4",
18
+ "version": "3.2.0",
19
19
  "types": "./dist/types/index.d.ts",
20
20
  "main": "./dist/cjs/index.js",
21
21
  "module": "./dist/esm/index.mjs",
@@ -137,22 +137,22 @@
137
137
  "@swc/helpers": "^0.5.17",
138
138
  "caniuse-lite": "^1.0.30001520",
139
139
  "import-meta-resolve": "^4.2.0",
140
- "lodash": "^4.17.23",
141
- "lodash-es": "^4.17.23",
140
+ "lodash": "^4.18.1",
141
+ "lodash-es": "^4.18.1",
142
142
  "rslog": "^1.3.2"
143
143
  },
144
144
  "devDependencies": {
145
- "@rslib/core": "0.21.0",
145
+ "@rslib/core": "0.21.4",
146
146
  "@types/node": "^20",
147
147
  "happy-dom": "^20.8.9",
148
148
  "typescript": "^5",
149
149
  "@modern-js/rslib": "2.68.10",
150
- "@modern-js/types": "3.1.4",
150
+ "@modern-js/types": "3.2.0",
151
151
  "@scripts/rstest-config": "2.66.0"
152
152
  },
153
153
  "peerDependencies": {
154
- "react": "^19.2.4",
155
- "react-dom": "^19.2.4"
154
+ "react": "^19.2.6",
155
+ "react-dom": "^19.2.6"
156
156
  },
157
157
  "peerDependenciesMeta": {
158
158
  "react": {