fix compile failure
This commit is contained in:
parent
5112a7f253
commit
e960da1295
19
nodejs-module-not-found-error-node12.patch
Normal file
19
nodejs-module-not-found-error-node12.patch
Normal file
@ -0,0 +1,19 @@
|
||||
commit 6ecc08caebe4cbcc282fbe8143c3d3288f99c539
|
||||
Author: Tom Hughes <tom@compton.nu>
|
||||
Date: Thu Aug 1 20:27:56 2019 +0100
|
||||
|
||||
Patch test to ignore extra information in Node.js 12.x errors
|
||||
|
||||
diff --git a/test.js b/test.js
|
||||
index fb3b65f..19f6957 100644
|
||||
--- a/test.js
|
||||
+++ b/test.js
|
||||
@@ -9,7 +9,7 @@ test(function (t) {
|
||||
require('foo')
|
||||
} catch (realErr) {
|
||||
var fakeErr = notFound('foo')
|
||||
- t.equal(fakeErr.message, realErr.message)
|
||||
+ t.equal(fakeErr.message, realErr.message.split("\n")[0])
|
||||
t.equal(fakeErr.code, realErr.code)
|
||||
}
|
||||
})
|
||||
@ -1,10 +1,11 @@
|
||||
Name: nodejs-module-not-found-error
|
||||
Version: 1.0.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Create a module not found error
|
||||
License: MIT
|
||||
URL: https://github.com/bendrucker/module-not-found-error
|
||||
Source0: https://github.com/bendrucker/module-not-found-error/archive/v%{version}.tar.gz#/nodejs-module-not-found-error-%{version}.tar.gz
|
||||
Patch0: nodejs-module-not-found-error-node12.patch
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{nodejs_arches} noarch
|
||||
BuildRequires: nodejs-packaging
|
||||
@ -13,7 +14,7 @@ BuildRequires: npm(tape)
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q -n module-not-found-error-%{version}
|
||||
%autosetup -p 1 -n module-not-found-error-%{version}
|
||||
rm -rf node_modules
|
||||
|
||||
%build
|
||||
@ -33,5 +34,8 @@ cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/module-not-found-erro
|
||||
%{nodejs_sitelib}/module-not-found-error
|
||||
|
||||
%changelog
|
||||
* Tue Dec 29 2020 Ge Wang <wangge20@huawei.com> - 1.0.1-2
|
||||
- Fix compile failure
|
||||
|
||||
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 1.0.1-1
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user