package init
This commit is contained in:
parent
8608618e83
commit
91cf2cd8d1
BIN
globule-0.2.0.tgz
Normal file
BIN
globule-0.2.0.tgz
Normal file
Binary file not shown.
54
nodejs-globule-lodash3.patch
Normal file
54
nodejs-globule-lodash3.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
From eb00aa591172c473835ff73285680e7422956257 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Anton Harniakou <anton.harniakou@gmail.com>
|
||||||
|
Date: Wed, 25 Nov 2015 18:25:17 +0300
|
||||||
|
Subject: [PATCH] Use lodash v3
|
||||||
|
|
||||||
|
There are some breaking changes in lodash v3,
|
||||||
|
such as flatten has become shallow.
|
||||||
|
This commit takes that into account and replaces _.flatten with
|
||||||
|
_.flattenDeep.
|
||||||
|
---
|
||||||
|
lib/globule.js | 8 ++++----
|
||||||
|
package.json | 2 +-
|
||||||
|
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/globule.js b/lib/globule.js
|
||||||
|
index 5a3eeac..7c6328e 100644
|
||||||
|
--- a/lib/globule.js
|
||||||
|
+++ b/lib/globule.js
|
||||||
|
@@ -46,8 +46,8 @@ globule.match = function(patterns, filepaths, options) {
|
||||||
|
// Return empty set if either patterns or filepaths was omitted.
|
||||||
|
if (patterns == null || filepaths == null) { return []; }
|
||||||
|
// Normalize patterns and filepaths to flattened arrays.
|
||||||
|
- patterns = _.isArray(patterns) ? _.flatten(patterns) : [patterns];
|
||||||
|
- filepaths = _.isArray(filepaths) ? _.flatten(filepaths) : [filepaths];
|
||||||
|
+ patterns = _.isArray(patterns) ? _.flattenDeep(patterns) : [patterns];
|
||||||
|
+ filepaths = _.isArray(filepaths) ? _.flattenDeep(filepaths) : [filepaths];
|
||||||
|
// Return empty set if there are no patterns or filepaths.
|
||||||
|
if (patterns.length === 0 || filepaths.length === 0) { return []; }
|
||||||
|
// Return all matching filepaths.
|
||||||
|
@@ -71,9 +71,9 @@ globule.find = function() {
|
||||||
|
// arguments. Flatten nested arrays.
|
||||||
|
var patterns;
|
||||||
|
if (options.src) {
|
||||||
|
- patterns = _.isArray(options.src) ? _.flatten(options.src) : [options.src];
|
||||||
|
+ patterns = _.isArray(options.src) ? _.flattenDeep(options.src) : [options.src];
|
||||||
|
} else {
|
||||||
|
- patterns = _.flatten(args);
|
||||||
|
+ patterns = _.flattenDeep(args);
|
||||||
|
}
|
||||||
|
// Return empty set if there are no patterns.
|
||||||
|
if (patterns.length === 0) { return []; }
|
||||||
|
diff --git a/package.json b/package.json
|
||||||
|
index e040dc3..cfdfb57 100644
|
||||||
|
--- a/package.json
|
||||||
|
+++ b/package.json
|
||||||
|
@@ -45,7 +45,7 @@
|
||||||
|
"awesome"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
- "lodash": "~2.4.1",
|
||||||
|
+ "lodash": "~3.10.1",
|
||||||
|
"glob": "~3.2.7",
|
||||||
|
"minimatch": "~0.2.11"
|
||||||
|
}
|
||||||
47
nodejs-globule.spec
Normal file
47
nodejs-globule.spec
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
%{?nodejs_find_provides_and_requires}
|
||||||
|
%global enable_tests 1
|
||||||
|
Name: nodejs-globule
|
||||||
|
Version: 0.2.0
|
||||||
|
Release: 1
|
||||||
|
Summary: An easy-to-use wildcard globbing library for Node.js
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/cowboy/node-globule
|
||||||
|
Source0: https://registry.npmjs.org/globule/-/globule-%{version}.tgz
|
||||||
|
Patch0: nodejs-globule-lodash3.patch
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
|
BuildRequires: nodejs-packaging
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
BuildRequires: npm(nodeunit) npm(glob) npm(lodash)
|
||||||
|
%endif
|
||||||
|
%description
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p 1 -n package
|
||||||
|
%nodejs_fixdep glob "^6.0.3"
|
||||||
|
%nodejs_fixdep minimatch "^3.0.0"
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{nodejs_sitelib}/globule
|
||||||
|
cp -pr package.json lib/ \
|
||||||
|
%{buildroot}%{nodejs_sitelib}/globule
|
||||||
|
%nodejs_symlink_deps
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%nodejs_symlink_deps --check
|
||||||
|
%{nodejs_sitelib}/nodeunit/bin/nodeunit test/globule_test.js
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{!?_licensedir:%global license %doc}
|
||||||
|
%doc README.md
|
||||||
|
%license LICENSE-MIT
|
||||||
|
%{nodejs_sitelib}/globule
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 0.2.0-1
|
||||||
|
- Package init
|
||||||
4
nodejs-globule.yaml
Normal file
4
nodejs-globule.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: cowboy/node-globule
|
||||||
|
tag_pattern: "^v"
|
||||||
|
seperator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user