[Pkg-javascript-commits] [node-brace-expansion] 01/05: New upstream version 1.1.8

Sruthi Chandran srud-guest at moszumanska.debian.org
Tue Jun 27 19:22:54 UTC 2017


This is an automated email from the git hooks/post-receive script.

srud-guest pushed a commit to branch master
in repository node-brace-expansion.

commit e6b355dd3430f9725e2a493bf2061203b9e1f2c6
Author: Sruthi <srud at disroot.org>
Date:   Wed Jun 28 00:44:05 2017 +0530

    New upstream version 1.1.8
---
 .travis.yml        |  3 ++-
 README.md          |  1 +
 index.js           |  2 +-
 package.json       |  8 +++++---
 test/perf/bench.js | 11 +++++++++++
 5 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index ecd4193..7a46988 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,7 @@
+sudo: false
 language: node_js
 node_js:
-  - "0.10"
   - "0.12"
   - "4"
   - "6"
+  - "7"
diff --git a/README.md b/README.md
index 1793929..ed2ec1f 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,7 @@ as known from sh/bash, in JavaScript.
 
 [![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
 [![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
+[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
 
 [![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
 
diff --git a/index.js b/index.js
index 955f27c..0478be8 100644
--- a/index.js
+++ b/index.js
@@ -106,7 +106,7 @@ function expand(str, isTop) {
   var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
   var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
   var isSequence = isNumericSequence || isAlphaSequence;
-  var isOptions = /^(.*,)+(.+)?$/.test(m.body);
+  var isOptions = m.body.indexOf(',') >= 0;
   if (!isSequence && !isOptions) {
     // {a},b}
     if (m.post.match(/,.*\}/)) {
diff --git a/package.json b/package.json
index 0ce5829..66f952a 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "brace-expansion",
   "description": "Brace expansion as known from sh/bash",
-  "version": "1.1.6",
+  "version": "1.1.8",
   "repository": {
     "type": "git",
     "url": "git://github.com/juliangruber/brace-expansion.git"
@@ -10,13 +10,15 @@
   "main": "index.js",
   "scripts": {
     "test": "tape test/*.js",
-    "gentest": "bash test/generate.sh"
+    "gentest": "bash test/generate.sh",
+    "bench": "matcha test/perf/bench.js"
   },
   "dependencies": {
-    "balanced-match": "^0.4.1",
+    "balanced-match": "^1.0.0",
     "concat-map": "0.0.1"
   },
   "devDependencies": {
+    "matcha": "^0.7.0",
     "tape": "^4.6.0"
   },
   "keywords": [],
diff --git a/test/perf/bench.js b/test/perf/bench.js
new file mode 100644
index 0000000..f8f74f9
--- /dev/null
+++ b/test/perf/bench.js
@@ -0,0 +1,11 @@
+'use strict';
+var expand = require('../../');
+var fs = require('fs');
+var resfile = __dirname + '/../cases.txt';
+var cases = fs.readFileSync(resfile, 'utf8').split('\n');
+
+bench('Average', function() {
+  cases.forEach(function(testcase) {
+    expand(testcase);
+  });
+});

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-brace-expansion.git



More information about the Pkg-javascript-commits mailing list