Hello community, here is the log from the commit of package nodejs-glob for openSUSE:Factory checked in at 2015-07-12 22:52:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nodejs-glob (Old) and /work/SRC/openSUSE:Factory/.nodejs-glob.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "nodejs-glob" Changes: -------- --- /work/SRC/openSUSE:Factory/nodejs-glob/nodejs-glob.changes 2015-07-02 22:40:24.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.nodejs-glob.new/nodejs-glob.changes 2015-07-12 22:52:05.000000000 +0200 @@ -1,0 +2,5 @@ +Sat Jul 4 10:33:19 UTC 2015 - i@marguerite.su + +- update version 5.0.13 + +------------------------------------------------------------------- Old: ---- glob-4.5.3.tgz New: ---- glob-5.0.13.tgz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nodejs-glob.spec ++++++ --- /var/tmp/diff_new_pack.OmUngf/_old 2015-07-12 22:52:06.000000000 +0200 +++ /var/tmp/diff_new_pack.OmUngf/_new 2015-07-12 22:52:06.000000000 +0200 @@ -19,7 +19,7 @@ %define base_name glob Name: nodejs-glob -Version: 4.5.3 +Version: 5.0.13 Release: 0 Summary: File Globbing License: ISC @@ -48,7 +48,6 @@ %files %defattr(-,root,root,-) %doc LICENSE README.md -%{nodejs_modulesdir} -%dir %{nodejs_modulesdir}/%{base_name} +%{nodejs_modulesdir}/%{base_name} %changelog ++++++ glob-4.5.3.tgz -> glob-5.0.13.tgz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/package/README.md new/package/README.md --- old/package/README.md 2015-03-13 06:32:15.000000000 +0100 +++ new/package/README.md 2015-06-19 00:23:47.000000000 +0200 @@ -79,7 +79,8 @@ The intent for negation would be for a pattern starting with `!` to match everything that *doesn't* match the supplied pattern. However, the implementation is weird, and for the time being, this should be -avoided. The behavior will change or be deprecated in version 5. +avoided. The behavior is deprecated in version 5, and will be removed +entirely in version 6. ### Empty Sets @@ -159,8 +160,6 @@ * `aborted` Boolean which is set to true when calling `abort()`. There is no way at this time to continue a glob search after aborting, but you can re-use the statCache to avoid having to duplicate syscalls. -* `statCache` Collection of all the stat results the glob search - performed. * `cache` Convenience object. Each field has the following possible values: * `false` - Path does not exist @@ -263,9 +262,6 @@ * `matchBase` Perform a basename-only match if the pattern does not contain any slash characters. That is, `*.js` would be treated as equivalent to `**/*.js`, matching all js files in all directories. -* `nonegate` Suppress `negate` behavior. (See below.) -* `nocomment` Suppress `comment` behavior. (See below.) -* `nonull` Return the pattern when no matches are found. * `nodir` Do not match directories, only files. (Note: to match *only* directories, simply put a `/` at the end of the pattern.) * `ignore` Add a pattern or an array of patterns to exclude matches. @@ -276,6 +272,10 @@ In the case of a symlink that cannot be resolved, the full absolute path to the matched entry is returned (though it will usually be a broken symlink) +* `nonegate` Suppress deprecated `negate` behavior. (See below.) + Default=true +* `nocomment` Suppress deprecated `comment` behavior. (See below.) + Default=true ## Comparisons to other fnmatch/glob implementations @@ -283,17 +283,6 @@ goal, some discrepancies exist between node-glob and other implementations, and are intentional. -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - The double-star character `**` is supported by default, unless the `noglobstar` flag is set. This is supported in the manner of bsdglob and bash 4.3, where `**` only has special significance if it is the only @@ -317,6 +306,25 @@ **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are checked for validity. Since those two are valid, matching proceeds. +### Comments and Negation + +**Note**: In version 5 of this module, negation and comments are +**disabled** by default. You can explicitly set `nonegate:false` or +`nocomment:false` to re-enable them. They are going away entirely in +version 6. + +The intent for negation would be for a pattern starting with `!` to +match everything that *doesn't* match the supplied pattern. However, +the implementation is weird. It is better to use the `ignore` option +to set a pattern or set of patterns to exclude from matches. If you +want the "everything except *x*" type of behavior, you can use `**` as +the main pattern, and set an `ignore` for the things to exclude. + +The comments feature is added in minimatch, primarily to more easily +support use cases like ignore files, where a `#` at the start of a +line makes the pattern "empty". However, in the context of a +straightforward filesystem globber, "comments" don't make much sense. + ## Windows **Please only use forward-slashes in glob expressions.** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/package/common.js new/package/common.js --- old/package/common.js 2015-03-13 06:53:09.000000000 +0100 +++ new/package/common.js 2015-05-21 18:44:39.000000000 +0200 @@ -1,6 +1,5 @@ exports.alphasort = alphasort exports.alphasorti = alphasorti -exports.isAbsolute = process.platform === "win32" ? absWin : absUnix exports.setopts = setopts exports.ownProp = ownProp exports.makeAbs = makeAbs @@ -15,26 +14,9 @@ var path = require("path") var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") var Minimatch = minimatch.Minimatch -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ - var result = splitDeviceRe.exec(p) - var device = result[1] || '' - var isUnc = device && device.charAt(1) !== ':' - var isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} - function alphasorti (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()) } @@ -58,11 +40,11 @@ var gmatcher = null if (pattern.slice(-3) === '/**') { var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { nonegate: true }) + gmatcher = new Minimatch(gpattern) } return { - matcher: new Minimatch(pattern, { nonegate: true }), + matcher: new Minimatch(pattern), gmatcher: gmatcher } } @@ -79,6 +61,7 @@ pattern = "**/" + pattern } + self.silent = !!options.silent self.pattern = pattern self.strict = options.strict !== false self.realpath = !!options.realpath @@ -120,10 +103,35 @@ self.nomount = !!options.nomount + // disable comments and negation unless the user explicitly + // passes in false as the option. + options.nonegate = options.nonegate === false ? false : true + options.nocomment = options.nocomment === false ? false : true + deprecationWarning(options) + self.minimatch = new Minimatch(pattern, options) self.options = self.minimatch.options } +// TODO(isaacs): remove entirely in v6 +// exported to reset in tests +exports.deprecationWarned +function deprecationWarning(options) { + if (!options.nonegate || !options.nocomment) { + if (process.noDeprecation !== true && !exports.deprecationWarned) { + var msg = 'glob WARNING: comments and negation will be disabled in v6' + if (process.throwDeprecation) + throw new Error(msg) + else if (process.traceDeprecation) + console.trace(msg) + else + console.error(msg) + + exports.deprecationWarned = true + } + } +} + function finish (self) { var nou = self.nounique var all = nou ? [] : Object.create(null) @@ -205,11 +213,11 @@ var abs = f if (f.charAt(0) === '/') { abs = path.join(self.root, f) - } else if (exports.isAbsolute(f)) { + } else if (isAbsolute(f) || f === '') { abs = f } else if (self.changedCwd) { abs = path.resolve(self.cwd, f) - } else if (self.realpath) { + } else { abs = path.resolve(f) } return abs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/package/glob.js new/package/glob.js --- old/package/glob.js 2015-03-13 07:05:23.000000000 +0100 +++ new/package/glob.js 2015-07-02 22:23:54.000000000 +0200 @@ -47,16 +47,17 @@ var EE = require('events').EventEmitter var path = require('path') var assert = require('assert') +var isAbsolute = require('path-is-absolute') var globSync = require('./sync.js') var common = require('./common.js') var alphasort = common.alphasort var alphasorti = common.alphasorti -var isAbsolute = common.isAbsolute var setopts = common.setopts var ownProp = common.ownProp var inflight = require('inflight') var util = require('util') var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored var once = require('once') @@ -432,6 +433,9 @@ if (this.matches[index][e]) return + if (isIgnored(this, e)) + return + if (this.paused) { this._emitQueue.push([index, e]) return @@ -565,10 +569,17 @@ default: // some unusual error. Treat as failure. this.cache[this._makeAbs(f)] = false - if (this.strict) return this.emit('error', er) - if (!this.silent) console.error('glob error', er) + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) break } + return cb() } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/package/package.json new/package/package.json --- old/package/package.json 2015-03-13 07:07:19.000000000 +0100 +++ new/package/package.json 2015-07-02 23:29:10.000000000 +0200 @@ -2,7 +2,7 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "name": "glob", "description": "a little globber", - "version": "4.5.3", + "version": "5.0.13", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" @@ -20,18 +20,19 @@ "inflight": "^1.0.4", "inherits": "2", "minimatch": "^2.0.1", - "once": "^1.3.0" + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "devDependencies": { "mkdirp": "0", "rimraf": "^2.2.8", - "tap": "^0.5.0", + "tap": "^1.1.4", "tick": "0.0.6" }, "scripts": { "prepublish": "npm run benchclean", "profclean": "rm -f v8.log profile.txt", - "test": "npm run profclean && tap test/*.js", + "test": "tap test/*.js --cov", "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", "bench": "bash benchmark.sh", "prof": "bash prof.sh && cat profile.txt", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/package/sync.js new/package/sync.js --- old/package/sync.js 2015-03-13 06:58:12.000000000 +0100 +++ new/package/sync.js 2015-05-21 18:44:38.000000000 +0200 @@ -8,10 +8,10 @@ var util = require('util') var path = require('path') var assert = require('assert') +var isAbsolute = require('path-is-absolute') var common = require('./common.js') var alphasort = common.alphasort var alphasorti = common.alphasorti -var isAbsolute = common.isAbsolute var setopts = common.setopts var ownProp = common.ownProp var childrenIgnored = common.childrenIgnored @@ -316,8 +316,10 @@ default: // some unusual error. Treat as failure. this.cache[this._makeAbs(f)] = false - if (this.strict) throw er - if (!this.silent) console.error('glob error', er) + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) break } }