2020-08-20 10:15:48 +08:00
|
|
|
%{?nodejs_find_provides_and_requires}
|
|
|
|
|
%global packagename source-map-support
|
|
|
|
|
%global enable_tests 1
|
|
|
|
|
Name: nodejs-source-map-support
|
|
|
|
|
Version: 0.4.18
|
2023-02-10 17:18:02 +08:00
|
|
|
Release: 3
|
2020-08-20 10:15:48 +08:00
|
|
|
Summary: Fixes stack traces for files with source maps
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/evanw/node-source-map-support
|
|
|
|
|
Source0: https://registry.npmjs.org/source-map-support/-/source-map-support-%{version}.tgz
|
|
|
|
|
Source1: https://raw.githubusercontent.com/evanw/node-source-map-support/v%{version}/test.js
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
|
|
BuildRequires: nodejs-packaging npm(source-map)
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
BuildRequires: mocha
|
|
|
|
|
%endif
|
|
|
|
|
%description
|
|
|
|
|
Fixes stack traces for files with source maps
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n package
|
|
|
|
|
cp -p %{SOURCE1} .
|
|
|
|
|
%nodejs_fixdep source-map
|
2020-12-30 18:11:46 +08:00
|
|
|
sed -i "s/'SyntaxError: Unexpected token )'/\/SyntaxError: Unexpected token '?\\\)'?\//g" ./test.js
|
2020-08-20 10:15:48 +08:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
cp -pr package.json *.js \
|
|
|
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
%nodejs_symlink_deps
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%nodejs_symlink_deps --check
|
|
|
|
|
%{__nodejs} -e 'require("./")'
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
NODE_ENV=test %{_bindir}/mocha -R spec
|
|
|
|
|
%else
|
|
|
|
|
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{!?_licensedir:%global license %doc}
|
|
|
|
|
%doc *.md
|
|
|
|
|
%license LICENSE.md
|
|
|
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-02-10 17:18:02 +08:00
|
|
|
* Fri Feb 10 2023 wulei <wulei80@h-partners.com> - 0.4.18-3
|
|
|
|
|
- Fix error invalid data type
|
|
|
|
|
|
2020-12-30 18:11:46 +08:00
|
|
|
* Tue Dec 29 2020 Ge Wang <wangge20@huawei.com> - 0.4.18-2
|
|
|
|
|
- Fix compile failure due to nodejs update to 10.21.0
|
|
|
|
|
|
2020-08-20 10:15:48 +08:00
|
|
|
* Wed Aug 12 2020 zhanghua <zhanghua40@huawei.com> - 0.4.18-1
|
|
|
|
|
- package init
|