[Pkg-javascript-commits] [node-globule] 01/05: New upstream version 1.1.0
Sruthi Chandran
srud-guest at moszumanska.debian.org
Wed Nov 9 10:01:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
srud-guest pushed a commit to branch master
in repository node-globule.
commit 90ac59c666404a4bb1c87675fc9e1ff7c926ce94
Author: Sruthi <srud at disroot.org>
Date: Wed Nov 9 15:13:23 2016 +0530
New upstream version 1.1.0
---
.travis.yml | 15 ++++++++++++---
LICENSE-MIT => LICENSE | 2 +-
README.md | 8 +++++---
appveyor.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++
lib/globule.js | 23 ++++++++++++++---------
package.json | 30 ++++++++++++++----------------
6 files changed, 90 insertions(+), 32 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index cbace30..f63bfeb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,15 @@
+sudo: false
language: node_js
node_js:
- - "0.8"
- "0.10"
-before_script:
- - npm install -g grunt-cli
+ - "0.12"
+ - "4"
+ - "5"
+ - "iojs"
+before_install:
+ - if [ "$TRAVIS_NODE_VERSION" = "0.10" ]; then npm install -g npm at 2; fi
+matrix:
+ fast_finish: true
+cache:
+ directories:
+ - node_modules
diff --git a/LICENSE-MIT b/LICENSE
similarity index 96%
rename from LICENSE-MIT
rename to LICENSE
index 1056fb5..8ac94f0 100644
--- a/LICENSE-MIT
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2014 "Cowboy" Ben Alman
+Copyright (c) 2016 "Cowboy" Ben Alman
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
diff --git a/README.md b/README.md
index 036c11e..b16abd9 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# globule [![Build Status](https://secure.travis-ci.org/cowboy/node-globule.png?branch=master)](http://travis-ci.org/cowboy/node-globule)
+# globule [![Build Status: Linux](https://travis-ci.org/cowboy/node-globule.svg?branch=master)](https://travis-ci.org/cowboy/node-globule) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/i9fnc38q952r9nc0/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/node-globule/branch/master)
An easy-to-use wildcard globbing library.
@@ -119,9 +119,11 @@ globule.mapping({src: ["a.js", "b.js"], srcBase: "foo", destBase: "bar"})
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
## Release History
-2014-01-07 - v0.2.0 - Updated dependencies. Added `src` option. Improved exclusion speed significantly.
+2016-10-23 - v1.1.0 - Update dependencies, lodash at 4.16, glob at 7.1.
+2016-04-14 - v1.0.0 - Update dependencies, lodash at 4.9, glob at 7.0, minimatch at 3.0. Paths are unix-style with prefixBase enabled.
+2014-01-07 - v0.2.0 - Updated dependencies. Added `src` option. Improved exclusion speed significantly.
2013-04-11 - v0.1.0 - Initial release.
## License
-Copyright (c) 2014 "Cowboy" Ben Alman
+Copyright (c) 2016 "Cowboy" Ben Alman
Licensed under the MIT license.
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..a196c5e
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,44 @@
+# http://www.appveyor.com/docs/appveyor-yml
+
+clone_depth: 10
+
+version: "{build}"
+
+# What combinations to test
+environment:
+ matrix:
+ - nodejs_version: "0.10"
+ platform: x86
+ - nodejs_version: "0.12"
+ platform: x86
+ - nodejs_version: "4"
+ platform: x64
+ - nodejs_version: "4"
+ platform: x86
+ - nodejs_version: "5"
+ platform: x86
+
+install:
+ - ps: Install-Product node $env:nodejs_version $env:platform
+ - ps: >-
+ if ($env:nodejs_version -eq "0.10") {
+ npm -g install npm at 2
+ $env:PATH="$env:APPDATA\npm;$env:PATH"
+ }
+ - npm install
+
+test_script:
+ # Output useful info for debugging
+ - node --version && npm --version
+ # We test multiple Windows shells because of prior stdout buffering issues
+ # filed against Grunt. https://github.com/joyent/node/issues/3584
+ - ps: "npm test # PowerShell" # Pass comment to PS for easier debugging
+ - cmd: npm test
+
+build: off
+
+matrix:
+ fast_finish: true
+
+cache:
+ - node_modules -> package.json
diff --git a/lib/globule.js b/lib/globule.js
index 5a3eeac..2afd813 100644
--- a/lib/globule.js
+++ b/lib/globule.js
@@ -39,6 +39,12 @@ function processPatterns(patterns, options, fn) {
return result;
}
+// Normalize paths to be unix-style.
+var pathSeparatorRe = /[\/\\]/g;
+function normalizePath(path) {
+ return path.replace(pathSeparatorRe, '/');
+}
+
// Match a filepath or filepaths against one or more wildcard patterns. Returns
// all matching filepaths. This behaves just like minimatch.match, but supports
// any number of patterns.
@@ -46,8 +52,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 +77,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 []; }
@@ -90,7 +96,7 @@ globule.find = function() {
// If srcBase and prefixBase were specified, prefix srcBase to matched paths.
if (srcBase && options.prefixBase) {
matches = matches.map(function(filepath) {
- return path.join(srcBase, filepath);
+ return normalizePath(path.join(srcBase, filepath));
});
}
// Filter result set?
@@ -99,7 +105,7 @@ globule.find = function() {
// If srcBase was specified but prefixBase was NOT, prefix srcBase
// temporarily, for filtering.
if (srcBase && !options.prefixBase) {
- filepath = path.join(srcBase, filepath);
+ filepath = normalizePath(path.join(srcBase, filepath));
}
try {
if (_.isFunction(options.filter)) {
@@ -117,7 +123,6 @@ globule.find = function() {
return matches;
};
-var pathSeparatorRe = /[\/\\]/g;
var extDotRe = {
first: /(\.[^\/]*)?$/,
last: /(\.[^\/\.]*)?$/,
@@ -157,8 +162,8 @@ globule.mapping = function(filepaths, options) {
src = path.join(options.srcBase, src);
}
// Normalize filepaths to be unix-style.
- dest = dest.replace(pathSeparatorRe, '/');
- src = src.replace(pathSeparatorRe, '/');
+ dest = normalizePath(dest);
+ src = normalizePath(src);
// Map correct src path to dest path.
if (fileByDest[dest]) {
// If dest already exists, push this src onto that dest's src array.
diff --git a/package.json b/package.json
index e040dc3..4283e79 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "globule",
"description": "An easy-to-use wildcard globbing library.",
- "version": "0.2.0",
+ "version": "1.1.0",
"homepage": "https://github.com/cowboy/node-globule",
"author": {
"name": "\"Cowboy\" Ben Alman",
@@ -14,24 +14,22 @@
"bugs": {
"url": "https://github.com/cowboy/node-globule/issues"
},
- "licenses": [
- {
- "type": "MIT",
- "url": "https://github.com/cowboy/node-globule/blob/master/LICENSE-MIT"
- }
- ],
+ "license": "MIT",
"main": "lib/globule",
+ "files": [
+ "lib"
+ ],
"engines": {
- "node": ">= 0.8.0"
+ "node": ">= 0.10"
},
"scripts": {
- "test": "grunt nodeunit"
+ "test": "grunt"
},
"devDependencies": {
- "grunt-contrib-jshint": "~0.8.0",
- "grunt-contrib-nodeunit": "~0.2.2",
- "grunt-contrib-watch": "~0.5.3",
- "grunt": "~0.4.2"
+ "grunt-contrib-jshint": "^1.0.0",
+ "grunt-contrib-nodeunit": "^1.0.0",
+ "grunt-contrib-watch": "^1.0.0",
+ "grunt": "^1.0.0"
},
"keywords": [
"glob",
@@ -45,8 +43,8 @@
"awesome"
],
"dependencies": {
- "lodash": "~2.4.1",
- "glob": "~3.2.7",
- "minimatch": "~0.2.11"
+ "glob": "~7.1.1",
+ "lodash": "~4.16.4",
+ "minimatch": "~3.0.2"
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-globule.git
More information about the Pkg-javascript-commits
mailing list