!16 Fix load error for nodejs-20.x

From: @wk333 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
This commit is contained in:
openeuler-ci-bot 2024-01-02 02:37:35 +00:00 committed by Gitee
commit 056405bc90
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,7 +1,7 @@
%{?nodejs_find_provides_and_requires}
Name: node-gyp
Version: 3.6.0
Release: 6
Release: 7
Summary: Node.js native addon build tool
License: MIT
URL: https://github.com/nodejs/node-gyp
@ -27,6 +27,8 @@ program which is removed for node v0.8.
%prep
%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
%nodejs_fixdep glob "^6.0.4"
%nodejs_fixdep minimatch "^3.0.0"
@ -53,6 +55,9 @@ rm -f test/test-download.js
%{_bindir}/node-gyp
%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
- fix test error