@flun/desktop-builder 1.0.4 → 1.0.5
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 +4 -10
- package/README.md +21 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
# 变更日志
|
|
2
|
-
|
|
2
|
+
## [1.0.5] - 2026-07-06 16:27
|
|
3
|
+
### 新增
|
|
4
|
+
- 在 README 中新增“配置”章节,指导用户通过 `allowScripts` 显式放行本包的安装脚本,避免因 `ignore-scripts` 全局配置导致钩子被跳过。
|
|
3
5
|
## [1.0.4] - 2026-07-05 17:17
|
|
4
6
|
### 紧急修复
|
|
5
7
|
- **修复依赖安装失败问题**:因 `node` 包安装脚本报错(`Cannot find module 'node-win-x64/package.json'`)导致安装中断,现通过 `--ignore-scripts` 和 `npm_config_ignore_scripts=true` 强制跳过脚本执行,确保依赖安装顺利完成。
|
|
6
8
|
|
|
7
9
|
### 优化
|
|
8
|
-
- **优化依赖清理逻辑**:因 Electron 已内置 Node.js 运行时,无需在应用内额外保留 `node` 包及其平台特定二进制目录(如 `node-win-x64`、`node-darwin-x64` 等)。现主动清理这些冗余目录,减小应用体积,同时避免与 Electron 内置运行时产生潜在冲突。注意:此优化不影响 `bcrypt` 等原生模块正常工作,因为所需依赖(如 `node-gyp-build`、`node-addon-api` 等)仍被保留。
|
|
9
|
-
|
|
10
|
-
## [1.0.3] - 2026-07-04 21:32
|
|
11
|
-
### 修复
|
|
12
|
-
- 修复 Windows 环境下 `npx desktop-builder build` 命令无任何输出的问题(入口判断逻辑改用 `pathToFileURL` 统一路径格式)。
|
|
13
|
-
|
|
14
|
-
## [1.0.2] - 2026-07-03 10:43
|
|
15
|
-
### 优化
|
|
16
|
-
- 简化使用示例;
|
|
10
|
+
- **优化依赖清理逻辑**:因 Electron 已内置 Node.js 运行时,无需在应用内额外保留 `node` 包及其平台特定二进制目录(如 `node-win-x64`、`node-darwin-x64` 等)。现主动清理这些冗余目录,减小应用体积,同时避免与 Electron 内置运行时产生潜在冲突。注意:此优化不影响 `bcrypt` 等原生模块正常工作,因为所需依赖(如 `node-gyp-build`、`node-addon-api` 等)仍被保留。
|
package/README.md
CHANGED
|
@@ -34,6 +34,27 @@
|
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
+
## 配置
|
|
38
|
+
|
|
39
|
+
### 允许安装脚本执行
|
|
40
|
+
|
|
41
|
+
本包在安装时可能触发某些依赖包的自动脚本(如 `postinstall` 等);如果你的 npm 全局配置或项目配置禁止了脚本执行(例如设置了 `ignore-scripts=true`),可能会导致安装不完整或运行时异常;
|
|
42
|
+
|
|
43
|
+
推荐在项目根目录的 `package.json` 中添加 `allowScripts` 字段,显式放行本包及其依赖的脚本:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"allowScripts": {
|
|
48
|
+
"@flun/desktop-builder": true
|
|
49
|
+
// 如果依赖的其它包(如 bcrypt、electron-winstaller 等)也有脚本,请按需添加,格式相同
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
> 如果你信任所有安装包,也可以直接在项目 `.npmrc` 中设置 `allow-scripts = false`(表示关闭脚本拦截,所有脚本均允许执行),或删除 `ignore-script`字段;
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
37
58
|
## 📦 安装
|
|
38
59
|
|
|
39
60
|
在你的项目目录下安装为开发依赖:
|