!1 add package

Merge pull request !1 from 付安安/master
This commit is contained in:
openeuler-ci-bot 2020-08-24 14:45:12 +08:00 committed by Gitee
commit ced30a048d
4 changed files with 97 additions and 0 deletions

BIN
nodejs-glob-6.0.4.tar.gz Normal file

Binary file not shown.

46
nodejs-glob-tap.patch Normal file
View File

@ -0,0 +1,46 @@
commit 8829452ae5502eef21846d86609f15dc47c56044
Author: Tom Hughes <tom@compton.nu>
Date: Fri Jan 1 11:19:26 2016 +0000
Fix tests to work with older version of tap
diff --git a/test/global-leakage.js b/test/global-leakage.js
index 238990c..7843495 100644
--- a/test/global-leakage.js
+++ b/test/global-leakage.js
@@ -1,5 +1,5 @@
if (require.main === module)
- return require('tap').pass('ok')
+ return require('tap').test('').pass('ok')
var before = Object.keys(global).sort().filter(function (t) {
return t !== '__coverage__'
diff --git a/test/multiple-weird-error.js b/test/multiple-weird-error.js
index 4a9e45e..9285dfb 100644
--- a/test/multiple-weird-error.js
+++ b/test/multiple-weird-error.js
@@ -1,4 +1,4 @@
-var t = require('tap')
+var tap = require('tap')
var fs = require('fs')
fs.readdir = function(path, cb) { cb(new Error('expected')) }
var glob = require('../')
@@ -6,10 +6,12 @@ var glob = require('../')
// also test that silent:true is actually silent!
console.error = function () { throw 'SILENCE, INSECT!' }
-t.plan(2)
-glob('*', { silent: true }, function(err, files) {
- t.ok(err, 'got first error')
-})
-glob('*', { silent: true }, function(err, files) {
- t.ok(err, 'got second error')
+tap.test("unexpected errors", function (t) {
+ t.plan(2)
+ glob('*', { silent: true }, function(err, files) {
+ t.ok(err, 'got first error')
+ })
+ glob('*', { silent: true }, function(err, files) {
+ t.ok(err, 'got second error')
+ })
})

47
nodejs-glob.spec Normal file
View File

@ -0,0 +1,47 @@
%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-glob
Version: 6.0.4
Release: 1
Summary: A little globber for Node.js
License: BSD
URL: https://github.com/isaacs/node-glob
Source0: https://github.com/isaacs/node-glob/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0: nodejs-glob-tap.patch
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(tap) npm(inflight) npm(path-is-absolute) npm(rimraf)
%endif
%description
This is a glob implementation in pure JavaScript. It uses the minimatch library
to do its matching.
%prep
%autosetup -p 1 -n node-glob-%{version}
%nodejs_fixdep once "^1.1.1"
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/glob
cp -pr package.json glob.js sync.js common.js \
%{buildroot}%{nodejs_sitelib}/glob
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%tap test/*.js
%endif
%files
%{!?_licensedir:%global license %doc}
%doc README.md examples
%license LICENSE
%{nodejs_sitelib}/glob
%changelog
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 6.0.4-1
- package init

4
nodejs-glob.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: isaacs/node-glob
tag_prefix: "^v"
seperator: "."