Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386322 )

Change subject: Bump src/ to 8e99708a + upgrade domino
......................................................................

Bump src/ to 8e99708a + upgrade domino

Change-Id: Ie1e5b5c6faccec6630edcf962cb9300421d86478
---
D node_modules/domino/.npmignore
M node_modules/domino/.travis.yml
M node_modules/domino/CHANGELOG.md
M node_modules/domino/lib/Node.js
M node_modules/domino/lib/URLUtils.js
M node_modules/domino/lib/htmlelts.js
M node_modules/domino/package.json
D node_modules/domino/test/.npmignore
A node_modules/domino/tools/bump-version.js
A node_modules/domino/tools/update-changelog.js
M src
11 files changed, 93 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/22/386322/1

diff --git a/node_modules/domino/.npmignore b/node_modules/domino/.npmignore
deleted file mode 100644
index dd9d743..0000000
--- a/node_modules/domino/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-node_modules
-npm-debug.log
-v8.log
diff --git a/node_modules/domino/.travis.yml b/node_modules/domino/.travis.yml
index 9563d77..b4fa8e8 100644
--- a/node_modules/domino/.travis.yml
+++ b/node_modules/domino/.travis.yml
@@ -3,7 +3,12 @@
   - 0.8
   - 0.10
   - 0.12
-  - "stable"
+  - "4"
+  - "6"
+  - "8"
+  # From the nvm docs, "this installs the latest version of node".
+  - "node"
+
 before_install:
   - NODE_VERSION=$(node -e 'console.log(process.version.replace(/[.][0-9]+$/, 
""))')
   - if [ "v0.8" = "$NODE_VERSION" ]; then npm install -g npm@2.7.3 ; fi
diff --git a/node_modules/domino/CHANGELOG.md b/node_modules/domino/CHANGELOG.md
index bacc645..5892cc8 100644
--- a/node_modules/domino/CHANGELOG.md
+++ b/node_modules/domino/CHANGELOG.md
@@ -1,3 +1,8 @@
+# domino 1.0.30 (24 Oct 2017)
+* Fix regexp capitalization in URLUtils (#101)
+* Fix O(N^2) slowdown in initial tree traversal using nextSibling/prevSibling
+* Update `mocha` dependency to 4.0.x and `should` to 13.1.x.
+
 # domino 1.0.29 ( 7 Aug 2017)
 * Fix "#id" optimization in querySelectorAll() when 0 or 2 matches for
   `id`. (#99)
diff --git a/node_modules/domino/lib/Node.js b/node_modules/domino/lib/Node.js
index 18c4ae4..e25543f 100644
--- a/node_modules/domino/lib/Node.js
+++ b/node_modules/domino/lib/Node.js
@@ -484,8 +484,13 @@
     utils.assert(this.parentNode);
     var kids = this.parentNode.childNodes;
     if (this._index === undefined || kids[this._index] !== this) {
-      this._index = kids.indexOf(this);
-      utils.assert(this._index !== -1);
+      // Ensure that we don't have an O(N^2) blowup if none of the
+      // kids have defined indices yet and we're traversing via
+      // nextSibling or prevSibling
+      for (var i=0; i<kids.length; i++) {
+        kids[i]._index = i;
+      }
+      utils.assert(kids[this._index] === this);
     }
     return this._index;
   }},
diff --git a/node_modules/domino/lib/URLUtils.js 
b/node_modules/domino/lib/URLUtils.js
index 323d93e..770ce8d 100644
--- a/node_modules/domino/lib/URLUtils.js
+++ b/node_modules/domino/lib/URLUtils.js
@@ -115,7 +115,7 @@
     var url = new URL(output);
     if (url.isAbsolute()) {
       v = v.replace(/:+$/, "");
-      v = v.replace(/[^-+\.a-zA-z0-9]/g, URL.percentEncode);
+      v = v.replace(/[^-+\.a-zA-Z0-9]/g, URL.percentEncode);
       if (v.length > 0) {
         url.scheme = v;
         output = url.toString();
@@ -128,7 +128,7 @@
     var output = this.href;
     var url = new URL(output);
     if (url.isAbsolute() && url.isAuthorityBased()) {
-      v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-z0-9]/g, URL.percentEncode);
+      v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g, URL.percentEncode);
       if (v.length > 0) {
         url.host = v;
         delete url.port;
@@ -143,7 +143,7 @@
     var url = new URL(output);
     if (url.isAbsolute() && url.isAuthorityBased()) {
       v = v.replace(/^\/+/, "");
-      v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-z0-9]/g, URL.percentEncode);
+      v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g, URL.percentEncode);
       if (v.length > 0) {
         url.host = v;
         output = url.toString();
@@ -174,7 +174,7 @@
     if (url.isAbsolute() && url.isHierarchical()) {
       if (v.charAt(0) !== "/")
         v = "/" + v;
-      v = v.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-z0-9]/g, URL.percentEncode);
+      v = v.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-Z0-9]/g, URL.percentEncode);
       url.path = v;
       output = url.toString();
     }
@@ -186,7 +186,7 @@
     var url = new URL(output);
     if (url.isAbsolute() && url.isHierarchical()) {
       if (v.charAt(0) === "?") v = v.substring(1);
-      v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-z0-9]/g, URL.percentEncode);
+      v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g, URL.percentEncode);
       url.query = v;
       output = url.toString();
     }
@@ -198,7 +198,7 @@
     var url = new URL(output);
     if (url.isAbsolute()) {
       if (v.charAt(0) === "#") v = v.substring(1);
-      v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-z0-9]/g, URL.percentEncode);
+      v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g, URL.percentEncode);
       url.fragment = v;
       output = url.toString();
     }
diff --git a/node_modules/domino/lib/htmlelts.js 
b/node_modules/domino/lib/htmlelts.js
index b4ff0ad..d499b5e 100644
--- a/node_modules/domino/lib/htmlelts.js
+++ b/node_modules/domino/lib/htmlelts.js
@@ -65,6 +65,11 @@
   "SELECT":true, "TEXTAREA":true, "COMMAND":true
 };
 
+var HTMLFormElement = function(doc, localName, prefix) {
+  HTMLElement.call(this, doc, localName, prefix);
+  this._form = null; // Prevent later deoptimization
+};
+
 var HTMLElement = exports.HTMLElement = define({
   superclass: Element,
   ctor: function HTMLElement(doc, localName, prefix) {
@@ -321,7 +326,7 @@
 define({
   tag: 'button',
   ctor: function HTMLButtonElement(doc, localName, prefix) {
-    HTMLElement.call(this, doc, localName, prefix);
+    HTMLFormElement.call(this, doc, localName, prefix);
   },
   props: formAssociatedProps,
   attributes: {
@@ -405,7 +410,7 @@
 define({
   tag: 'fieldset',
   ctor: function HTMLFieldSetElement(doc, localName, prefix) {
-    HTMLElement.call(this, doc, localName, prefix);
+    HTMLFormElement.call(this, doc, localName, prefix);
   },
   props: formAssociatedProps,
   attributes: {
@@ -543,7 +548,7 @@
 define({
   tag: 'input',
   ctor: function HTMLInputElement(doc, localName, prefix) {
-    HTMLElement.call(this, doc, localName, prefix);
+    HTMLFormElement.call(this, doc, localName, prefix);
   },
   props: {
     form: formAssociatedProps.form,
@@ -603,7 +608,7 @@
 define({
   tag: 'keygen',
   ctor: function HTMLKeygenElement(doc, localName, prefix) {
-    HTMLElement.call(this, doc, localName, prefix);
+    HTMLFormElement.call(this, doc, localName, prefix);
   },
   props: formAssociatedProps,
   attributes: {
@@ -630,7 +635,7 @@
 define({
   tag: 'label',
   ctor: function HTMLLabelElement(doc, localName, prefix) {
-    HTMLElement.call(this, doc, localName, prefix);
+    HTMLFormElement.call(this, doc, localName, prefix);
   },
   props: formAssociatedProps,
   attributes: {
@@ -714,7 +719,7 @@
 define({
   tag: 'meter',
   ctor: function HTMLMeterElement(doc, localName, prefix) {
-    HTMLElement.call(this, doc, localName, prefix);
+    HTMLFormElement.call(this, doc, localName, prefix);
   },
   props: formAssociatedProps
 });
@@ -769,7 +774,7 @@
 define({
   tag: 'object',
   ctor: function HTMLObjectElement(doc, localName, prefix) {
-    HTMLElement.call(this, doc, localName, prefix);
+    HTMLFormElement.call(this, doc, localName, prefix);
   },
   props: formAssociatedProps,
   attributes: {
@@ -830,7 +835,7 @@
 define({
   tag: 'output',
   ctor: function HTMLOutputElement(doc, localName, prefix) {
-    HTMLElement.call(this, doc, localName, prefix);
+    HTMLFormElement.call(this, doc, localName, prefix);
   },
   props: formAssociatedProps,
   attributes: {
@@ -878,7 +883,7 @@
 define({
   tag: 'progress',
   ctor: function HTMLProgressElement(doc, localName, prefix) {
-    HTMLElement.call(this, doc, localName, prefix);
+    HTMLFormElement.call(this, doc, localName, prefix);
   },
   props: formAssociatedProps,
   attributes: {
@@ -935,7 +940,7 @@
 define({
   tag: 'select',
   ctor: function HTMLSelectElement(doc, localName, prefix) {
-    HTMLElement.call(this, doc, localName, prefix);
+    HTMLFormElement.call(this, doc, localName, prefix);
   },
   props: {
     form: formAssociatedProps.form,
@@ -1113,7 +1118,7 @@
 define({
   tag: 'textarea',
   ctor: function HTMLTextAreaElement(doc, localName, prefix) {
-    HTMLElement.call(this, doc, localName, prefix);
+    HTMLFormElement.call(this, doc, localName, prefix);
   },
   props: formAssociatedProps,
   attributes: {
diff --git a/node_modules/domino/package.json b/node_modules/domino/package.json
index 07fe120..a917cdf 100644
--- a/node_modules/domino/package.json
+++ b/node_modules/domino/package.json
@@ -2,38 +2,38 @@
   "_args": [
     [
       {
-        "raw": "domino@https://registry.npmjs.org/domino/-/domino-1.0.29.tgz";,
+        "raw": "domino@https://registry.npmjs.org/domino/-/domino-1.0.30.tgz";,
         "scope": null,
         "escapedName": "domino",
         "name": "domino",
-        "rawSpec": "https://registry.npmjs.org/domino/-/domino-1.0.29.tgz";,
-        "spec": "https://registry.npmjs.org/domino/-/domino-1.0.29.tgz";,
+        "rawSpec": "https://registry.npmjs.org/domino/-/domino-1.0.30.tgz";,
+        "spec": "https://registry.npmjs.org/domino/-/domino-1.0.30.tgz";,
         "type": "remote"
       },
       "/Users/arlolra/Work/Wikimedia/services/deploy"
     ]
   ],
-  "_from": "domino@1.0.29",
-  "_id": "domino@1.0.29",
+  "_from": "domino@1.0.30",
+  "_id": "domino@1.0.30",
   "_inCache": true,
   "_location": "/domino",
   "_phantomChildren": {},
   "_requested": {
-    "raw": "domino@https://registry.npmjs.org/domino/-/domino-1.0.29.tgz";,
+    "raw": "domino@https://registry.npmjs.org/domino/-/domino-1.0.30.tgz";,
     "scope": null,
     "escapedName": "domino",
     "name": "domino",
-    "rawSpec": "https://registry.npmjs.org/domino/-/domino-1.0.29.tgz";,
-    "spec": "https://registry.npmjs.org/domino/-/domino-1.0.29.tgz";,
+    "rawSpec": "https://registry.npmjs.org/domino/-/domino-1.0.30.tgz";,
+    "spec": "https://registry.npmjs.org/domino/-/domino-1.0.30.tgz";,
     "type": "remote"
   },
   "_requiredBy": [
     "/"
   ],
-  "_resolved": "https://registry.npmjs.org/domino/-/domino-1.0.29.tgz";,
-  "_shasum": "de8aa1f6f98e3c5538feb7a61fa69c1eabbace06",
+  "_resolved": "https://registry.npmjs.org/domino/-/domino-1.0.30.tgz";,
+  "_shasum": "54a4154ecae968616680f8feba3cedff355c71f4",
   "_shrinkwrap": null,
-  "_spec": "domino@https://registry.npmjs.org/domino/-/domino-1.0.29.tgz";,
+  "_spec": "domino@https://registry.npmjs.org/domino/-/domino-1.0.30.tgz";,
   "_where": "/Users/arlolra/Work/Wikimedia/services/deploy",
   "author": {
     "name": "Felix Gnass",
@@ -46,8 +46,8 @@
   "description": "Server-side DOM implementation based on Mozilla's dom.js",
   "devDependencies": {
     "jshint": "^2.9.1",
-    "mocha": "^3.2.0",
-    "should": "^11.1.2"
+    "mocha": "^3.5.3",
+    "should": "^13.1.2"
   },
   "homepage": "https://github.com/fgnass/domino";,
   "main": "./lib",
@@ -60,12 +60,14 @@
     "url": "git+https://github.com/fgnass/domino.git";
   },
   "scripts": {
+    "bump-version": "npm version patch -m 'Release domino %s.' && 
tools/bump-version.js && npm run version && git add package.json && git commit 
-m 'Bump version after release.'",
     "lint": "jshint lib test/*.js",
     "mocha": "mocha",
     "mocha-spec": "mocha -R spec",
     "regen-html5lib-tests": "node test/tools/update-html5lib-tests.js 
test/html5lib-tests.json",
     "test": "npm run lint && npm run mocha",
-    "test-spec": "npm run lint && npm run mocha-spec"
+    "test-spec": "npm run lint && npm run mocha-spec",
+    "version": "tools/update-changelog.js && git add CHANGELOG.md"
   },
-  "version": "1.0.29"
+  "version": "1.0.30"
 }
diff --git a/node_modules/domino/test/.npmignore 
b/node_modules/domino/test/.npmignore
deleted file mode 100644
index 6adaa8a..0000000
--- a/node_modules/domino/test/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-html5lib-tests
-web-platform-tests
diff --git a/node_modules/domino/tools/bump-version.js 
b/node_modules/domino/tools/bump-version.js
new file mode 100755
index 0000000..5e4b477
--- /dev/null
+++ b/node_modules/domino/tools/bump-version.js
@@ -0,0 +1,10 @@
+#!/usr/bin/node
+var fs = require('fs');
+var path = require('path');
+var PACKAGEPATH = path.join(__dirname, '..', 'package.json');
+
+var package = require(PACKAGEPATH);
+if (!/\+git$/.test(package.version)) {
+    package.version += '+git';
+    fs.writeFileSync(PACKAGEPATH, JSON.stringify(package, null, 2)+'\n', 
'utf8');
+}
diff --git a/node_modules/domino/tools/update-changelog.js 
b/node_modules/domino/tools/update-changelog.js
new file mode 100755
index 0000000..6efb773
--- /dev/null
+++ b/node_modules/domino/tools/update-changelog.js
@@ -0,0 +1,25 @@
+#!/usr/bin/node
+var fs = require('fs');
+var path = require('path');
+var version = require('../package.json').version;
+
+var CHANGELOG_PATH = path.join(__dirname, '..', 'CHANGELOG.md');
+
+var changelog = fs.readFileSync(CHANGELOG_PATH, 'utf8');
+
+
+if (/\+git$/.test(version)) {
+    changelog = '# domino x.x.x (not yet released)\n\n' + changelog;
+} else {
+    changelog = changelog.replace(/^# domino x\.x\.x.*$/m, function() {
+        var today = new Date();
+        var fmt = new Intl.DateTimeFormat('en-GB', {
+            day: 'numeric',
+            month: 'short',
+            year: 'numeric',
+        }).format(today);
+        return '# domino ' + version + ' (' + fmt + ')';
+    });
+}
+
+fs.writeFileSync(CHANGELOG_PATH, changelog, 'utf8');
diff --git a/src b/src
index a3be9cf..8e99708 160000
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit a3be9cfcf0762687764cfdbacd91ded56ead288c
+Subproject commit 8e99708a3c00f4ce287ea05d61c37dfef1722640

-- 
To view, visit https://gerrit.wikimedia.org/r/386322
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1e5b5c6faccec6630edcf962cb9300421d86478
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Arlolra <abrea...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to