diff --git a/nodejs-resolve-pkg.spec b/nodejs-resolve-pkg.spec index f6ae36d..f15e55d 100644 --- a/nodejs-resolve-pkg.spec +++ b/nodejs-resolve-pkg.spec @@ -7,8 +7,7 @@ Release: 1 Summary: Resolve the path of a package regardless of it having an entry License: MIT URL: https://github.com/sindresorhus/resolve-pkg -Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz -Source1: https://raw.githubusercontent.com/sindresorhus/resolve-pkg/v%{version}/test.js +Source0: https://github.com/sindresorhus/resolve-pkg/archive/v%{version}.tar.gz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging npm(resolve-from) @@ -20,8 +19,7 @@ BuildRequires: npm(ava) Resolve the path of a package regardless of it having an entry %prep -%autosetup -n package -cp -p %{SOURCE1} . +%autosetup -n resolve-pkg-%{version} %nodejs_fixdep resolve-from %build diff --git a/resolve-pkg-1.0.0.tgz b/resolve-pkg-1.0.0.tgz deleted file mode 100644 index d952397..0000000 Binary files a/resolve-pkg-1.0.0.tgz and /dev/null differ diff --git a/test.js b/test.js deleted file mode 100644 index ea331d9..0000000 --- a/test.js +++ /dev/null @@ -1,12 +0,0 @@ -import path from 'path'; -import test from 'ava'; -import m from './'; - -test(t => { - t.is(m('nonexistent'), null); - t.is(m('nonexistent/foo'), null); - t.is(path.relative('.', m('grunt-svgmin')), 'node_modules/grunt-svgmin'); - t.is(path.relative('.', m('grunt-svgmin/tasks')), 'node_modules/grunt-svgmin/tasks'); - t.is(path.relative('.', m('@someprivate/module-test')), 'node_modules/@someprivate/module-test'); - t.is(path.relative('.', m('@someprivate/module-test/subdir')), 'node_modules/@someprivate/module-test/subdir'); -}); diff --git a/v1.0.0.tar.gz b/v1.0.0.tar.gz new file mode 100644 index 0000000..396457d Binary files /dev/null and b/v1.0.0.tar.gz differ