The package rpms/nodejs-write-json-file.git has added or updated architecture specific
content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/nodejs-write-json-file.git/commit....
Change:
+ExclusiveArch: %{nodejs_arches} noarch
Thanks.
Full change:
============
commit 7c39dded563709f6177deb4ca4228a57413b97ea
Author: Jared K. Smith <jaredsmith(a)jaredsmith.net>
Date: Wed May 3 13:44:20 2017 -0400
Initial packaging
diff --git a/.gitignore b/.gitignore
index e69de29..d3d1e22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/write-json-file-2.0.0.tgz
diff --git a/nodejs-write-json-file.spec b/nodejs-write-json-file.spec
new file mode 100644
index 0000000..1794737
--- /dev/null
+++ b/nodejs-write-json-file.spec
@@ -0,0 +1,66 @@
+%{?nodejs_find_provides_and_requires}
+
+%global packagename write-json-file
+
+# tests missing due to missing npm(ava)
+%global enable_tests 0
+
+Name: nodejs-write-json-file
+Version: 2.0.0
+Release: 1%{?dist}
+Summary: Stringify and write JSON to a file atomically
+
+License: MIT
+URL:
https://github.com/sindresorhus/write-json-file
+Source0:
https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
+# The test files are not included in the npm tarball.
+Source1:
https://raw.githubusercontent.com/sindresorhus/write-json-file/v%{version...
+
+ExclusiveArch: %{nodejs_arches} noarch
+BuildArch: noarch
+
+BuildRequires: nodejs-packaging
+BuildRequires: npm(mkdirp)
+BuildRequires: npm(pify)
+BuildRequires: npm(sort-keys)
+BuildRequires: npm(write-file-atomic)
+%if 0%{?enable_tests}
+BuildRequires: npm(ava)
+%endif
+
+%description
+Stringify and write JSON to a file atomically
+
+
+%prep
+%autosetup -n package
+# setup the tests
+cp -p %{SOURCE1} .
+
+%build
+# nothing to do!
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
+cp -pr package.json index.js \
+ %{buildroot}%{nodejs_sitelib}/%{packagename}
+
+%nodejs_symlink_deps
+
+%check
+%nodejs_symlink_deps --check
+%{__nodejs} -e 'require("./")'
+%if 0%{?enable_tests}
+%{_bindir}/ava
+%else
+%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
+%endif
+
+%files
+%doc readme.md
+%license license
+%{nodejs_sitelib}/%{packagename}
+
+%changelog
+* Thu Apr 20 2017 Jared Smith <jsmith(a)fedoraproject.org> - 2.0.0-1
+- Initial packaging
diff --git a/sources b/sources
index e69de29..8ea7da5 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (write-json-file-2.0.0.tgz) =
7b4f1ef2cc0580d67c7fd3da43f30e7eb2c9b0624ef3ef8d0e807126ad6bc6bb11f2015a7a386674d78ad6fa86c2e21b9d0d0b7467bfee0294cfa34e263c41c6
diff --git a/test.js b/test.js
new file mode 100644
index 0000000..7b6c867
--- /dev/null
+++ b/test.js
@@ -0,0 +1,17 @@
+import path from 'path';
+import fs from 'fs';
+import test from 'ava';
+import tempfile from 'tempfile';
+import m from './';
+
+test('async', async t => {
+ const tmp = path.join(tempfile(), 'foo');
+ await m(tmp, {foo: true}, {indent: 2});
+ t.is(fs.readFileSync(tmp, 'utf8'), '{\n "foo": true\n}\n');
+});
+
+test('sync', t => {
+ const tmp = path.join(tempfile(), 'foo');
+ m.sync(tmp, {foo: true}, {indent: 2});
+ t.is(fs.readFileSync(tmp, 'utf8'), '{\n "foo": true\n}\n');
+});