From 38f2bc54bf04933d7647181f3c904500ea1f456d Mon Sep 17 00:00:00 2001 From: Jared K. Smith Date: Apr 22 2017 21:21:52 +0000 Subject: Update to upstream 3.0.0 release --- diff --git a/nodejs-path-exists.spec b/nodejs-path-exists.spec index 18a04d6..1be263a 100644 --- a/nodejs-path-exists.spec +++ b/nodejs-path-exists.spec @@ -2,17 +2,16 @@ %global enable_tests 0 %global srcname path-exists -%global commit0 3af423661e78466764f87c5712263c5d7a1ce5b7 -%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) - Epoch: 1 Name: nodejs-%{srcname} -Version: 2.1.0 -Release: 3%{?dist} +Version: 3.0.0 +Release: 1%{?dist} Summary: Promisify a callback-style function License: MIT -URL: https://www.npmjs.com/package/%{srcname} -Source0: https://github.com/sindresorhus/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz +URL: https://github.com/sindresorhus/path-exists +Source0: https://registry.npmjs.com/%{srcname}/-/%{srcname}-%{version}.tgz +# Test file not in npm tarball +Source1: https://raw.githubusercontent.com/sindresorhus/%{srcname}/v%{version}/test.js BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch @@ -27,8 +26,8 @@ BuildRequires: npm(ava) %{summary}. %prep -%setup -qn %{srcname}-%{commit0} -rm -rf node_modules/ +%autosetup -n package +cp -p %{SOURCE1} . %build #nothing to do @@ -42,9 +41,10 @@ cp -pr index.js package.json \ %nodejs_symlink_deps -%if 0%{?enable_tests} %check %nodejs_symlink_deps --check +%{__nodejs} -e 'require("./")' +%if 0%{?enable_tests} ava %endif @@ -56,6 +56,9 @@ ava %changelog +* Sat Apr 22 2017 Jared Smith - 1:3.0.0-1 +- Update to upstream 3.0.0 release + * Fri Feb 10 2017 Fedora Release Engineering - 1:2.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/test.js b/test.js new file mode 100644 index 0000000..e726a11 --- /dev/null +++ b/test.js @@ -0,0 +1,12 @@ +import test from 'ava'; +import m from './'; + +test('async', async t => { + t.true(await m('test.js')); + t.false(await m('fail')); +}); + +test('sync', t => { + t.true(m.sync('test.js')); + t.false(m.sync('fail')); +});