@modern-js/core 2.13.0 → 2.13.2

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,31 @@
1
1
  # @modern-js/core
2
2
 
3
+ ## 2.13.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 106ac07: fix(core): ignore error when clear temp config files
8
+
9
+ fix(core): 忽略清理临时文件时的异常
10
+
11
+ - 7f4fd56: fix: nodeApi type export in modern-js/core
12
+
13
+ fix: 修复 nodeApi 在 modern-js/core 中的类型导出
14
+
15
+ - @modern-js/node-bundle-require@2.13.2
16
+ - @modern-js/plugin@2.13.2
17
+ - @modern-js/utils@2.13.2
18
+
19
+ ## 2.13.1
20
+
21
+ ### Patch Changes
22
+
23
+ - ab79a7b: fix: use nodeApi instead node-api in @modern-js/core exports
24
+ 修复: 使用 nodeApi 代替 node-api 作为 @modern-js/core 的导出
25
+ - @modern-js/node-bundle-require@2.13.1
26
+ - @modern-js/plugin@2.13.1
27
+ - @modern-js/utils@2.13.1
28
+
3
29
  ## 2.13.0
4
30
 
5
31
  ### 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.0",
13
+ "version": "2.13.2",
14
14
  "jsnext:source": "./src/index.ts",
15
15
  "types": "./dist/index.d.ts",
16
16
  "main": "./dist/index.js",
@@ -25,9 +25,9 @@
25
25
  "default": "./dist/index.js"
26
26
  },
27
27
  "./node": {
28
- "jsnext:source": "./src/node-api.ts",
29
- "types": "./dist/node-api.d.ts",
30
- "default": "./dist/node-api.js"
28
+ "jsnext:source": "./src/nodeApi.ts",
29
+ "types": "./dist/nodeApi.d.ts",
30
+ "default": "./dist/nodeApi.js"
31
31
  },
32
32
  "./bin": {
33
33
  "jsnext:source": "./src/bin.ts",
@@ -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.0",
69
- "@modern-js/plugin": "2.13.0",
70
- "@modern-js/utils": "2.13.0"
68
+ "@modern-js/node-bundle-require": "2.13.2",
69
+ "@modern-js/plugin": "2.13.2",
70
+ "@modern-js/utils": "2.13.2"
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.0",
88
- "@modern-js/babel-preset-app": "2.13.0",
89
- "@modern-js/types": "2.13.0",
90
- "@scripts/jest-config": "2.13.0",
91
- "@scripts/build": "2.13.0"
87
+ "@modern-js/builder-shared": "2.13.2",
88
+ "@modern-js/babel-preset-app": "2.13.2",
89
+ "@modern-js/types": "2.13.2",
90
+ "@scripts/jest-config": "2.13.2",
91
+ "@scripts/build": "2.13.2"
92
92
  },
93
93
  "sideEffects": false,
94
94
  "publishConfig": {