diff --git a/nodejs-module-not-found-error-node12.patch b/nodejs-module-not-found-error-node12.patch new file mode 100644 index 0000000..6ea7b2e --- /dev/null +++ b/nodejs-module-not-found-error-node12.patch @@ -0,0 +1,19 @@ +commit 6ecc08caebe4cbcc282fbe8143c3d3288f99c539 +Author: Tom Hughes +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) + } + }) diff --git a/nodejs-module-not-found-error.spec b/nodejs-module-not-found-error.spec index 7698f36..f0e974b 100644 --- a/nodejs-module-not-found-error.spec +++ b/nodejs-module-not-found-error.spec @@ -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 - 1.0.1-2 +- Fix compile failure + * Thu Aug 20 2020 yaokai - 1.0.1-1 - Package init