[Pkg-javascript-commits] [node-regenerate] 02/05: New upstream version 1.3.2
Julien Puydt
julien.puydt at laposte.net
Wed Nov 16 09:16:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
jpuydt-guest pushed a commit to branch master
in repository node-regenerate.
commit dbbe805b3cf6ea7d1c3acf5a14a77dfe34c7b69c
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Wed Nov 16 10:10:08 2016 +0100
New upstream version 1.3.2
---
.editorconfig | 12 ++++++++++
.travis.yml | 6 +++--
Gruntfile.js | 13 ++---------
README.md | 10 ++++-----
bower.json | 2 +-
component.json | 2 +-
package.json | 71 +++++++++++++++++++++++++++++-----------------------------
regenerate.js | 12 ++--------
8 files changed, 62 insertions(+), 66 deletions(-)
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..dbd9e6b
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,12 @@
+root = true
+
+[*]
+charset = utf-8
+indent_style = tab
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[{README.md,package.json,.travis.yml}]
+indent_style = space
+indent_size = 2
diff --git a/.travis.yml b/.travis.yml
index b8bcdab..0448ce9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,6 +19,8 @@ before_script:
# If the enviroment stores rt.jar in a different directory, find it and symlink the directory
- "PREFIX=/usr/lib/jvm; if [ ! -d $PREFIX/java-6-openjdk ]; then for d in $PREFIX/java-6-openjdk-*; do if [ -e $d/jre/lib/rt.jar ]; then sudo ln -s $d $PREFIX/java-6-openjdk; break; fi; done; fi"
script:
- - "grunt ci"
+ - 'grunt ci'
after_script:
- - "grunt shell:cover-coveralls"
+ - 'if [ "${TRAVIS_NODE_VERSION}" = "6" ]; then
+ istanbul cover --verbose --dir coverage tests/tests.js && codecov;
+ fi'
diff --git a/Gruntfile.js b/Gruntfile.js
index 17af026..c2ae480 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -7,12 +7,6 @@ module.exports = function(grunt) {
'stderr': true,
'failOnError': true
},
- 'cover-html': {
- 'command': 'istanbul cover --report "html" --verbose --dir "coverage" "tests/tests.js"'
- },
- 'cover-coveralls': {
- 'command': 'istanbul cover --verbose --dir "coverage" "tests/tests.js" && coveralls < coverage/lcov.info; rm -rf -- coverage/lcov*'
- },
'test-narwhal': {
'command': 'echo "Testing in Narwhal..."; export NARWHAL_OPTIMIZATION=-1; narwhal "tests/tests.js"'
},
@@ -41,14 +35,12 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-shell');
- grunt.registerTask('cover', 'shell:cover-html');
grunt.registerTask('ci', [
'shell:test-narwhal',
'shell:test-phantomjs',
'shell:test-rhino',
'shell:test-ringo',
- 'shell:test-node',
- 'shell:cover-html'
+ 'shell:test-node'
]);
grunt.registerTask('test', [
'ci',
@@ -56,8 +48,7 @@ module.exports = function(grunt) {
]);
grunt.registerTask('default', [
- 'shell:test-node',
- 'cover'
+ 'shell:test-node'
]);
};
diff --git a/README.md b/README.md
index d194cab..c4d5e3e 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,6 @@
-# Regenerate [![Build status](https://travis-ci.org/mathiasbynens/regenerate.svg?branch=master)](https://travis-ci.org/mathiasbynens/regenerate) [![Code coverage status](https://coveralls.io/repos/mathiasbynens/regenerate/badge.svg)](https://coveralls.io/r/mathiasbynens/regenerate) [![Dependency status](https://gemnasium.com/mathiasbynens/regenerate.svg)](https://gemnasium.com/mathiasbynens/regenerate)
+# Regenerate [![Build status](https://travis-ci.org/mathiasbynens/regenerate.svg?branch=master)](https://travis-ci.org/mathiasbynens/regenerate) [![Code coverage status](https://img.shields.io/codecov/c/github/mathiasbynens/regenerate.svg)](https://codecov.io/gh/mathiasbynens/regenerate) [![Dependency status](https://gemnasium.com/mathiasbynens/regenerate.svg)](https://gemnasium.com/mathiasbynens/regenerate)
-_Regenerate_ is a Unicode-aware regex generator for JavaScript. It allows you to easily generate JavaScript-compatible regular expressions based on a given set of Unicode symbols or code points. (This is trickier than you might think, because of [how JavaScript deals with astral symbols](https://mathiasbynens.be/notes/javascript-unicode).)
-
-Feel free to fork if you see possible improvements!
+_Regenerate_ is a Unicode-aware regex generator for JavaScript. It allows you to easily generate ES5-compatible regular expressions based on a given set of Unicode symbols or code points. (This is trickier than you might think, because of [how JavaScript deals with astral symbols](https://mathiasbynens.be/notes/javascript-unicode).)
## Installation
@@ -316,10 +314,10 @@ var regenerate = require('regenerate');
var string = 'Lorem ipsum dolor sit amet.';
// Get an array of all symbols used in the string:
-var codePoints = Array.from(string);
+var symbols = Array.from(string);
// Generate a regular expression that matches any of the symbols used in the string:
-regenerate(codePoints).toString();
+regenerate(symbols).toString();
// → '[ \\.Ladeilmopr-u]'
```
diff --git a/bower.json b/bower.json
index ac8efc8..c28771f 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "regenerate",
- "version": "1.3.1",
+ "version": "1.3.2",
"main": "regenerate.js",
"ignore": [
"coverage",
diff --git a/component.json b/component.json
index d076359..c0f8095 100644
--- a/component.json
+++ b/component.json
@@ -1,6 +1,6 @@
{
"name": "regenerate",
- "version": "1.3.1",
+ "version": "1.3.2",
"description": "Generate JavaScript-compatible regular expressions based on a given set of Unicode symbols or code points.",
"repo": "mathiasbynens/regenerate",
"license": "MIT",
diff --git a/package.json b/package.json
index 52c6c28..95c0b03 100644
--- a/package.json
+++ b/package.json
@@ -1,37 +1,38 @@
{
- "name": "regenerate",
- "version": "1.3.1",
- "description": "Generate JavaScript-compatible regular expressions based on a given set of Unicode symbols or code points.",
- "homepage": "https://mths.be/regenerate",
- "main": "regenerate.js",
- "keywords": [
- "regex",
- "regexp",
- "javascript",
- "unicode",
- "generator",
- "tool"
- ],
- "license": "MIT",
- "author": {
- "name": "Mathias Bynens",
- "url": "https://mathiasbynens.be/"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/mathiasbynens/regenerate.git"
- },
- "bugs": "https://github.com/mathiasbynens/regenerate/issues",
- "scripts": {
- "test": "node tests/tests.js"
- },
- "devDependencies": {
- "coveralls": "^2.11.2",
- "grunt": "^0.4.5",
- "grunt-shell": "^1.1.1",
- "istanbul": "^0.3.2",
- "qunit-extras": "^1.1.0",
- "qunitjs": "~1.11.0",
- "requirejs": "^2.1.15"
- }
+ "name": "regenerate",
+ "version": "1.3.2",
+ "description": "Generate JavaScript-compatible regular expressions based on a given set of Unicode symbols or code points.",
+ "homepage": "https://mths.be/regenerate",
+ "main": "regenerate.js",
+ "keywords": [
+ "regex",
+ "regexp",
+ "javascript",
+ "unicode",
+ "generator",
+ "tool"
+ ],
+ "license": "MIT",
+ "author": {
+ "name": "Mathias Bynens",
+ "url": "https://mathiasbynens.be/"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mathiasbynens/regenerate.git"
+ },
+ "bugs": "https://github.com/mathiasbynens/regenerate/issues",
+ "scripts": {
+ "cover": "istanbul cover --report html --verbose --dir coverage tests/tests.js",
+ "test": "node tests/tests.js"
+ },
+ "devDependencies": {
+ "codecov": "^1.0.1",
+ "grunt": "^0.4.5",
+ "grunt-shell": "^1.1.1",
+ "istanbul": "^0.4.3",
+ "qunit-extras": "^1.1.0",
+ "qunitjs": "~1.11.0",
+ "requirejs": "^2.1.15"
+ }
}
diff --git a/regenerate.js b/regenerate.js
index 9b0b5be..2393988 100644
--- a/regenerate.js
+++ b/regenerate.js
@@ -1,4 +1,4 @@
-/*! https://mths.be/regenerate v1.3.1 by @mathias | MIT license */
+/*! https://mths.be/regenerate v1.3.2 by @mathias | MIT license */
;(function(root) {
// Detect free variables `exports`.
@@ -893,14 +893,10 @@
var end;
var startHigh;
var startLow;
- var prevStartHigh = 0;
- var prevEndHigh = 0;
- var tmpLow = [];
var endHigh;
var endLow;
var surrogateMappings = [];
var length = data.length;
- var dataHigh = [];
while (index < length) {
start = data[index];
end = data[index + 1] - 1;
@@ -958,9 +954,6 @@
]);
}
- prevStartHigh = startHigh;
- prevEndHigh = endHigh;
-
index += 2;
}
@@ -1001,7 +994,6 @@
var loneLowSurrogates = parts.loneLowSurrogates;
var bmp = parts.bmp;
var astral = parts.astral;
- var hasAstral = !dataIsEmpty(parts.astral);
var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates);
var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates);
@@ -1060,7 +1052,7 @@
return (new regenerate).add(value);
};
- regenerate.version = '1.3.1';
+ regenerate.version = '1.3.2';
var proto = regenerate.prototype;
extend(proto, {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-regenerate.git
More information about the Pkg-javascript-commits
mailing list