%global npmname fast-safe-stringify Name: nodejs-%{npmname} Version: 2.0.7 Release: 1%{?dist} Summary: Safely and quickly serialize JavaScript objects License: MIT URL: https://www.npmjs.com/package/%{npmname} Source0: https://registry.npmjs.org/%{npmname}/-/%{npmname}-%{version}.tgz BuildRequires: nodejs-packaging BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch %description Safe and fast serialization alternative to JSON.stringify. Gracefully handles circular structures instead of throwing. Provides a deterministic ("stable") version as well that will also gracefully handle circular structures. %prep #autosetup -n %{npmname}-%{version} %autosetup -n package %build # Nothing to build, this is a noarch package %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{npmname} cp -a index.js index.d.ts %{buildroot}%{nodejs_sitelib}/%{npmname}/ cp -a package.json %{buildroot}%{nodejs_sitelib}/%{npmname}/ %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' # two tests don't run out of the box on Fedora, probably due to outdated tap # and/or deep-equal... #tap --no-esm test.js test-stable.js %files %{nodejs_sitelib}/%{npmname}/ %license LICENSE %doc readme.md CHANGELOG.md %changelog * Tue Apr 28 2020 Ben Rosser - 2.0.7-1 - Initial package for Fedora.