Fix load error for nodejs-20.x

This commit is contained in:
wk333 2024-01-02 10:23:56 +08:00
parent 92a4e354c6
commit 61deaedc0a

View File

@ -1,7 +1,7 @@
%{?nodejs_find_provides_and_requires} %{?nodejs_find_provides_and_requires}
Name: node-gyp Name: node-gyp
Version: 3.6.0 Version: 3.6.0
Release: 6 Release: 7
Summary: Node.js native addon build tool Summary: Node.js native addon build tool
License: MIT License: MIT
URL: https://github.com/nodejs/node-gyp URL: https://github.com/nodejs/node-gyp
@ -27,6 +27,8 @@ program which is removed for node v0.8.
%prep %prep
%autosetup -p1 %autosetup -p1
# Fix load error for nodejs-20.x https://github.com/nwjs/nw-gyp/issues/155#issuecomment-1308701166
sed -i 's/process.config || {}/JSON.parse(JSON.stringify(process.config)) || {}/g' lib/configure.js
cp -p %{SOURCE1} addon-rpm.gypi cp -p %{SOURCE1} addon-rpm.gypi
%nodejs_fixdep glob "^6.0.4" %nodejs_fixdep glob "^6.0.4"
%nodejs_fixdep minimatch "^3.0.0" %nodejs_fixdep minimatch "^3.0.0"
@ -53,6 +55,9 @@ rm -f test/test-download.js
%{_bindir}/node-gyp %{_bindir}/node-gyp
%changelog %changelog
* Tue Jan 02 2024 wangkai <13474090681@163.com> - 3.6.0-7
- Fix load error for nodejs-20.x
* Fri Feb 10 2023 xu_ping <xuping33@h-partners.com> - 3.6.0-6 * Fri Feb 10 2023 xu_ping <xuping33@h-partners.com> - 3.6.0-6
- fix test error - fix test error