@bleedingdev/modern-js-plugin 3.11.3-ultramodern.6 → 3.11.3-ultramodern.8

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.
@@ -37,7 +37,6 @@ var __webpack_require__ = {};
37
37
  var __webpack_exports__ = {};
38
38
  __webpack_require__.r(__webpack_exports__);
39
39
  __webpack_require__.d(__webpack_exports__, {
40
- clearFilesOverTime: ()=>clearFilesOverTime,
41
40
  getConfigFilePath: ()=>getConfigFilePath,
42
41
  loadConfig: ()=>loadConfig,
43
42
  loadTypeScriptFile: ()=>loadTypeScriptFile
@@ -51,18 +50,6 @@ const getConfigFilePath = (appDirectory, configFilePath)=>{
51
50
  if (external_path_default().isAbsolute(configFilePath)) return configFilePath;
52
51
  return external_path_default().resolve(appDirectory, configFilePath);
53
52
  };
54
- const clearFilesOverTime = async (targetDir, overtime)=>{
55
- try {
56
- const files = await (0, utils_namespaceObject.globby)(`${targetDir}/**/*`, {
57
- stats: true,
58
- absolute: true
59
- });
60
- const currentTime = Date.now();
61
- if (files.length > 0) {
62
- for (const file of files)if (currentTime - file.stats.birthtimeMs >= 1000 * overtime) utils_namespaceObject.fs.unlinkSync(file.path);
63
- }
64
- } catch (err) {}
65
- };
66
53
  async function loadConfigContent(configFile) {
67
54
  const jitiFrom = __filename;
68
55
  const jiti = (0, external_jiti_namespaceObject.createJiti)(jitiFrom, {
@@ -103,12 +90,10 @@ const loadConfig = async (appDirectory, configFile)=>{
103
90
  config
104
91
  };
105
92
  };
106
- exports.clearFilesOverTime = __webpack_exports__.clearFilesOverTime;
107
93
  exports.getConfigFilePath = __webpack_exports__.getConfigFilePath;
108
94
  exports.loadConfig = __webpack_exports__.loadConfig;
109
95
  exports.loadTypeScriptFile = __webpack_exports__.loadTypeScriptFile;
110
96
  for(var __rspack_i in __webpack_exports__)if (-1 === [
111
- "clearFilesOverTime",
112
97
  "getConfigFilePath",
113
98
  "loadConfig",
114
99
  "loadTypeScriptFile"
@@ -1,4 +1,4 @@
1
- import { compatibleRequire, fs, globby } from "@modern-js/utils";
1
+ import { compatibleRequire, fs } from "@modern-js/utils";
2
2
  import { createJiti } from "jiti";
3
3
  import path from "path";
4
4
  const getConfigFilePath = (appDirectory, configFilePath)=>{
@@ -6,18 +6,6 @@ const getConfigFilePath = (appDirectory, configFilePath)=>{
6
6
  if (path.isAbsolute(configFilePath)) return configFilePath;
7
7
  return path.resolve(appDirectory, configFilePath);
8
8
  };
9
- const clearFilesOverTime = async (targetDir, overtime)=>{
10
- try {
11
- const files = await globby(`${targetDir}/**/*`, {
12
- stats: true,
13
- absolute: true
14
- });
15
- const currentTime = Date.now();
16
- if (files.length > 0) {
17
- for (const file of files)if (currentTime - file.stats.birthtimeMs >= 1000 * overtime) fs.unlinkSync(file.path);
18
- }
19
- } catch (err) {}
20
- };
21
9
  async function loadConfigContent(configFile) {
22
10
  const jitiFrom = import.meta.url;
23
11
  const jiti = createJiti(jitiFrom, {
@@ -58,4 +46,4 @@ const loadConfig = async (appDirectory, configFile)=>{
58
46
  config
59
47
  };
60
48
  };
61
- export { clearFilesOverTime, getConfigFilePath, loadConfig, loadTypeScriptFile };
49
+ export { getConfigFilePath, loadConfig, loadTypeScriptFile };
@@ -1,5 +1,5 @@
1
1
  import "node:module";
2
- import { compatibleRequire, fs, globby } from "@modern-js/utils";
2
+ import { compatibleRequire, fs } from "@modern-js/utils";
3
3
  import { createJiti } from "jiti";
4
4
  import path from "path";
5
5
  import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
@@ -9,18 +9,6 @@ const getConfigFilePath = (appDirectory, configFilePath)=>{
9
9
  if (path.isAbsolute(configFilePath)) return configFilePath;
10
10
  return path.resolve(appDirectory, configFilePath);
11
11
  };
12
- const clearFilesOverTime = async (targetDir, overtime)=>{
13
- try {
14
- const files = await globby(`${targetDir}/**/*`, {
15
- stats: true,
16
- absolute: true
17
- });
18
- const currentTime = Date.now();
19
- if (files.length > 0) {
20
- for (const file of files)if (currentTime - file.stats.birthtimeMs >= 1000 * overtime) fs.unlinkSync(file.path);
21
- }
22
- } catch (err) {}
23
- };
24
12
  async function loadConfigContent(configFile) {
25
13
  const jitiFrom = import.meta.url;
26
14
  const jiti = createJiti(jitiFrom, {
@@ -61,4 +49,4 @@ const loadConfig = async (appDirectory, configFile)=>{
61
49
  config
62
50
  };
63
51
  };
64
- export { clearFilesOverTime, getConfigFilePath, loadConfig, loadTypeScriptFile };
52
+ export { getConfigFilePath, loadConfig, loadTypeScriptFile };
@@ -1,10 +1,4 @@
1
1
  export declare const getConfigFilePath: (appDirectory: string, configFilePath: string | false) => string | false;
2
- /**
3
- *
4
- * @param targetDir target dir
5
- * @param overtime Unit of second
6
- */
7
- export declare const clearFilesOverTime: (targetDir: string, overtime: number) => Promise<void>;
8
2
  /**
9
3
  * Parse and load user config file, support extensions like .ts, mjs, js, ejs.
10
4
  * @param appDirectory - App root directory, from which start search user config file.
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "modern",
18
18
  "modern.js"
19
19
  ],
20
- "version": "3.11.3-ultramodern.6",
20
+ "version": "3.11.3-ultramodern.8",
21
21
  "types": "./dist/types/index.d.ts",
22
22
  "main": "./dist/cjs/index.js",
23
23
  "exports": {
@@ -79,15 +79,15 @@
79
79
  }
80
80
  },
81
81
  "dependencies": {
82
- "@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.11.3-ultramodern.6",
83
- "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.11.3-ultramodern.6",
84
- "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.11.3-ultramodern.6",
85
- "@rsbuild/core": "2.3.2",
82
+ "@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.11.3-ultramodern.8",
83
+ "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.11.3-ultramodern.8",
84
+ "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.11.3-ultramodern.8",
85
+ "@rsbuild/core": "2.3.3",
86
86
  "@swc/helpers": "^0.5.24",
87
87
  "jiti": "2.7.0"
88
88
  },
89
89
  "devDependencies": {
90
- "@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.11.3-ultramodern.6",
90
+ "@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.11.3-ultramodern.8",
91
91
  "@rslib/core": "1.0.7",
92
92
  "@types/node": "^26.6.6",
93
93
  "@types/react": "^19.3.0",