@modern-js/core 2.13.1 → 2.13.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @modern-js/core
2
2
 
3
+ ## 2.13.3
4
+
5
+ ### Patch Changes
6
+
7
+ - @modern-js/node-bundle-require@2.13.3
8
+ - @modern-js/plugin@2.13.3
9
+ - @modern-js/utils@2.13.3
10
+
11
+ ## 2.13.2
12
+
13
+ ### Patch Changes
14
+
15
+ - 106ac07: fix(core): ignore error when clear temp config files
16
+
17
+ fix(core): 忽略清理临时文件时的异常
18
+
19
+ - 7f4fd56: fix: nodeApi type export in modern-js/core
20
+
21
+ fix: 修复 nodeApi 在 modern-js/core 中的类型导出
22
+
23
+ - @modern-js/node-bundle-require@2.13.2
24
+ - @modern-js/plugin@2.13.2
25
+ - @modern-js/utils@2.13.2
26
+
3
27
  ## 2.13.1
4
28
 
5
29
  ### Patch Changes
@@ -48,19 +48,24 @@ exports.getDependencies = getDependencies;
48
48
  * @param overtime Unit of second
49
49
  */
50
50
  const clearFilesOverTime = async (targetDir, overtime) => {
51
- // when stats is true, globby return Stats[]
52
- const files = (await (0, utils_1.globby)(`${targetDir}/**/*`, {
53
- stats: true,
54
- absolute: true,
55
- }));
56
- const currentTime = Date.now();
57
- if (files.length > 0) {
58
- for (const file of files) {
59
- if (currentTime - file.stats.birthtimeMs >= overtime * 1000) {
60
- utils_1.fs.unlinkSync(file.path);
51
+ try {
52
+ // when stats is true, globby return Stats[]
53
+ const files = (await (0, utils_1.globby)(`${targetDir}/**/*`, {
54
+ stats: true,
55
+ absolute: true,
56
+ }));
57
+ const currentTime = Date.now();
58
+ if (files.length > 0) {
59
+ for (const file of files) {
60
+ if (currentTime - file.stats.birthtimeMs >= overtime * 1000) {
61
+ utils_1.fs.unlinkSync(file.path);
62
+ }
61
63
  }
62
64
  }
63
65
  }
66
+ catch (err) {
67
+ // ignore error when clear files
68
+ }
64
69
  };
65
70
  exports.clearFilesOverTime = clearFilesOverTime;
66
71
  const bundleRequireWithCatch = async (configFile, { appDirectory }) => {
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "modern",
11
11
  "modern.js"
12
12
  ],
13
- "version": "2.13.1",
13
+ "version": "2.13.3",
14
14
  "jsnext:source": "./src/index.ts",
15
15
  "types": "./dist/index.d.ts",
16
16
  "main": "./dist/index.js",
@@ -57,7 +57,7 @@
57
57
  "./dist/types/index.d.ts"
58
58
  ],
59
59
  "node": [
60
- "./dist/node-api.d.ts"
60
+ "./dist/nodeApi.d.ts"
61
61
  ],
62
62
  "runBin": [
63
63
  "./dist/runBin.d.ts"
@@ -65,9 +65,9 @@
65
65
  }
66
66
  },
67
67
  "dependencies": {
68
- "@modern-js/node-bundle-require": "2.13.1",
69
- "@modern-js/plugin": "2.13.1",
70
- "@modern-js/utils": "2.13.1"
68
+ "@modern-js/node-bundle-require": "2.13.3",
69
+ "@modern-js/plugin": "2.13.3",
70
+ "@modern-js/utils": "2.13.3"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/babel__code-frame": "^7.0.3",
@@ -84,11 +84,11 @@
84
84
  "terser-webpack-plugin": "^5.1.4",
85
85
  "typescript": "^4",
86
86
  "webpack": "^5.76.2",
87
- "@modern-js/builder-shared": "2.13.1",
88
- "@modern-js/babel-preset-app": "2.13.1",
89
- "@modern-js/types": "2.13.1",
90
- "@scripts/build": "2.13.1",
91
- "@scripts/jest-config": "2.13.1"
87
+ "@modern-js/builder-shared": "2.13.3",
88
+ "@modern-js/babel-preset-app": "2.13.3",
89
+ "@modern-js/types": "2.13.3",
90
+ "@scripts/build": "2.13.3",
91
+ "@scripts/jest-config": "2.13.3"
92
92
  },
93
93
  "sideEffects": false,
94
94
  "publishConfig": {