@flun/nodejs-mobile-gyp 1.1.1 → 1.1.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,7 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.2] - 2026-09-28 21:49
4
+
5
+ ### 修复
6
+
7
+ - **action 目标的路径分隔符**:`make.py` 中 `self.output` 由 `ComputeOutput` 产出,Windows 上带反斜杠(如 `$(obj).target\../node-addon-api\foo.stamp`),导致 `sh` 把 `\.` 当转义、目录不存在。现统一转正斜杠;非 Windows 平台为 no-op。
8
+
3
9
  ## [1.1.1] - 2026-09-28 09:23
4
10
 
11
+ ### 修复
12
+
13
+ - **Windows 路径分隔符**:gyp 生成的 Makefile 中,`Absolutify` 与 `self.output` 产出的路径带 Windows 反斜杠(如 `src\bufferutil.o`),导致 `sh` / `sed` / `make` 解析失败。现在统一转成正斜杠;该改动在非 Windows 平台上是 no-op。
14
+ - **`mkdir` 目标路径**:`mkdir -p "$(dir $@)"` 在 Windows 上因路径尾部反斜杠被 `sh` 当转义符,导致目录未创建、编译器无法写产物。新增 `slashpath` 辅助函数,把路径转正斜杠后再传给 `mkdir`。
15
+ - **超长路径依赖**:Windows 下 Makefile 会因 gypi 依赖路径超过 260 字符而报 `No rule to make target`。现在过滤掉 `node_modules` 中的此类依赖——仅影响 Makefile 自动重新生成,不影响编译。
16
+
5
17
  ### 文档
6
18
 
7
19
  全面核对并修正 README,消除前后矛盾、过时表述与硬编码:
@@ -66,39 +78,4 @@
66
78
  ### 验证
67
79
 
68
80
  - 在 Windows + VS2026 BuildTools + Python 3.14 + Node 26.8.1 环境下,`configure` + `build` 全流程通过,0 warning / 0 error。
69
- - 生成的 `.node` 可被 Node 正常 `require()` 加载并调用。
70
-
71
- ## [1.0.1] - 2026-09-21
72
-
73
- ### 首发
74
-
75
- - 发布 `@flun/nodejs-mobile-gyp`,基于 [nodejs-mobile-gyp](https://github.com/janeasystems/nodejs-mobile-gyp) 0.4.0 与上游 [node-gyp](https://github.com/nodejs/node-gyp) fork
76
- - 用于为 nodejs-mobile 环境编译原生模块(Android / iOS)
77
-
78
- ### 代码风格
79
-
80
- - 全量改造为 **ESM**(`package.json` 的 `type: "module"`)
81
- - 导出方式统一为文件末尾 `export { ... }`
82
- - 函数声明改为 `const xxx = (...) => {}`(`class` 保留)
83
- - 注释全部中文化
84
-
85
- ### Windows 适配
86
-
87
- - 支持 **Visual Studio 2026**(版本号 18,`versionYear=2026`,toolset `v145`)
88
- - 强制走 **MSVC** 工具集,不再使用 ClangCL
89
- - 关闭 **LTO**:`enable_lto` / `enable_thin_lto` 置 `false`,`lto_jobs` 置空
90
- - 避免 `MSB8020: 无法找到 ClangCL 的生成工具`
91
- - 避免 `LNK1117: 选项"opt:lldltojobs=2"中的语法错误`
92
- - `configure` 阶段显式追加 `-Gmsvs_toolset=v145`
93
-
94
- ### 依赖升级
95
-
96
- - `tar`: `^6.1.2` → `^7.5.22`
97
- - `glob`: `^10.3.10` → `^13.0.6`
98
- - `make-fetch-happen`: `^13.0.0` → `^16.0.1`
99
- - 连带消除 `inflight`、`rimraf@3`、旧版 `glob` 等停更依赖
100
-
101
- ### 验证
102
-
103
- - Windows + VS2026 BuildTools + Python 3.14 + Node 26.8.1 环境下,`configure` + `build` 全流程通过
104
- - 生成的 `.node` 能被 Node 正常加载
81
+ - 生成的 `.node` 可被 Node 正常 `require()` 加载并调用。
@@ -860,7 +860,7 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
860
860
  self.output = self.ComputeMacBundleOutput(spec)
861
861
  self.output_binary = self.ComputeMacBundleBinaryOutput(spec)
862
862
  else:
863
- self.output = self.output_binary = self.ComputeOutput(spec)
863
+ self.output = self.output_binary = self.ComputeOutput(spec).replace(os.sep, '/')
864
864
 
865
865
  self.is_standalone_static_library = bool(
866
866
  spec.get("standalone_static_library", 0)
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "bindings",
12
12
  "gyp"
13
13
  ],
14
- "version": "1.1.1",
14
+ "version": "1.1.2",
15
15
  "installVersion": 11,
16
16
  "author": "flun <open@flun.top>",
17
17
  "bin": {