Fix compile failure due to nodejs update to 16.15.0
This commit is contained in:
parent
5ef7dda85f
commit
fc8922b24b
39
fix-build-error-due-to-nodejs-update-to-16.15.0.patch
Normal file
39
fix-build-error-due-to-nodejs-update-to-16.15.0.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
diff -Nur a/test/less/errors/javascript-error.txt b/test/less/errors/javascript-error.txt
|
||||||
|
--- a/test/less/errors/javascript-error.txt 1985-10-26 16:15:00.000000000 +0800
|
||||||
|
+++ b/test/less/errors/javascript-error.txt 2023-02-11 10:31:43.000000000 +0800
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-SyntaxError: JavaScript evaluation error: 'TypeError: Cannot read property 'toJS' of undefined' in {path}javascript-error.less on line 2, column 10:
|
||||||
|
+SyntaxError: JavaScript evaluation error: 'TypeError: Cannot read properties of undefined (reading 'toJS')' in {path}javascript-error.less on line 2, column 10:
|
||||||
|
1 .scope {
|
||||||
|
2 var: `this.foo.toJS`;
|
||||||
|
3 }
|
||||||
|
diff -Nur a/test/less/errors/plugin-1.txt b/test/less/errors/plugin-1.txt
|
||||||
|
--- a/test/less/errors/plugin-1.txt 1985-10-26 16:15:00.000000000 +0800
|
||||||
|
+++ b/test/less/errors/plugin-1.txt 2023-02-11 10:45:25.000000000 +0800
|
||||||
|
@@ -1,2 +1,2 @@
|
||||||
|
-SyntaxError: Error in {path}plugin-error.js{node} on line 1, column 8:
|
||||||
|
-1 throw new Error('Error');{/node}
|
||||||
|
+SyntaxError: Error in {path}plugin-error.js on line 1, column 8:
|
||||||
|
+1 throw new Error('Error');
|
||||||
|
diff -Nur a/test/less/errors/plugin-2.txt b/test/less/errors/plugin-2.txt
|
||||||
|
--- a/test/less/errors/plugin-2.txt 1985-10-26 16:15:00.000000000 +0800
|
||||||
|
+++ b/test/less/errors/plugin-2.txt 2023-02-11 10:45:31.000000000 +0800
|
||||||
|
@@ -1,5 +1,4 @@
|
||||||
|
-SyntaxError: An error was here. in {path}plugin-error-2.js{node} on line 3, column 16:
|
||||||
|
+SyntaxError: An error was here. in {path}plugin-error-2.js on line 3, column 16:
|
||||||
|
2 use: function() {
|
||||||
|
3 throw new Error('An error was here.')
|
||||||
|
4 }
|
||||||
|
-{/node}
|
||||||
|
\ No newline at end of file
|
||||||
|
diff -Nur a/test/less/errors/plugin-3.txt b/test/less/errors/plugin-3.txt
|
||||||
|
--- a/test/less/errors/plugin-3.txt 1985-10-26 16:15:00.000000000 +0800
|
||||||
|
+++ b/test/less/errors/plugin-3.txt 2023-02-11 10:45:37.000000000 +0800
|
||||||
|
@@ -1,5 +1,4 @@
|
||||||
|
-SyntaxError: Plugin error during evaluation in {path}plugin-error-3.js{node} on line 3, column 16:
|
||||||
|
+SyntaxError: Plugin error during evaluation in {path}plugin-error-3.js on line 3, column 16:
|
||||||
|
2 eval: function() {
|
||||||
|
3 throw new Error('An error was here.')
|
||||||
|
4 }
|
||||||
|
-{/node}
|
||||||
|
\ No newline at end of file
|
||||||
@ -1,12 +1,13 @@
|
|||||||
%{?nodejs_find_provides_and_requires}
|
%{?nodejs_find_provides_and_requires}
|
||||||
Name: nodejs-less
|
Name: nodejs-less
|
||||||
Version: 3.10.3
|
Version: 3.10.3
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: Less.js The dynamic stylesheet language
|
Summary: Less.js The dynamic stylesheet language
|
||||||
License: ASL 2.0 and BSD
|
License: ASL 2.0 and BSD
|
||||||
URL: http://lesscss.org
|
URL: http://lesscss.org
|
||||||
Source0: http://registry.npmjs.org/less/-/less-%{version}.tgz
|
Source0: http://registry.npmjs.org/less/-/less-%{version}.tgz
|
||||||
Patch0: nodejs-less-mime2.patch
|
Patch0: nodejs-less-mime2.patch
|
||||||
|
Patch1: fix-build-error-due-to-nodejs-update-to-16.15.0.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
ExclusiveArch: %{nodejs_arches} noarch aarch64 x86_64
|
ExclusiveArch: %{nodejs_arches} noarch aarch64 x86_64
|
||||||
BuildRequires: nodejs-diff
|
BuildRequires: nodejs-diff
|
||||||
@ -29,15 +30,6 @@ and server-side, with Node.js and Rhino.
|
|||||||
%nodejs_fixdep --optional request "^2.67.0"
|
%nodejs_fixdep --optional request "^2.67.0"
|
||||||
%nodejs_fixdep --optional source-map "^0.5.6"
|
%nodejs_fixdep --optional source-map "^0.5.6"
|
||||||
rm -rf node_modules
|
rm -rf node_modules
|
||||||
sed -i 's/line 1/line -1/g' ./test/less/errors/plugin-1.txt
|
|
||||||
sed -i '2d' ./test/less/errors/plugin-1.txt
|
|
||||||
sed -i '1a\{/node}' ./test/less/errors/plugin-1.txt
|
|
||||||
sed -i 's/line 3/line 1/g' ./test/less/errors/plugin-2.txt
|
|
||||||
sed -i '1a\1 registerPlugin({' ./test/less/errors/plugin-2.txt
|
|
||||||
sed -i '4,6d' ./test/less/errors/plugin-2.txt
|
|
||||||
sed -i 's/line 3/line 1/g' ./test/less/errors/plugin-3.txt
|
|
||||||
sed -i '1a\1 registerPlugin({' ./test/less/errors/plugin-3.txt
|
|
||||||
sed -i '4,6d' ./test/less/errors/plugin-3.txt
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -64,6 +56,9 @@ ln -s %{nodejs_sitelib}/less/bin/lessc %{buildroot}%{_bindir}
|
|||||||
%{nodejs_sitelib}/less
|
%{nodejs_sitelib}/less
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Feb 11 2023 liyanan <liyanan32@h-partners.com> - 3.10.3-3
|
||||||
|
- Fix compile failure due to nodejs update to 16.15.0
|
||||||
|
|
||||||
* Wed Dec 30 2020 Ge Wang <wangge20@huawei.com> - 3.10.3-2
|
* Wed Dec 30 2020 Ge Wang <wangge20@huawei.com> - 3.10.3-2
|
||||||
- Fix compile failure due to nodejs update to 10.21.0
|
- Fix compile failure due to nodejs update to 10.21.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user